diff options
-rw-r--r-- | drivers/net/usb/cdc_subset.c | 27 | ||||
-rw-r--r-- | drivers/net/usb/usbnet.c | 8 | ||||
-rw-r--r-- | include/linux/usb/usbnet.h | 3 |
3 files changed, 2 insertions, 36 deletions
diff --git a/drivers/net/usb/cdc_subset.c b/drivers/net/usb/cdc_subset.c index 3ef411efd86e..91f0919fe278 100644 --- a/drivers/net/usb/cdc_subset.c +++ b/drivers/net/usb/cdc_subset.c | |||
@@ -85,34 +85,9 @@ static int always_connected (struct usbnet *dev) | |||
85 | * | 85 | * |
86 | *-------------------------------------------------------------------------*/ | 86 | *-------------------------------------------------------------------------*/ |
87 | 87 | ||
88 | static void m5632_recover(struct usbnet *dev) | ||
89 | { | ||
90 | struct usb_device *udev = dev->udev; | ||
91 | struct usb_interface *intf = dev->intf; | ||
92 | int r; | ||
93 | |||
94 | r = usb_lock_device_for_reset(udev, intf); | ||
95 | if (r < 0) | ||
96 | return; | ||
97 | |||
98 | usb_reset_device(udev); | ||
99 | usb_unlock_device(udev); | ||
100 | } | ||
101 | |||
102 | static int dummy_prereset(struct usb_interface *intf) | ||
103 | { | ||
104 | return 0; | ||
105 | } | ||
106 | |||
107 | static int dummy_postreset(struct usb_interface *intf) | ||
108 | { | ||
109 | return 0; | ||
110 | } | ||
111 | |||
112 | static const struct driver_info ali_m5632_info = { | 88 | static const struct driver_info ali_m5632_info = { |
113 | .description = "ALi M5632", | 89 | .description = "ALi M5632", |
114 | .flags = FLAG_POINTTOPOINT, | 90 | .flags = FLAG_POINTTOPOINT, |
115 | .recover = m5632_recover, | ||
116 | }; | 91 | }; |
117 | 92 | ||
118 | #endif | 93 | #endif |
@@ -357,8 +332,6 @@ static struct usb_driver cdc_subset_driver = { | |||
357 | .probe = usbnet_probe, | 332 | .probe = usbnet_probe, |
358 | .suspend = usbnet_suspend, | 333 | .suspend = usbnet_suspend, |
359 | .resume = usbnet_resume, | 334 | .resume = usbnet_resume, |
360 | .pre_reset = dummy_prereset, | ||
361 | .post_reset = dummy_postreset, | ||
362 | .disconnect = usbnet_disconnect, | 335 | .disconnect = usbnet_disconnect, |
363 | .id_table = products, | 336 | .id_table = products, |
364 | .disable_hub_initiated_lpm = 1, | 337 | .disable_hub_initiated_lpm = 1, |
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 5173821a9575..f9e96c427558 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c | |||
@@ -1218,12 +1218,8 @@ void usbnet_tx_timeout (struct net_device *net) | |||
1218 | 1218 | ||
1219 | unlink_urbs (dev, &dev->txq); | 1219 | unlink_urbs (dev, &dev->txq); |
1220 | tasklet_schedule (&dev->bh); | 1220 | tasklet_schedule (&dev->bh); |
1221 | /* this needs to be handled individually because the generic layer | 1221 | |
1222 | * doesn't know what is sufficient and could not restore private | 1222 | // FIXME: device recovery -- reset? |
1223 | * information if a remedy of an unconditional reset were used. | ||
1224 | */ | ||
1225 | if (dev->driver_info->recover) | ||
1226 | (dev->driver_info->recover)(dev); | ||
1227 | } | 1223 | } |
1228 | EXPORT_SYMBOL_GPL(usbnet_tx_timeout); | 1224 | EXPORT_SYMBOL_GPL(usbnet_tx_timeout); |
1229 | 1225 | ||
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index 26088feb6608..0662e98fef72 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
@@ -148,9 +148,6 @@ struct driver_info { | |||
148 | struct sk_buff *(*tx_fixup)(struct usbnet *dev, | 148 | struct sk_buff *(*tx_fixup)(struct usbnet *dev, |
149 | struct sk_buff *skb, gfp_t flags); | 149 | struct sk_buff *skb, gfp_t flags); |
150 | 150 | ||
151 | /* recover from timeout */ | ||
152 | void (*recover)(struct usbnet *dev); | ||
153 | |||
154 | /* early initialization code, can sleep. This is for minidrivers | 151 | /* early initialization code, can sleep. This is for minidrivers |
155 | * having 'subminidrivers' that need to do extra initialization | 152 | * having 'subminidrivers' that need to do extra initialization |
156 | * right after minidriver have initialized hardware. */ | 153 | * right after minidriver have initialized hardware. */ |