Don't issue USB resume signalling in USB device mode, if the USB power

mode is ON and suspend is detected. This confuses iPads running in USB
host mode at least.

MFC after:	1 week
Approved by:	re (hrs)
This commit is contained in:
hselasky 2013-09-12 10:39:38 +00:00
parent 9ea4b5f27d
commit 3d434bd768

View File

@ -2083,7 +2083,8 @@ usbd_transfer_power_ref(struct usb_xfer *xfer, int val)
static uint8_t
usb_peer_should_wakeup(struct usb_device *udev)
{
return ((udev->power_mode == USB_POWER_MODE_ON) ||
return (((udev->power_mode == USB_POWER_MODE_ON) &&
(udev->flags.usb_mode == USB_MODE_HOST)) ||
(udev->driver_added_refcount != udev->bus->driver_added_refcount) ||
(udev->re_enumerate_wait != 0) ||
(udev->pwr_save.type_refs[UE_ISOCHRONOUS] != 0) ||