1. 22 1月, 2009 26 次提交
  2. 21 1月, 2009 8 次提交
  3. 20 1月, 2009 6 次提交
    • I
      wimax/i2400m: error paths that need to free an skb should use kfree_skb() · f4895b8b
      Inaky Perez-Gonzalez 提交于
      Roel Kluin reported a bug in two error paths where skbs were wrongly
      being freed using kfree(). He provided a fix where it was replaced to
      kfree_skb(), as it should be.
      
      However, in i2400mu_rx(), the error path was missing returning an
      indication of the failure. Changed to reset rx_skb to NULL and return
      it to the caller, i2400mu_rxd(). It will be treated as a transient
      error and just ignore the packet.
      
      Depending on the buffering conditions inside the device, the data
      packet might be dropped or the device will signal the host again for
      data-ready-to-read and the host will retry.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f4895b8b
    • G
      mv643xx_eth: prevent interrupt storm on ifconfig down · fe65e704
      Gabriel Paubert 提交于
      Contrary to what the docs say, the 'extended interrupt cause' bit in
      the interrupt cause register (bit 1) appears to not be maskable on at
      least some of the mv643xx_eth platforms, making writing zeroes to the
      interrupt mask register but not the extended interrupt mask register
      insufficient to stop interrupts from occuring.  Therefore, also write
      zeroes to the extended interrupt mask register when shutting down the
      port.
      
      This fixes the interrupt storm seen on the Pegasos board when shutting
      down the interface.
      Signed-off-by: NLennert Buytenhek <buytenh@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fe65e704
    • L
      mv643xx_eth: fix multicast filter programming · 2b448334
      Lennert Buytenhek 提交于
      Commit 66e63ffb ("mv643xx_eth:
      implement ->set_rx_mode()") cleaned up mv643xx_eth's multicast filter
      programming, but broke it as well.
      
      The non-special multicast filter table (for multicast addresses that
      are not of the form 01:00:5e:00:00:xx) consists of 256 hash table
      buckets organised as 64 32-bit words, where the 'accept' bits are
      in the LSB of each byte, so in bits 24 16 8 0 of each 32-bit word.
      The old code got this right, but the referenced commit broke this by
      using bits 3 2 1 0 instead.  This commit fixes this up.
      Signed-off-by: NLennert Buytenhek <buytenh@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2b448334
    • L
      Revert "mv643xx_eth: use longer DMA bursts". · e0c6ef93
      Lennert Buytenhek 提交于
      This reverts commit cd4ccf76.
      
      On the Pegasos board, we can't do DMA burst that are longer than
      one cache line.  For now, go back to using 32 byte DMA bursts for
      all mv643xx_eth platforms -- we can switch the ARM-based platforms
      back to doing long 128 byte bursts in the next development cycle.
      Signed-off-by: NLennert Buytenhek <buytenh@marvell.com>
      Reported-by: NAlan Curry <pacman@kosh.dhis.org>
      Reported-by: NGabriel Paubert <paubert@iram.es>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e0c6ef93
    • J
      net: Fix data corruption when splicing from sockets. · 8b9d3728
      Jarek Poplawski 提交于
      The trick in socket splicing where we try to convert the skb->data
      into a page based reference using virt_to_page() does not work so
      well.
      
      The idea is to pass the virt_to_page() reference via the pipe
      buffer, and refcount the buffer using a SKB reference.
      
      But if we are splicing from a socket to a socket (via sendpage)
      this doesn't work.
      
      The from side processing will grab the page (and SKB) references.
      The sendpage() calls will grab page references only, return, and
      then the from side processing completes and drops the SKB ref.
      
      The page based reference to skb->data is not enough to keep the
      kmalloc() buffer backing it from being reused.  Yet, that is
      all that the socket send side has at this point.
      
      This leads to data corruption if the skb->data buffer is reused
      by SLAB before the send side socket actually gets the TX packet
      out to the device.
      
      The fix employed here is to simply allocate a page and copy the
      skb->data bytes into that page.
      
      This will hurt performance, but there is no clear way to fix this
      properly without a copy at the present time, and it is important
      to get rid of the data corruption.
      
      With fixes from Herbert Xu.
      Tested-by: NWilly Tarreau <w@1wt.eu>
      Foreseen-by: NChangli Gao <xiaosuo@gmail.com>
      Diagnosed-by: NWilly Tarreau <w@1wt.eu>
      Reported-by: NWilly Tarreau <w@1wt.eu>
      Fixed-by: NJens Axboe <jens.axboe@oracle.com>
      Signed-off-by: NJarek Poplawski <jarkao2@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8b9d3728
    • M
      tg3: Fix firmware loading · 9e9fd12d
      Matt Carlson 提交于
      This patch modifies how the tg3 driver handles device firmware.
      
      The patch starts by consolidating David Woodhouse's earlier patch under
      the same name.  Specifically, the patch moves the request_firmware call
      into a separate tg3_request_firmware() function and calls that function
      from tg3_open() rather than tg3_init_one().
      
      The patch then goes on to limit the number of devices that will make
      request_firmware calls.  The original firmware patch unnecessarily
      requested TSO firmware for devices that did not need it.  This patch
      reduces the set of devices making TSO firmware patches to approximately
      the following device set : 5703, 5704, and 5705.
      
      Finally, the patch reduces the effects of a request_firmware() failure.
      For those devices that are requesting TSO firmware, the driver will turn
      off the TSO capability.  If TSO firmware becomes available at a later
      time, the device can be closed and then opened again to reacquire the
      TSO capability.
      Signed-off-by: NMatt Carlson <mcarlson@broadcom.com>
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9e9fd12d