14 May, 2014

1 commit

  • net: get rid of SET_ETHTOOL_OPS

    Dave Miller mentioned he'd like to see SET_ETHTOOL_OPS gone.
    This does that.

    Mostly done via coccinelle script:
    @@
    struct ethtool_ops *ops;
    struct net_device *dev;
    @@
    - SET_ETHTOOL_OPS(dev, ops);
    + dev->ethtool_ops = ops;

    Compile tested only, but I'd seriously wonder if this broke anything.

    Suggested-by: Dave Miller
    Signed-off-by: Wilfried Klaebe
    Acked-by: Felipe Balbi
    Signed-off-by: David S. Miller

    Wilfried Klaebe
     

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
     

07 Dec, 2013

1 commit

  • Several files refer to an old address for the Free Software Foundation
    in the file header comment. Resolve by replacing the address with
    the URL so that we do not have to keep
    updating the header comments anytime the address changes.

    CC: Oliver Neukum
    CC: Steve Glendinning
    CC: Oliver Neukum
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Jeff Kirsher
     

12 Oct, 2012

1 commit


21 Sep, 2012

1 commit

  • The dbg() USB macro is so old, it predates me. The USB networking drivers are
    the last hold-out using this macro, and we want to get rid of it, so replace
    the usage of it with the proper netdev_dbg() or dev_dbg() (depending on the
    context) calls.

    Some places we end up using a local variable for the debug call, so also
    convert the other existing dev_* calls to use it as well, to save tiny amounts
    of code space.

    Signed-off-by: Greg Kroah-Hartman
    Signed-off-by: David S. Miller

    Greg Kroah-Hartman
     

28 Jul, 2012

1 commit

  • The problem is that we call this with a spin lock held. The call tree
    is:
    kaweth_start_xmit() holds kaweth->device_lock.
    -> kaweth_async_set_rx_mode()
    -> kaweth_control()
    -> kaweth_internal_control_msg()

    The kaweth_internal_control_msg() function is only called from
    kaweth_control() which used GFP_ATOMIC for its allocations.

    Signed-off-by: Dan Carpenter
    Signed-off-by: David S. Miller

    Dan Carpenter
     

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
     

26 Apr, 2012

1 commit


25 Feb, 2012

1 commit


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


31 Mar, 2011

1 commit


25 Jan, 2011

1 commit


17 Aug, 2010

1 commit

  • The driver name and bus address for a net_device can normally be found
    through the driver model now. Instead of requiring drivers to provide
    this information redundantly through the ethtool_ops::get_drvinfo
    operation, use the driver model to do so if the driver does not define
    the operation. Since ETHTOOL_GDRVINFO no longer requires the driver
    to implement any operations, do not require net_device::ethtool_ops to
    be set either.

    Remove implementations of get_drvinfo and ethtool_ops that provide
    only this information.

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings
     

03 Jun, 2010

1 commit


21 May, 2010

2 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (229 commits)
    USB: remove unused usb_buffer_alloc and usb_buffer_free macros
    usb: musb: update gfp/slab.h includes
    USB: ftdi_sio: fix legacy SIO-device header
    USB: kl5usb105: reimplement using generic framework
    USB: kl5usb105: minor clean ups
    USB: kl5usb105: fix memory leak
    USB: io_ti: use kfifo to implement write buffering
    USB: io_ti: remove unsused private counter
    USB: ti_usb: use kfifo to implement write buffering
    USB: ir-usb: fix incorrect write-buffer length
    USB: aircable: fix incorrect write-buffer length
    USB: safe_serial: straighten out read processing
    USB: safe_serial: reimplement read using generic framework
    USB: safe_serial: reimplement write using generic framework
    usb-storage: always print quirks
    USB: usb-storage: trivial debug improvements
    USB: oti6858: use port write fifo
    USB: oti6858: use kfifo to implement write buffering
    USB: cypress_m8: use kfifo to implement write buffering
    USB: cypress_m8: remove unused drain define
    ...

    Fix up conflicts (due to usb_buffer_alloc/free renaming) in
    drivers/input/tablet/acecad.c
    drivers/input/tablet/kbtab.c
    drivers/input/tablet/wacom_sys.c
    drivers/media/video/gspca/gspca.c
    sound/usb/usbaudio.c

    Linus Torvalds
     
  • For more clearance what the functions actually do,

    usb_buffer_alloc() is renamed to usb_alloc_coherent()
    usb_buffer_free() is renamed to usb_free_coherent()

    They should only be used in code which really needs DMA coherency.

    All call sites have been changed accordingly, except for staging
    drivers.

    Signed-off-by: Daniel Mack
    Cc: Alan Stern
    Cc: Pedro Ribeiro
    Signed-off-by: Greg Kroah-Hartman

    Daniel Mack
     

