Skip to content

Commit 1d8fcba

Browse files
committed
Revert "cdc_subset: deal with a device that needs reset for timeout"
This reverts commit 20fbe3a. As reported by Stephen Rothwell, it causes compile failures in certain configurations: drivers/net/usb/cdc_subset.c:360:15: error: 'dummy_prereset' undeclared here (not in a function) .pre_reset = dummy_prereset, ^ drivers/net/usb/cdc_subset.c:361:16: error: 'dummy_postreset' undeclared here (not in a function) .post_reset = dummy_postreset, ^ Reported-by: Stephen Rothwell <[email protected]> Acked-by: David Miller <[email protected]> Cc: Oliver Neukum <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent b527cae commit 1d8fcba

File tree

3 files changed

+2
-36
lines changed

3 files changed

+2
-36
lines changed

drivers/net/usb/cdc_subset.c

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -85,34 +85,9 @@ static int always_connected (struct usbnet *dev)
8585
*
8686
*-------------------------------------------------------------------------*/
8787

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-
11288
static const struct driver_info ali_m5632_info = {
11389
.description = "ALi M5632",
11490
.flags = FLAG_POINTTOPOINT,
115-
.recover = m5632_recover,
11691
};
11792

11893
#endif
@@ -357,8 +332,6 @@ static struct usb_driver cdc_subset_driver = {
357332
.probe = usbnet_probe,
358333
.suspend = usbnet_suspend,
359334
.resume = usbnet_resume,
360-
.pre_reset = dummy_prereset,
361-
.post_reset = dummy_postreset,
362335
.disconnect = usbnet_disconnect,
363336
.id_table = products,
364337
.disable_hub_initiated_lpm = 1,

drivers/net/usb/usbnet.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,12 +1218,8 @@ void usbnet_tx_timeout (struct net_device *net)
12181218

12191219
unlink_urbs (dev, &dev->txq);
12201220
tasklet_schedule (&dev->bh);
1221-
/* this needs to be handled individually because the generic layer
1222-
* doesn't know what is sufficient and could not restore private
1223-
* information if a remedy of an unconditional reset were used.
1224-
*/
1225-
if (dev->driver_info->recover)
1226-
(dev->driver_info->recover)(dev);
1221+
1222+
// FIXME: device recovery -- reset?
12271223
}
12281224
EXPORT_SYMBOL_GPL(usbnet_tx_timeout);
12291225

include/linux/usb/usbnet.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,6 @@ struct driver_info {
148148
struct sk_buff *(*tx_fixup)(struct usbnet *dev,
149149
struct sk_buff *skb, gfp_t flags);
150150

151-
/* recover from timeout */
152-
void (*recover)(struct usbnet *dev);
153-
154151
/* early initialization code, can sleep. This is for minidrivers
155152
* having 'subminidrivers' that need to do extra initialization
156153
* right after minidriver have initialized hardware. */

0 commit comments

Comments
 (0)