diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-02-28 07:39:56 -0500 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-02-28 07:40:01 -0500 |
commit | 4d8cfec692e988b844dcaeaeb76b5780b7ef9d28 (patch) | |
tree | 67d43adab2afd18a74d08f347e3676ae1a64193f /drivers/usb | |
parent | a3a3c4664184f86ef964323d106c62158e2b3f25 (diff) | |
parent | 1d8c38c3d1b48eeb9cfaa42a8be13a1423569eb2 (diff) |
Merge branch 'cleanup-3.4' of git://github.com/hzhuang1/linux into next/cleanup
* 'cleanup-3.4' of git://github.com/hzhuang1/linux: (2 commits)
rtc: sa1100: remove verification code of alarm
rtc: sa1100: remove periodic code
(update to v3.3-rc5)
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/core/hcd-pci.c | 5 | ||||
-rw-r--r-- | drivers/usb/core/hcd.c | 6 | ||||
-rw-r--r-- | drivers/usb/core/hub.c | 30 | ||||
-rw-r--r-- | drivers/usb/gadget/f_loopback.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/Kconfig | 8 | ||||
-rw-r--r-- | drivers/usb/host/ehci-fsl.c | 11 | ||||
-rw-r--r-- | drivers/usb/host/ehci-fsl.h | 1 | ||||
-rw-r--r-- | drivers/usb/host/pci-quirks.c | 17 | ||||
-rw-r--r-- | drivers/usb/host/xhci-hub.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/xhci-mem.c | 32 | ||||
-rw-r--r-- | drivers/usb/host/xhci.c | 5 | ||||
-rw-r--r-- | drivers/usb/musb/musb_io.h | 3 | ||||
-rw-r--r-- | drivers/usb/otg/Kconfig | 2 | ||||
-rw-r--r-- | drivers/usb/serial/cp210x.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 1 | ||||
-rw-r--r-- | drivers/usb/serial/ftdi_sio_ids.h | 7 | ||||
-rw-r--r-- | drivers/usb/serial/option.c | 40 | ||||
-rw-r--r-- | drivers/usb/serial/qcserial.c | 16 | ||||
-rw-r--r-- | drivers/usb/serial/ti_usb_3410_5052.c | 6 | ||||
-rw-r--r-- | drivers/usb/serial/ti_usb_3410_5052.h | 4 | ||||
-rw-r--r-- | drivers/usb/storage/usb.c | 90 | ||||
-rw-r--r-- | drivers/usb/storage/usb.h | 7 |
22 files changed, 182 insertions, 115 deletions
diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c index d136b8f4c8a7..81e2c0d9c17d 100644 --- a/drivers/usb/core/hcd-pci.c +++ b/drivers/usb/core/hcd-pci.c | |||
@@ -187,7 +187,10 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) | |||
187 | return -ENODEV; | 187 | return -ENODEV; |
188 | dev->current_state = PCI_D0; | 188 | dev->current_state = PCI_D0; |
189 | 189 | ||
190 | if (!dev->irq) { | 190 | /* The xHCI driver supports MSI and MSI-X, |
191 | * so don't fail if the BIOS doesn't provide a legacy IRQ. | ||
192 | */ | ||
193 | if (!dev->irq && (driver->flags & HCD_MASK) != HCD_USB3) { | ||
191 | dev_err(&dev->dev, | 194 | dev_err(&dev->dev, |
192 | "Found HC with no IRQ. Check BIOS/PCI %s setup!\n", | 195 | "Found HC with no IRQ. Check BIOS/PCI %s setup!\n", |
193 | pci_name(dev)); | 196 | pci_name(dev)); |
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index eb19cba34ac9..e1282328fc27 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
@@ -2447,8 +2447,10 @@ int usb_add_hcd(struct usb_hcd *hcd, | |||
2447 | && device_can_wakeup(&hcd->self.root_hub->dev)) | 2447 | && device_can_wakeup(&hcd->self.root_hub->dev)) |
2448 | dev_dbg(hcd->self.controller, "supports USB remote wakeup\n"); | 2448 | dev_dbg(hcd->self.controller, "supports USB remote wakeup\n"); |
2449 | 2449 | ||
2450 | /* enable irqs just before we start the controller */ | 2450 | /* enable irqs just before we start the controller, |
2451 | if (usb_hcd_is_primary_hcd(hcd)) { | 2451 | * if the BIOS provides legacy PCI irqs. |
2452 | */ | ||
2453 | if (usb_hcd_is_primary_hcd(hcd) && irqnum) { | ||
2452 | retval = usb_hcd_request_irqs(hcd, irqnum, irqflags); | 2454 | retval = usb_hcd_request_irqs(hcd, irqnum, irqflags); |
2453 | if (retval) | 2455 | if (retval) |
2454 | goto err_request_irq; | 2456 | goto err_request_irq; |
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index a0613d8f9be7..265c2f675d04 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -705,10 +705,26 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type) | |||
705 | if (type == HUB_INIT3) | 705 | if (type == HUB_INIT3) |
706 | goto init3; | 706 | goto init3; |
707 | 707 | ||
708 | /* After a resume, port power should still be on. | 708 | /* The superspeed hub except for root hub has to use Hub Depth |
709 | * value as an offset into the route string to locate the bits | ||
710 | * it uses to determine the downstream port number. So hub driver | ||
711 | * should send a set hub depth request to superspeed hub after | ||
712 | * the superspeed hub is set configuration in initialization or | ||
713 | * reset procedure. | ||
714 | * | ||
715 | * After a resume, port power should still be on. | ||
709 | * For any other type of activation, turn it on. | 716 | * For any other type of activation, turn it on. |
710 | */ | 717 | */ |
711 | if (type != HUB_RESUME) { | 718 | if (type != HUB_RESUME) { |
719 | if (hdev->parent && hub_is_superspeed(hdev)) { | ||
720 | ret = usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0), | ||
721 | HUB_SET_DEPTH, USB_RT_HUB, | ||
722 | hdev->level - 1, 0, NULL, 0, | ||
723 | USB_CTRL_SET_TIMEOUT); | ||
724 | if (ret < 0) | ||
725 | dev_err(hub->intfdev, | ||
726 | "set hub depth failed\n"); | ||
727 | } | ||
712 | 728 | ||
713 | /* Speed up system boot by using a delayed_work for the | 729 | /* Speed up system boot by using a delayed_work for the |
714 | * hub's initial power-up delays. This is pretty awkward | 730 | * hub's initial power-up delays. This is pretty awkward |
@@ -987,18 +1003,6 @@ static int hub_configure(struct usb_hub *hub, | |||
987 | goto fail; | 1003 | goto fail; |
988 | } | 1004 | } |
989 | 1005 | ||
990 | if (hub_is_superspeed(hdev) && (hdev->parent != NULL)) { | ||
991 | ret = usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0), | ||
992 | HUB_SET_DEPTH, USB_RT_HUB, | ||
993 | hdev->level - 1, 0, NULL, 0, | ||
994 | USB_CTRL_SET_TIMEOUT); | ||
995 | |||
996 | if (ret < 0) { | ||
997 | message = "can't set hub depth"; | ||
998 | goto fail; | ||
999 | } | ||
1000 | } | ||
1001 | |||
1002 | /* Request the entire hub descriptor. | 1006 | /* Request the entire hub descriptor. |
1003 | * hub->descriptor can handle USB_MAXCHILDREN ports, | 1007 | * hub->descriptor can handle USB_MAXCHILDREN ports, |
1004 | * but the hub can/will return fewer bytes here. | 1008 | * but the hub can/will return fewer bytes here. |
diff --git a/drivers/usb/gadget/f_loopback.c b/drivers/usb/gadget/f_loopback.c index 6d87f288df4e..2c0cd824c667 100644 --- a/drivers/usb/gadget/f_loopback.c +++ b/drivers/usb/gadget/f_loopback.c | |||
@@ -418,7 +418,7 @@ int __init loopback_add(struct usb_composite_dev *cdev, bool autoresume) | |||
418 | 418 | ||
419 | /* support autoresume for remote wakeup testing */ | 419 | /* support autoresume for remote wakeup testing */ |
420 | if (autoresume) | 420 | if (autoresume) |
421 | sourcesink_driver.bmAttributes |= USB_CONFIG_ATT_WAKEUP; | 421 | loopback_driver.bmAttributes |= USB_CONFIG_ATT_WAKEUP; |
422 | 422 | ||
423 | /* support OTG systems */ | 423 | /* support OTG systems */ |
424 | if (gadget_is_otg(cdev->gadget)) { | 424 | if (gadget_is_otg(cdev->gadget)) { |
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 91413cac97be..353cdd488b93 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig | |||
@@ -130,7 +130,7 @@ config USB_FSL_MPH_DR_OF | |||
130 | tristate | 130 | tristate |
131 | 131 | ||
132 | config USB_EHCI_FSL | 132 | config USB_EHCI_FSL |
133 | bool "Support for Freescale on-chip EHCI USB controller" | 133 | bool "Support for Freescale PPC on-chip EHCI USB controller" |
134 | depends on USB_EHCI_HCD && FSL_SOC | 134 | depends on USB_EHCI_HCD && FSL_SOC |
135 | select USB_EHCI_ROOT_HUB_TT | 135 | select USB_EHCI_ROOT_HUB_TT |
136 | select USB_FSL_MPH_DR_OF if OF | 136 | select USB_FSL_MPH_DR_OF if OF |
@@ -138,7 +138,7 @@ config USB_EHCI_FSL | |||
138 | Variation of ARC USB block used in some Freescale chips. | 138 | Variation of ARC USB block used in some Freescale chips. |
139 | 139 | ||
140 | config USB_EHCI_MXC | 140 | config USB_EHCI_MXC |
141 | bool "Support for Freescale on-chip EHCI USB controller" | 141 | bool "Support for Freescale i.MX on-chip EHCI USB controller" |
142 | depends on USB_EHCI_HCD && ARCH_MXC | 142 | depends on USB_EHCI_HCD && ARCH_MXC |
143 | select USB_EHCI_ROOT_HUB_TT | 143 | select USB_EHCI_ROOT_HUB_TT |
144 | ---help--- | 144 | ---help--- |
@@ -546,7 +546,7 @@ config USB_RENESAS_USBHS_HCD | |||
546 | config USB_WHCI_HCD | 546 | config USB_WHCI_HCD |
547 | tristate "Wireless USB Host Controller Interface (WHCI) driver (EXPERIMENTAL)" | 547 | tristate "Wireless USB Host Controller Interface (WHCI) driver (EXPERIMENTAL)" |
548 | depends on EXPERIMENTAL | 548 | depends on EXPERIMENTAL |
549 | depends on PCI && USB | 549 | depends on PCI && USB && UWB |
550 | select USB_WUSB | 550 | select USB_WUSB |
551 | select UWB_WHCI | 551 | select UWB_WHCI |
552 | help | 552 | help |
@@ -559,7 +559,7 @@ config USB_WHCI_HCD | |||
559 | config USB_HWA_HCD | 559 | config USB_HWA_HCD |
560 | tristate "Host Wire Adapter (HWA) driver (EXPERIMENTAL)" | 560 | tristate "Host Wire Adapter (HWA) driver (EXPERIMENTAL)" |
561 | depends on EXPERIMENTAL | 561 | depends on EXPERIMENTAL |
562 | depends on USB | 562 | depends on USB && UWB |
563 | select USB_WUSB | 563 | select USB_WUSB |
564 | select UWB_HWA | 564 | select UWB_HWA |
565 | help | 565 | help |
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index b556a72264d1..c26a82e83f6e 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c | |||
@@ -239,7 +239,7 @@ static void ehci_fsl_setup_phy(struct ehci_hcd *ehci, | |||
239 | ehci_writel(ehci, portsc, &ehci->regs->port_status[port_offset]); | 239 | ehci_writel(ehci, portsc, &ehci->regs->port_status[port_offset]); |
240 | } | 240 | } |
241 | 241 | ||
242 | static void ehci_fsl_usb_setup(struct ehci_hcd *ehci) | 242 | static int ehci_fsl_usb_setup(struct ehci_hcd *ehci) |
243 | { | 243 | { |
244 | struct usb_hcd *hcd = ehci_to_hcd(ehci); | 244 | struct usb_hcd *hcd = ehci_to_hcd(ehci); |
245 | struct fsl_usb2_platform_data *pdata; | 245 | struct fsl_usb2_platform_data *pdata; |
@@ -299,12 +299,19 @@ static void ehci_fsl_usb_setup(struct ehci_hcd *ehci) | |||
299 | #endif | 299 | #endif |
300 | out_be32(non_ehci + FSL_SOC_USB_SICTRL, 0x00000001); | 300 | out_be32(non_ehci + FSL_SOC_USB_SICTRL, 0x00000001); |
301 | } | 301 | } |
302 | |||
303 | if (!(in_be32(non_ehci + FSL_SOC_USB_CTRL) & CTRL_PHY_CLK_VALID)) { | ||
304 | printk(KERN_WARNING "fsl-ehci: USB PHY clock invalid\n"); | ||
305 | return -ENODEV; | ||
306 | } | ||
307 | return 0; | ||
302 | } | 308 | } |
303 | 309 | ||
304 | /* called after powerup, by probe or system-pm "wakeup" */ | 310 | /* called after powerup, by probe or system-pm "wakeup" */ |
305 | static int ehci_fsl_reinit(struct ehci_hcd *ehci) | 311 | static int ehci_fsl_reinit(struct ehci_hcd *ehci) |
306 | { | 312 | { |
307 | ehci_fsl_usb_setup(ehci); | 313 | if (ehci_fsl_usb_setup(ehci)) |
314 | return -ENODEV; | ||
308 | ehci_port_power(ehci, 0); | 315 | ehci_port_power(ehci, 0); |
309 | 316 | ||
310 | return 0; | 317 | return 0; |
diff --git a/drivers/usb/host/ehci-fsl.h b/drivers/usb/host/ehci-fsl.h index 491806221165..bdf43e2adc51 100644 --- a/drivers/usb/host/ehci-fsl.h +++ b/drivers/usb/host/ehci-fsl.h | |||
@@ -45,5 +45,6 @@ | |||
45 | #define FSL_SOC_USB_PRICTRL 0x40c /* NOTE: big-endian */ | 45 | #define FSL_SOC_USB_PRICTRL 0x40c /* NOTE: big-endian */ |
46 | #define FSL_SOC_USB_SICTRL 0x410 /* NOTE: big-endian */ | 46 | #define FSL_SOC_USB_SICTRL 0x410 /* NOTE: big-endian */ |
47 | #define FSL_SOC_USB_CTRL 0x500 /* NOTE: big-endian */ | 47 | #define FSL_SOC_USB_CTRL 0x500 /* NOTE: big-endian */ |
48 | #define CTRL_PHY_CLK_VALID (1 << 17) | ||
48 | #define SNOOP_SIZE_2GB 0x1e | 49 | #define SNOOP_SIZE_2GB 0x1e |
49 | #endif /* _EHCI_FSL_H */ | 50 | #endif /* _EHCI_FSL_H */ |
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c index caf87428ca43..7732d69e49e0 100644 --- a/drivers/usb/host/pci-quirks.c +++ b/drivers/usb/host/pci-quirks.c | |||
@@ -867,6 +867,22 @@ hc_init: | |||
867 | 867 | ||
868 | static void __devinit quirk_usb_early_handoff(struct pci_dev *pdev) | 868 | static void __devinit quirk_usb_early_handoff(struct pci_dev *pdev) |
869 | { | 869 | { |
870 | /* Skip Netlogic mips SoC's internal PCI USB controller. | ||
871 | * This device does not need/support EHCI/OHCI handoff | ||
872 | */ | ||
873 | if (pdev->vendor == 0x184e) /* vendor Netlogic */ | ||
874 | return; | ||
875 | if (pdev->class != PCI_CLASS_SERIAL_USB_UHCI && | ||
876 | pdev->class != PCI_CLASS_SERIAL_USB_OHCI && | ||
877 | pdev->class != PCI_CLASS_SERIAL_USB_EHCI && | ||
878 | pdev->class != PCI_CLASS_SERIAL_USB_XHCI) | ||
879 | return; | ||
880 | |||
881 | if (pci_enable_device(pdev) < 0) { | ||
882 | dev_warn(&pdev->dev, "Can't enable PCI device, " | ||
883 | "BIOS handoff failed.\n"); | ||
884 | return; | ||
885 | } | ||
870 | if (pdev->class == PCI_CLASS_SERIAL_USB_UHCI) | 886 | if (pdev->class == PCI_CLASS_SERIAL_USB_UHCI) |
871 | quirk_usb_handoff_uhci(pdev); | 887 | quirk_usb_handoff_uhci(pdev); |
872 | else if (pdev->class == PCI_CLASS_SERIAL_USB_OHCI) | 888 | else if (pdev->class == PCI_CLASS_SERIAL_USB_OHCI) |
@@ -875,5 +891,6 @@ static void __devinit quirk_usb_early_handoff(struct pci_dev *pdev) | |||
875 | quirk_usb_disable_ehci(pdev); | 891 | quirk_usb_disable_ehci(pdev); |
876 | else if (pdev->class == PCI_CLASS_SERIAL_USB_XHCI) | 892 | else if (pdev->class == PCI_CLASS_SERIAL_USB_XHCI) |
877 | quirk_usb_handoff_xhci(pdev); | 893 | quirk_usb_handoff_xhci(pdev); |
894 | pci_disable_device(pdev); | ||
878 | } | 895 | } |
879 | DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, quirk_usb_early_handoff); | 896 | DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, quirk_usb_early_handoff); |
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index 35e257f79c7b..557b6f32db86 100644 --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c | |||
@@ -93,7 +93,7 @@ static void xhci_usb2_hub_descriptor(struct usb_hcd *hcd, struct xhci_hcd *xhci, | |||
93 | */ | 93 | */ |
94 | memset(port_removable, 0, sizeof(port_removable)); | 94 | memset(port_removable, 0, sizeof(port_removable)); |
95 | for (i = 0; i < ports; i++) { | 95 | for (i = 0; i < ports; i++) { |
96 | portsc = xhci_readl(xhci, xhci->usb3_ports[i]); | 96 | portsc = xhci_readl(xhci, xhci->usb2_ports[i]); |
97 | /* If a device is removable, PORTSC reports a 0, same as in the | 97 | /* If a device is removable, PORTSC reports a 0, same as in the |
98 | * hub descriptor DeviceRemovable bits. | 98 | * hub descriptor DeviceRemovable bits. |
99 | */ | 99 | */ |
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 36cbe2226a44..383fc857491c 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c | |||
@@ -1126,26 +1126,42 @@ static unsigned int xhci_parse_exponent_interval(struct usb_device *udev, | |||
1126 | } | 1126 | } |
1127 | 1127 | ||
1128 | /* | 1128 | /* |
1129 | * Convert bInterval expressed in frames (in 1-255 range) to exponent of | 1129 | * Convert bInterval expressed in microframes (in 1-255 range) to exponent of |
1130 | * microframes, rounded down to nearest power of 2. | 1130 | * microframes, rounded down to nearest power of 2. |
1131 | */ | 1131 | */ |
1132 | static unsigned int xhci_parse_frame_interval(struct usb_device *udev, | 1132 | static unsigned int xhci_microframes_to_exponent(struct usb_device *udev, |
1133 | struct usb_host_endpoint *ep) | 1133 | struct usb_host_endpoint *ep, unsigned int desc_interval, |
1134 | unsigned int min_exponent, unsigned int max_exponent) | ||
1134 | { | 1135 | { |
1135 | unsigned int interval; | 1136 | unsigned int interval; |
1136 | 1137 | ||
1137 | interval = fls(8 * ep->desc.bInterval) - 1; | 1138 | interval = fls(desc_interval) - 1; |
1138 | interval = clamp_val(interval, 3, 10); | 1139 | interval = clamp_val(interval, min_exponent, max_exponent); |
1139 | if ((1 << interval) != 8 * ep->desc.bInterval) | 1140 | if ((1 << interval) != desc_interval) |
1140 | dev_warn(&udev->dev, | 1141 | dev_warn(&udev->dev, |
1141 | "ep %#x - rounding interval to %d microframes, ep desc says %d microframes\n", | 1142 | "ep %#x - rounding interval to %d microframes, ep desc says %d microframes\n", |
1142 | ep->desc.bEndpointAddress, | 1143 | ep->desc.bEndpointAddress, |
1143 | 1 << interval, | 1144 | 1 << interval, |
1144 | 8 * ep->desc.bInterval); | 1145 | desc_interval); |
1145 | 1146 | ||
1146 | return interval; | 1147 | return interval; |
1147 | } | 1148 | } |
1148 | 1149 | ||
1150 | static unsigned int xhci_parse_microframe_interval(struct usb_device *udev, | ||
1151 | struct usb_host_endpoint *ep) | ||
1152 | { | ||
1153 | return xhci_microframes_to_exponent(udev, ep, | ||
1154 | ep->desc.bInterval, 0, 15); | ||
1155 | } | ||
1156 | |||
1157 | |||
1158 | static unsigned int xhci_parse_frame_interval(struct usb_device *udev, | ||
1159 | struct usb_host_endpoint *ep) | ||
1160 | { | ||
1161 | return xhci_microframes_to_exponent(udev, ep, | ||
1162 | ep->desc.bInterval * 8, 3, 10); | ||
1163 | } | ||
1164 | |||
1149 | /* Return the polling or NAK interval. | 1165 | /* Return the polling or NAK interval. |
1150 | * | 1166 | * |
1151 | * The polling interval is expressed in "microframes". If xHCI's Interval field | 1167 | * The polling interval is expressed in "microframes". If xHCI's Interval field |
@@ -1164,7 +1180,7 @@ static unsigned int xhci_get_endpoint_interval(struct usb_device *udev, | |||
1164 | /* Max NAK rate */ | 1180 | /* Max NAK rate */ |
1165 | if (usb_endpoint_xfer_control(&ep->desc) || | 1181 | if (usb_endpoint_xfer_control(&ep->desc) || |
1166 | usb_endpoint_xfer_bulk(&ep->desc)) { | 1182 | usb_endpoint_xfer_bulk(&ep->desc)) { |
1167 | interval = ep->desc.bInterval; | 1183 | interval = xhci_parse_microframe_interval(udev, ep); |
1168 | break; | 1184 | break; |
1169 | } | 1185 | } |
1170 | /* Fall through - SS and HS isoc/int have same decoding */ | 1186 | /* Fall through - SS and HS isoc/int have same decoding */ |
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 6bbe3c3a7111..c939f5fdef9e 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c | |||
@@ -352,6 +352,11 @@ static int xhci_try_enable_msi(struct usb_hcd *hcd) | |||
352 | /* hcd->irq is -1, we have MSI */ | 352 | /* hcd->irq is -1, we have MSI */ |
353 | return 0; | 353 | return 0; |
354 | 354 | ||
355 | if (!pdev->irq) { | ||
356 | xhci_err(xhci, "No msi-x/msi found and no IRQ in BIOS\n"); | ||
357 | return -EINVAL; | ||
358 | } | ||
359 | |||
355 | /* fall back to legacy interrupt*/ | 360 | /* fall back to legacy interrupt*/ |
356 | ret = request_irq(pdev->irq, &usb_hcd_irq, IRQF_SHARED, | 361 | ret = request_irq(pdev->irq, &usb_hcd_irq, IRQF_SHARED, |
357 | hcd->irq_descr, hcd); | 362 | hcd->irq_descr, hcd); |
diff --git a/drivers/usb/musb/musb_io.h b/drivers/usb/musb/musb_io.h index e61aa95f2d2a..1d5eda26fbd1 100644 --- a/drivers/usb/musb/musb_io.h +++ b/drivers/usb/musb/musb_io.h | |||
@@ -39,7 +39,8 @@ | |||
39 | 39 | ||
40 | #if !defined(CONFIG_ARM) && !defined(CONFIG_SUPERH) \ | 40 | #if !defined(CONFIG_ARM) && !defined(CONFIG_SUPERH) \ |
41 | && !defined(CONFIG_AVR32) && !defined(CONFIG_PPC32) \ | 41 | && !defined(CONFIG_AVR32) && !defined(CONFIG_PPC32) \ |
42 | && !defined(CONFIG_PPC64) && !defined(CONFIG_BLACKFIN) | 42 | && !defined(CONFIG_PPC64) && !defined(CONFIG_BLACKFIN) \ |
43 | && !defined(CONFIG_MIPS) | ||
43 | static inline void readsl(const void __iomem *addr, void *buf, int len) | 44 | static inline void readsl(const void __iomem *addr, void *buf, int len) |
44 | { insl((unsigned long)addr, buf, len); } | 45 | { insl((unsigned long)addr, buf, len); } |
45 | static inline void readsw(const void __iomem *addr, void *buf, int len) | 46 | static inline void readsw(const void __iomem *addr, void *buf, int len) |
diff --git a/drivers/usb/otg/Kconfig b/drivers/usb/otg/Kconfig index 76d629345418..735ef4c2339a 100644 --- a/drivers/usb/otg/Kconfig +++ b/drivers/usb/otg/Kconfig | |||
@@ -118,7 +118,7 @@ config FSL_USB2_OTG | |||
118 | 118 | ||
119 | config USB_MV_OTG | 119 | config USB_MV_OTG |
120 | tristate "Marvell USB OTG support" | 120 | tristate "Marvell USB OTG support" |
121 | depends on USB_MV_UDC && USB_SUSPEND | 121 | depends on USB_EHCI_MV && USB_MV_UDC && USB_SUSPEND |
122 | select USB_OTG | 122 | select USB_OTG |
123 | select USB_OTG_UTILS | 123 | select USB_OTG_UTILS |
124 | help | 124 | help |
diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index 8dbf51a43c45..08a5575724cd 100644 --- a/drivers/usb/serial/cp210x.c +++ b/drivers/usb/serial/cp210x.c | |||
@@ -136,6 +136,8 @@ static const struct usb_device_id id_table[] = { | |||
136 | { USB_DEVICE(0x16DC, 0x0011) }, /* W-IE-NE-R Plein & Baus GmbH RCM Remote Control for MARATON Power Supply */ | 136 | { USB_DEVICE(0x16DC, 0x0011) }, /* W-IE-NE-R Plein & Baus GmbH RCM Remote Control for MARATON Power Supply */ |
137 | { USB_DEVICE(0x16DC, 0x0012) }, /* W-IE-NE-R Plein & Baus GmbH MPOD Multi Channel Power Supply */ | 137 | { USB_DEVICE(0x16DC, 0x0012) }, /* W-IE-NE-R Plein & Baus GmbH MPOD Multi Channel Power Supply */ |
138 | { USB_DEVICE(0x16DC, 0x0015) }, /* W-IE-NE-R Plein & Baus GmbH CML Control, Monitoring and Data Logger */ | 138 | { USB_DEVICE(0x16DC, 0x0015) }, /* W-IE-NE-R Plein & Baus GmbH CML Control, Monitoring and Data Logger */ |
139 | { USB_DEVICE(0x17A8, 0x0001) }, /* Kamstrup Optical Eye/3-wire */ | ||
140 | { USB_DEVICE(0x17A8, 0x0005) }, /* Kamstrup M-Bus Master MultiPort 250D */ | ||
139 | { USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */ | 141 | { USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */ |
140 | { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */ | 142 | { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */ |
141 | { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */ | 143 | { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */ |
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index ad654f8208ef..f770415305f8 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -839,6 +839,7 @@ static struct usb_device_id id_table_combined [] = { | |||
839 | { USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_LOGBOOKML_PID) }, | 839 | { USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_LOGBOOKML_PID) }, |
840 | { USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_LS_LOGBOOK_PID) }, | 840 | { USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_LS_LOGBOOK_PID) }, |
841 | { USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_HS_LOGBOOK_PID) }, | 841 | { USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_HS_LOGBOOK_PID) }, |
842 | { USB_DEVICE(FTDI_VID, FTDI_CINTERION_MC55I_PID) }, | ||
842 | { USB_DEVICE(FTDI_VID, FTDI_DOTEC_PID) }, | 843 | { USB_DEVICE(FTDI_VID, FTDI_DOTEC_PID) }, |
843 | { USB_DEVICE(QIHARDWARE_VID, MILKYMISTONE_JTAGSERIAL_PID), | 844 | { USB_DEVICE(QIHARDWARE_VID, MILKYMISTONE_JTAGSERIAL_PID), |
844 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, | 845 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, |
diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h index f994503df2dd..6f6058f0db1b 100644 --- a/drivers/usb/serial/ftdi_sio_ids.h +++ b/drivers/usb/serial/ftdi_sio_ids.h | |||
@@ -1187,3 +1187,10 @@ | |||
1187 | */ | 1187 | */ |
1188 | /* ZigBee controller */ | 1188 | /* ZigBee controller */ |
1189 | #define FTDI_RF_R106 0x8A28 | 1189 | #define FTDI_RF_R106 0x8A28 |
1190 | |||
1191 | /* | ||
1192 | * Product: HCP HIT GPRS modem | ||
1193 | * Manufacturer: HCP d.o.o. | ||
1194 | * ATI command output: Cinterion MC55i | ||
1195 | */ | ||
1196 | #define FTDI_CINTERION_MC55I_PID 0xA951 | ||
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index ea126a4490cd..b54afceb9611 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -788,7 +788,6 @@ static const struct usb_device_id option_ids[] = { | |||
788 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0012, 0xff, 0xff, 0xff), | 788 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0012, 0xff, 0xff, 0xff), |
789 | .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, | 789 | .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, |
790 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0013, 0xff, 0xff, 0xff) }, | 790 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0013, 0xff, 0xff, 0xff) }, |
791 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0014, 0xff, 0xff, 0xff) }, | ||
792 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF628, 0xff, 0xff, 0xff) }, | 791 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF628, 0xff, 0xff, 0xff) }, |
793 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0016, 0xff, 0xff, 0xff) }, | 792 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0016, 0xff, 0xff, 0xff) }, |
794 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0017, 0xff, 0xff, 0xff), | 793 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0017, 0xff, 0xff, 0xff), |
@@ -803,7 +802,6 @@ static const struct usb_device_id option_ids[] = { | |||
803 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0024, 0xff, 0xff, 0xff) }, | 802 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0024, 0xff, 0xff, 0xff) }, |
804 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0025, 0xff, 0xff, 0xff), | 803 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0025, 0xff, 0xff, 0xff), |
805 | .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, | 804 | .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, |
806 | /* { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0026, 0xff, 0xff, 0xff) }, */ | ||
807 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0028, 0xff, 0xff, 0xff) }, | 805 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0028, 0xff, 0xff, 0xff) }, |
808 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0029, 0xff, 0xff, 0xff) }, | 806 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0029, 0xff, 0xff, 0xff) }, |
809 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0030, 0xff, 0xff, 0xff) }, | 807 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0030, 0xff, 0xff, 0xff) }, |
@@ -828,7 +826,6 @@ static const struct usb_device_id option_ids[] = { | |||
828 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0051, 0xff, 0xff, 0xff) }, | 826 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0051, 0xff, 0xff, 0xff) }, |
829 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0052, 0xff, 0xff, 0xff), | 827 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0052, 0xff, 0xff, 0xff), |
830 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, | 828 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, |
831 | /* { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0053, 0xff, 0xff, 0xff) }, */ | ||
832 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0054, 0xff, 0xff, 0xff) }, | 829 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0054, 0xff, 0xff, 0xff) }, |
833 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0055, 0xff, 0xff, 0xff), | 830 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0055, 0xff, 0xff, 0xff), |
834 | .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, | 831 | .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, |
@@ -836,7 +833,6 @@ static const struct usb_device_id option_ids[] = { | |||
836 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0057, 0xff, 0xff, 0xff) }, | 833 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0057, 0xff, 0xff, 0xff) }, |
837 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0058, 0xff, 0xff, 0xff), | 834 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0058, 0xff, 0xff, 0xff), |
838 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, | 835 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, |
839 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0059, 0xff, 0xff, 0xff) }, | ||
840 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0061, 0xff, 0xff, 0xff) }, | 836 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0061, 0xff, 0xff, 0xff) }, |
841 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0062, 0xff, 0xff, 0xff) }, | 837 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0062, 0xff, 0xff, 0xff) }, |
842 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0063, 0xff, 0xff, 0xff), | 838 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0063, 0xff, 0xff, 0xff), |
@@ -846,7 +842,6 @@ static const struct usb_device_id option_ids[] = { | |||
846 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0066, 0xff, 0xff, 0xff) }, | 842 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0066, 0xff, 0xff, 0xff) }, |
847 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0067, 0xff, 0xff, 0xff) }, | 843 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0067, 0xff, 0xff, 0xff) }, |
848 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0069, 0xff, 0xff, 0xff) }, | 844 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0069, 0xff, 0xff, 0xff) }, |
849 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0070, 0xff, 0xff, 0xff) }, | ||
850 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0076, 0xff, 0xff, 0xff) }, | 845 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0076, 0xff, 0xff, 0xff) }, |
851 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0077, 0xff, 0xff, 0xff) }, | 846 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0077, 0xff, 0xff, 0xff) }, |
852 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0078, 0xff, 0xff, 0xff) }, | 847 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0078, 0xff, 0xff, 0xff) }, |
@@ -855,6 +850,16 @@ static const struct usb_device_id option_ids[] = { | |||
855 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0083, 0xff, 0xff, 0xff) }, | 850 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0083, 0xff, 0xff, 0xff) }, |
856 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0086, 0xff, 0xff, 0xff) }, | 851 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0086, 0xff, 0xff, 0xff) }, |
857 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0087, 0xff, 0xff, 0xff) }, | 852 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0087, 0xff, 0xff, 0xff) }, |
853 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0088, 0xff, 0xff, 0xff) }, | ||
854 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0089, 0xff, 0xff, 0xff) }, | ||
855 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0090, 0xff, 0xff, 0xff) }, | ||
856 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0091, 0xff, 0xff, 0xff) }, | ||
857 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0092, 0xff, 0xff, 0xff) }, | ||
858 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0093, 0xff, 0xff, 0xff) }, | ||
859 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0094, 0xff, 0xff, 0xff) }, | ||
860 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0095, 0xff, 0xff, 0xff) }, | ||
861 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0096, 0xff, 0xff, 0xff) }, | ||
862 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0097, 0xff, 0xff, 0xff) }, | ||
858 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0104, 0xff, 0xff, 0xff), | 863 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0104, 0xff, 0xff, 0xff), |
859 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, | 864 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, |
860 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0105, 0xff, 0xff, 0xff) }, | 865 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0105, 0xff, 0xff, 0xff) }, |
@@ -875,23 +880,18 @@ static const struct usb_device_id option_ids[] = { | |||
875 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0143, 0xff, 0xff, 0xff) }, | 880 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0143, 0xff, 0xff, 0xff) }, |
876 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0144, 0xff, 0xff, 0xff) }, | 881 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0144, 0xff, 0xff, 0xff) }, |
877 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0145, 0xff, 0xff, 0xff) }, | 882 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0145, 0xff, 0xff, 0xff) }, |
878 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0146, 0xff, 0xff, 0xff) }, | ||
879 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0147, 0xff, 0xff, 0xff) }, | ||
880 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0148, 0xff, 0xff, 0xff) }, | 883 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0148, 0xff, 0xff, 0xff) }, |
881 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0149, 0xff, 0xff, 0xff) }, | ||
882 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0150, 0xff, 0xff, 0xff) }, | ||
883 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0151, 0xff, 0xff, 0xff) }, | 884 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0151, 0xff, 0xff, 0xff) }, |
884 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0152, 0xff, 0xff, 0xff) }, | ||
885 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0153, 0xff, 0xff, 0xff) }, | 885 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0153, 0xff, 0xff, 0xff) }, |
886 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0154, 0xff, 0xff, 0xff) }, | ||
887 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0155, 0xff, 0xff, 0xff) }, | 886 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0155, 0xff, 0xff, 0xff) }, |
888 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0156, 0xff, 0xff, 0xff) }, | 887 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0156, 0xff, 0xff, 0xff) }, |
889 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0157, 0xff, 0xff, 0xff) }, | 888 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0157, 0xff, 0xff, 0xff) }, |
890 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0158, 0xff, 0xff, 0xff) }, | 889 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0158, 0xff, 0xff, 0xff) }, |
891 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0159, 0xff, 0xff, 0xff) }, | 890 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0159, 0xff, 0xff, 0xff) }, |
892 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0160, 0xff, 0xff, 0xff) }, | ||
893 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0161, 0xff, 0xff, 0xff) }, | 891 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0161, 0xff, 0xff, 0xff) }, |
894 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0162, 0xff, 0xff, 0xff) }, | 892 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0162, 0xff, 0xff, 0xff) }, |
893 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0164, 0xff, 0xff, 0xff) }, | ||
894 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0165, 0xff, 0xff, 0xff) }, | ||
895 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1008, 0xff, 0xff, 0xff) }, | 895 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1008, 0xff, 0xff, 0xff) }, |
896 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1010, 0xff, 0xff, 0xff) }, | 896 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1010, 0xff, 0xff, 0xff) }, |
897 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1012, 0xff, 0xff, 0xff) }, | 897 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1012, 0xff, 0xff, 0xff) }, |
@@ -1066,17 +1066,27 @@ static const struct usb_device_id option_ids[] = { | |||
1066 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1298, 0xff, 0xff, 0xff) }, | 1066 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1298, 0xff, 0xff, 0xff) }, |
1067 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1299, 0xff, 0xff, 0xff) }, | 1067 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1299, 0xff, 0xff, 0xff) }, |
1068 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1300, 0xff, 0xff, 0xff) }, | 1068 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1300, 0xff, 0xff, 0xff) }, |
1069 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2002, 0xff, | ||
1070 | 0xff, 0xff), .driver_info = (kernel_ulong_t)&zte_k3765_z_blacklist }, | ||
1071 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2003, 0xff, 0xff, 0xff) }, | ||
1072 | |||
1069 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0014, 0xff, 0xff, 0xff) }, /* ZTE CDMA products */ | 1073 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0014, 0xff, 0xff, 0xff) }, /* ZTE CDMA products */ |
1070 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0027, 0xff, 0xff, 0xff) }, | 1074 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0027, 0xff, 0xff, 0xff) }, |
1071 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0059, 0xff, 0xff, 0xff) }, | 1075 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0059, 0xff, 0xff, 0xff) }, |
1072 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0060, 0xff, 0xff, 0xff) }, | 1076 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0060, 0xff, 0xff, 0xff) }, |
1073 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0070, 0xff, 0xff, 0xff) }, | 1077 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0070, 0xff, 0xff, 0xff) }, |
1074 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0073, 0xff, 0xff, 0xff) }, | 1078 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0073, 0xff, 0xff, 0xff) }, |
1079 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0094, 0xff, 0xff, 0xff) }, | ||
1075 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0130, 0xff, 0xff, 0xff) }, | 1080 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0130, 0xff, 0xff, 0xff) }, |
1081 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0133, 0xff, 0xff, 0xff) }, | ||
1076 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0141, 0xff, 0xff, 0xff) }, | 1082 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0141, 0xff, 0xff, 0xff) }, |
1077 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2002, 0xff, | 1083 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0147, 0xff, 0xff, 0xff) }, |
1078 | 0xff, 0xff), .driver_info = (kernel_ulong_t)&zte_k3765_z_blacklist }, | 1084 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0152, 0xff, 0xff, 0xff) }, |
1079 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2003, 0xff, 0xff, 0xff) }, | 1085 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0168, 0xff, 0xff, 0xff) }, |
1086 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0170, 0xff, 0xff, 0xff) }, | ||
1087 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0176, 0xff, 0xff, 0xff) }, | ||
1088 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0178, 0xff, 0xff, 0xff) }, | ||
1089 | |||
1080 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH, 0xff, 0xff, 0xff) }, | 1090 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH, 0xff, 0xff, 0xff) }, |
1081 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710, 0xff, 0xff, 0xff) }, | 1091 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710, 0xff, 0xff, 0xff) }, |
1082 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) }, | 1092 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) }, |
diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c index 1d5deee3be52..f98800f2324c 100644 --- a/drivers/usb/serial/qcserial.c +++ b/drivers/usb/serial/qcserial.c | |||
@@ -36,6 +36,11 @@ static const struct usb_device_id id_table[] = { | |||
36 | {USB_DEVICE(0x413c, 0x8171)}, /* Dell Gobi QDL device */ | 36 | {USB_DEVICE(0x413c, 0x8171)}, /* Dell Gobi QDL device */ |
37 | {USB_DEVICE(0x1410, 0xa001)}, /* Novatel Gobi Modem device */ | 37 | {USB_DEVICE(0x1410, 0xa001)}, /* Novatel Gobi Modem device */ |
38 | {USB_DEVICE(0x1410, 0xa008)}, /* Novatel Gobi QDL device */ | 38 | {USB_DEVICE(0x1410, 0xa008)}, /* Novatel Gobi QDL device */ |
39 | {USB_DEVICE(0x1410, 0xa010)}, /* Novatel Gobi QDL device */ | ||
40 | {USB_DEVICE(0x1410, 0xa011)}, /* Novatel Gobi QDL device */ | ||
41 | {USB_DEVICE(0x1410, 0xa012)}, /* Novatel Gobi QDL device */ | ||
42 | {USB_DEVICE(0x1410, 0xa013)}, /* Novatel Gobi QDL device */ | ||
43 | {USB_DEVICE(0x1410, 0xa014)}, /* Novatel Gobi QDL device */ | ||
39 | {USB_DEVICE(0x0b05, 0x1776)}, /* Asus Gobi Modem device */ | 44 | {USB_DEVICE(0x0b05, 0x1776)}, /* Asus Gobi Modem device */ |
40 | {USB_DEVICE(0x0b05, 0x1774)}, /* Asus Gobi QDL device */ | 45 | {USB_DEVICE(0x0b05, 0x1774)}, /* Asus Gobi QDL device */ |
41 | {USB_DEVICE(0x19d2, 0xfff3)}, /* ONDA Gobi Modem device */ | 46 | {USB_DEVICE(0x19d2, 0xfff3)}, /* ONDA Gobi Modem device */ |
@@ -86,7 +91,16 @@ static const struct usb_device_id id_table[] = { | |||
86 | {USB_DEVICE(0x16d8, 0x8002)}, /* CMDTech Gobi 2000 Modem device (VU922) */ | 91 | {USB_DEVICE(0x16d8, 0x8002)}, /* CMDTech Gobi 2000 Modem device (VU922) */ |
87 | {USB_DEVICE(0x05c6, 0x9204)}, /* Gobi 2000 QDL device */ | 92 | {USB_DEVICE(0x05c6, 0x9204)}, /* Gobi 2000 QDL device */ |
88 | {USB_DEVICE(0x05c6, 0x9205)}, /* Gobi 2000 Modem device */ | 93 | {USB_DEVICE(0x05c6, 0x9205)}, /* Gobi 2000 Modem device */ |
94 | |||
95 | {USB_DEVICE(0x05c6, 0x920c)}, /* Gobi 3000 QDL */ | ||
96 | {USB_DEVICE(0x05c6, 0x920d)}, /* Gobi 3000 Composite */ | ||
97 | {USB_DEVICE(0x1410, 0xa020)}, /* Novatel Gobi 3000 QDL */ | ||
98 | {USB_DEVICE(0x1410, 0xa021)}, /* Novatel Gobi 3000 Composite */ | ||
99 | {USB_DEVICE(0x413c, 0x8193)}, /* Dell Gobi 3000 QDL */ | ||
100 | {USB_DEVICE(0x413c, 0x8194)}, /* Dell Gobi 3000 Composite */ | ||
89 | {USB_DEVICE(0x1199, 0x9013)}, /* Sierra Wireless Gobi 3000 Modem device (MC8355) */ | 101 | {USB_DEVICE(0x1199, 0x9013)}, /* Sierra Wireless Gobi 3000 Modem device (MC8355) */ |
102 | {USB_DEVICE(0x12D1, 0x14F0)}, /* Sony Gobi 3000 QDL */ | ||
103 | {USB_DEVICE(0x12D1, 0x14F1)}, /* Sony Gobi 3000 Composite */ | ||
90 | { } /* Terminating entry */ | 104 | { } /* Terminating entry */ |
91 | }; | 105 | }; |
92 | MODULE_DEVICE_TABLE(usb, id_table); | 106 | MODULE_DEVICE_TABLE(usb, id_table); |
@@ -123,8 +137,6 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id) | |||
123 | 137 | ||
124 | spin_lock_init(&data->susp_lock); | 138 | spin_lock_init(&data->susp_lock); |
125 | 139 | ||
126 | usb_enable_autosuspend(serial->dev); | ||
127 | |||
128 | switch (nintf) { | 140 | switch (nintf) { |
129 | case 1: | 141 | case 1: |
130 | /* QDL mode */ | 142 | /* QDL mode */ |
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index 8468eb769a29..75b838eff178 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c | |||
@@ -165,7 +165,7 @@ static unsigned int product_5052_count; | |||
165 | /* the array dimension is the number of default entries plus */ | 165 | /* the array dimension is the number of default entries plus */ |
166 | /* TI_EXTRA_VID_PID_COUNT user defined entries plus 1 terminating */ | 166 | /* TI_EXTRA_VID_PID_COUNT user defined entries plus 1 terminating */ |
167 | /* null entry */ | 167 | /* null entry */ |
168 | static struct usb_device_id ti_id_table_3410[13+TI_EXTRA_VID_PID_COUNT+1] = { | 168 | static struct usb_device_id ti_id_table_3410[14+TI_EXTRA_VID_PID_COUNT+1] = { |
169 | { USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) }, | 169 | { USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) }, |
170 | { USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) }, | 170 | { USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) }, |
171 | { USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_NO_FW_PRODUCT_ID) }, | 171 | { USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_NO_FW_PRODUCT_ID) }, |
@@ -179,6 +179,7 @@ static struct usb_device_id ti_id_table_3410[13+TI_EXTRA_VID_PID_COUNT+1] = { | |||
179 | { USB_DEVICE(IBM_VENDOR_ID, IBM_4543_PRODUCT_ID) }, | 179 | { USB_DEVICE(IBM_VENDOR_ID, IBM_4543_PRODUCT_ID) }, |
180 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454B_PRODUCT_ID) }, | 180 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454B_PRODUCT_ID) }, |
181 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454C_PRODUCT_ID) }, | 181 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454C_PRODUCT_ID) }, |
182 | { USB_DEVICE(ABBOTT_VENDOR_ID, ABBOTT_PRODUCT_ID) }, | ||
182 | }; | 183 | }; |
183 | 184 | ||
184 | static struct usb_device_id ti_id_table_5052[5+TI_EXTRA_VID_PID_COUNT+1] = { | 185 | static struct usb_device_id ti_id_table_5052[5+TI_EXTRA_VID_PID_COUNT+1] = { |
@@ -188,7 +189,7 @@ static struct usb_device_id ti_id_table_5052[5+TI_EXTRA_VID_PID_COUNT+1] = { | |||
188 | { USB_DEVICE(TI_VENDOR_ID, TI_5052_FIRMWARE_PRODUCT_ID) }, | 189 | { USB_DEVICE(TI_VENDOR_ID, TI_5052_FIRMWARE_PRODUCT_ID) }, |
189 | }; | 190 | }; |
190 | 191 | ||
191 | static struct usb_device_id ti_id_table_combined[17+2*TI_EXTRA_VID_PID_COUNT+1] = { | 192 | static struct usb_device_id ti_id_table_combined[18+2*TI_EXTRA_VID_PID_COUNT+1] = { |
192 | { USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) }, | 193 | { USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) }, |
193 | { USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) }, | 194 | { USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) }, |
194 | { USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_NO_FW_PRODUCT_ID) }, | 195 | { USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_NO_FW_PRODUCT_ID) }, |
@@ -206,6 +207,7 @@ static struct usb_device_id ti_id_table_combined[17+2*TI_EXTRA_VID_PID_COUNT+1] | |||
206 | { USB_DEVICE(IBM_VENDOR_ID, IBM_4543_PRODUCT_ID) }, | 207 | { USB_DEVICE(IBM_VENDOR_ID, IBM_4543_PRODUCT_ID) }, |
207 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454B_PRODUCT_ID) }, | 208 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454B_PRODUCT_ID) }, |
208 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454C_PRODUCT_ID) }, | 209 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454C_PRODUCT_ID) }, |
210 | { USB_DEVICE(ABBOTT_VENDOR_ID, ABBOTT_PRODUCT_ID) }, | ||
209 | { } | 211 | { } |
210 | }; | 212 | }; |
211 | 213 | ||
diff --git a/drivers/usb/serial/ti_usb_3410_5052.h b/drivers/usb/serial/ti_usb_3410_5052.h index 2aac1953993b..f140f1b9d5c0 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.h +++ b/drivers/usb/serial/ti_usb_3410_5052.h | |||
@@ -49,6 +49,10 @@ | |||
49 | #define MTS_MT9234ZBA_PRODUCT_ID 0xF115 | 49 | #define MTS_MT9234ZBA_PRODUCT_ID 0xF115 |
50 | #define MTS_MT9234ZBAOLD_PRODUCT_ID 0x0319 | 50 | #define MTS_MT9234ZBAOLD_PRODUCT_ID 0x0319 |
51 | 51 | ||
52 | /* Abbott Diabetics vendor and product ids */ | ||
53 | #define ABBOTT_VENDOR_ID 0x1a61 | ||
54 | #define ABBOTT_PRODUCT_ID 0x3410 | ||
55 | |||
52 | /* Commands */ | 56 | /* Commands */ |
53 | #define TI_GET_VERSION 0x01 | 57 | #define TI_GET_VERSION 0x01 |
54 | #define TI_GET_PORT_STATUS 0x02 | 58 | #define TI_GET_PORT_STATUS 0x02 |
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index 3dd7da9fd504..db51ba16dc07 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c | |||
@@ -788,15 +788,19 @@ static void quiesce_and_remove_host(struct us_data *us) | |||
788 | struct Scsi_Host *host = us_to_host(us); | 788 | struct Scsi_Host *host = us_to_host(us); |
789 | 789 | ||
790 | /* If the device is really gone, cut short reset delays */ | 790 | /* If the device is really gone, cut short reset delays */ |
791 | if (us->pusb_dev->state == USB_STATE_NOTATTACHED) | 791 | if (us->pusb_dev->state == USB_STATE_NOTATTACHED) { |
792 | set_bit(US_FLIDX_DISCONNECTING, &us->dflags); | 792 | set_bit(US_FLIDX_DISCONNECTING, &us->dflags); |
793 | wake_up(&us->delay_wait); | ||
794 | } | ||
793 | 795 | ||
794 | /* Prevent SCSI-scanning (if it hasn't started yet) | 796 | /* Prevent SCSI scanning (if it hasn't started yet) |
795 | * and wait for the SCSI-scanning thread to stop. | 797 | * or wait for the SCSI-scanning routine to stop. |
796 | */ | 798 | */ |
797 | set_bit(US_FLIDX_DONT_SCAN, &us->dflags); | 799 | cancel_delayed_work_sync(&us->scan_dwork); |
798 | wake_up(&us->delay_wait); | 800 | |
799 | wait_for_completion(&us->scanning_done); | 801 | /* Balance autopm calls if scanning was cancelled */ |
802 | if (test_bit(US_FLIDX_SCAN_PENDING, &us->dflags)) | ||
803 | usb_autopm_put_interface_no_suspend(us->pusb_intf); | ||
800 | 804 | ||
801 | /* Removing the host will perform an orderly shutdown: caches | 805 | /* Removing the host will perform an orderly shutdown: caches |
802 | * synchronized, disks spun down, etc. | 806 | * synchronized, disks spun down, etc. |
@@ -823,53 +827,28 @@ static void release_everything(struct us_data *us) | |||
823 | scsi_host_put(us_to_host(us)); | 827 | scsi_host_put(us_to_host(us)); |
824 | } | 828 | } |
825 | 829 | ||
826 | /* Thread to carry out delayed SCSI-device scanning */ | 830 | /* Delayed-work routine to carry out SCSI-device scanning */ |
827 | static int usb_stor_scan_thread(void * __us) | 831 | static void usb_stor_scan_dwork(struct work_struct *work) |
828 | { | 832 | { |
829 | struct us_data *us = (struct us_data *)__us; | 833 | struct us_data *us = container_of(work, struct us_data, |
834 | scan_dwork.work); | ||
830 | struct device *dev = &us->pusb_intf->dev; | 835 | struct device *dev = &us->pusb_intf->dev; |
831 | 836 | ||
832 | dev_dbg(dev, "device found\n"); | 837 | dev_dbg(dev, "starting scan\n"); |
833 | |||
834 | set_freezable(); | ||
835 | 838 | ||
836 | /* | 839 | /* For bulk-only devices, determine the max LUN value */ |
837 | * Wait for the timeout to expire or for a disconnect | 840 | if (us->protocol == USB_PR_BULK && !(us->fflags & US_FL_SINGLE_LUN)) { |
838 | * | 841 | mutex_lock(&us->dev_mutex); |
839 | * We can't freeze in this thread or we risk causing khubd to | 842 | us->max_lun = usb_stor_Bulk_max_lun(us); |
840 | * fail to freeze, but we can't be non-freezable either. Nor can | 843 | mutex_unlock(&us->dev_mutex); |
841 | * khubd freeze while waiting for scanning to complete as it may | ||
842 | * hold the device lock, causing a hang when suspending devices. | ||
843 | * So instead of using wait_event_freezable(), explicitly test | ||
844 | * for (DONT_SCAN || freezing) in interruptible wait and proceed | ||
845 | * if any of DONT_SCAN, freezing or timeout has happened. | ||
846 | */ | ||
847 | if (delay_use > 0) { | ||
848 | dev_dbg(dev, "waiting for device to settle " | ||
849 | "before scanning\n"); | ||
850 | wait_event_interruptible_timeout(us->delay_wait, | ||
851 | test_bit(US_FLIDX_DONT_SCAN, &us->dflags) || | ||
852 | freezing(current), delay_use * HZ); | ||
853 | } | 844 | } |
845 | scsi_scan_host(us_to_host(us)); | ||
846 | dev_dbg(dev, "scan complete\n"); | ||
854 | 847 | ||
855 | /* If the device is still connected, perform the scanning */ | 848 | /* Should we unbind if no devices were detected? */ |
856 | if (!test_bit(US_FLIDX_DONT_SCAN, &us->dflags)) { | ||
857 | |||
858 | /* For bulk-only devices, determine the max LUN value */ | ||
859 | if (us->protocol == USB_PR_BULK && | ||
860 | !(us->fflags & US_FL_SINGLE_LUN)) { | ||
861 | mutex_lock(&us->dev_mutex); | ||
862 | us->max_lun = usb_stor_Bulk_max_lun(us); | ||
863 | mutex_unlock(&us->dev_mutex); | ||
864 | } | ||
865 | scsi_scan_host(us_to_host(us)); | ||
866 | dev_dbg(dev, "scan complete\n"); | ||
867 | |||
868 | /* Should we unbind if no devices were detected? */ | ||
869 | } | ||
870 | 849 | ||
871 | usb_autopm_put_interface(us->pusb_intf); | 850 | usb_autopm_put_interface(us->pusb_intf); |
872 | complete_and_exit(&us->scanning_done, 0); | 851 | clear_bit(US_FLIDX_SCAN_PENDING, &us->dflags); |
873 | } | 852 | } |
874 | 853 | ||
875 | static unsigned int usb_stor_sg_tablesize(struct usb_interface *intf) | 854 | static unsigned int usb_stor_sg_tablesize(struct usb_interface *intf) |
@@ -916,7 +895,7 @@ int usb_stor_probe1(struct us_data **pus, | |||
916 | init_completion(&us->cmnd_ready); | 895 | init_completion(&us->cmnd_ready); |
917 | init_completion(&(us->notify)); | 896 | init_completion(&(us->notify)); |
918 | init_waitqueue_head(&us->delay_wait); | 897 | init_waitqueue_head(&us->delay_wait); |
919 | init_completion(&us->scanning_done); | 898 | INIT_DELAYED_WORK(&us->scan_dwork, usb_stor_scan_dwork); |
920 | 899 | ||
921 | /* Associate the us_data structure with the USB device */ | 900 | /* Associate the us_data structure with the USB device */ |
922 | result = associate_dev(us, intf); | 901 | result = associate_dev(us, intf); |
@@ -947,7 +926,6 @@ EXPORT_SYMBOL_GPL(usb_stor_probe1); | |||
947 | /* Second part of general USB mass-storage probing */ | 926 | /* Second part of general USB mass-storage probing */ |
948 | int usb_stor_probe2(struct us_data *us) | 927 | int usb_stor_probe2(struct us_data *us) |
949 | { | 928 | { |
950 | struct task_struct *th; | ||
951 | int result; | 929 | int result; |
952 | struct device *dev = &us->pusb_intf->dev; | 930 | struct device *dev = &us->pusb_intf->dev; |
953 | 931 | ||
@@ -988,20 +966,14 @@ int usb_stor_probe2(struct us_data *us) | |||
988 | goto BadDevice; | 966 | goto BadDevice; |
989 | } | 967 | } |
990 | 968 | ||
991 | /* Start up the thread for delayed SCSI-device scanning */ | 969 | /* Submit the delayed_work for SCSI-device scanning */ |
992 | th = kthread_create(usb_stor_scan_thread, us, "usb-stor-scan"); | ||
993 | if (IS_ERR(th)) { | ||
994 | dev_warn(dev, | ||
995 | "Unable to start the device-scanning thread\n"); | ||
996 | complete(&us->scanning_done); | ||
997 | quiesce_and_remove_host(us); | ||
998 | result = PTR_ERR(th); | ||
999 | goto BadDevice; | ||
1000 | } | ||
1001 | |||
1002 | usb_autopm_get_interface_no_resume(us->pusb_intf); | 970 | usb_autopm_get_interface_no_resume(us->pusb_intf); |
1003 | wake_up_process(th); | 971 | set_bit(US_FLIDX_SCAN_PENDING, &us->dflags); |
1004 | 972 | ||
973 | if (delay_use > 0) | ||
974 | dev_dbg(dev, "waiting for device to settle before scanning\n"); | ||
975 | queue_delayed_work(system_freezable_wq, &us->scan_dwork, | ||
976 | delay_use * HZ); | ||
1005 | return 0; | 977 | return 0; |
1006 | 978 | ||
1007 | /* We come here if there are any problems */ | 979 | /* We come here if there are any problems */ |
diff --git a/drivers/usb/storage/usb.h b/drivers/usb/storage/usb.h index 7b0f2113632e..75f70f04f37b 100644 --- a/drivers/usb/storage/usb.h +++ b/drivers/usb/storage/usb.h | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <linux/blkdev.h> | 47 | #include <linux/blkdev.h> |
48 | #include <linux/completion.h> | 48 | #include <linux/completion.h> |
49 | #include <linux/mutex.h> | 49 | #include <linux/mutex.h> |
50 | #include <linux/workqueue.h> | ||
50 | #include <scsi/scsi_host.h> | 51 | #include <scsi/scsi_host.h> |
51 | 52 | ||
52 | struct us_data; | 53 | struct us_data; |
@@ -72,7 +73,7 @@ struct us_unusual_dev { | |||
72 | #define US_FLIDX_DISCONNECTING 3 /* disconnect in progress */ | 73 | #define US_FLIDX_DISCONNECTING 3 /* disconnect in progress */ |
73 | #define US_FLIDX_RESETTING 4 /* device reset in progress */ | 74 | #define US_FLIDX_RESETTING 4 /* device reset in progress */ |
74 | #define US_FLIDX_TIMED_OUT 5 /* SCSI midlayer timed out */ | 75 | #define US_FLIDX_TIMED_OUT 5 /* SCSI midlayer timed out */ |
75 | #define US_FLIDX_DONT_SCAN 6 /* don't scan (disconnect) */ | 76 | #define US_FLIDX_SCAN_PENDING 6 /* scanning not yet done */ |
76 | #define US_FLIDX_REDO_READ10 7 /* redo READ(10) command */ | 77 | #define US_FLIDX_REDO_READ10 7 /* redo READ(10) command */ |
77 | #define US_FLIDX_READ10_WORKED 8 /* previous READ(10) succeeded */ | 78 | #define US_FLIDX_READ10_WORKED 8 /* previous READ(10) succeeded */ |
78 | 79 | ||
@@ -147,8 +148,8 @@ struct us_data { | |||
147 | /* mutual exclusion and synchronization structures */ | 148 | /* mutual exclusion and synchronization structures */ |
148 | struct completion cmnd_ready; /* to sleep thread on */ | 149 | struct completion cmnd_ready; /* to sleep thread on */ |
149 | struct completion notify; /* thread begin/end */ | 150 | struct completion notify; /* thread begin/end */ |
150 | wait_queue_head_t delay_wait; /* wait during scan, reset */ | 151 | wait_queue_head_t delay_wait; /* wait during reset */ |
151 | struct completion scanning_done; /* wait for scan thread */ | 152 | struct delayed_work scan_dwork; /* for async scanning */ |
152 | 153 | ||
153 | /* subdriver information */ | 154 | /* subdriver information */ |
154 | void *extra; /* Any extra data */ | 155 | void *extra; /* Any extra data */ |