Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1557207 > unrolled thread

[PATCH 1/1] usb: xhci: set RWE only for remote wakeup capable devices

Started byLu Baolu <baolu.lu@linux.intel.com>
First post2017-01-12 10:00 +0100
Last post2017-01-12 11:10 +0100
Articles 2 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/1] usb: xhci: set RWE only for remote wakeup capable devices Lu Baolu <baolu.lu@linux.intel.com> - 2017-01-12 10:00 +0100
    Re: [PATCH 1/1] usb: xhci: set RWE only for remote wakeup capable  devices Lu Baolu <baolu.lu@linux.intel.com> - 2017-01-12 11:10 +0100

#1557207 — [PATCH 1/1] usb: xhci: set RWE only for remote wakeup capable devices

FromLu Baolu <baolu.lu@linux.intel.com>
Date2017-01-12 10:00 +0100
Subject[PATCH 1/1] usb: xhci: set RWE only for remote wakeup capable devices
Message-ID<sYJoK-1PX-13@gated-at.bofh.it>
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

Suggested-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
---
 drivers/usb/host/xhci.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 0c8deb9..d887e09 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -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;
-- 
2.1.4

[toc] | [next] | [standalone]


#1557273 — Re: [PATCH 1/1] usb: xhci: set RWE only for remote wakeup capable devices

FromLu Baolu <baolu.lu@linux.intel.com>
Date2017-01-12 11:10 +0100
SubjectRe: [PATCH 1/1] usb: xhci: set RWE only for remote wakeup capable devices
Message-ID<sYKuv-2GC-45@gated-at.bofh.it>
In reply to#1557207
Hi Mathias,

On 01/12/2017 04:53 PM, Lu Baolu wrote:
> 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
>
> Suggested-by: Mathias Nyman <mathias.nyman@linux.intel.com>
> Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
> ---
>  drivers/usb/host/xhci.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
> index 0c8deb9..d887e09 100644
> --- a/drivers/usb/host/xhci.c
> +++ b/drivers/usb/host/xhci.c
> @@ -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

> +			pm_val |= PORT_RWE;
>  		writel(pm_val, pm_addr);
>  		pm_val = readl(pm_addr);
>  		pm_val |= PORT_HLE;

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web