08 Jun, 2009

27 commits

  • Change the name of the Kernel CAPI exported function capi_ctr_reseted()
    to something representing its purpose better.

    Impact: renaming, no functional change
    Signed-off-by: Tilman Schmidt
    Signed-off-by: David S. Miller

    Tilman Schmidt
     
  • It is possible for tun_chr_close to race with dellink on the
    a tun device. In which case if __tun_get runs before dellink
    but dellink runs before tun_chr_close calls unregister_netdevice
    we will attempt to unregister the netdevice after it is already
    gone.

    The two cases are already serialized on the rtnl_lock, so I have
    gone for the cheap simple fix of moving rtnl_lock to cover __tun_get
    in tun_chr_close. Eliminating the possibility of the tun device
    being unregistered between __tun_get and unregister_netdevice in
    tun_chr_close.

    Signed-off-by: Eric W. Biederman
    Tested-by: David Woodhouse
    Signed-off-by: David S. Miller

    Eric W. Biederman
     
  • BUG_ON(!test_bit(NAPI_STATE_SCHED, &n->state)) was being hit
    during e100 EEH recovery. The problem source was a napi_enable
    call being made during e100_io_error_detected. Napi should remain
    disabled after e100_down, and only be reenabled when the interface
    is recovered.

    This patch also updates e100_io_error_detected in order to make
    it similar to the current versions of the error_detected callback
    in drivers such as e1000e and ixgbe.

    Signed-off-by: Andre Detsch
    Signed-off-by: David S. Miller

    Andre Detsch
     
  • vfree() does its own 'NULL' check, so no need for check before
    calling it.

    Signed-off-by: Figo.zhang
    Signed-off-by: David S. Miller

    Figo.zhang
     
  • If mlx4_create_eq() would fail for one of EQ's assigned for
    completion handling, the code would try to free the same EQ
    we failed to create.
    The crash was found by Christoph Lameter

    Signed-off-by: Yevgeny Petrilin
    Signed-off-by: David S. Miller

    Yevgeny Petrilin
     
  • Use the right structure while incrementing the offset in tun_get_user.

    Signed-off-by: Sridhar Samudrala
    Acked-by: Michael S. Tsirkin
    Signed-off-by: David S. Miller

    Sridhar Samudrala
     
  • Increment the iovec base by the offset passed in for the initial
    copy_to_user() in memcpy_to_iovecend().

    Signed-off-by: Sridhar Samudrala
    Acked-by: Michael S. Tsirkin
    Signed-off-by: David S. Miller

    Sridhar Samudrala
     
  • I am working on enabling UFO between KVM guests using virtio-net and i have
    some patches that i got working with 2.6.30-rc8. When i wanted to try them
    with net-next-2.6, i noticed that virtio-net is not working with that tree.

    After some debugging, it turned out to be several bugs in the recent patches
    to fix aio with tun driver, specifically the following 2 commits.

    http://git.kernel.org/?p=linux/kernel/git/davem/net-next-2.6.git;a=commitdiff;h=0a1ec07a67bd8b0033dace237249654d015efa21
    http://git.kernel.org/?p=linux/kernel/git/davem/net-next-2.6.git;a=commitdiff;h=6f26c9a7555e5bcca3560919db9b852015077dae

    Fix the call to memcpy_from_iovecend() in skb_copy_datagram_from_iovec
    to pass the right iovec offset.

    Signed-off-by: Sridhar Samudrala
    Acked-by: Michael S. Tsirkin
    Signed-off-by: David S. Miller

    Sridhar Samudrala
     
  • skb_dma_unmap() is quite expensive for small packets,
    because we use two different cache lines from skb_shared_info.

    One to access nr_frags, one to access dma_maps[0]

    Instead of dma_maps being an array of MAX_SKB_FRAGS + 1 elements,
    let dma_head alone in a new dma_head field, close to nr_frags,
    to reduce cache lines misses.

    Tested on my dev machine (bnx2 & tg3 adapters), nice speedup !

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Get rid of num_dma_maps in struct skb_shared_info, as it seems unused.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Remove the private definition of TRUE/FALSE and use the ones from
    linux/stddef.h. Also remove the definition of BOOL which is not referenced
    inside the driver anyway.

    Signed-off-by: Tobias Klauser
    Signed-off-by: David S. Miller

    Tobias Klauser
     
  • Signed-off-by: Paulius Zaleckas
    Signed-off-by: David S. Miller

    Paulius Zaleckas
     
  • This is a driver for the Micrel KS8842 ethernet switch.

    The supplied code is for driving the KS8842 through the Timberdale FPGA
    on the Russellville board, a development board for Intel Atom CPU
    in the automotive area.

    Signed-off-by: Richard Röjfors
    Signed-off-by: David S. Miller

    Richard Ršöjfors
     
  • On Thu, Jun 04, 2009 at 09:06:00PM +1000, Herbert Xu wrote:
    >
    > tun: Optimise handling of bogus gso->hdr_len
    >
    > As all current versions of virtio_net generate a value for the
    > header length that's too small, we should optimise this so that
    > we don't copy it twice. This can be done by ensuring that it is
    > at least as large as the place where we'll write the checksum.
    >
    > Signed-off-by: Herbert Xu

    With this applied we can strengthen the partial checksum check:

    In skb_partial_csum_set we check to see if the checksum offset
    is within the packet. However, we really should check that it
    is within the skb head as that's the only bit we can modify
    without copying.

    Signed-off-by: Herbert Xu
    Acked-by: Rusty Russell
    Signed-off-by: David S. Miller

    Herbert Xu
     
  • As all current versions of virtio_net generate a value for the
    header length that's too small, we should optimise this so that
    we don't copy it twice. This can be done by ensuring that it is
    at least as large as the place where we'll write the checksum.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     
  • Through a bug in the tun driver, I noticed that virtio_net is
    producing bogus hdr_len values. In particular, it only includes
    the IP header in the linear area, and excludes the entire TCP
    header. This causes the TCP header to be copied twice for each
    packet. (The bug omitted the second copy :)

    This patch corrects this.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     
  • Fixes an initialization error; the chip negotiates gigabit, but
    the driver mistakenly handled it as 100Mb.
    Changes based on both SiS own GPL driver and forcedeth.
    Hopefully should fix
    http://bugzilla.kernel.org/show_bug.cgi?id=9735
    http://bugzilla.kernel.org/show_bug.cgi?id=11149

    Signed-off-by: Riccardo Ghetta
    Signed-off-by: David S. Miller

    Riccardo Ghetta
     
  • Signed-off-by: Riccardo Ghetta
    Signed-off-by: David S. Miller

    Riccardo Ghetta
     
  • Signed-off-by: Riccardo Ghetta
    Signed-off-by: David S. Miller

    Riccardo Ghetta
     
  • Corrected dma sync handling on small packets. Should fix
    http://bugzilla.kernel.org/show_bug.cgi?id=11509
    Note:
    While this bug was reported only on x86_64, it could have affected
    any architecture.

    Signed-off-by: Riccardo Ghetta
    Signed-off-by: David S. Miller

    Riccardo Ghetta
     
  • Some firmware mailbox commands require the firmware to
    communicate with the FCoE driver running on another
    PCI function. This can potentially take several seconds.
    This wait is done in process context only.

    Signed-off-by: Ron Mercer
    Signed-off-by: David S. Miller

    Ron Mercer
     
  • There are 8 banks of 'sub-registers' each of which are accessed
    through address/data register pair. An example would be reading
    flash or the xgmac. Accessing these require the driver to wait for
    a ready bit before writing the address and then accessing the data.
    This patch increases the timeout to 100us to prevent timeouts
    that have been seen on some platforms.
    These register are accessed in process context only.

    Signed-off-by: Ron Mercer
    Signed-off-by: David S. Miller

    Ron Mercer
     
  • Since an FCoE function shares a port with this NIC function, the
    jumbo settings must always be in place. This patch causes the
    hardware to be set up for jumbo if it is not already done.

    Signed-off-by: Ron Mercer
    Signed-off-by: David S. Miller

    Ron Mercer
     
  • Each firmware mailbox command can have a different number of
    valid data elements. When waiting for a mailbox command to
    complete it the process passes it's element count and
    waits for the completion. It is possible that while waiting
    an unrelated firmware async event (AE) can arrive. When this
    happens, the handler will over write the element count
    with the value for the newly arrived AE. This can cause
    the mailbox command to not get all of it's data.
    This patch restores original mailbox count at the end
    of the handler.

    Signed-off-by: Ron Mercer
    Signed-off-by: David S. Miller

    Ron Mercer
     
  • Check status on every iteration of event handler loop and exit
    if an error occurred. If an error occurred then recover process
    will be queued so this loop should no continue.

    Signed-off-by: Ron Mercer
    Signed-off-by: David S. Miller

    Ron Mercer
     
  • The smsc911x_drv_remove() function is declared with __devexit, so the
    assignment to the driver structure needs __devexit_p() wrappings to prevent
    build failure when hotplug is disabled.

    Signed-off-by: Mike Frysinger
    Signed-off-by: David S. Miller

    Mike Frysinger
     
  • The smsc911x driver works fine on Blackfin systems, so add it to the arch
    list in the Kconfig.

    Signed-off-by: Mike Frysinger
    Signed-off-by: David S. Miller

    Mike Frysinger
     

07 Jun, 2009

13 commits