12 Sep, 2020

1 commit


04 Apr, 2017

1 commit

  • Add support for the net stats64 counters to the usbnet core. With that
    in place put the hooks into every usbnet driver to use it.

    This is a strait forward addition of 64bit counters for RX and TX packet
    and byte counts. It is done in the same style as for the other net drivers
    that support stats64. Note that the other stats fields remain as 32bit
    sized values (error counts, etc).

    The motivation to add this is that it is not particularly difficult to
    get the RX and TX byte counts to wrap on 32bit platforms.

    Signed-off-by: Greg Ungerer
    Acked-by: Bjørn Mork
    Signed-off-by: David S. Miller

    Greg Ungerer
     

22 Mar, 2017

1 commit


16 Oct, 2015

1 commit


18 Jan, 2014

1 commit


17 Jan, 2014

1 commit

  • None of these files are actually using any __init type directives
    and hence don't need to include . Most are just a
    left over from __devinit and __cpuinit removal, or simply due to
    code getting copied from one driver to the next.

    This covers everything under drivers/net except for wireless, which
    has been submitted separately.

    Signed-off-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    Paul Gortmaker
     

15 Jan, 2014

1 commit


19 Dec, 2013

4 commits


01 Oct, 2013

1 commit


12 Apr, 2013

1 commit


30 Jan, 2013

1 commit


28 Jan, 2013

1 commit

  • dm9620 is a newer variant of dm9601 with more features (usb 2.0, checksum
    offload, ..), but it can also be put in a dm9601 compatible mode, allowing
    us to reuse the existing driver.

    This does mean that the extended features like checksum offload cannot be
    used, but that's hardly critical on a 100mbps interface.

    Thanks to Sławek Wernikowski for providing me
    with a dm9620 based device to test.

    Signed-off-by: Peter Korsgaard
    Signed-off-by: David S. Miller

    Peter Korsgaard
     

19 Jan, 2013

1 commit


17 Jan, 2013

