qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Yuri Benditovich <yuri.benditovich@daynix.com>
Cc: yan@daynix.com, ehabkost@redhat.com, qemu-devel@nongnu.org
Subject: Re: [PATCH 1/2] usb-host: remove 'remote wakeup' flag from configuration descriptor
Date: Tue, 3 Dec 2019 11:48:08 +0100	[thread overview]
Message-ID: <20191203104808.w23xl73o6wy5qtrp@sirius.home.kraxel.org> (raw)
In-Reply-To: <20191202123430.7125-2-yuri.benditovich@daynix.com>

  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



  reply	other threads:[~2019-12-03 10:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-02 12:34 [PATCH 0/2] Remove 'remote wakeup' flag from USB config descriptor Yuri Benditovich
2019-12-02 12:34 ` [PATCH 1/2] usb-host: remove 'remote wakeup' flag from configuration descriptor Yuri Benditovich
2019-12-03 10:48   ` Gerd Hoffmann [this message]
2019-12-02 12:34 ` [PATCH 2/2] usb-redir: " Yuri Benditovich
2019-12-03 10:53   ` Gerd Hoffmann
2019-12-02 16:30 ` [PATCH 0/2] Remove 'remote wakeup' flag from USB config descriptor no-reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191203104808.w23xl73o6wy5qtrp@sirius.home.kraxel.org \
    --to=kraxel@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yan@daynix.com \
    --cc=yuri.benditovich@daynix.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).