Commit f1fd62a6 authored by Zeng Tao's avatar Zeng Tao Committed by Greg Kroah-Hartman

xhci: remove the unused sw_lpm_support

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.
Signed-off-by: default avatarZeng Tao <prime.zeng@hisilicon.com>
Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3ea5eb13
...@@ -2181,23 +2181,11 @@ static void xhci_add_in_port(struct xhci_hcd *xhci, unsigned int num_ports, ...@@ -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) if (major_revision < 0x03 && xhci->num_ext_caps < max_caps)
xhci->ext_caps[xhci->num_ext_caps++] = temp; xhci->ext_caps[xhci->num_ext_caps++] = temp;
/* Check the host's USB2 LPM capability */ if ((xhci->hci_version >= 0x100) && (major_revision != 0x03) &&
if ((xhci->hci_version == 0x96) && (major_revision != 0x03) && (temp & XHCI_HLC)) {
(temp & XHCI_L1C)) {
xhci_dbg_trace(xhci, trace_xhci_dbg_init, xhci_dbg_trace(xhci, trace_xhci_dbg_init,
"xHCI 0.96: support USB2 software lpm"); "xHCI 1.0: support USB2 hardware lpm");
xhci->sw_lpm_support = 1; xhci->hw_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;
}
} }
port_offset--; port_offset--;
......
...@@ -4370,8 +4370,7 @@ static int xhci_update_device(struct usb_hcd *hcd, struct usb_device *udev) ...@@ -4370,8 +4370,7 @@ static int xhci_update_device(struct usb_hcd *hcd, struct usb_device *udev)
struct xhci_hcd *xhci = hcd_to_xhci(hcd); struct xhci_hcd *xhci = hcd_to_xhci(hcd);
int portnum = udev->portnum - 1; int portnum = udev->portnum - 1;
if (hcd->speed >= HCD_USB3 || !xhci->sw_lpm_support || if (hcd->speed >= HCD_USB3 || !udev->lpm_capable)
!udev->lpm_capable)
return 0; return 0;
/* we only support lpm for non-hub device connected to root hub yet */ /* we only support lpm for non-hub device connected to root hub yet */
......
...@@ -1858,8 +1858,6 @@ struct xhci_hcd { ...@@ -1858,8 +1858,6 @@ struct xhci_hcd {
struct xhci_port *hw_ports; struct xhci_port *hw_ports;
struct xhci_hub usb2_rhub; struct xhci_hub usb2_rhub;
struct xhci_hub usb3_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 */ /* support xHCI 1.0 spec USB2 hardware LPM */
unsigned hw_lpm_support:1; unsigned hw_lpm_support:1;
/* cached usb2 extened protocol capabilites */ /* cached usb2 extened protocol capabilites */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment