Revert "cdc_subset: deal with a device that needs reset for timeout"
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 30 Jul 2014 15:56:23 +0000 (08:56 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 30 Jul 2014 15:56:23 +0000 (08:56 -0700)
This reverts commit 20fbe3ae990fd54fc7d1f889d61958bc8b38f254.

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 <sfr@canb.auug.org.au>
Acked-by: David Miller <davem@davemloft.net>
Cc: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/net/usb/cdc_subset.c
drivers/net/usb/usbnet.c
include/linux/usb/usbnet.h

index 3ef411efd86ece66f59053d638f7fa34fd67995c..91f0919fe27891cd4993e63488fa3094f19fc197 100644 (file)
@@ -85,34 +85,9 @@ static int always_connected (struct usbnet *dev)
  *
  *-------------------------------------------------------------------------*/
 
-static void m5632_recover(struct usbnet *dev)
-{
-       struct usb_device       *udev = dev->udev;
-       struct usb_interface    *intf = dev->intf;
-       int r;
-
-       r = usb_lock_device_for_reset(udev, intf);
-       if (r < 0)
-               return;
-
-       usb_reset_device(udev);
-       usb_unlock_device(udev);
-}
-
-static int dummy_prereset(struct usb_interface *intf)
-{
-       return 0;
-}
-
-static int dummy_postreset(struct usb_interface *intf)
-{
-       return 0;
-}
-
 static const struct driver_info        ali_m5632_info = {
        .description =  "ALi M5632",
        .flags       = FLAG_POINTTOPOINT,
-       .recover     = m5632_recover,
 };
 
 #endif
@@ -357,8 +332,6 @@ static struct usb_driver cdc_subset_driver = {
        .probe =        usbnet_probe,
        .suspend =      usbnet_suspend,
        .resume =       usbnet_resume,
-       .pre_reset =    dummy_prereset,
-       .post_reset =   dummy_postreset,
        .disconnect =   usbnet_disconnect,
        .id_table =     products,
        .disable_hub_initiated_lpm = 1,
index 5173821a9575e4131f9b45ceef41c9c1eda52cfd..f9e96c4275589ebc63b3d87432fe50471c287872 100644 (file)
@@ -1218,12 +1218,8 @@ void usbnet_tx_timeout (struct net_device *net)
 
        unlink_urbs (dev, &dev->txq);
        tasklet_schedule (&dev->bh);
-       /* this needs to be handled individually because the generic layer
-        * doesn't know what is sufficient and could not restore private
-        * information if a remedy of an unconditional reset were used.
-        */
-       if (dev->driver_info->recover)
-               (dev->driver_info->recover)(dev);
+
+       // FIXME: device recovery -- reset?
 }
 EXPORT_SYMBOL_GPL(usbnet_tx_timeout);
 
index 26088feb660813448ac93391bee76c1e73b57d70..0662e98fef72b21fdabb7d14ac1fd71f2066a140 100644 (file)
@@ -148,9 +148,6 @@ struct driver_info {
        struct sk_buff  *(*tx_fixup)(struct usbnet *dev,
                                struct sk_buff *skb, gfp_t flags);
 
-       /* recover from timeout */
-       void    (*recover)(struct usbnet *dev);
-
        /* early initialization code, can sleep. This is for minidrivers
         * having 'subminidrivers' that need to do extra initialization
         * right after minidriver have initialized hardware. */