All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xhci: remove the unused sw_lpm_support
@ 2018-10-16 11:37 ` Zengtao (B)
  0 siblings, 0 replies; 6+ messages in thread
From: Zeng Tao @ 2018-10-16 11:37 UTC (permalink / raw)
  To: mathias.nyman, gregkh; +Cc: Zeng Tao, linux-usb, linux-kernel

It is introduced for the pre-0.96 xHC controllers, and the driver only
support HW LPM for 1.0 and later controllers.It's not actually used now
and is thought not to be used in the future any more, so just remove it.

Acked-by: Mathias Nyman <mathias.nyman@intel.com>
Signed-off-by: Zeng Tao <prime.zeng@hisilicon.com>
---
 drivers/usb/host/xhci-mem.c | 20 ++++----------------
 drivers/usb/host/xhci.c     |  3 +--
 drivers/usb/host/xhci.h     |  2 --
 3 files changed, 5 insertions(+), 20 deletions(-)

diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index b1f27aa..791c5d8 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -2181,23 +2181,11 @@ static void xhci_add_in_port(struct xhci_hcd *xhci, unsigned int num_ports,
 	if (major_revision < 0x03 && xhci->num_ext_caps < max_caps)
 		xhci->ext_caps[xhci->num_ext_caps++] = temp;
 
-	/* Check the host's USB2 LPM capability */
-	if ((xhci->hci_version == 0x96) && (major_revision != 0x03) &&
-			(temp & XHCI_L1C)) {
+	if ((xhci->hci_version >= 0x100) && (major_revision != 0x03) &&
+		 (temp & XHCI_HLC)) {
 		xhci_dbg_trace(xhci, trace_xhci_dbg_init,
-				"xHCI 0.96: support USB2 software lpm");
-		xhci->sw_lpm_support = 1;
-	}
-
-	if ((xhci->hci_version >= 0x100) && (major_revision != 0x03)) {
-		xhci_dbg_trace(xhci, trace_xhci_dbg_init,
-				"xHCI 1.0: support USB2 software lpm");
-		xhci->sw_lpm_support = 1;
-		if (temp & XHCI_HLC) {
-			xhci_dbg_trace(xhci, trace_xhci_dbg_init,
-					"xHCI 1.0: support USB2 hardware lpm");
-			xhci->hw_lpm_support = 1;
-		}
+			       "xHCI 1.0: support USB2 hardware lpm");
+		xhci->hw_lpm_support = 1;
 	}
 
 	port_offset--;
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 0420eef..d565d5a 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -4372,8 +4372,7 @@ static int xhci_update_device(struct usb_hcd *hcd, struct usb_device *udev)
 	struct xhci_hcd	*xhci = hcd_to_xhci(hcd);
 	int		portnum = udev->portnum - 1;
 
-	if (hcd->speed >= HCD_USB3 || !xhci->sw_lpm_support ||
-			!udev->lpm_capable)
+	if (hcd->speed >= HCD_USB3 || !udev->lpm_capable)
 		return 0;
 
 	/* we only support lpm for non-hub device connected to root hub yet */
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 6230a57..746129d 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1854,8 +1854,6 @@ struct xhci_hcd {
 	struct xhci_port	*hw_ports;
 	struct xhci_hub		usb2_rhub;
 	struct xhci_hub		usb3_rhub;
-	/* support xHCI 0.96 spec USB2 software LPM */
-	unsigned		sw_lpm_support:1;
 	/* support xHCI 1.0 spec USB2 hardware LPM */
 	unsigned		hw_lpm_support:1;
 	/* cached usb2 extened protocol capabilites */
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* xhci: remove the unused sw_lpm_support
@ 2018-10-16 11:37 ` Zengtao (B)
  0 siblings, 0 replies; 6+ messages in thread
From: Zengtao (B) @ 2018-10-16 11:37 UTC (permalink / raw)
  To: mathias.nyman, gregkh; +Cc: Zeng Tao, linux-usb, linux-kernel

It is introduced for the pre-0.96 xHC controllers, and the driver only
support HW LPM for 1.0 and later controllers.It's not actually used now
and is thought not to be used in the future any more, so just remove it.

Acked-by: Mathias Nyman <mathias.nyman@intel.com>
Signed-off-by: Zeng Tao <prime.zeng@hisilicon.com>
---
 drivers/usb/host/xhci-mem.c | 20 ++++----------------
 drivers/usb/host/xhci.c     |  3 +--
 drivers/usb/host/xhci.h     |  2 --
 3 files changed, 5 insertions(+), 20 deletions(-)

diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index b1f27aa..791c5d8 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -2181,23 +2181,11 @@ static void xhci_add_in_port(struct xhci_hcd *xhci, unsigned int num_ports,
 	if (major_revision < 0x03 && xhci->num_ext_caps < max_caps)
 		xhci->ext_caps[xhci->num_ext_caps++] = temp;
 
-	/* Check the host's USB2 LPM capability */
-	if ((xhci->hci_version == 0x96) && (major_revision != 0x03) &&
-			(temp & XHCI_L1C)) {
+	if ((xhci->hci_version >= 0x100) && (major_revision != 0x03) &&
+		 (temp & XHCI_HLC)) {
 		xhci_dbg_trace(xhci, trace_xhci_dbg_init,
-				"xHCI 0.96: support USB2 software lpm");
-		xhci->sw_lpm_support = 1;
-	}
-
-	if ((xhci->hci_version >= 0x100) && (major_revision != 0x03)) {
-		xhci_dbg_trace(xhci, trace_xhci_dbg_init,
-				"xHCI 1.0: support USB2 software lpm");
-		xhci->sw_lpm_support = 1;
-		if (temp & XHCI_HLC) {
-			xhci_dbg_trace(xhci, trace_xhci_dbg_init,
-					"xHCI 1.0: support USB2 hardware lpm");
-			xhci->hw_lpm_support = 1;
-		}
+			       "xHCI 1.0: support USB2 hardware lpm");
+		xhci->hw_lpm_support = 1;
 	}
 
 	port_offset--;
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 0420eef..d565d5a 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -4372,8 +4372,7 @@ static int xhci_update_device(struct usb_hcd *hcd, struct usb_device *udev)
 	struct xhci_hcd	*xhci = hcd_to_xhci(hcd);
 	int		portnum = udev->portnum - 1;
 
-	if (hcd->speed >= HCD_USB3 || !xhci->sw_lpm_support ||
-			!udev->lpm_capable)
+	if (hcd->speed >= HCD_USB3 || !udev->lpm_capable)
 		return 0;
 
 	/* we only support lpm for non-hub device connected to root hub yet */
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 6230a57..746129d 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1854,8 +1854,6 @@ struct xhci_hcd {
 	struct xhci_port	*hw_ports;
 	struct xhci_hub		usb2_rhub;
 	struct xhci_hub		usb3_rhub;
-	/* support xHCI 0.96 spec USB2 software LPM */
-	unsigned		sw_lpm_support:1;
 	/* support xHCI 1.0 spec USB2 hardware LPM */
 	unsigned		hw_lpm_support:1;
 	/* cached usb2 extened protocol capabilites */

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] xhci: remove the unused sw_lpm_support
@ 2018-10-16 12:33   ` Mathias Nyman
  0 siblings, 0 replies; 6+ messages in thread
From: Mathias Nyman @ 2018-10-16 12:33 UTC (permalink / raw)
  To: Zeng Tao, mathias.nyman, gregkh; +Cc: linux-usb, linux-kernel

On 16.10.2018 14:37, Zeng Tao wrote:
> It is introduced for the pre-0.96 xHC controllers, and the driver only
> support HW LPM for 1.0 and later controllers.It's not actually used now
> and is thought not to be used in the future any more, so just remove it.
> 
> Acked-by: Mathias Nyman <mathias.nyman@intel.com>

Please don't add my Acked-by to patches I haven't seen.

 From Documentation/process/submitting-patches.rst:
  
"Acked-by: is not as formal as Signed-off-by:.  It is a record that the acker
has at least reviewed the patch and has indicated acceptance."

> Signed-off-by: Zeng Tao <prime.zeng@hisilicon.com>

Otherwise the patch looks good, I'll queue it, and remove the extra Acked-by

Thanks
-Mathias

^ permalink raw reply	[flat|nested] 6+ messages in thread

* xhci: remove the unused sw_lpm_support
@ 2018-10-16 12:33   ` Mathias Nyman
  0 siblings, 0 replies; 6+ messages in thread
From: Mathias Nyman @ 2018-10-16 12:33 UTC (permalink / raw)
  To: Zeng Tao, mathias.nyman, gregkh; +Cc: linux-usb, linux-kernel

On 16.10.2018 14:37, Zeng Tao wrote:
> It is introduced for the pre-0.96 xHC controllers, and the driver only
> support HW LPM for 1.0 and later controllers.It's not actually used now
> and is thought not to be used in the future any more, so just remove it.
> 
> Acked-by: Mathias Nyman <mathias.nyman@intel.com>

Please don't add my Acked-by to patches I haven't seen.

 From Documentation/process/submitting-patches.rst:
  
"Acked-by: is not as formal as Signed-off-by:.  It is a record that the acker
has at least reviewed the patch and has indicated acceptance."

> Signed-off-by: Zeng Tao <prime.zeng@hisilicon.com>

Otherwise the patch looks good, I'll queue it, and remove the extra Acked-by

Thanks
-Mathias

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH] xhci: remove the unused sw_lpm_support
@ 2018-10-17  2:05     ` Zengtao (B)
  0 siblings, 0 replies; 6+ messages in thread
From: Zengtao (B) @ 2018-10-17  2:05 UTC (permalink / raw)
  To: Mathias Nyman, mathias.nyman, gregkh; +Cc: linux-usb, linux-kernel

Hi  Mathias:

>-----Original Message-----
>From: Mathias Nyman [mailto:mathias.nyman@linux.intel.com]
>Sent: Tuesday, October 16, 2018 8:34 PM
>To: Zengtao (B) <prime.zeng@hisilicon.com>; mathias.nyman@intel.com;
>gregkh@linuxfoundation.org
>Cc: linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org
>Subject: Re: [PATCH] xhci: remove the unused sw_lpm_support
>
>On 16.10.2018 14:37, Zeng Tao wrote:
>> It is introduced for the pre-0.96 xHC controllers, and the driver only
>> support HW LPM for 1.0 and later controllers.It's not actually used
>> now and is thought not to be used in the future any more, so just
>remove it.
>>
>> Acked-by: Mathias Nyman <mathias.nyman@intel.com>
>
>Please don't add my Acked-by to patches I haven't seen.
>
> From Documentation/process/submitting-patches.rst:
>
Thanks for pointing out the wrong tag, I meant to add suggested-by, ^_^

>"Acked-by: is not as formal as Signed-off-by:.  It is a record that the acker
>has at least reviewed the patch and has indicated acceptance."
>
>> Signed-off-by: Zeng Tao <prime.zeng@hisilicon.com>
>
>Otherwise the patch looks good, I'll queue it, and remove the extra
>Acked-by
>
It's ok for me,  thank you.

Regards
Zengtao 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* xhci: remove the unused sw_lpm_support
@ 2018-10-17  2:05     ` Zengtao (B)
  0 siblings, 0 replies; 6+ messages in thread
