09 Jun, 2009

23 commits


08 Jun, 2009

17 commits

  • A driver overhaul on 29 Feb 2000 (!) broke locking around fiddling with
    the tx descriptor ring in start_xmit(); a follow-on "fix" removed the
    broken remnants altogether. Here's a patch to restore proper locking in
    the function -- the complement in the interrupt handler has been correct
    all the time.

    This *may* have been the reason for the occasional confusion of the chip
    -- triggering a tx timeout followed by a chip reset sequence -- seen on
    R4k-based DECstations with the onboard Ethernet interface. Another theory
    is the confusion is due to an unindentified problem -- perhaps a silicon
    erratum -- associated with the variation of the MT ASIC used to interface
    the R4k CPU to the rest of the system on these computers; with its
    aggressive write-back buffering the design is particularly weakly ordered
    when it comes to MMIO (in the absence of ordering barriers uncached reads
    are allowed to bypass earlier uncached writes, even if to the same
    location), which may trigger all kinds of corner cases in peripheral
    hardware as well as software.

    Either way this piece of code is buggy.

    Signed-off-by: Maciej W. Rozycki
    Signed-off-by: David S. Miller

    Maciej W. Rozycki
     
  • Clarify calling context and return codes of callback methods, and
    add a description of the _cmsg structure and helper functions.

    Impact: documentation
    Signed-off-by: Tilman Schmidt
    Signed-off-by: David S. Miller

    Tilman Schmidt
     
  • The dereferencing of the private pointer cmsg->m in capi_cmsg2str() may
    cause an Oops in case of an error, which is particularly inconvenient
    as that function is typically used to format an error message. Add a
    NULL pointer check to avoid this.

    Impact: error handling improvement
    Signed-off-by: Tilman Schmidt
    Signed-off-by: David S. Miller

    Tilman Schmidt
     
  • Add kerneldoc comments for the exported funtions in capiutil.c.

    Impact: documentation
    Signed-off-by: Tilman Schmidt
    Signed-off-by: David S. Miller

    Tilman Schmidt
     
  • 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