All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] ehci: clear suspend bit on detach
Date: Wed, 21 Oct 2015 09:47:56 +0200	[thread overview]
Message-ID: <5627432C.5000700@redhat.com> (raw)
In-Reply-To: <1445413462-18004-1-git-send-email-kraxel@redhat.com>

Hi,

On 21-10-15 09:44, Gerd Hoffmann wrote:
> When a device is detached, clear the suspend bit (PORTSC_SUSPEND)
> in the port status register.
>
> The specs are not *that* clear what is supposed to happen in case
> a suspended device is unplugged.  But the enable bit (PORTSC_PED)
> is cleared, and the specs mention setting suspend with enable being
> unset is undefined behavior.  So clearing them both looks reasonable,
> and it actually fixes the reported bug.
>
> https://bugzilla.redhat.com/show_bug.cgi?id=1268879
>
> Cc: Hans de Goede <hdegoede@redhat.com>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

Thanks for fixing this. Patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans


> ---
>   hw/usb/hcd-ehci.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
> index 64a54c6..4e2161b 100644
> --- a/hw/usb/hcd-ehci.c
> +++ b/hw/usb/hcd-ehci.c
> @@ -726,7 +726,7 @@ static void ehci_detach(USBPort *port)
>       ehci_queues_rip_device(s, port->dev, 0);
>       ehci_queues_rip_device(s, port->dev, 1);
>
> -    *portsc &= ~(PORTSC_CONNECT|PORTSC_PED);
> +    *portsc &= ~(PORTSC_CONNECT|PORTSC_PED|PORTSC_SUSPEND);
>       *portsc |= PORTSC_CSC;
>
>       ehci_raise_irq(s, USBSTS_PCD);
>

      reply	other threads:[~2015-10-21  7:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-21  7:44 [Qemu-devel] [PATCH] ehci: clear suspend bit on detach Gerd Hoffmann
2015-10-21  7:47 ` Hans de Goede [this message]

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=5627432C.5000700@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.