diff options
Diffstat (limited to 'drivers/usb/host/xhci-hub.c')
-rw-r--r-- | drivers/usb/host/xhci-hub.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index aa90ad4d4fd5..a686cf4905bb 100644 --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c | |||
@@ -151,9 +151,8 @@ static void xhci_usb3_hub_descriptor(struct usb_hcd *hcd, struct xhci_hcd *xhci, | |||
151 | if (portsc & PORT_DEV_REMOVE) | 151 | if (portsc & PORT_DEV_REMOVE) |
152 | port_removable |= 1 << (i + 1); | 152 | port_removable |= 1 << (i + 1); |
153 | } | 153 | } |
154 | memset(&desc->u.ss.DeviceRemovable, | 154 | |
155 | (__force __u16) cpu_to_le16(port_removable), | 155 | desc->u.ss.DeviceRemovable = cpu_to_le16(port_removable); |
156 | sizeof(__u16)); | ||
157 | } | 156 | } |
158 | 157 | ||
159 | static void xhci_hub_descriptor(struct usb_hcd *hcd, struct xhci_hcd *xhci, | 158 | static void xhci_hub_descriptor(struct usb_hcd *hcd, struct xhci_hcd *xhci, |
@@ -809,11 +808,13 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, | |||
809 | temp = xhci_readl(xhci, port_array[wIndex]); | 808 | temp = xhci_readl(xhci, port_array[wIndex]); |
810 | xhci_dbg(xhci, "set port power, actual port %d status = 0x%x\n", wIndex, temp); | 809 | xhci_dbg(xhci, "set port power, actual port %d status = 0x%x\n", wIndex, temp); |
811 | 810 | ||
811 | spin_unlock_irqrestore(&xhci->lock, flags); | ||
812 | temp = usb_acpi_power_manageable(hcd->self.root_hub, | 812 | temp = usb_acpi_power_manageable(hcd->self.root_hub, |
813 | wIndex); | 813 | wIndex); |
814 | if (temp) | 814 | if (temp) |
815 | usb_acpi_set_power_state(hcd->self.root_hub, | 815 | usb_acpi_set_power_state(hcd->self.root_hub, |
816 | wIndex, true); | 816 | wIndex, true); |
817 | spin_lock_irqsave(&xhci->lock, flags); | ||
817 | break; | 818 | break; |
818 | case USB_PORT_FEAT_RESET: | 819 | case USB_PORT_FEAT_RESET: |
819 | temp = (temp | PORT_RESET); | 820 | temp = (temp | PORT_RESET); |
@@ -917,11 +918,13 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, | |||
917 | xhci_writel(xhci, temp & ~PORT_POWER, | 918 | xhci_writel(xhci, temp & ~PORT_POWER, |
918 | port_array[wIndex]); | 919 | port_array[wIndex]); |
919 | 920 | ||
921 | spin_unlock_irqrestore(&xhci->lock, flags); | ||
920 | temp = usb_acpi_power_manageable(hcd->self.root_hub, | 922 | temp = usb_acpi_power_manageable(hcd->self.root_hub, |
921 | wIndex); | 923 | wIndex); |
922 | if (temp) | 924 | if (temp) |
923 | usb_acpi_set_power_state(hcd->self.root_hub, | 925 | usb_acpi_set_power_state(hcd->self.root_hub, |
924 | wIndex, false); | 926 | wIndex, false); |
927 | spin_lock_irqsave(&xhci->lock, flags); | ||
925 | break; | 928 | break; |
926 | default: | 929 | default: |
927 | goto error; | 930 | goto error; |