Re: [PATCHv2][RFC] smsc95xx: enable dynamic autosuspend

2012-12-14 Thread Ming Lei
On Fri, Dec 14, 2012 at 10:22 PM, Oliver Neukum wrote: > > On second thought, I think that if a driver can do manage_power(), even > only for a subset of devices, it should implement it. Doctoring the table of > methods > is very, very ugly, Sorry, why is it very ugly? netdev_ops/ethtool_ops is

Re: [PATCHv2][RFC] smsc95xx: enable dynamic autosuspend

2012-12-14 Thread Oliver Neukum
On Friday 14 December 2012 13:35:04 Steve Glendinning wrote: > Thanks Ming, I've updated this. Very good. Good catch Ming. > > IMO, it is better to keep smsc95xx_info.manage_power as NULL > > for devices without FEATURE_AUTOSUSPEND, so that fewer code > > and follow the current .mange_power usag

Re: [PATCHv2][RFC] smsc95xx: enable dynamic autosuspend

2012-12-14 Thread Steve Glendinning
On 11 December 2012 16:27, Joe Perches wrote: > On Tue, 2012-12-11 at 15:26 +, Steve Glendinning wrote: > []> diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c > [] >> + ret = smsc95xx_read_reg_nopm(dev, RX_FIFO_INF, &val); >> + if (ret < 0) { >> + netdev

Re: [PATCHv2][RFC] smsc95xx: enable dynamic autosuspend

2012-12-14 Thread Steve Glendinning
On 11 December 2012 16:13, Ming Lei wrote: > On Tue, Dec 11, 2012 at 11:26 PM, Steve Glendinning > wrote: >> + >> + if (on) >> + usb_autopm_get_interface_no_resume(dev->intf); >> + else >> + usb_autopm_put_interface_no_suspend(dev->intf); > > The above line

Re: [PATCHv2][RFC] smsc95xx: enable dynamic autosuspend

2012-12-11 Thread Joe Perches
On Tue, 2012-12-11 at 15:26 +, Steve Glendinning wrote: > This patch enables USB dynamic autosuspend for LAN9500A. This > saves very little power in itself, but it allows power saving > in upstream hubs/hosts. []> diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c [] > +

Re: [PATCHv2][RFC] smsc95xx: enable dynamic autosuspend

2012-12-11 Thread Ming Lei
On Tue, Dec 11, 2012 at 11:26 PM, Steve Glendinning wrote: > This patch enables USB dynamic autosuspend for LAN9500A. This > saves very little power in itself, but it allows power saving > in upstream hubs/hosts. > > The earlier devices in this family (LAN9500/9512/9514) do not > support this fea

[PATCHv2][RFC] smsc95xx: enable dynamic autosuspend

2012-12-11 Thread Steve Glendinning
This patch enables USB dynamic autosuspend for LAN9500A. This saves very little power in itself, but it allows power saving in upstream hubs/hosts. The earlier devices in this family (LAN9500/9512/9514) do not support this feature. Signed-off-by: Steve Glendinning --- drivers/net/usb/smsc95xx.