* [PATCH v2] usb: host: xhci-hub: drop redundant PORTSC register read
@ 2022-02-14 19:00 Sergey Shtylyov
0 siblings, 0 replies; only message in thread
From: Sergey Shtylyov @ 2022-02-14 19:00 UTC (permalink / raw)
To: Mathias Nyman, linux-usb, Greg Kroah-Hartman
In xhci_hub_control(), there are many PORTSC register readbacks in several
branches of the *switch* statement which get duplicated right after that
*switch* by reading back that register once more -- which is done to flush
the posted writes. Drop that redundant PORTSC readback...
Found by Linux Verification Center (linuxtesting.org) with the SVACE static
analysis tool.
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
This patch is against the 'usb-next' branch of Greg KH's 'usb.git' repo.
Changes in version 2:
- dropped the register readback after the *switch* not inside it, updated
the patch description/subject accordingly;
- added the reigster name in the patch description/subject.
drivers/usb/host/xhci-hub.c | 2 --
1 file changed, 2 deletions(-)
Index: usb/drivers/usb/host/xhci-hub.c
===================================================================
--- usb.orig/drivers/usb/host/xhci-hub.c
+++ usb/drivers/usb/host/xhci-hub.c
@@ -1522,8 +1522,6 @@ int xhci_hub_control(struct usb_hcd *hcd
default:
goto error;
}
- /* unblock any posted writes */
- temp = readl(ports[wIndex]->addr);
break;
case ClearPortFeature:
if (!wIndex || wIndex > max_ports)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-02-14 21:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-14 19:00 [PATCH v2] usb: host: xhci-hub: drop redundant PORTSC register read Sergey Shtylyov
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).