From: Jules Maselbas <jmaselbas@kalray.eu>
To: barebox@lists.infradead.org
Cc: Jules Maselbas <jmaselbas@kalray.eu>
Subject: [PATCH 2/6] usb: hub: Only clear port reset status if set
Date: Thu, 10 Oct 2019 10:14:59 +0200 [thread overview]
Message-ID: <20191010081503.15254-2-jmaselbas@kalray.eu> (raw)
In-Reply-To: <20191010081503.15254-1-jmaselbas@kalray.eu>
Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu>
---
drivers/usb/core/hub.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 91a938567..910a87021 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -158,7 +158,8 @@ int hub_port_reset(struct usb_device *hub, int port, struct usb_device *usb)
return -1;
}
- usb_clear_port_feature(hub, port + 1, USB_PORT_FEAT_C_RESET);
+ if (portstatus & USB_PORT_STAT_C_RESET)
+ usb_clear_port_feature(hub, port + 1, USB_PORT_FEAT_C_RESET);
if (portstatus & USB_PORT_STAT_HIGH_SPEED)
usb->speed = USB_SPEED_HIGH;
--
2.21.0.196.g041f5ea
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2019-10-10 8:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-10 8:14 [PATCH 1/6] usb: hub: Use more accurate struct name Jules Maselbas
2019-10-10 8:14 ` Jules Maselbas [this message]
2019-10-10 8:15 ` [PATCH 3/6] usb: string: Use dma_alloc instead of a local buffer Jules Maselbas
2019-10-10 8:15 ` [PATCH 4/6] usb: string: Use le16_to_cpu for langid Jules Maselbas
2019-10-10 20:41 ` Andrey Smirnov
2019-10-14 11:42 ` Sascha Hauer
2019-10-14 15:09 ` Jules Maselbas
2019-10-10 8:15 ` [PATCH 5/6] usb: string: size_t is unsigned Jules Maselbas
2019-10-10 8:15 ` [PATCH 6/6] usb: string: Minor changes Jules Maselbas
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=20191010081503.15254-2-jmaselbas@kalray.eu \
--to=jmaselbas@kalray.eu \
--cc=barebox@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox