On Sat, 26 Apr 2014, Peter Münster wrote:

> On Tue, Apr 22 2014, Alan Stern wrote:
> 
> > Here's diag5; it's essentially a subset of diag4.  Test it in the same
> > way.
> >
> > (Not being able to wake up the system from the keyboard is expected
> > for diag4.  With diag5, you may or may not be able to use the keyboard
> > for wakeup -- try it and see.  It's even possible that the system will 
> > crash if you use the keyboard but not if you use the power button!)
> 
> Hi Alan,
> 
> I can wakeup with the keyboard and there is no crash. Please find
> attached the log. There are 2 s2ram-wakeup cycles: the first wakeup is
> with the power-button, the second with the keyboard.

That's interesting.  Here's another test you should try with that same
kernel.  Start moving the mouse before you wake up the system, and keep
moving it until the system has fully resumed.  When you do this, does
it work right?  That is, when the screen turns back on, do you see the
mouse cursor moving around?

Below is the next patch in the series, diag6.  This adds back more 
material that was removeed in diag5.  My guess is that this one will 
cause your system to crash during resume.

Alan Stern



Index: peter/drivers/usb/core/hub.c
===================================================================
--- peter.orig/drivers/usb/core/hub.c
+++ peter/drivers/usb/core/hub.c
@@ -2981,7 +2981,7 @@ int usb_port_suspend(struct usb_device *
         * Therefore we will turn on the suspend feature if udev or any of its
         * descendants is enabled for remote wakeup.
         */
-       else if (PMSG_IS_AUTO(msg) || wakeup_enabled_descendants(udev) > 0)
+       else if (0)
                status = set_port_feature(hub->hdev, port1,
                                USB_PORT_FEAT_SUSPEND);
        else {
@@ -3107,38 +3107,6 @@ static int finish_port_resume(struct usb
        if (status) {
                dev_dbg(&udev->dev, "gone after usb resume? status %d\n",
                                status);
-       /*
-        * There are a few quirky devices which violate the standard
-        * by claiming to have remote wakeup enabled after a reset,
-        * which crash if the feature is cleared, hence check for
-        * udev->reset_resume
-        */
-       } else if (udev->actconfig && !udev->reset_resume) {
-               if (!hub_is_superspeed(udev->parent)) {
-                       le16_to_cpus(&devstatus);
-                       if (devstatus & (1 << USB_DEVICE_REMOTE_WAKEUP))
-                               status = usb_control_msg(udev,
-                                               usb_sndctrlpipe(udev, 0),
-                                               USB_REQ_CLEAR_FEATURE,
-                                               USB_RECIP_DEVICE,
-                                               USB_DEVICE_REMOTE_WAKEUP, 0,
-                                               NULL, 0,
-                                               USB_CTRL_SET_TIMEOUT);
-               } else {
-                       status = usb_get_status(udev, USB_RECIP_INTERFACE, 0,
-                                       &devstatus);
-                       le16_to_cpus(&devstatus);
-                       if (!status && devstatus & (USB_INTRF_STAT_FUNC_RW_CAP
-                                       | USB_INTRF_STAT_FUNC_RW))
-                               status =
-                                       usb_disable_function_remotewakeup(udev);
-               }
-
-               if (status)
-                       dev_dbg(&udev->dev,
-                               "disable remote wakeup, status %d\n",
-                               status);
-               status = 0;
        }
        return status;
 }

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to