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 2/2] usb-redir: remove 'remote wakeup' flag from configuration descriptor
Date: Tue, 3 Dec 2019 11:53:02 +0100	[thread overview]
Message-ID: <20191203105302.wm7tcy3f4ysuesrf@sirius.home.kraxel.org> (raw)
In-Reply-To: <20191202123430.7125-3-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
> +         */
> +        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



  reply	other threads:[~2019-12-03 10:57 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
2019-12-02 12:34 ` [PATCH 2/2] usb-redir: " Yuri Benditovich
2019-12-03 10:53   ` Gerd Hoffmann [this message]
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=20191203105302.wm7tcy3f4ysuesrf@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).