Hi, > + /* > + * If this is GET_DESCRIPTOR request for configuration descriptor, > + * remove 'remote wakeup' flag from it to prevent idle power down > + * in Windows guest > + */ > + if (dev->suppress_remote_wake && > + control_packet->requesttype == USB_DIR_IN && > + control_packet->request == USB_REQ_GET_DESCRIPTOR && > + control_packet->value == (USB_DT_CONFIG << 8) && > + control_packet->index == 0 && > + /* bmAttributes field of config descriptor */ > + len > 7 && (dev->dev.data_buf[7] & USB_CFG_ATT_WAKEUP)) { > + DPRINTF("Removed remote wake %04X:%04X\n", > + dev->device_info.vendor_id, > + dev->device_info.product_id); > + dev->dev.data_buf[7] &= ~USB_CFG_ATT_WAKEUP; > + }
Hmm, not much opportunity to factor out stuff to share with usb-host. Ok then. I think checkpatch has complains for this too, otherwise it looks fine. cheers, Gerd