smsc95xx: add missing .reset_resume hook and reset card
PATCH 1/1 smsc95xx: add missing .reset_resume hook and reset card
This patch fixes the undefined behaviour (random MAC, interface goes down) of smsc95xx driver after resume from suspend. Calling smsc95xx_reset() is needed to properly set hw registers of card and bring interface up to defined state.
Signed-off-by Viliam Mateicka <[email protected]>
--- drivers/net/usb/smsc95xx.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)
drivers/net/usb/smsc95xx.c +12 -0
@@ -1181,6 +1181,17 @@ static struct sk_buff *smsc95xx_tx_fixup(struct usbnet *dev,return skb; } +static int smsc95xx_reset_resume (struct usb_interface *intf) +{ +struct usbnet *dev =usb_get_intfdata (intf); + +smsc95xx_reset (dev); + +usbnet_resume (intf); + +return 0 ; +} +static const struct driver_info smsc95xx_info = { .description ="smsc95xx USB 2.0 Ethernet" , .bind = smsc95xx_bind,
@@ -1295,6 +1306,7 @@ static struct usb_driver smsc95xx_driver = { .suspend = usbnet_suspend, .resume = usbnet_resume, .disconnect = usbnet_disconnect, + .reset_resume = smsc95xx_reset_resume, };static int __init smsc95xx_init (void )
Signature · 1 line
1.7.4.1
David Miller
maintainerFrom: Viliam Mateicka <[email protected]>
Date: Thu, 14 Jul 2011 13:51:46 +0200
Quoted 4 lines
This patch fixes the undefined behaviour (random MAC, interface goes down) of smsc95xx driver after resume from suspend. Calling
smsc95xx_reset()is needed to properly set hw registers of card and bring interface up to defined state.Signed-off-by Viliam Mateicka <[email protected]>
Please submit networking patches to [email protected] so that it can be tracked properly.