aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci-hub.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/xhci-hub.c')
-rw-r--r--drivers/usb/host/xhci-hub.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
index d5eb357aa5c4..aa90ad4d4fd5 100644
--- a/drivers/usb/host/xhci-hub.c
+++ b/drivers/usb/host/xhci-hub.c
@@ -29,7 +29,7 @@
29#define PORT_RWC_BITS (PORT_CSC | PORT_PEC | PORT_WRC | PORT_OCC | \ 29#define PORT_RWC_BITS (PORT_CSC | PORT_PEC | PORT_WRC | PORT_OCC | \
30 PORT_RC | PORT_PLC | PORT_PE) 30 PORT_RC | PORT_PLC | PORT_PE)
31 31
32/* usb 1.1 root hub device descriptor */ 32/* USB 3.0 BOS descriptor and a capability descriptor, combined */
33static u8 usb_bos_descriptor [] = { 33static u8 usb_bos_descriptor [] = {
34 USB_DT_BOS_SIZE, /* __u8 bLength, 5 bytes */ 34 USB_DT_BOS_SIZE, /* __u8 bLength, 5 bytes */
35 USB_DT_BOS, /* __u8 bDescriptorType */ 35 USB_DT_BOS, /* __u8 bDescriptorType */
@@ -422,7 +422,7 @@ void xhci_set_link_state(struct xhci_hcd *xhci, __le32 __iomem **port_array,
422 xhci_writel(xhci, temp, port_array[port_id]); 422 xhci_writel(xhci, temp, port_array[port_id]);
423} 423}
424 424
425void xhci_set_remote_wake_mask(struct xhci_hcd *xhci, 425static void xhci_set_remote_wake_mask(struct xhci_hcd *xhci,
426 __le32 __iomem **port_array, int port_id, u16 wake_mask) 426 __le32 __iomem **port_array, int port_id, u16 wake_mask)
427{ 427{
428 u32 temp; 428 u32 temp;
@@ -808,6 +808,12 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
808 808
809 temp = xhci_readl(xhci, port_array[wIndex]); 809 temp = xhci_readl(xhci, port_array[wIndex]);
810 xhci_dbg(xhci, "set port power, actual port %d status = 0x%x\n", wIndex, temp); 810 xhci_dbg(xhci, "set port power, actual port %d status = 0x%x\n", wIndex, temp);
811
812 temp = usb_acpi_power_manageable(hcd->self.root_hub,
813 wIndex);
814 if (temp)
815 usb_acpi_set_power_state(hcd->self.root_hub,
816 wIndex, true);
811 break; 817 break;
812 case USB_PORT_FEAT_RESET: 818 case USB_PORT_FEAT_RESET:
813 temp = (temp | PORT_RESET); 819 temp = (temp | PORT_RESET);
@@ -907,6 +913,16 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
907 xhci_disable_port(hcd, xhci, wIndex, 913 xhci_disable_port(hcd, xhci, wIndex,
908 port_array[wIndex], temp); 914 port_array[wIndex], temp);
909 break; 915 break;
916 case USB_PORT_FEAT_POWER:
917 xhci_writel(xhci, temp & ~PORT_POWER,
918 port_array[wIndex]);
919
920 temp = usb_acpi_power_manageable(hcd->self.root_hub,
921 wIndex);
922 if (temp)
923 usb_acpi_set_power_state(hcd->self.root_hub,
924 wIndex, false);
925 break;
910 default: 926 default:
911 goto error; 927 goto error;
912 } 928 }