mirror of
https://github.com/apache/nuttx.git
synced 2026-10-03 04:07:55 +00:00
drivers/usbhost: Do not disable an xHCI port while probing it.
xhci_probe_ports() wrote PORTSC back to clear the change bits, including PED, which is write-one-to-clear. A port that came up enabled, which is what a device attached at power up produces, was switched off by the act of reading it. Mask PED out of the value written back. The port status worker already does this. Assisted-by: Claude:claude-opus-5 Signed-off-by: Justin Hammond <justin@dynam.ac>
This commit is contained in:
parent
648aa30e37
commit
e03c23c4ae
1 changed files with 6 additions and 1 deletions
|
|
@ -1291,8 +1291,13 @@ static void xhci_probe_ports(FAR struct usbhost_xhci_s *priv)
|
|||
portsc = xhci_oper_getreg(priv, XHCI_PORTSC(i));
|
||||
priv->rhport[i].connected = ((portsc & XHCI_PORTSC_CCS) != 0);
|
||||
|
||||
/* Clear status change */
|
||||
/* Clear status change, but not PED. Port Enabled/Disabled is
|
||||
* write-one-to-clear, so writing back what was read disables any
|
||||
* port that came up enabled, which is what a device attached at
|
||||
* power up does.
|
||||
*/
|
||||
|
||||
portsc &= ~XHCI_PORTSC_PED;
|
||||
xhci_oper_putreg(priv, XHCI_PORTSC(i), portsc);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue