Hi,

Currently only very few usbnet devices support the traffic based
runtime PM, eg. wake up devices if there are packets to be transmitted.

For the below situation, it should make sense to runtime suspend usbnet
device to save power:

        - after network link becomes down

This patch implements the runtime PM triggered by network link change
event, and it works basically on asix usbnet device after a simple
runtime PM test.

Change Log:
v1:
        -- use system_freezable_wq to fix deadlock by calling
        usbnet_link_updated in same workqueue
        -- use system_freezable_wq to stop link check work during
        system sleep
        -- fix bug of possible change of previous autosuspend_delay
        -- set/clear 'needs_remote_wakeup' for devices which support
        remote wakeup on link change
        -- convert EXPORT_SYMBOL_GPL to EXPORT_SYMBOL
        -- introduce module parameter of link_autocheck_time
        -- introduce link_rpm_supported to not start link
        runtime PM for devices which can't detect link change
        (such as smsc95xx)

        Thanks for Oliver's review.

 drivers/net/usb/asix_devices.c |    6 +-
 drivers/net/usb/cdc_ether.c    |    5 +-
 drivers/net/usb/cdc_ncm.c      |    9 +-
 drivers/net/usb/dm9601.c       |    7 +-
 drivers/net/usb/mcs7830.c      |    6 +-
 drivers/net/usb/sierra_net.c   |    6 +-
 drivers/net/usb/usbnet.c       |  280 +++++++++++++++++++++++++++++++++++++++-
 include/linux/usb/usbnet.h     |   22 +++-
 8 files changed, 306 insertions(+), 35 deletions(-)


Thanks,
--
Ming Lei

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to