From: Zengtao (B) @ 2018-10-17  2:05 UTC (permalink / raw)
  To: Mathias Nyman, mathias.nyman, gregkh; +Cc: linux-usb, linux-kernel

Hi  Mathias:

>-----Original Message-----
>From: Mathias Nyman [mailto:mathias.nyman@linux.intel.com]
>Sent: Tuesday, October 16, 2018 8:34 PM
>To: Zengtao (B) <prime.zeng@hisilicon.com>; mathias.nyman@intel.com;
>gregkh@linuxfoundation.org
>Cc: linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org
>Subject: Re: [PATCH] xhci: remove the unused sw_lpm_support
>
>On 16.10.2018 14:37, Zeng Tao wrote:
>> It is introduced for the pre-0.96 xHC controllers, and the driver only
>> support HW LPM for 1.0 and later controllers.It's not actually used
>> now and is thought not to be used in the future any more, so just
>remove it.
>>
>> Acked-by: Mathias Nyman <mathias.nyman@intel.com>
>
>Please don't add my Acked-by to patches I haven't seen.
>
> From Documentation/process/submitting-patches.rst:
>
Thanks for pointing out the wrong tag, I meant to add suggested-by, ^_^

>"Acked-by: is not as formal as Signed-off-by:.  It is a record that the acker
>has at least reviewed the patch and has indicated acceptance."
>
>> Signed-off-by: Zeng Tao <prime.zeng@hisilicon.com>
>
>Otherwise the patch looks good, I'll queue it, and remove the extra
>Acked-by
>
It's ok for me,  thank you.

Regards
Zengtao

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-10-17  2:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-16 11:37 [PATCH] xhci: remove the unused sw_lpm_support Zeng Tao
2018-10-16 11:37 ` Zengtao (B)
2018-10-16 12:33 ` [PATCH] " Mathias Nyman
2018-10-16 12:33   ` Mathias Nyman
2018-10-17  2:05   ` [PATCH] " Zengtao (B)
2018-10-17  2:05     ` Zengtao (B)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.