1. 02 4月, 2011 1 次提交
    • A
      usbnet: use eth%d name for known ethernet devices · c261344d
      Arnd Bergmann 提交于
      The documentation for the USB ethernet devices suggests that
      only some devices are supposed to use usb0 as the network interface
      name instead of eth0. The logic used there, and documented in
      Kconfig for CDC is that eth0 will be used when the mac address
      is a globally assigned one, but usb0 is used for the locally
      managed range that is typically used on point-to-point links.
      
      Unfortunately, this has caused a lot of pain on the smsc95xx
      device that is used on the popular pandaboard without an
      EEPROM to store the MAC address, which causes the driver to
      call random_ether_address().
      
      Obviously, there should be a proper MAC addressed assigned to
      the device, and discussions are ongoing about how to solve
      this, but this patch at least makes sure that the default
      interface naming gets a little saner and matches what the
      user can expect based on the documentation, including for
      new devices.
      
      The approach taken here is to flag whether a device might be a
      point-to-point link with the new FLAG_POINTTOPOINT setting in
      the usbnet driver_info. A driver can set both FLAG_POINTTOPOINT
      and FLAG_ETHER if it is not sure (e.g. cdc_ether), or just one
      of the two.  The usbnet framework only looks at the MAC address
      for device naming if both flags are set, otherwise it trusts the
      flag.
      Signed-off-by: NArnd Bergmann <arnd.bergmann@linaro.org>
      Tested-by: NAndy Green <andy.green@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c261344d
  2. 30 3月, 2011 1 次提交
    • A
      net/usb: Ethernet quirks for the LG-VL600 4G modem · 7a635ea9
      Andrzej Zaborowski 提交于
      This adds a driver for the CDC Ethernet part of this modem.  The
      device's ID is blacklisted in cdc_ether.c and is white-listed in
      this new driver because of the quirks needed to make it useful.
      The modem's firmware exposes a CDC ACM port for modem control and a
      CDC Ethernet port for network data.  The descriptors look fine but
      both ports actually are some sort of multiplexers requiring non-
      standard headers added/removed from every packet or they get
      ignored.  All information is based on a usb traffic log from a
      Windows machine.
      
      On the Verizon 4G network I've seen speeds up to 1.1MB/s so far with
      this driver, a speed-o-meter site reports 16.2Mbps/10.5Mbps.
      Userspace scripts are required to talk to the CDC ACM port.
      Signed-off-by: NAndrzej Zaborowski <balrogg@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7a635ea9
  3. 14 2月, 2011 1 次提交
  4. 12 12月, 2010 1 次提交
    • T
      drivers/net: don't use flush_scheduled_work() · 23f333a2
      Tejun Heo 提交于
      flush_scheduled_work() is on its way out.  This patch contains simple
      conversions to replace flush_scheduled_work() usage with direct
      cancels and flushes.
      
      Directly cancel the used works on driver detach and flush them in
      other cases.
      
      The conversions are mostly straight forward and the only dangers are,
      
      * Forgetting to cancel/flush one or more used works.
      
      * Cancelling when a work should be flushed (ie. the work must be
        executed once scheduled whether the driver is detaching or not).
      
      I've gone over the changes multiple times but it would be much
      appreciated if you can review with the above points in mind.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jay Cliburn <jcliburn@gmail.com>
      Cc: Michael Chan <mchan@broadcom.com>
      Cc: Divy Le Ray <divy@chelsio.com>
      Cc: e1000-devel@lists.sourceforge.net
      Cc: Vasanthy Kolluri <vkolluri@cisco.com>
      Cc: Samuel Ortiz <samuel@sortiz.org>
      Cc: Lennert Buytenhek <buytenh@wantstofly.org>
      Cc: Andrew Gallatin <gallatin@myri.com>
      Cc: Francois Romieu <romieu@fr.zoreil.com>
      Cc: Ramkrishna Vepa <ramkrishna.vepa@exar.com>
      Cc: Matt Carlson <mcarlson@broadcom.com>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Cc: Shreyas Bhatewara <sbhatewara@vmware.com>
      Cc: netdev@vger.kernel.org
      23f333a2
  5. 07 12月, 2010 1 次提交
  6. 01 11月, 2010 1 次提交
    • M
      usbnet: fix usb_autopm_get_interface failure(v1) · b0786b43
      Ming Lei 提交于
      Since usbnet already took usb runtime pm, we have to
      enable runtime pm for usb interface of usbnet, otherwise
      usb_autopm_get_interface may return failure and cause
      'ifconfig usb0 up' failed if USB_SUSPEND(RUNTIME_PM) is
      enabled.
      
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Ben Hutchings <ben@decadent.org.uk>
      Cc: Joe Perches <joe@perches.com>
      Cc: Oliver Neukum <oliver@neukum.org>
      Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
      Cc: stable@kernel.org
      Signed-off-by: NMing Lei <tom.leiming@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b0786b43
  7. 10 8月, 2010 1 次提交
  8. 06 8月, 2010 1 次提交
  9. 27 7月, 2010 1 次提交
  10. 24 7月, 2010 1 次提交
  11. 03 7月, 2010 1 次提交
  12. 13 6月, 2010 1 次提交
  13. 07 4月, 2010 1 次提交
  14. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  15. 18 2月, 2010 2 次提交
  16. 04 12月, 2009 2 次提交
  17. 11 11月, 2009 1 次提交
  18. 05 10月, 2009 2 次提交
  19. 23 9月, 2009 1 次提交
    • S
      smsc95xx: fix transmission where ZLP is expected · ec475623
      Steve Glendinning 提交于
      Usbnet framework assumes USB hardware doesn't handle zero length
      packets, but SMSC LAN95xx requires these to be sent for correct
      operation.
      
      This patch fixes an easily reproducible tx lockup when sending a frame
      that results in exactly 512 bytes in a USB transmission (e.g. a UDP
      frame with 458 data bytes, due to IP headers and our USB headers).  It
      adds an extra flag to usbnet for the hardware driver to indicate that
      it can handle and requires the zero length packets.
      
      This patch should not affect other usbnet users, please also consider
      for -stable.
      Signed-off-by: NSteve Glendinning <steve.glendinning@smsc.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ec475623
  20. 02 9月, 2009 1 次提交
  21. 01 9月, 2009 1 次提交
  22. 14 8月, 2009 1 次提交
  23. 05 8月, 2009 1 次提交
  24. 11 7月, 2009 1 次提交
  25. 01 7月, 2009 1 次提交
  26. 13 6月, 2009 1 次提交
  27. 21 4月, 2009 1 次提交
  28. 16 4月, 2009 1 次提交
  29. 07 4月, 2009 1 次提交
  30. 22 3月, 2009 2 次提交
  31. 02 3月, 2009 1 次提交
  32. 28 10月, 2008 1 次提交
  33. 23 9月, 2008 1 次提交
  34. 01 2月, 2008 2 次提交
  35. 07 11月, 2007 1 次提交
    • A
      [NET]: Let USB_USBNET always select MII. · 4aa92cd9
      Adrian Bunk 提交于
      All this USB_USBNET_MII trickery is simply not worth it considering how
      few code it saves.
      
      As a side effect, this also fixes the following compile error reported
      by Toralf Frster:
      
      <--  snip  -->
      
      ...
        LD      .tmp_vmlinux1
      drivers/built-in.o: In function `usbnet_set_settings':
      (.text+0xf1876): undefined reference to `mii_ethtool_sset'
      drivers/built-in.o: In function `usbnet_get_settings':
      (.text+0xf1836): undefined reference to `mii_ethtool_gset'
      drivers/built-in.o: In function `usbnet_get_link':
      (.text+0xf18d6): undefined reference to `mii_link_ok'
      drivers/built-in.o: In function `usbnet_nway_reset':
      (.text+0xf18f6): undefined reference to `mii_nway_restart'
      make: *** [.tmp_vmlinux1] Error 1
      
      <--  snip  -->
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4aa92cd9