[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] usb-host: remove 'remote wakeup' flag from configuration
From: |
Gerd Hoffmann |
Subject: |
Re: [PATCH 1/2] usb-host: remove 'remote wakeup' flag from configuration descriptor |
Date: |
Tue, 3 Dec 2019 11:48:08 +0100 |
Hi,
> + /* If this is GET_DESCRIPTOR request for configuration descriptor,
> + * remove 'remote wakeup' flag from it to prevent idle power down
> + * in Windows guest */
scripts/checkpatch.pl complains about that, please fix (and also the
other checkpatch warnings).
> + if (s->suppress_remote_wake &&
> + udev->setup_buf[0] == USB_DIR_IN &&
> + udev->setup_buf[1] == USB_REQ_GET_DESCRIPTOR &&
> + udev->setup_buf[3] == USB_DT_CONFIG && udev->setup_buf[2] == 0 &&
> + xfer->actual_length > offsetof(struct libusb_config_descriptor,
> bmAttributes) &&
> + (conf->bmAttributes & USB_CFG_ATT_WAKEUP)) {
> + struct libusb_device_descriptor desc;
> + libusb_get_device_descriptor(s->dev, &desc);
> + trace_usb_host_remote_wakeup_removed(desc.idVendor,
> desc.idProduct);
Please use s->bus_num and s->addr to identify the device, like all the
other trace points do. I don't think there is a need to log
desc.idVendor and desc.idProduct here.
Otherwise the patch looks fine.
cheers,
Gerd