1. 30 3月, 2015 1 次提交
  2. 07 12月, 2013 1 次提交
  3. 04 5月, 2013 1 次提交
    • H
      asix: fix BUG in receive path when lowering MTU · c5060cec
      holger@eitzenberger.org 提交于
      There is bug in the receive path of the asix driver at the time a
      packet is received larger than MTU size and DF bit set:
      
       BUG: unable to handle kernel paging request at 0000004000000001
       IP: [<ffffffff8126f65b>] skb_release_head_state+0x2d/0xd2
       ...
       Call Trace:
        <IRQ>
        [<ffffffff8126f86d>] ? skb_release_all+0x9/0x1e
        [<ffffffff8126f8ad>] ? __kfree_skb+0x9/0x6f
        [<ffffffffa00b4200>] ? asix_rx_fixup_internal+0xff/0x1ae [asix]
        [<ffffffffa00fb3dc>] ? usbnet_bh+0x4f/0x226 [usbnet]
        ...
      
      It is easily reproducable by setting an MTU of 512 e. g. and sending
      something like
      
        ping -s 1472 -c 1 -M do $SELF
      
      from another box.
      
      And this is because the rx->ax_skb is freed on error, but rx->ax_skb
      is not reset, and the size is not reset to zero in this case.
      
      And since the skb is added again to the usbnet->done skb queue it is
      accessing already freed memory, resulting in the BUG when freeing a
      2nd time.  I therefore think the value 0x0000004000000001 show in the
      trace is more or less random data.
      Signed-off-by: NHolger Eitzenberger <holger@eitzenberger.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c5060cec
  4. 19 1月, 2013 1 次提交
  5. 07 1月, 2013 1 次提交
  6. 26 10月, 2012 1 次提交
  7. 20 7月, 2012 2 次提交
  8. 17 7月, 2012 3 次提交
  9. 08 7月, 2012 1 次提交
    • E
      asix: avoid copies in tx path · 95162d65
      Eric Dumazet 提交于
      I noticed excess calls to skb_copy_expand() or memmove() in asix driver.
      
      This driver needs to push 4 bytes in front of frame (packet_len)
      and maybe add 4 bytes after the end (if padlen is 4)
      
      So it should set needed_headroom & needed_tailroom to avoid
      copies. But its not enough, because many packets are cloned
      before entering asix_tx_fixup() and this driver use skb_cloned()
      as a lazy way to check if it can push and put additional bytes in frame.
      
      Avoid skb_copy_expand() expensive call, using following rules :
      
      - We are allowed to push 4 bytes in headroom if skb_header_cloned()
        is false (and if we have 4 bytes of headroom)
      
      - We are allowed to put 4 bytes at tail if skb_cloned()
        is false (and if we have 4 bytes of tailroom)
      
      TCP packets for example are cloned, but skb_header_release()
      was called in tcp stack, allowing us to use headroom for our needs.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Allan Chou <allan@asix.com.tw>
      Cc: Trond Wuellner <trond@chromium.org>
      Cc: Grant Grundler <grundler@chromium.org>
      Cc: Paul Stewart <pstew@chromium.org>
      Cc: Ming Lei <tom.leiming@gmail.com>
      Tested-by: NMing Lei <ming.lei@canonical.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      95162d65
  10. 30 5月, 2012 1 次提交
  11. 19 5月, 2012 1 次提交
    • S
      USB: Disable hub-initiated LPM for comms devices. · e1f12eb6
      Sarah Sharp 提交于
      Hub-initiated LPM is not good for USB communications devices.  Comms
      devices should be able to tell when their link can go into a lower power
      state, because they know when an incoming transmission is finished.
      Ideally, these devices would slam their links into a lower power state,
      using the device-initiated LPM, after finishing the last packet of their
      data transfer.
      
      If we enable the idle timeouts for the parent hubs to enable
      hub-initiated LPM, we will get a lot of useless LPM packets on the bus
      as the devices reject LPM transitions when they're in the middle of
      receiving data.  Worse, some devices might blindly accept the
      hub-initiated LPM and power down their radios while they're in the
      middle of receiving a transmission.
      
      The Intel Windows folks are disabling hub-initiated LPM for all USB
      communications devices under a xHCI USB 3.0 host.  In order to keep
      the Linux behavior as close as possible to Windows, we need to do the
      same in Linux.
      
      Set the disable_hub_initiated_lpm flag for for all USB communications
      drivers.  I know there aren't currently any USB 3.0 devices that
      implement these class specifications, but we should be ready if they do.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: Marcel Holtmann <marcel@holtmann.org>
      Cc: Gustavo Padovan <gustavo@padovan.org>
      Cc: Johan Hedberg <johan.hedberg@gmail.com>
      Cc: Hansjoerg Lipp <hjlipp@web.de>
      Cc: Tilman Schmidt <tilman@imap.cc>
      Cc: Karsten Keil <isdn@linux-pingi.de>
      Cc: Peter Korsgaard <jacmet@sunsite.dk>
      Cc: Jan Dumon <j.dumon@option.com>
      Cc: Petko Manolov <petkan@users.sourceforge.net>
      Cc: Steve Glendinning <steve.glendinning@smsc.com>
      Cc: "John W. Linville" <linville@tuxdriver.com>
      Cc: Kalle Valo <kvalo@qca.qualcomm.com>
      Cc: "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com>
      Cc: Jouni Malinen <jouni@qca.qualcomm.com>
      Cc: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
      Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
      Cc: Christian Lamparter <chunkeey@googlemail.com>
      Cc: Brett Rudley <brudley@broadcom.com>
      Cc: Roland Vossen <rvossen@broadcom.com>
      Cc: Arend van Spriel <arend@broadcom.com>
      Cc: "Franky (Zhenhui) Lin" <frankyl@broadcom.com>
      Cc: Kan Yan <kanyan@broadcom.com>
      Cc: Dan Williams <dcbw@redhat.com>
      Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
      Cc: Ivo van Doorn <IvDoorn@gmail.com>
      Cc: Gertjan van Wingerde <gwingerde@gmail.com>
      Cc: Helmut Schaa <helmut.schaa@googlemail.com>
      Cc: Herton Ronaldo Krzesinski <herton@canonical.com>
      Cc: Hin-Tak Leung <htl10@users.sourceforge.net>
      Cc: Larry Finger <Larry.Finger@lwfinger.net>
      Cc: Chaoming Li <chaoming_li@realsil.com.cn>
      Cc: Daniel Drake <dsd@gentoo.org>
      Cc: Ulrich Kunitz <kune@deine-taler.de>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      e1f12eb6
  12. 24 4月, 2012 1 次提交
  13. 16 3月, 2012 1 次提交
    • E
      asix: asix_rx_fixup surgery to reduce skb truesizes · a9e0aca4
      Eric Dumazet 提交于
      asix_rx_fixup() is complex, and does some unnecessary memory copies (at
      least on x86 where NET_IP_ALIGN is 0)
      
      Also, it tends to provide skbs with a big truesize (4096+256 with
      MTU=1500) to upper stack, so incoming trafic consume a lot of memory and
      I noticed early packet drops because we hit socket rcvbuf too fast.
      
      Switch to a different strategy, using copybreak so that we provide nice
      skbs to upper stack (including the NET_SKB_PAD to avoid future head
      reallocations in some paths)
      
      With this patch, I no longer see packets drops or tcp collapses on
      various tcp workload with a AX88772 adapter.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Cc: Aurelien Jacobs <aurel@gnuage.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Trond Wuellner <trond@chromium.org>
      Cc: Grant Grundler <grundler@chromium.org>
      Cc: Paul Stewart <pstew@chromium.org>
      Reviewed-by: NGrant Grundler <grundler@chromium.org>
      Reviewed-by: NGrant Grundler <grundler@chromium.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a9e0aca4
  14. 12 3月, 2012 1 次提交
  15. 11 1月, 2012 2 次提交
  16. 10 1月, 2012 1 次提交
  17. 08 1月, 2012 1 次提交
  18. 24 12月, 2011 1 次提交
  19. 20 12月, 2011 1 次提交
  20. 19 11月, 2011 1 次提交
    • G
      USB: convert drivers/net/* to use module_usb_driver() · d632eb1b
      Greg Kroah-Hartman 提交于
      This converts the drivers in drivers/net/* to use the
      module_usb_driver() macro which makes the code smaller and a bit
      simpler.
      
      Added bonus is that it removes some unneeded kernel log messages about
      drivers loading and/or unloading.
      
      Cc: Wolfgang Grandegger <wg@grandegger.com>
      Cc: Samuel Ortiz <samuel@sortiz.org>
      Cc: Oliver Neukum <oliver@neukum.name>
      Cc: Peter Korsgaard <jacmet@sunsite.dk>
      Cc: Petko Manolov <petkan@users.sourceforge.net>
      Cc: Steve Glendinning <steve.glendinning@smsc.com>
      Cc: Christian Lamparter <chunkeey@googlemail.com>
      Cc: "John W. Linville" <linville@tuxdriver.com>
      Cc: Dan Williams <dcbw@redhat.com>
      Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
      Cc: Ivo van Doorn <IvDoorn@gmail.com>
      Cc: Gertjan van Wingerde <gwingerde@gmail.com>
      Cc: Helmut Schaa <helmut.schaa@googlemail.com>
      Cc: Herton Ronaldo Krzesinski <herton@canonical.com>
      Cc: Hin-Tak Leung <htl10@users.sourceforge.net>
      Cc: Larry Finger <Larry.Finger@lwfinger.net>
      Cc: Chaoming Li <chaoming_li@realsil.com.cn>
      Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Roel Kluin <roel.kluin@gmail.com>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Jiri Pirko <jpirko@redhat.com>
      Cc: Pavel Roskin <proski@gnu.org>
      Cc: Yoann DI-RUZZA <y.diruzza@lim.eu>
      Cc: George <george0505@realtek.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d632eb1b
  21. 16 11月, 2011 5 次提交
  22. 20 10月, 2011 1 次提交
  23. 05 10月, 2011 3 次提交
  24. 18 8月, 2011 1 次提交
  25. 28 7月, 2011 2 次提交
  26. 22 7月, 2011 1 次提交
  27. 30 4月, 2011 1 次提交
    • D
      ethtool: Call ethtool's get/set_settings callbacks with cleaned data · 8ae6daca
      David Decotigny 提交于
      This makes sure that when a driver calls the ethtool's
      get/set_settings() callback of another driver, the data passed to it
      is clean. This guarantees that speed_hi will be zeroed correctly if
      the called callback doesn't explicitely set it: we are sure we don't
      get a corrupted speed from the underlying driver. We also take care of
      setting the cmd field appropriately (ETHTOOL_GSET/SSET).
      
      This applies to dev_ethtool_get_settings(), which now makes sure it
      sets up that ethtool command parameter correctly before passing it to
      drivers. This also means that whoever calls dev_ethtool_get_settings()
      does not have to clean the ethtool command parameter. This function
      also becomes an exported symbol instead of an inline.
      
      All drivers visible to make allyesconfig under x86_64 have been
      updated.
      Signed-off-by: NDavid Decotigny <decot@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8ae6daca
  28. 18 12月, 2010 1 次提交
  29. 07 6月, 2010 1 次提交