1. 12 4月, 2013 1 次提交
  2. 05 2月, 2013 2 次提交
    • J
      drivers: net: usb: Remove unnecessary alloc/OOM messages · 38673c82
      Joe Perches 提交于
      alloc failures already get standardized OOM
      messages and a dump_stack.
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      38673c82
    • B
      net: usbnet: fix tx_dropped statistics · bf414b36
      Bjørn Mork 提交于
      It is normal for minidrivers accumulating frames to return NULL
      from their tx_fixup function. We do not want to count this as a
      drop, or log any debug messages.  A different exit path is
      therefore chosen for such drivers, skipping the debug message
      and the tx_dropped increment.
      
      The test for accumulating drivers was however completely bogus,
      making the exit path selection depend on whether the user had
      enabled tx_err logging or not. This would arbitrarily mess up
      accounting for both accumulating and non-accumulating minidrivers,
      and would result in unwanted debug messages for the accumulating
      drivers.
      
      Fix by testing for FLAG_MULTI_PACKET instead, which probably was
      the intention from the beginning.  This usage match the documented
      behaviour of this flag:
      
       Indicates to usbnet, that USB driver accumulates multiple IP packets.
       Affects statistic (counters) and short packet handling.
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bf414b36
  3. 31 1月, 2013 1 次提交
  4. 22 1月, 2013 1 次提交
  5. 20 12月, 2012 2 次提交
  6. 10 11月, 2012 1 次提交
  7. 07 11月, 2012 2 次提交
  8. 26 10月, 2012 2 次提交
  9. 12 10月, 2012 1 次提交
  10. 06 9月, 2012 1 次提交
  11. 05 9月, 2012 1 次提交
  12. 04 9月, 2012 1 次提交
    • B
      net: usbnet: fix softirq storm on suspend · 85e87870
      Bjørn Mork 提交于
      Suspending an open usbnet device results in constant
      rescheduling of usbnet_bh.
      
      commit 65841fd5 "usbnet: handle remote wakeup asap"
      refactored the usbnet_bh code to allow sharing the
      urb allocate and submit code with usbnet_resume. In
      this process, a test for, and immediate return on,
      ENOLINK from rx_submit was unintentionally dropped.
      
      The rx queue will not grow if rx_submit fails,
      making usbnet_bh reschedule itself.  This results
      in a softirq storm if the error is persistent.
      rx_submit translates the usb_submit_urb error
      EHOSTUNREACH into ENOLINK, so this is an expected
      and persistent error for a suspended device. The
      old code tested for this condition and avoided
      rescheduling.  Putting this test back.
      
      Cc: <stable@vger.kernel.org> # v3.5
      Cc: Ming Lei <ming.lei@canonical.com>
      Cc: Oliver Neukum <oneukum@suse.de>
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      85e87870
  13. 01 9月, 2012 1 次提交
  14. 17 7月, 2012 1 次提交
  15. 23 6月, 2012 3 次提交
  16. 18 6月, 2012 1 次提交
  17. 13 6月, 2012 3 次提交
  18. 16 5月, 2012 1 次提交
    • M
      usbnet: fix skb traversing races during unlink(v2) · 5b6e9bcd
      Ming Lei 提交于
      Commit 4231d47e(net/usbnet: avoid
      recursive locking in usbnet_stop()) fixes the recursive locking
      problem by releasing the skb queue lock before unlink, but may
      cause skb traversing races:
      	- after URB is unlinked and the queue lock is released,
      	the refered skb and skb->next may be moved to done queue,
      	even be released
      	- in skb_queue_walk_safe, the next skb is still obtained
      	by next pointer of the last skb
      	- so maybe trigger oops or other problems
      
      This patch extends the usage of entry->state to describe 'start_unlink'
      state, so always holding the queue(rx/tx) lock to change the state if
      the referd skb is in rx or tx queue because we need to know if the
      refered urb has been started unlinking in unlink_urbs.
      
      The other part of this patch is based on Huajun's patch:
      always traverse from head of the tx/rx queue to get skb which is
      to be unlinked but not been started unlinking.
      Signed-off-by: NHuajun Li <huajun.li.lee@gmail.com>
      Signed-off-by: NMing Lei <tom.leiming@gmail.com>
      Cc: Oliver Neukum <oneukum@suse.de>
      Cc: stable@kernel.org
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5b6e9bcd
  19. 03 5月, 2012 2 次提交
  20. 04 4月, 2012 1 次提交
  21. 23 3月, 2012 3 次提交
  22. 17 3月, 2012 1 次提交
  23. 16 3月, 2012 1 次提交
  24. 08 3月, 2012 1 次提交
    • S
      net/usbnet: avoid recursive locking in usbnet_stop() · 4231d47e
      Sebastian Siewior 提交于
      |kernel BUG at kernel/rtmutex.c:724!
      |[<c029599c>] (rt_spin_lock_slowlock+0x108/0x2bc) from [<c01c2330>] (defer_bh+0x1c/0xb4)
      |[<c01c2330>] (defer_bh+0x1c/0xb4) from [<c01c3afc>] (rx_complete+0x14c/0x194)
      |[<c01c3afc>] (rx_complete+0x14c/0x194) from [<c01cac88>] (usb_hcd_giveback_urb+0xa0/0xf0)
      |[<c01cac88>] (usb_hcd_giveback_urb+0xa0/0xf0) from [<c01e1ff4>] (musb_giveback+0x34/0x40)
      |[<c01e1ff4>] (musb_giveback+0x34/0x40) from [<c01e2b1c>] (musb_advance_schedule+0xb4/0x1c0)
      |[<c01e2b1c>] (musb_advance_schedule+0xb4/0x1c0) from [<c01e2ca8>] (musb_cleanup_urb.isra.9+0x80/0x8c)
      |[<c01e2ca8>] (musb_cleanup_urb.isra.9+0x80/0x8c) from [<c01e2ed0>] (musb_urb_dequeue+0xec/0x108)
      |[<c01e2ed0>] (musb_urb_dequeue+0xec/0x108) from [<c01cbb90>] (unlink1+0xbc/0xcc)
      |[<c01cbb90>] (unlink1+0xbc/0xcc) from [<c01cc2ec>] (usb_hcd_unlink_urb+0x54/0xa8)
      |[<c01cc2ec>] (usb_hcd_unlink_urb+0x54/0xa8) from [<c01c2a84>] (unlink_urbs.isra.17+0x2c/0x58)
      |[<c01c2a84>] (unlink_urbs.isra.17+0x2c/0x58) from [<c01c2b44>] (usbnet_terminate_urbs+0x94/0x10c)
      |[<c01c2b44>] (usbnet_terminate_urbs+0x94/0x10c) from [<c01c2d68>] (usbnet_stop+0x100/0x15c)
      |[<c01c2d68>] (usbnet_stop+0x100/0x15c) from [<c020f718>] (__dev_close_many+0x94/0xc8)
      
      defer_bh() takes the lock which is hold during unlink_urbs(). The safe
      walk suggest that the skb will be removed from the list and this is done
      by defer_bh() so it seems to be okay to drop the lock here.
      
      Cc: stable@kernel.org
      Reported-by: NAníbal Almeida Pinto <anibal.pinto@efacec.com>
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Acked-by: NOliver Neukum <oliver@neukum.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4231d47e
  25. 01 2月, 2012 1 次提交
  26. 08 11月, 2011 1 次提交
  27. 30 9月, 2011 1 次提交
  28. 20 8月, 2011 1 次提交
  29. 10 5月, 2011 1 次提交