usb: xhci: set RWE only for remote wakeup capable devices
Subsystems (2)
PATCH 1/1 usb: xhci: set RWE only for remote wakeup capable devices
Xhci spec requires in section 4.23.5.1.1.1 that the RWE bit of USB2 PORTPMSC register should only set for remote wakeup capble devices.
This was suggested by Mathias in the following discussion thread.
http://marc.info/?l=linux-usb&m=148154757829677&w=2
--- drivers/usb/host/xhci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/usb/host/xhci.c +3 -1
@@ -4191,7 +4191,9 @@ int xhci_set_usb2_hardware_lpm(struct usb_hcd *hcd, } pm_val &= ~PORT_HIRD_MASK ; - pm_val |=PORT_HIRD (hird) |PORT_RWE |PORT_L1DS (udev->slot_id); + pm_val |=PORT_HIRD (hird) |PORT_L1DS (udev->slot_id); +if (udev->do_remote_wakeup) + pm_val |=PORT_RWE ;writel (pm_val, pm_addr); pm_val =readl (pm_addr); pm_val |=PORT_HLE ;
Signature · 1 line
2.1.4
Hi Mathias,
Quoted 17 lines · Lu Baolu
Xhci spec requires in section 4.23.5.1.1.1 that the RWE bit of USB2 PORTPMSC register should only set for remote wakeup capble devices.
This was suggested by Mathias in the following discussion thread.
http://marc.info/?l=linux-usb&m=148154757829677&w=2Suggested-by Mathias Nyman <[email protected]>Signed-off-by Lu Baolu <[email protected]>--- drivers/usb/host/xhci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/usb/host/xhci.c +0
-0
drivers/usb/host/xhci.c int xhci_set_usb2_hardware_lpm(struct usb_hcd *hcd, · line 4195
Quoted 6 lines
drivers/usb/host/xhci.c +2
-1@@ -4191,7 +4191,9 @@ int xhci_set_usb2_hardware_lpm(struct usb_hcd *hcd, } pm_val &= ~PORT_HIRD_MASK ; - pm_val |=PORT_HIRD (hird) |PORT_RWE |PORT_L1DS (udev->slot_id); + pm_val |=PORT_HIRD (hird) |PORT_L1DS (udev->slot_id); +if (udev->do_remote_wakeup)
This is not the right thing to check remote wakeup capability of a device. I will rework it and submit v2. Please just ignore this one.
Sorry about this.
Best regards,
Lu Baolu
Quoted 4 lines
drivers/usb/host/xhci.c +1
-0+ pm_val |=PORT_RWE ;writel (pm_val, pm_addr); pm_val =readl (pm_addr); pm_val |=PORT_HLE ;