10 May, 2010

1 commit

  • Now that core network takes care of trans_start updates, dont do it
    in drivers themselves, if possible. Drivers can avoid one cache miss
    (on dev->trans_start) in their start_xmit() handler.

    Exceptions are NETIF_F_LLTX drivers

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

28 Apr, 2010

1 commit


13 Feb, 2010

1 commit


12 Dec, 2009

1 commit


30 Oct, 2009

1 commit


23 Sep, 2009

1 commit

  • kaweth_control() never frees the buffer that it allocates for the USB
    control message. Test case:

    while :; do ifconfig eth2 down ; ifconfig eth2 up ; done

    This is a tiny buffer so it is a slow leak. If you want to speed up the
    process, you can change the allocation size to e.g. 16384 bytes, and it
    will consume several megabytes within a few minutes.

    Signed-off-by: Kevin Cernekee
    Acked-by: Oliver Neukum
    Signed-off-by: David S. Miller

    Kevin Cernekee
     

02 Sep, 2009

1 commit


01 Sep, 2009

1 commit


17 Jul, 2009

1 commit


13 Jul, 2009

2 commits


06 Jul, 2009

1 commit


14 Apr, 2009

1 commit

  • The driver kaweth yields a -EBUSY error when starting, and a -ETIME
    error when shutting down. These errors are avoided, and the RX status
    is further checked for other potential errors.

    Signed-off-by: Larry Finger
    Signed-off-by: David S. Miller

    Larry Finger
     

02 Apr, 2009

1 commit

  • On an SMP system, the following message is printed. The patch below gets
    fixes the problem.

    =================================
    [ INFO: inconsistent lock state ]
    2.6.29-Linus-05093-gc31f403 #57
    ---------------------------------
    inconsistent {hardirq-on-W} -> {in-hardirq-W} usage.
    bash/4105 [HC1[1]:SC0[0]:HE0:SE1] takes:
    (&kaweth->device_lock){+...}, at: []
    kaweth_usb_receive+0x77/0x1af [kaw eth]
    {hardirq-on-W} state was registered at:
    [] __lock_acquire+0x753/0x1685
    [] lock_acquire+0x55/0x71
    [] _spin_lock+0x31/0x3d
    [] kaweth_start_xmit+0x2b/0x1e1 [kaweth]
    [] dev_hard_start_xmit+0x22e/0x2ad
    [] __qdisc_run+0xf2/0x203
    [] dev_queue_xmit+0x263/0x39b
    [] packet_sendmsg_spkt+0x1c4/0x20a [af_packet]
    [] sock_sendmsg+0xe4/0xfd
    [] sys_sendto+0xe4/0x10c
    [] system_call_fastpath+0x16/0x1b
    [] 0xffffffffffffffff
    irq event stamp: 1280
    hardirqs last enabled at (1279): []
    _spin_unlock_irqrestore+0x44/0x4c
    hardirqs last disabled at (1280): []
    save_args+0x67/0x70
    softirqs last enabled at (660): []
    __do_softirq+0x14d/0x15d
    softirqs last disabled at (651): []
    call_softirq+0x1c/0x28

    Signed-off-by: Larry Finger
    Signed-off-by: David S. Miller

    Larry Finger
     

09 Jan, 2009

1 commit


08 Jan, 2009

1 commit


19 Dec, 2008

1 commit


18 Oct, 2008

2 commits


10 Jul, 2008

1 commit


12 Jun, 2008

1 commit

  • If the RTNL is held when we invoke flush_scheduled_work() we could
    deadlock. One such case is linkwatch, it is a work struct which tries
    to grab the RTNL semaphore.

    The most common case are net driver ->stop() methods. The
    simplest conversion is to instead use cancel_{delayed_}work_sync()
    explicitly on the various work struct the driver uses.

    This is an OK transformation because these work structs are doing
    things like resetting the chip, restarting link negotiation, and so
    forth. And if we're bringing down the device, we're about to turn the
    chip off and reset it anways. So if we cancel a pending work event,
    that's fine here.

    Some drivers were working around this deadlock by using a msleep()
    polling loop of some sort, and those cases are converted to instead
    use cancel_{delayed_}work_sync() as well.

    Signed-off-by: David S. Miller

    David S. Miller
     

19 Apr, 2008

1 commit


09 Jan, 2008

1 commit