usb: improve "not suspended yet" message in hub_suspend()
authorDan Williams <dan.j.williams@intel.com>
Tue, 17 Jun 2014 23:16:22 +0000 (16:16 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Jun 2014 23:44:57 +0000 (16:44 -0700)
Reading through a recent bug report [1], Alan notes:

  "Dan, the warning message in hub_suspend() should mention that the
   child device isn't suspended yet."

...update the warning from:

  "usb usb3-port4: not suspended yet"

...to:

   "usb usb3-port4: device 3-4: not suspended yet"

[1]: http://marc.info/?l=linux-usb&m=140290586301336&w=2

Reported-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/hub.c

index ec6f05cbbae335589cd1b8e417307a9dd29ba054..78c3cd20d7aed6b1f2057e5a6aa8877884750711 100644 (file)
@@ -3458,7 +3458,8 @@ static int hub_suspend(struct usb_interface *intf, pm_message_t msg)
                struct usb_device *udev = port_dev->child;
 
                if (udev && udev->can_submit) {
-                       dev_warn(&port_dev->dev, "not suspended yet\n");
+                       dev_warn(&port_dev->dev, "device %s not suspended yet\n",
+                                       dev_name(&udev->dev));
                        if (PMSG_IS_AUTO(msg))
                                return -EBUSY;
                }