1 commit

  • commit 24b1042c4eb2 ("usbnet: dm9601: apply introduced usb command
    APIs") removes the distiction between DM_WRITE_REG and DM_WRITE_REGS
    command. The distiction is reintroduced to the driver so that the
    functionality of the driver remains same.

    CC: Ming Lei
    Signed-off-by: Tushar Behera
    Signed-off-by: David S. Miller

    Tushar Behera
     

26 Oct, 2012

1 commit


19 May, 2012

1 commit

  • 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: Sarah Sharp
    Cc: Marcel Holtmann
    Cc: Gustavo Padovan
    Cc: Johan Hedberg
    Cc: Hansjoerg Lipp
    Cc: Tilman Schmidt
    Cc: Karsten Keil
    Cc: Peter Korsgaard
    Cc: Jan Dumon
    Cc: Petko Manolov
    Cc: Steve Glendinning
    Cc: "John W. Linville"
    Cc: Kalle Valo
    Cc: "Luis R. Rodriguez"
    Cc: Jouni Malinen
    Cc: Vasanthakumar Thiagarajan
    Cc: Senthil Balasubramanian
    Cc: Christian Lamparter
    Cc: Brett Rudley
    Cc: Roland Vossen
    Cc: Arend van Spriel
    Cc: "Franky (Zhenhui) Lin"
    Cc: Kan Yan
    Cc: Dan Williams
    Cc: Jussi Kivilinna
    Cc: Ivo van Doorn
    Cc: Gertjan van Wingerde
    Cc: Helmut Schaa
    Cc: Herton Ronaldo Krzesinski
    Cc: Hin-Tak Leung
    Cc: Larry Finger
    Cc: Chaoming Li
    Cc: Daniel Drake
    Cc: Ulrich Kunitz
    Signed-off-by: Sarah Sharp

    Sarah Sharp
     

19 Nov, 2011

1 commit

  • 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
    Cc: Samuel Ortiz
    Cc: Oliver Neukum
    Cc: Peter Korsgaard
    Cc: Petko Manolov
    Cc: Steve Glendinning
    Cc: Christian Lamparter
    Cc: "John W. Linville"
    Cc: Dan Williams
    Cc: Jussi Kivilinna
    Cc: Ivo van Doorn
    Cc: Gertjan van Wingerde
    Cc: Helmut Schaa
    Cc: Herton Ronaldo Krzesinski
    Cc: Hin-Tak Leung
    Cc: Larry Finger
    Cc: Chaoming Li
    Cc: Lucas De Marchi
    Cc: "David S. Miller"
    Cc: Roel Kluin
    Cc: Paul Gortmaker
    Cc: Jiri Pirko
    Cc: Pavel Roskin
    Cc: Yoann DI-RUZZA
    Cc: George
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

18 Aug, 2011

1 commit


30 Apr, 2011

1 commit

  • 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: David Decotigny
    Signed-off-by: David S. Miller

    David Decotigny
     

24 Feb, 2011

1 commit


18 May, 2010

1 commit

  • Use kmemdup when some other buffer is immediately copied into the
    allocated region.

    A simplified version of the semantic patch that makes this change is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @@
    expression from,to,size,flag;
    statement S;
    @@

    - to = \(kmalloc\|kzalloc\)(size,flag);
    + to = kmemdup(from,size,flag);
    if (to==NULL || ...) S
    - memcpy(to, from, size);
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: David S. Miller

    Julia Lawall
     

04 May, 2010

2 commits

  • David S. Miller
     
  • Use correct bit positions in DM_SHARED_CTRL register for writes.

    Michael Planes recently encountered a 'KY-RS9600 USB-LAN converter', which
    came with a driver CD containing a Linux driver. This driver turns out to
    be a copy of dm9601.c with symbols renamed and my copyright stripped.
    That aside, it did contain 1 functional change in dm_write_shared_word(),
    and after checking the datasheet the original value was indeed wrong
    (read versus write bits).

    On Michaels HW, this change bumps receive speed from ~30KB/s to ~900KB/s.
    On other devices the difference is less spectacular, but still significant
    (~30%).

    Reported-by: Michael Planes
    CC: stable@kernel.org
    Signed-off-by: Peter Korsgaard
    Signed-off-by: David S. Miller

    Peter Korsgaard
     

12 Apr, 2010

1 commit


04 Apr, 2010

1 commit

  • Converts the list and the core manipulating with it to be the same as uc_list.

    +uses two functions for adding/removing mc address (normal and "global"
    variant) instead of a function parameter.
    +removes dev_mcast.c completely.
    +exposes netdev_hw_addr_list_* macros along with __hw_addr_* functions for
    manipulation with lists on a sandbox (used in bonding and 80211 drivers)

    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Jiri Pirko
     

30 Mar, 2010

1 commit

  • …it 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: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

18 Feb, 2010

1 commit

  • These macros are too similar to the dev_ equivalents
    but take a usbnet * argument. Convert them to the recently
    introduced netdev_ macros and remove the old macros.

    The old macros had "\n" appended to the format string.
    Add the "\n" to the converted uses.

    Some existing uses of the dev macros in cdc_eem.c
    probably mistakenly had trailing "\n". No "\n" added there.

    Fix net1080 this/other log message inversion.

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     

06 Feb, 2010

1 commit


11 Nov, 2009

1 commit


29 Oct, 2009

1 commit

  • I found that the current version of drivers/net/usb/dm9601.c can be used to
    successfully drive a low-power, low-cost network adapter with USB ID
    0a46:9000, based on a DM9000E chipset. As no device with this ID is yet
    present in the kernel, I have created a patch that adds support for the device
    to the dm9601 driver.

    Created and tested against linux-2.6.32-rc5.

    Signed-off-by: Janusz Krzysztofik
    Acked-by: Peter Korsgaard
    Signed-off-by: David S. Miller

    Janusz Krzysztofik
     

02 Sep, 2009

1 commit


01 Jul, 2009

1 commit


18 May, 2009

1 commit


22 Mar, 2009

1 commit


04 Mar, 2009

1 commit


09 Jan, 2009

2 commits