diff options
Diffstat (limited to 'drivers/usb')
25 files changed, 430 insertions, 310 deletions
diff --git a/drivers/usb/chipidea/ci_hdrc_pci.c b/drivers/usb/chipidea/ci_hdrc_pci.c index 042320a6c6c7..d514332ac081 100644 --- a/drivers/usb/chipidea/ci_hdrc_pci.c +++ b/drivers/usb/chipidea/ci_hdrc_pci.c | |||
@@ -129,7 +129,12 @@ static DEFINE_PCI_DEVICE_TABLE(ci_hdrc_pci_id_table) = { | |||
129 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x0829), | 129 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x0829), |
130 | .driver_data = (kernel_ulong_t)&penwell_pci_platdata, | 130 | .driver_data = (kernel_ulong_t)&penwell_pci_platdata, |
131 | }, | 131 | }, |
132 | { 0, 0, 0, 0, 0, 0, 0 /* end: all zeroes */ } | 132 | { |
133 | /* Intel Clovertrail */ | ||
134 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xe006), | ||
135 | .driver_data = (kernel_ulong_t)&penwell_pci_platdata, | ||
136 | }, | ||
137 | { 0 } /* end: all zeroes */ | ||
133 | }; | 138 | }; |
134 | MODULE_DEVICE_TABLE(pci, ci_hdrc_pci_id_table); | 139 | MODULE_DEVICE_TABLE(pci, ci_hdrc_pci_id_table); |
135 | 140 | ||
diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c index 6f96795dd20c..64d7a6d9a1ad 100644 --- a/drivers/usb/chipidea/host.c +++ b/drivers/usb/chipidea/host.c | |||
@@ -100,8 +100,10 @@ static void host_stop(struct ci_hdrc *ci) | |||
100 | { | 100 | { |
101 | struct usb_hcd *hcd = ci->hcd; | 101 | struct usb_hcd *hcd = ci->hcd; |
102 | 102 | ||
103 | usb_remove_hcd(hcd); | 103 | if (hcd) { |
104 | usb_put_hcd(hcd); | 104 | usb_remove_hcd(hcd); |
105 | usb_put_hcd(hcd); | ||
106 | } | ||
105 | if (ci->platdata->reg_vbus) | 107 | if (ci->platdata->reg_vbus) |
106 | regulator_disable(ci->platdata->reg_vbus); | 108 | regulator_disable(ci->platdata->reg_vbus); |
107 | } | 109 | } |
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c index 5b44cd47da5b..01fe36273f3b 100644 --- a/drivers/usb/core/quirks.c +++ b/drivers/usb/core/quirks.c | |||
@@ -97,6 +97,9 @@ static const struct usb_device_id usb_quirk_list[] = { | |||
97 | /* Alcor Micro Corp. Hub */ | 97 | /* Alcor Micro Corp. Hub */ |
98 | { USB_DEVICE(0x058f, 0x9254), .driver_info = USB_QUIRK_RESET_RESUME }, | 98 | { USB_DEVICE(0x058f, 0x9254), .driver_info = USB_QUIRK_RESET_RESUME }, |
99 | 99 | ||
100 | /* MicroTouch Systems touchscreen */ | ||
101 | { USB_DEVICE(0x0596, 0x051e), .driver_info = USB_QUIRK_RESET_RESUME }, | ||
102 | |||
100 | /* appletouch */ | 103 | /* appletouch */ |
101 | { USB_DEVICE(0x05ac, 0x021a), .driver_info = USB_QUIRK_RESET_RESUME }, | 104 | { USB_DEVICE(0x05ac, 0x021a), .driver_info = USB_QUIRK_RESET_RESUME }, |
102 | 105 | ||
@@ -130,6 +133,9 @@ static const struct usb_device_id usb_quirk_list[] = { | |||
130 | /* Broadcom BCM92035DGROM BT dongle */ | 133 | /* Broadcom BCM92035DGROM BT dongle */ |
131 | { USB_DEVICE(0x0a5c, 0x2021), .driver_info = USB_QUIRK_RESET_RESUME }, | 134 | { USB_DEVICE(0x0a5c, 0x2021), .driver_info = USB_QUIRK_RESET_RESUME }, |
132 | 135 | ||
136 | /* MAYA44USB sound device */ | ||
137 | { USB_DEVICE(0x0a92, 0x0091), .driver_info = USB_QUIRK_RESET_RESUME }, | ||
138 | |||
133 | /* Action Semiconductor flash disk */ | 139 | /* Action Semiconductor flash disk */ |
134 | { USB_DEVICE(0x10d6, 0x2200), .driver_info = | 140 | { USB_DEVICE(0x10d6, 0x2200), .driver_info = |
135 | USB_QUIRK_STRING_FETCH_255 }, | 141 | USB_QUIRK_STRING_FETCH_255 }, |
diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c index 0658908d8968..44cf775a8627 100644 --- a/drivers/usb/gadget/f_fs.c +++ b/drivers/usb/gadget/f_fs.c | |||
@@ -2256,6 +2256,8 @@ static int ffs_func_bind(struct usb_configuration *c, | |||
2256 | data->raw_descs + ret, | 2256 | data->raw_descs + ret, |
2257 | (sizeof data->raw_descs) - ret, | 2257 | (sizeof data->raw_descs) - ret, |
2258 | __ffs_func_bind_do_descs, func); | 2258 | __ffs_func_bind_do_descs, func); |
2259 | if (unlikely(ret < 0)) | ||
2260 | goto error; | ||
2259 | } | 2261 | } |
2260 | 2262 | ||
2261 | /* | 2263 | /* |
diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c index cc9207473dbc..0ac6064aa3b8 100644 --- a/drivers/usb/gadget/pxa25x_udc.c +++ b/drivers/usb/gadget/pxa25x_udc.c | |||
@@ -2054,7 +2054,7 @@ static struct pxa25x_udc memory = { | |||
2054 | /* | 2054 | /* |
2055 | * probe - binds to the platform device | 2055 | * probe - binds to the platform device |
2056 | */ | 2056 | */ |
2057 | static int __init pxa25x_udc_probe(struct platform_device *pdev) | 2057 | static int pxa25x_udc_probe(struct platform_device *pdev) |
2058 | { | 2058 | { |
2059 | struct pxa25x_udc *dev = &memory; | 2059 | struct pxa25x_udc *dev = &memory; |
2060 | int retval, irq; | 2060 | int retval, irq; |
@@ -2203,7 +2203,7 @@ static void pxa25x_udc_shutdown(struct platform_device *_dev) | |||
2203 | pullup_off(); | 2203 | pullup_off(); |
2204 | } | 2204 | } |
2205 | 2205 | ||
2206 | static int __exit pxa25x_udc_remove(struct platform_device *pdev) | 2206 | static int pxa25x_udc_remove(struct platform_device *pdev) |
2207 | { | 2207 | { |
2208 | struct pxa25x_udc *dev = platform_get_drvdata(pdev); | 2208 | struct pxa25x_udc *dev = platform_get_drvdata(pdev); |
2209 | 2209 | ||
@@ -2294,7 +2294,8 @@ static int pxa25x_udc_resume(struct platform_device *dev) | |||
2294 | 2294 | ||
2295 | static struct platform_driver udc_driver = { | 2295 | static struct platform_driver udc_driver = { |
2296 | .shutdown = pxa25x_udc_shutdown, | 2296 | .shutdown = pxa25x_udc_shutdown, |
2297 | .remove = __exit_p(pxa25x_udc_remove), | 2297 | .probe = pxa25x_udc_probe, |
2298 | .remove = pxa25x_udc_remove, | ||
2298 | .suspend = pxa25x_udc_suspend, | 2299 | .suspend = pxa25x_udc_suspend, |
2299 | .resume = pxa25x_udc_resume, | 2300 | .resume = pxa25x_udc_resume, |
2300 | .driver = { | 2301 | .driver = { |
@@ -2303,7 +2304,7 @@ static struct platform_driver udc_driver = { | |||
2303 | }, | 2304 | }, |
2304 | }; | 2305 | }; |
2305 | 2306 | ||
2306 | module_platform_driver_probe(udc_driver, pxa25x_udc_probe); | 2307 | module_platform_driver(udc_driver); |
2307 | 2308 | ||
2308 | MODULE_DESCRIPTION(DRIVER_DESC); | 2309 | MODULE_DESCRIPTION(DRIVER_DESC); |
2309 | MODULE_AUTHOR("Frank Becker, Robert Schwebel, David Brownell"); | 2310 | MODULE_AUTHOR("Frank Becker, Robert Schwebel, David Brownell"); |
diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index 6bddf1aa2347..a8a99e4748d5 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c | |||
@@ -543,7 +543,7 @@ static int s3c_hsotg_write_fifo(struct s3c_hsotg *hsotg, | |||
543 | * FIFO, requests of >512 cause the endpoint to get stuck with a | 543 | * FIFO, requests of >512 cause the endpoint to get stuck with a |
544 | * fragment of the end of the transfer in it. | 544 | * fragment of the end of the transfer in it. |
545 | */ | 545 | */ |
546 | if (can_write > 512) | 546 | if (can_write > 512 && !periodic) |
547 | can_write = 512; | 547 | can_write = 512; |
548 | 548 | ||
549 | /* | 549 | /* |
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c index 2c76ef1320ea..08ef2829a7e2 100644 --- a/drivers/usb/host/pci-quirks.c +++ b/drivers/usb/host/pci-quirks.c | |||
@@ -799,7 +799,7 @@ void usb_enable_intel_xhci_ports(struct pci_dev *xhci_pdev) | |||
799 | * switchable ports. | 799 | * switchable ports. |
800 | */ | 800 | */ |
801 | pci_write_config_dword(xhci_pdev, USB_INTEL_USB3_PSSEN, | 801 | pci_write_config_dword(xhci_pdev, USB_INTEL_USB3_PSSEN, |
802 | cpu_to_le32(ports_available)); | 802 | ports_available); |
803 | 803 | ||
804 | pci_read_config_dword(xhci_pdev, USB_INTEL_USB3_PSSEN, | 804 | pci_read_config_dword(xhci_pdev, USB_INTEL_USB3_PSSEN, |
805 | &ports_available); | 805 | &ports_available); |
@@ -821,7 +821,7 @@ void usb_enable_intel_xhci_ports(struct pci_dev *xhci_pdev) | |||
821 | * host. | 821 | * host. |
822 | */ | 822 | */ |
823 | pci_write_config_dword(xhci_pdev, USB_INTEL_XUSB2PR, | 823 | pci_write_config_dword(xhci_pdev, USB_INTEL_XUSB2PR, |
824 | cpu_to_le32(ports_available)); | 824 | ports_available); |
825 | 825 | ||
826 | pci_read_config_dword(xhci_pdev, USB_INTEL_XUSB2PR, | 826 | pci_read_config_dword(xhci_pdev, USB_INTEL_XUSB2PR, |
827 | &ports_available); | 827 | &ports_available); |
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index 773a6b28c4f1..e8b4c56dcf62 100644 --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c | |||
@@ -1157,18 +1157,6 @@ int xhci_bus_suspend(struct usb_hcd *hcd) | |||
1157 | t1 = xhci_port_state_to_neutral(t1); | 1157 | t1 = xhci_port_state_to_neutral(t1); |
1158 | if (t1 != t2) | 1158 | if (t1 != t2) |
1159 | xhci_writel(xhci, t2, port_array[port_index]); | 1159 | xhci_writel(xhci, t2, port_array[port_index]); |
1160 | |||
1161 | if (hcd->speed != HCD_USB3) { | ||
1162 | /* enable remote wake up for USB 2.0 */ | ||
1163 | __le32 __iomem *addr; | ||
1164 | u32 tmp; | ||
1165 | |||
1166 | /* Get the port power control register address. */ | ||
1167 | addr = port_array[port_index] + PORTPMSC; | ||
1168 | tmp = xhci_readl(xhci, addr); | ||
1169 | tmp |= PORT_RWE; | ||
1170 | xhci_writel(xhci, tmp, addr); | ||
1171 | } | ||
1172 | } | 1160 | } |
1173 | hcd->state = HC_STATE_SUSPENDED; | 1161 | hcd->state = HC_STATE_SUSPENDED; |
1174 | bus_state->next_statechange = jiffies + msecs_to_jiffies(10); | 1162 | bus_state->next_statechange = jiffies + msecs_to_jiffies(10); |
@@ -1247,20 +1235,6 @@ int xhci_bus_resume(struct usb_hcd *hcd) | |||
1247 | xhci_ring_device(xhci, slot_id); | 1235 | xhci_ring_device(xhci, slot_id); |
1248 | } else | 1236 | } else |
1249 | xhci_writel(xhci, temp, port_array[port_index]); | 1237 | xhci_writel(xhci, temp, port_array[port_index]); |
1250 | |||
1251 | if (hcd->speed != HCD_USB3) { | ||
1252 | /* disable remote wake up for USB 2.0 */ | ||
1253 | __le32 __iomem *addr; | ||
1254 | u32 tmp; | ||
1255 | |||
1256 | /* Add one to the port status register address to get | ||
1257 | * the port power control register address. | ||
1258 | */ | ||
1259 | addr = port_array[port_index] + PORTPMSC; | ||
1260 | tmp = xhci_readl(xhci, addr); | ||
1261 | tmp &= ~PORT_RWE; | ||
1262 | xhci_writel(xhci, tmp, addr); | ||
1263 | } | ||
1264 | } | 1238 | } |
1265 | 1239 | ||
1266 | (void) xhci_readl(xhci, &xhci->op_regs->command); | 1240 | (void) xhci_readl(xhci, &xhci->op_regs->command); |
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index 236c3aabe940..b8dffd59eb25 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c | |||
@@ -35,6 +35,9 @@ | |||
35 | #define PCI_VENDOR_ID_ETRON 0x1b6f | 35 | #define PCI_VENDOR_ID_ETRON 0x1b6f |
36 | #define PCI_DEVICE_ID_ASROCK_P67 0x7023 | 36 | #define PCI_DEVICE_ID_ASROCK_P67 0x7023 |
37 | 37 | ||
38 | #define PCI_DEVICE_ID_INTEL_LYNXPOINT_XHCI 0x8c31 | ||
39 | #define PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_XHCI 0x9c31 | ||
40 | |||
38 | static const char hcd_name[] = "xhci_hcd"; | 41 | static const char hcd_name[] = "xhci_hcd"; |
39 | 42 | ||
40 | /* called after powerup, by probe or system-pm "wakeup" */ | 43 | /* called after powerup, by probe or system-pm "wakeup" */ |
@@ -69,6 +72,14 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) | |||
69 | "QUIRK: Fresco Logic xHC needs configure" | 72 | "QUIRK: Fresco Logic xHC needs configure" |
70 | " endpoint cmd after reset endpoint"); | 73 | " endpoint cmd after reset endpoint"); |
71 | } | 74 | } |
75 | if (pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_PDK && | ||
76 | pdev->revision == 0x4) { | ||
77 | xhci->quirks |= XHCI_SLOW_SUSPEND; | ||
78 | xhci_dbg_trace(xhci, trace_xhci_dbg_quirks, | ||
79 | "QUIRK: Fresco Logic xHC revision %u" | ||
80 | "must be suspended extra slowly", | ||
81 | pdev->revision); | ||
82 | } | ||
72 | /* Fresco Logic confirms: all revisions of this chip do not | 83 | /* Fresco Logic confirms: all revisions of this chip do not |
73 | * support MSI, even though some of them claim to in their PCI | 84 | * support MSI, even though some of them claim to in their PCI |
74 | * capabilities. | 85 | * capabilities. |
@@ -110,6 +121,15 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) | |||
110 | xhci->quirks |= XHCI_SPURIOUS_REBOOT; | 121 | xhci->quirks |= XHCI_SPURIOUS_REBOOT; |
111 | xhci->quirks |= XHCI_AVOID_BEI; | 122 | xhci->quirks |= XHCI_AVOID_BEI; |
112 | } | 123 | } |
124 | if (pdev->vendor == PCI_VENDOR_ID_INTEL && | ||
125 | (pdev->device == PCI_DEVICE_ID_INTEL_LYNXPOINT_XHCI || | ||
126 | pdev->device == PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_XHCI)) { | ||
127 | /* Workaround for occasional spurious wakeups from S5 (or | ||
128 | * any other sleep) on Haswell machines with LPT and LPT-LP | ||
129 | * with the new Intel BIOS | ||
130 | */ | ||
131 | xhci->quirks |= XHCI_SPURIOUS_WAKEUP; | ||
132 | } | ||
113 | if (pdev->vendor == PCI_VENDOR_ID_ETRON && | 133 | if (pdev->vendor == PCI_VENDOR_ID_ETRON && |
114 | pdev->device == PCI_DEVICE_ID_ASROCK_P67) { | 134 | pdev->device == PCI_DEVICE_ID_ASROCK_P67) { |
115 | xhci->quirks |= XHCI_RESET_ON_RESUME; | 135 | xhci->quirks |= XHCI_RESET_ON_RESUME; |
@@ -217,6 +237,11 @@ static void xhci_pci_remove(struct pci_dev *dev) | |||
217 | usb_put_hcd(xhci->shared_hcd); | 237 | usb_put_hcd(xhci->shared_hcd); |
218 | } | 238 | } |
219 | usb_hcd_pci_remove(dev); | 239 | usb_hcd_pci_remove(dev); |
240 | |||
241 | /* Workaround for spurious wakeups at shutdown with HSW */ | ||
242 | if (xhci->quirks & XHCI_SPURIOUS_WAKEUP) | ||
243 | pci_set_power_state(dev, PCI_D3hot); | ||
244 | |||
220 | kfree(xhci); | 245 | kfree(xhci); |
221 | } | 246 | } |
222 | 247 | ||
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 1e36dbb48366..6e0d886bcce5 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c | |||
@@ -730,6 +730,9 @@ void xhci_shutdown(struct usb_hcd *hcd) | |||
730 | 730 | ||
731 | spin_lock_irq(&xhci->lock); | 731 | spin_lock_irq(&xhci->lock); |
732 | xhci_halt(xhci); | 732 | xhci_halt(xhci); |
733 | /* Workaround for spurious wakeups at shutdown with HSW */ | ||
734 | if (xhci->quirks & XHCI_SPURIOUS_WAKEUP) | ||
735 | xhci_reset(xhci); | ||
733 | spin_unlock_irq(&xhci->lock); | 736 | spin_unlock_irq(&xhci->lock); |
734 | 737 | ||
735 | xhci_cleanup_msix(xhci); | 738 | xhci_cleanup_msix(xhci); |
@@ -737,6 +740,10 @@ void xhci_shutdown(struct usb_hcd *hcd) | |||
737 | xhci_dbg_trace(xhci, trace_xhci_dbg_init, | 740 | xhci_dbg_trace(xhci, trace_xhci_dbg_init, |
738 | "xhci_shutdown completed - status = %x", | 741 | "xhci_shutdown completed - status = %x", |
739 | xhci_readl(xhci, &xhci->op_regs->status)); | 742 | xhci_readl(xhci, &xhci->op_regs->status)); |
743 | |||
744 | /* Yet another workaround for spurious wakeups at shutdown with HSW */ | ||
745 | if (xhci->quirks & XHCI_SPURIOUS_WAKEUP) | ||
746 | pci_set_power_state(to_pci_dev(hcd->self.controller), PCI_D3hot); | ||
740 | } | 747 | } |
741 | 748 | ||
742 | #ifdef CONFIG_PM | 749 | #ifdef CONFIG_PM |
@@ -839,6 +846,7 @@ static void xhci_clear_command_ring(struct xhci_hcd *xhci) | |||
839 | int xhci_suspend(struct xhci_hcd *xhci) | 846 | int xhci_suspend(struct xhci_hcd *xhci) |
840 | { | 847 | { |
841 | int rc = 0; | 848 | int rc = 0; |
849 | unsigned int delay = XHCI_MAX_HALT_USEC; | ||
842 | struct usb_hcd *hcd = xhci_to_hcd(xhci); | 850 | struct usb_hcd *hcd = xhci_to_hcd(xhci); |
843 | u32 command; | 851 | u32 command; |
844 | 852 | ||
@@ -861,8 +869,12 @@ int xhci_suspend(struct xhci_hcd *xhci) | |||
861 | command = xhci_readl(xhci, &xhci->op_regs->command); | 869 | command = xhci_readl(xhci, &xhci->op_regs->command); |
862 | command &= ~CMD_RUN; | 870 | command &= ~CMD_RUN; |
863 | xhci_writel(xhci, command, &xhci->op_regs->command); | 871 | xhci_writel(xhci, command, &xhci->op_regs->command); |
872 | |||
873 | /* Some chips from Fresco Logic need an extraordinary delay */ | ||
874 | delay *= (xhci->quirks & XHCI_SLOW_SUSPEND) ? 10 : 1; | ||
875 | |||
864 | if (xhci_handshake(xhci, &xhci->op_regs->status, | 876 | if (xhci_handshake(xhci, &xhci->op_regs->status, |
865 | STS_HALT, STS_HALT, XHCI_MAX_HALT_USEC)) { | 877 | STS_HALT, STS_HALT, delay)) { |
866 | xhci_warn(xhci, "WARN: xHC CMD_RUN timeout\n"); | 878 | xhci_warn(xhci, "WARN: xHC CMD_RUN timeout\n"); |
867 | spin_unlock_irq(&xhci->lock); | 879 | spin_unlock_irq(&xhci->lock); |
868 | return -ETIMEDOUT; | 880 | return -ETIMEDOUT; |
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index 289fbfbae746..941d5f59e4dc 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h | |||
@@ -1548,6 +1548,8 @@ struct xhci_hcd { | |||
1548 | #define XHCI_COMP_MODE_QUIRK (1 << 14) | 1548 | #define XHCI_COMP_MODE_QUIRK (1 << 14) |
1549 | #define XHCI_AVOID_BEI (1 << 15) | 1549 | #define XHCI_AVOID_BEI (1 << 15) |
1550 | #define XHCI_PLAT (1 << 16) | 1550 | #define XHCI_PLAT (1 << 16) |
1551 | #define XHCI_SLOW_SUSPEND (1 << 17) | ||
1552 | #define XHCI_SPURIOUS_WAKEUP (1 << 18) | ||
1551 | unsigned int num_active_eps; | 1553 | unsigned int num_active_eps; |
1552 | unsigned int limit_active_eps; | 1554 | unsigned int limit_active_eps; |
1553 | /* There are two roothubs to keep track of bus suspend info for */ | 1555 | /* There are two roothubs to keep track of bus suspend info for */ |
diff --git a/drivers/usb/misc/Kconfig b/drivers/usb/misc/Kconfig index e2b21c1d9c40..ba5f70f92888 100644 --- a/drivers/usb/misc/Kconfig +++ b/drivers/usb/misc/Kconfig | |||
@@ -246,6 +246,6 @@ config USB_EZUSB_FX2 | |||
246 | config USB_HSIC_USB3503 | 246 | config USB_HSIC_USB3503 |
247 | tristate "USB3503 HSIC to USB20 Driver" | 247 | tristate "USB3503 HSIC to USB20 Driver" |
248 | depends on I2C | 248 | depends on I2C |
249 | select REGMAP | 249 | select REGMAP_I2C |
250 | help | 250 | help |
251 | This option enables support for SMSC USB3503 HSIC to USB 2.0 Driver. | 251 | This option enables support for SMSC USB3503 HSIC to USB 2.0 Driver. |
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 18e877ffe7b7..cd70cc886171 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -922,6 +922,52 @@ static void musb_generic_disable(struct musb *musb) | |||
922 | } | 922 | } |
923 | 923 | ||
924 | /* | 924 | /* |
925 | * Program the HDRC to start (enable interrupts, dma, etc.). | ||
926 | */ | ||
927 | void musb_start(struct musb *musb) | ||
928 | { | ||
929 | void __iomem *regs = musb->mregs; | ||
930 | u8 devctl = musb_readb(regs, MUSB_DEVCTL); | ||
931 | |||
932 | dev_dbg(musb->controller, "<== devctl %02x\n", devctl); | ||
933 | |||
934 | /* Set INT enable registers, enable interrupts */ | ||
935 | musb->intrtxe = musb->epmask; | ||
936 | musb_writew(regs, MUSB_INTRTXE, musb->intrtxe); | ||
937 | musb->intrrxe = musb->epmask & 0xfffe; | ||
938 | musb_writew(regs, MUSB_INTRRXE, musb->intrrxe); | ||
939 | musb_writeb(regs, MUSB_INTRUSBE, 0xf7); | ||
940 | |||
941 | musb_writeb(regs, MUSB_TESTMODE, 0); | ||
942 | |||
943 | /* put into basic highspeed mode and start session */ | ||
944 | musb_writeb(regs, MUSB_POWER, MUSB_POWER_ISOUPDATE | ||
945 | | MUSB_POWER_HSENAB | ||
946 | /* ENSUSPEND wedges tusb */ | ||
947 | /* | MUSB_POWER_ENSUSPEND */ | ||
948 | ); | ||
949 | |||
950 | musb->is_active = 0; | ||
951 | devctl = musb_readb(regs, MUSB_DEVCTL); | ||
952 | devctl &= ~MUSB_DEVCTL_SESSION; | ||
953 | |||
954 | /* session started after: | ||
955 | * (a) ID-grounded irq, host mode; | ||
956 | * (b) vbus present/connect IRQ, peripheral mode; | ||
957 | * (c) peripheral initiates, using SRP | ||
958 | */ | ||
959 | if (musb->port_mode != MUSB_PORT_MODE_HOST && | ||
960 | (devctl & MUSB_DEVCTL_VBUS) == MUSB_DEVCTL_VBUS) { | ||
961 | musb->is_active = 1; | ||
962 | } else { | ||
963 | devctl |= MUSB_DEVCTL_SESSION; | ||
964 | } | ||
965 | |||
966 | musb_platform_enable(musb); | ||
967 | musb_writeb(regs, MUSB_DEVCTL, devctl); | ||
968 | } | ||
969 | |||
970 | /* | ||
925 | * Make the HDRC stop (disable interrupts, etc.); | 971 | * Make the HDRC stop (disable interrupts, etc.); |
926 | * reversible by musb_start | 972 | * reversible by musb_start |
927 | * called on gadget driver unregister | 973 | * called on gadget driver unregister |
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h index 65f3917b4fc5..1c5bf75ee8ff 100644 --- a/drivers/usb/musb/musb_core.h +++ b/drivers/usb/musb/musb_core.h | |||
@@ -503,6 +503,7 @@ static inline void musb_configure_ep0(struct musb *musb) | |||
503 | extern const char musb_driver_name[]; | 503 | extern const char musb_driver_name[]; |
504 | 504 | ||
505 | extern void musb_stop(struct musb *musb); | 505 | extern void musb_stop(struct musb *musb); |
506 | extern void musb_start(struct musb *musb); | ||
506 | 507 | ||
507 | extern void musb_write_fifo(struct musb_hw_ep *ep, u16 len, const u8 *src); | 508 | extern void musb_write_fifo(struct musb_hw_ep *ep, u16 len, const u8 *src); |
508 | extern void musb_read_fifo(struct musb_hw_ep *ep, u16 len, u8 *dst); | 509 | extern void musb_read_fifo(struct musb_hw_ep *ep, u16 len, u8 *dst); |
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 4047cbb91bac..bd4138d80a48 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c | |||
@@ -535,6 +535,9 @@ static int dsps_probe(struct platform_device *pdev) | |||
535 | struct dsps_glue *glue; | 535 | struct dsps_glue *glue; |
536 | int ret; | 536 | int ret; |
537 | 537 | ||
538 | if (!strcmp(pdev->name, "musb-hdrc")) | ||
539 | return -ENODEV; | ||
540 | |||
538 | match = of_match_node(musb_dsps_of_match, pdev->dev.of_node); | 541 | match = of_match_node(musb_dsps_of_match, pdev->dev.of_node); |
539 | if (!match) { | 542 | if (!match) { |
540 | dev_err(&pdev->dev, "fail to get matching of_match struct\n"); | 543 | dev_err(&pdev->dev, "fail to get matching of_match struct\n"); |
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 9a08679d204d..3671898a4535 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c | |||
@@ -1790,6 +1790,10 @@ int musb_gadget_setup(struct musb *musb) | |||
1790 | musb->g.max_speed = USB_SPEED_HIGH; | 1790 | musb->g.max_speed = USB_SPEED_HIGH; |
1791 | musb->g.speed = USB_SPEED_UNKNOWN; | 1791 | musb->g.speed = USB_SPEED_UNKNOWN; |
1792 | 1792 | ||
1793 | MUSB_DEV_MODE(musb); | ||
1794 | musb->xceiv->otg->default_a = 0; | ||
1795 | musb->xceiv->state = OTG_STATE_B_IDLE; | ||
1796 | |||
1793 | /* this "gadget" abstracts/virtualizes the controller */ | 1797 | /* this "gadget" abstracts/virtualizes the controller */ |
1794 | musb->g.name = musb_driver_name; | 1798 | musb->g.name = musb_driver_name; |
1795 | musb->g.is_otg = 1; | 1799 | musb->g.is_otg = 1; |
@@ -1855,6 +1859,8 @@ static int musb_gadget_start(struct usb_gadget *g, | |||
1855 | musb->xceiv->state = OTG_STATE_B_IDLE; | 1859 | musb->xceiv->state = OTG_STATE_B_IDLE; |
1856 | spin_unlock_irqrestore(&musb->lock, flags); | 1860 | spin_unlock_irqrestore(&musb->lock, flags); |
1857 | 1861 | ||
1862 | musb_start(musb); | ||
1863 | |||
1858 | /* REVISIT: funcall to other code, which also | 1864 | /* REVISIT: funcall to other code, which also |
1859 | * handles power budgeting ... this way also | 1865 | * handles power budgeting ... this way also |
1860 | * ensures HdrcStart is indirectly called. | 1866 | * ensures HdrcStart is indirectly called. |
diff --git a/drivers/usb/musb/musb_virthub.c b/drivers/usb/musb/musb_virthub.c index a523950c2b32..d1d6b83aabca 100644 --- a/drivers/usb/musb/musb_virthub.c +++ b/drivers/usb/musb/musb_virthub.c | |||
@@ -44,52 +44,6 @@ | |||
44 | 44 | ||
45 | #include "musb_core.h" | 45 | #include "musb_core.h" |
46 | 46 | ||
47 | /* | ||
48 | * Program the HDRC to start (enable interrupts, dma, etc.). | ||
49 | */ | ||
50 | static void musb_start(struct musb *musb) | ||
51 | { | ||
52 | void __iomem *regs = musb->mregs; | ||
53 | u8 devctl = musb_readb(regs, MUSB_DEVCTL); | ||
54 | |||
55 | dev_dbg(musb->controller, "<== devctl %02x\n", devctl); | ||
56 | |||
57 | /* Set INT enable registers, enable interrupts */ | ||
58 | musb->intrtxe = musb->epmask; | ||
59 | musb_writew(regs, MUSB_INTRTXE, musb->intrtxe); | ||
60 | musb->intrrxe = musb->epmask & 0xfffe; | ||
61 | musb_writew(regs, MUSB_INTRRXE, musb->intrrxe); | ||
62 | musb_writeb(regs, MUSB_INTRUSBE, 0xf7); | ||
63 | |||
64 | musb_writeb(regs, MUSB_TESTMODE, 0); | ||
65 | |||
66 | /* put into basic highspeed mode and start session */ | ||
67 | musb_writeb(regs, MUSB_POWER, MUSB_POWER_ISOUPDATE | ||
68 | | MUSB_POWER_HSENAB | ||
69 | /* ENSUSPEND wedges tusb */ | ||
70 | /* | MUSB_POWER_ENSUSPEND */ | ||
71 | ); | ||
72 | |||
73 | musb->is_active = 0; | ||
74 | devctl = musb_readb(regs, MUSB_DEVCTL); | ||
75 | devctl &= ~MUSB_DEVCTL_SESSION; | ||
76 | |||
77 | /* session started after: | ||
78 | * (a) ID-grounded irq, host mode; | ||
79 | * (b) vbus present/connect IRQ, peripheral mode; | ||
80 | * (c) peripheral initiates, using SRP | ||
81 | */ | ||
82 | if (musb->port_mode != MUSB_PORT_MODE_HOST && | ||
83 | (devctl & MUSB_DEVCTL_VBUS) == MUSB_DEVCTL_VBUS) { | ||
84 | musb->is_active = 1; | ||
85 | } else { | ||
86 | devctl |= MUSB_DEVCTL_SESSION; | ||
87 | } | ||
88 | |||
89 | musb_platform_enable(musb); | ||
90 | musb_writeb(regs, MUSB_DEVCTL, devctl); | ||
91 | } | ||
92 | |||
93 | static void musb_port_suspend(struct musb *musb, bool do_suspend) | 47 | static void musb_port_suspend(struct musb *musb, bool do_suspend) |
94 | { | 48 | { |
95 | struct usb_otg *otg = musb->xceiv->otg; | 49 | struct usb_otg *otg = musb->xceiv->otg; |
diff --git a/drivers/usb/phy/phy-gpio-vbus-usb.c b/drivers/usb/phy/phy-gpio-vbus-usb.c index b2f29c9aebbf..02799a5efcd4 100644 --- a/drivers/usb/phy/phy-gpio-vbus-usb.c +++ b/drivers/usb/phy/phy-gpio-vbus-usb.c | |||
@@ -241,7 +241,7 @@ static int gpio_vbus_set_suspend(struct usb_phy *phy, int suspend) | |||
241 | 241 | ||
242 | /* platform driver interface */ | 242 | /* platform driver interface */ |
243 | 243 | ||
244 | static int __init gpio_vbus_probe(struct platform_device *pdev) | 244 | static int gpio_vbus_probe(struct platform_device *pdev) |
245 | { | 245 | { |
246 | struct gpio_vbus_mach_info *pdata = dev_get_platdata(&pdev->dev); | 246 | struct gpio_vbus_mach_info *pdata = dev_get_platdata(&pdev->dev); |
247 | struct gpio_vbus_data *gpio_vbus; | 247 | struct gpio_vbus_data *gpio_vbus; |
@@ -349,7 +349,7 @@ err_gpio: | |||
349 | return err; | 349 | return err; |
350 | } | 350 | } |
351 | 351 | ||
352 | static int __exit gpio_vbus_remove(struct platform_device *pdev) | 352 | static int gpio_vbus_remove(struct platform_device *pdev) |
353 | { | 353 | { |
354 | struct gpio_vbus_data *gpio_vbus = platform_get_drvdata(pdev); | 354 | struct gpio_vbus_data *gpio_vbus = platform_get_drvdata(pdev); |
355 | struct gpio_vbus_mach_info *pdata = dev_get_platdata(&pdev->dev); | 355 | struct gpio_vbus_mach_info *pdata = dev_get_platdata(&pdev->dev); |
@@ -398,8 +398,6 @@ static const struct dev_pm_ops gpio_vbus_dev_pm_ops = { | |||
398 | }; | 398 | }; |
399 | #endif | 399 | #endif |
400 | 400 | ||
401 | /* NOTE: the gpio-vbus device may *NOT* be hotplugged */ | ||
402 | |||
403 | MODULE_ALIAS("platform:gpio-vbus"); | 401 | MODULE_ALIAS("platform:gpio-vbus"); |
404 | 402 | ||
405 | static struct platform_driver gpio_vbus_driver = { | 403 | static struct platform_driver gpio_vbus_driver = { |
@@ -410,10 +408,11 @@ static struct platform_driver gpio_vbus_driver = { | |||
410 | .pm = &gpio_vbus_dev_pm_ops, | 408 | .pm = &gpio_vbus_dev_pm_ops, |
411 | #endif | 409 | #endif |
412 | }, | 410 | }, |
413 | .remove = __exit_p(gpio_vbus_remove), | 411 | .probe = gpio_vbus_probe, |
412 | .remove = gpio_vbus_remove, | ||
414 | }; | 413 | }; |
415 | 414 | ||
416 | module_platform_driver_probe(gpio_vbus_driver, gpio_vbus_probe); | 415 | module_platform_driver(gpio_vbus_driver); |
417 | 416 | ||
418 | MODULE_DESCRIPTION("simple GPIO controlled OTG transceiver driver"); | 417 | MODULE_DESCRIPTION("simple GPIO controlled OTG transceiver driver"); |
419 | MODULE_AUTHOR("Philipp Zabel"); | 418 | MODULE_AUTHOR("Philipp Zabel"); |
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index c45f9c0a1b34..b21d553c245b 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -904,6 +904,7 @@ static struct usb_device_id id_table_combined [] = { | |||
904 | { USB_DEVICE(FTDI_VID, FTDI_LUMEL_PD12_PID) }, | 904 | { USB_DEVICE(FTDI_VID, FTDI_LUMEL_PD12_PID) }, |
905 | /* Crucible Devices */ | 905 | /* Crucible Devices */ |
906 | { USB_DEVICE(FTDI_VID, FTDI_CT_COMET_PID) }, | 906 | { USB_DEVICE(FTDI_VID, FTDI_CT_COMET_PID) }, |
907 | { USB_DEVICE(FTDI_VID, FTDI_Z3X_PID) }, | ||
907 | { } /* Terminating entry */ | 908 | { } /* Terminating entry */ |
908 | }; | 909 | }; |
909 | 910 | ||
diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h index 1b8af461b522..a7019d1e3058 100644 --- a/drivers/usb/serial/ftdi_sio_ids.h +++ b/drivers/usb/serial/ftdi_sio_ids.h | |||
@@ -1307,3 +1307,9 @@ | |||
1307 | * Manufacturer: Crucible Technologies | 1307 | * Manufacturer: Crucible Technologies |
1308 | */ | 1308 | */ |
1309 | #define FTDI_CT_COMET_PID 0x8e08 | 1309 | #define FTDI_CT_COMET_PID 0x8e08 |
1310 | |||
1311 | /* | ||
1312 | * Product: Z3X Box | ||
1313 | * Manufacturer: Smart GSM Team | ||
1314 | */ | ||
1315 | #define FTDI_Z3X_PID 0x0011 | ||
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 1cf6f125f5f0..acaee066b99a 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -81,6 +81,7 @@ static void option_instat_callback(struct urb *urb); | |||
81 | 81 | ||
82 | #define HUAWEI_VENDOR_ID 0x12D1 | 82 | #define HUAWEI_VENDOR_ID 0x12D1 |
83 | #define HUAWEI_PRODUCT_E173 0x140C | 83 | #define HUAWEI_PRODUCT_E173 0x140C |
84 | #define HUAWEI_PRODUCT_E1750 0x1406 | ||
84 | #define HUAWEI_PRODUCT_K4505 0x1464 | 85 | #define HUAWEI_PRODUCT_K4505 0x1464 |
85 | #define HUAWEI_PRODUCT_K3765 0x1465 | 86 | #define HUAWEI_PRODUCT_K3765 0x1465 |
86 | #define HUAWEI_PRODUCT_K4605 0x14C6 | 87 | #define HUAWEI_PRODUCT_K4605 0x14C6 |
@@ -450,6 +451,10 @@ static void option_instat_callback(struct urb *urb); | |||
450 | #define CHANGHONG_VENDOR_ID 0x2077 | 451 | #define CHANGHONG_VENDOR_ID 0x2077 |
451 | #define CHANGHONG_PRODUCT_CH690 0x7001 | 452 | #define CHANGHONG_PRODUCT_CH690 0x7001 |
452 | 453 | ||
454 | /* Inovia */ | ||
455 | #define INOVIA_VENDOR_ID 0x20a6 | ||
456 | #define INOVIA_SEW858 0x1105 | ||
457 | |||
453 | /* some devices interfaces need special handling due to a number of reasons */ | 458 | /* some devices interfaces need special handling due to a number of reasons */ |
454 | enum option_blacklist_reason { | 459 | enum option_blacklist_reason { |
455 | OPTION_BLACKLIST_NONE = 0, | 460 | OPTION_BLACKLIST_NONE = 0, |
@@ -567,6 +572,8 @@ static const struct usb_device_id option_ids[] = { | |||
567 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1c23, USB_CLASS_COMM, 0x02, 0xff) }, | 572 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1c23, USB_CLASS_COMM, 0x02, 0xff) }, |
568 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E173, 0xff, 0xff, 0xff), | 573 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E173, 0xff, 0xff, 0xff), |
569 | .driver_info = (kernel_ulong_t) &net_intf1_blacklist }, | 574 | .driver_info = (kernel_ulong_t) &net_intf1_blacklist }, |
575 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1750, 0xff, 0xff, 0xff), | ||
576 | .driver_info = (kernel_ulong_t) &net_intf2_blacklist }, | ||
570 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1441, USB_CLASS_COMM, 0x02, 0xff) }, | 577 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1441, USB_CLASS_COMM, 0x02, 0xff) }, |
571 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1442, USB_CLASS_COMM, 0x02, 0xff) }, | 578 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1442, USB_CLASS_COMM, 0x02, 0xff) }, |
572 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4505, 0xff, 0xff, 0xff), | 579 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4505, 0xff, 0xff, 0xff), |
@@ -686,6 +693,222 @@ static const struct usb_device_id option_ids[] = { | |||
686 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x7A) }, | 693 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x7A) }, |
687 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x7B) }, | 694 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x7B) }, |
688 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x7C) }, | 695 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x7C) }, |
696 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x01) }, | ||
697 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x02) }, | ||
698 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x03) }, | ||
699 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x04) }, | ||
700 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x05) }, | ||
701 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x06) }, | ||
702 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x0A) }, | ||
703 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x0B) }, | ||
704 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x0D) }, | ||
705 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x0E) }, | ||
706 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x0F) }, | ||
707 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x10) }, | ||
708 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x12) }, | ||
709 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x13) }, | ||
710 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x14) }, | ||
711 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x15) }, | ||
712 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x17) }, | ||
713 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x18) }, | ||
714 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x19) }, | ||
715 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x1A) }, | ||
716 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x1B) }, | ||
717 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x1C) }, | ||
718 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x31) }, | ||
719 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x32) }, | ||
720 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x33) }, | ||
721 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x34) }, | ||
722 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x35) }, | ||
723 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x36) }, | ||
724 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x3A) }, | ||
725 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x3B) }, | ||
726 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x3D) }, | ||
727 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x3E) }, | ||
728 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x3F) }, | ||
729 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x48) }, | ||
730 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x49) }, | ||
731 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x4A) }, | ||
732 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x4B) }, | ||
733 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x4C) }, | ||
734 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x61) }, | ||
735 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x62) }, | ||
736 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x63) }, | ||
737 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x64) }, | ||
738 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x65) }, | ||
739 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x66) }, | ||
740 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x6A) }, | ||
741 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x6B) }, | ||
742 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x6D) }, | ||
743 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x6E) }, | ||
744 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x6F) }, | ||
745 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x78) }, | ||
746 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x79) }, | ||
747 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x7A) }, | ||
748 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x7B) }, | ||
749 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x7C) }, | ||
750 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x01) }, | ||
751 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x02) }, | ||
752 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x03) }, | ||
753 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x04) }, | ||
754 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x05) }, | ||
755 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x06) }, | ||
756 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x0A) }, | ||
757 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x0B) }, | ||
758 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x0D) }, | ||
759 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x0E) }, | ||
760 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x0F) }, | ||
761 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x10) }, | ||
762 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x12) }, | ||
763 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x13) }, | ||
764 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x14) }, | ||
765 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x15) }, | ||
766 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x17) }, | ||
767 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x18) }, | ||
768 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x19) }, | ||
769 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x1A) }, | ||
770 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x1B) }, | ||
771 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x1C) }, | ||
772 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x31) }, | ||
773 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x32) }, | ||
774 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x33) }, | ||
775 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x34) }, | ||
776 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x35) }, | ||
777 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x36) }, | ||
778 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x3A) }, | ||
779 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x3B) }, | ||
780 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x3D) }, | ||
781 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x3E) }, | ||
782 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x3F) }, | ||
783 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x48) }, | ||
784 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x49) }, | ||
785 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x4A) }, | ||
786 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x4B) }, | ||
787 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x4C) }, | ||
788 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x61) }, | ||
789 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x62) }, | ||
790 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x63) }, | ||
791 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x64) }, | ||
792 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x65) }, | ||
793 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x66) }, | ||
794 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x6A) }, | ||
795 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x6B) }, | ||
796 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x6D) }, | ||
797 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x6E) }, | ||
798 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x6F) }, | ||
799 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x78) }, | ||
800 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x79) }, | ||
801 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x7A) }, | ||
802 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x7B) }, | ||
803 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x7C) }, | ||
804 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x01) }, | ||
805 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x02) }, | ||
806 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x03) }, | ||
807 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x04) }, | ||
808 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x05) }, | ||
809 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x06) }, | ||
810 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x0A) }, | ||
811 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x0B) }, | ||
812 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x0D) }, | ||
813 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x0E) }, | ||
814 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x0F) }, | ||
815 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x10) }, | ||
816 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x12) }, | ||
817 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x13) }, | ||
818 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x14) }, | ||
819 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x15) }, | ||
820 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x17) }, | ||
821 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x18) }, | ||
822 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x19) }, | ||
823 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x1A) }, | ||
824 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x1B) }, | ||
825 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x1C) }, | ||
826 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x31) }, | ||
827 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x32) }, | ||
828 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x33) }, | ||
829 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x34) }, | ||
830 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x35) }, | ||
831 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x36) }, | ||
832 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x3A) }, | ||
833 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x3B) }, | ||
834 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x3D) }, | ||
835 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x3E) }, | ||
836 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x3F) }, | ||
837 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x48) }, | ||
838 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x49) }, | ||
839 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x4A) }, | ||
840 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x4B) }, | ||
841 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x4C) }, | ||
842 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x61) }, | ||
843 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x62) }, | ||
844 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x63) }, | ||
845 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x64) }, | ||
846 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x65) }, | ||
847 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x66) }, | ||
848 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x6A) }, | ||
849 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x6B) }, | ||
850 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x6D) }, | ||
851 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x6E) }, | ||
852 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x6F) }, | ||
853 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x78) }, | ||
854 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x79) }, | ||
855 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x7A) }, | ||
856 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x7B) }, | ||
857 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x7C) }, | ||
858 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x01) }, | ||
859 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x02) }, | ||
860 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x03) }, | ||
861 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x04) }, | ||
862 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x05) }, | ||
863 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x06) }, | ||
864 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x0A) }, | ||
865 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x0B) }, | ||
866 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x0D) }, | ||
867 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x0E) }, | ||
868 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x0F) }, | ||
869 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x10) }, | ||
870 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x12) }, | ||
871 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x13) }, | ||
872 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x14) }, | ||
873 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x15) }, | ||
874 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x17) }, | ||
875 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x18) }, | ||
876 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x19) }, | ||
877 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x1A) }, | ||
878 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x1B) }, | ||
879 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x1C) }, | ||
880 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x31) }, | ||
881 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x32) }, | ||
882 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x33) }, | ||
883 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x34) }, | ||
884 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x35) }, | ||
885 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x36) }, | ||
886 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x3A) }, | ||
887 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x3B) }, | ||
888 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x3D) }, | ||
889 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x3E) }, | ||
890 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x3F) }, | ||
891 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x48) }, | ||
892 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x49) }, | ||
893 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x4A) }, | ||
894 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x4B) }, | ||
895 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x4C) }, | ||
896 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x61) }, | ||
897 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x62) }, | ||
898 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x63) }, | ||
899 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x64) }, | ||
900 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x65) }, | ||
901 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x66) }, | ||
902 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x6A) }, | ||
903 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x6B) }, | ||
904 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x6D) }, | ||
905 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x6E) }, | ||
906 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x6F) }, | ||
907 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x78) }, | ||
908 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x79) }, | ||
909 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x7A) }, | ||
910 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x7B) }, | ||
911 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x7C) }, | ||
689 | 912 | ||
690 | 913 | ||
691 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) }, | 914 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) }, |
@@ -1254,7 +1477,9 @@ static const struct usb_device_id option_ids[] = { | |||
1254 | 1477 | ||
1255 | { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100) }, | 1478 | { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100) }, |
1256 | { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD145) }, | 1479 | { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD145) }, |
1257 | { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD200) }, | 1480 | { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD200), |
1481 | .driver_info = (kernel_ulong_t)&net_intf6_blacklist | ||
1482 | }, | ||
1258 | { USB_DEVICE(CELOT_VENDOR_ID, CELOT_PRODUCT_CT680M) }, /* CT-650 CDMA 450 1xEVDO modem */ | 1483 | { USB_DEVICE(CELOT_VENDOR_ID, CELOT_PRODUCT_CT680M) }, /* CT-650 CDMA 450 1xEVDO modem */ |
1259 | { USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_GT_B3730, USB_CLASS_CDC_DATA, 0x00, 0x00) }, /* Samsung GT-B3730 LTE USB modem.*/ | 1484 | { USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_GT_B3730, USB_CLASS_CDC_DATA, 0x00, 0x00) }, /* Samsung GT-B3730 LTE USB modem.*/ |
1260 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM600) }, | 1485 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM600) }, |
@@ -1342,6 +1567,7 @@ static const struct usb_device_id option_ids[] = { | |||
1342 | { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x00, 0x00) }, | 1567 | { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x00, 0x00) }, |
1343 | { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e01, 0xff, 0xff, 0xff) }, /* D-Link DWM-152/C1 */ | 1568 | { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e01, 0xff, 0xff, 0xff) }, /* D-Link DWM-152/C1 */ |
1344 | { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e02, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/C1 */ | 1569 | { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e02, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/C1 */ |
1570 | { USB_DEVICE(INOVIA_VENDOR_ID, INOVIA_SEW858) }, | ||
1345 | { } /* Terminating entry */ | 1571 | { } /* Terminating entry */ |
1346 | }; | 1572 | }; |
1347 | MODULE_DEVICE_TABLE(usb, option_ids); | 1573 | MODULE_DEVICE_TABLE(usb, option_ids); |
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index bedf8e47713b..1e6de4cd079d 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c | |||
@@ -4,11 +4,6 @@ | |||
4 | * Copyright (C) 2001-2007 Greg Kroah-Hartman (greg@kroah.com) | 4 | * Copyright (C) 2001-2007 Greg Kroah-Hartman (greg@kroah.com) |
5 | * Copyright (C) 2003 IBM Corp. | 5 | * Copyright (C) 2003 IBM Corp. |
6 | * | 6 | * |
7 | * Copyright (C) 2009, 2013 Frank Schäfer <fschaefer.oss@googlemail.com> | ||
8 | * - fixes, improvements and documentation for the baud rate encoding methods | ||
9 | * Copyright (C) 2013 Reinhard Max <max@suse.de> | ||
10 | * - fixes and improvements for the divisor based baud rate encoding method | ||
11 | * | ||
12 | * Original driver for 2.2.x by anonymous | 7 | * Original driver for 2.2.x by anonymous |
13 | * | 8 | * |
14 | * This program is free software; you can redistribute it and/or | 9 | * This program is free software; you can redistribute it and/or |
@@ -134,18 +129,10 @@ MODULE_DEVICE_TABLE(usb, id_table); | |||
134 | 129 | ||
135 | 130 | ||
136 | enum pl2303_type { | 131 | enum pl2303_type { |
137 | type_0, /* H version ? */ | 132 | type_0, /* don't know the difference between type 0 and */ |
138 | type_1, /* H version ? */ | 133 | type_1, /* type 1, until someone from prolific tells us... */ |
139 | HX_TA, /* HX(A) / X(A) / TA version */ /* TODO: improve */ | 134 | HX, /* HX version of the pl2303 chip */ |
140 | HXD_EA_RA_SA, /* HXD / EA / RA / SA version */ /* TODO: improve */ | ||
141 | TB, /* TB version */ | ||
142 | HX_CLONE, /* Cheap and less functional clone of the HX chip */ | ||
143 | }; | 135 | }; |
144 | /* | ||
145 | * NOTE: don't know the difference between type 0 and type 1, | ||
146 | * until someone from Prolific tells us... | ||
147 | * TODO: distinguish between X/HX, TA and HXD, EA, RA, SA variants | ||
148 | */ | ||
149 | 136 | ||
150 | struct pl2303_serial_private { | 137 | struct pl2303_serial_private { |
151 | enum pl2303_type type; | 138 | enum pl2303_type type; |
@@ -185,7 +172,6 @@ static int pl2303_startup(struct usb_serial *serial) | |||
185 | { | 172 | { |
186 | struct pl2303_serial_private *spriv; | 173 | struct pl2303_serial_private *spriv; |
187 | enum pl2303_type type = type_0; | 174 | enum pl2303_type type = type_0; |
188 | char *type_str = "unknown (treating as type_0)"; | ||
189 | unsigned char *buf; | 175 | unsigned char *buf; |
190 | 176 | ||
191 | spriv = kzalloc(sizeof(*spriv), GFP_KERNEL); | 177 | spriv = kzalloc(sizeof(*spriv), GFP_KERNEL); |
@@ -198,53 +184,15 @@ static int pl2303_startup(struct usb_serial *serial) | |||
198 | return -ENOMEM; | 184 | return -ENOMEM; |
199 | } | 185 | } |
200 | 186 | ||
201 | if (serial->dev->descriptor.bDeviceClass == 0x02) { | 187 | if (serial->dev->descriptor.bDeviceClass == 0x02) |
202 | type = type_0; | 188 | type = type_0; |
203 | type_str = "type_0"; | 189 | else if (serial->dev->descriptor.bMaxPacketSize0 == 0x40) |
204 | } else if (serial->dev->descriptor.bMaxPacketSize0 == 0x40) { | 190 | type = HX; |
205 | /* | 191 | else if (serial->dev->descriptor.bDeviceClass == 0x00) |
206 | * NOTE: The bcdDevice version is the only difference between | ||
207 | * the device descriptors of the X/HX, HXD, EA, RA, SA, TA, TB | ||
208 | */ | ||
209 | if (le16_to_cpu(serial->dev->descriptor.bcdDevice) == 0x300) { | ||
210 | /* Check if the device is a clone */ | ||
211 | pl2303_vendor_read(0x9494, 0, serial, buf); | ||
212 | /* | ||
213 | * NOTE: Not sure if this read is really needed. | ||
214 | * The HX returns 0x00, the clone 0x02, but the Windows | ||
215 | * driver seems to ignore the value and continues. | ||
216 | */ | ||
217 | pl2303_vendor_write(0x0606, 0xaa, serial); | ||
218 | pl2303_vendor_read(0x8686, 0, serial, buf); | ||
219 | if (buf[0] != 0xaa) { | ||
220 | type = HX_CLONE; | ||
221 | type_str = "X/HX clone (limited functionality)"; | ||
222 | } else { | ||
223 | type = HX_TA; | ||
224 | type_str = "X/HX/TA"; | ||
225 | } | ||
226 | pl2303_vendor_write(0x0606, 0x00, serial); | ||
227 | } else if (le16_to_cpu(serial->dev->descriptor.bcdDevice) | ||
228 | == 0x400) { | ||
229 | type = HXD_EA_RA_SA; | ||
230 | type_str = "HXD/EA/RA/SA"; | ||
231 | } else if (le16_to_cpu(serial->dev->descriptor.bcdDevice) | ||
232 | == 0x500) { | ||
233 | type = TB; | ||
234 | type_str = "TB"; | ||
235 | } else { | ||
236 | dev_info(&serial->interface->dev, | ||
237 | "unknown/unsupported device type\n"); | ||
238 | kfree(spriv); | ||
239 | kfree(buf); | ||
240 | return -ENODEV; | ||
241 | } | ||
242 | } else if (serial->dev->descriptor.bDeviceClass == 0x00 | ||
243 | || serial->dev->descriptor.bDeviceClass == 0xFF) { | ||
244 | type = type_1; | 192 | type = type_1; |
245 | type_str = "type_1"; | 193 | else if (serial->dev->descriptor.bDeviceClass == 0xFF) |
246 | } | 194 | type = type_1; |
247 | dev_dbg(&serial->interface->dev, "device type: %s\n", type_str); | 195 | dev_dbg(&serial->interface->dev, "device type: %d\n", type); |
248 | 196 | ||
249 | spriv->type = type; | 197 | spriv->type = type; |
250 | usb_set_serial_data(serial, spriv); | 198 | usb_set_serial_data(serial, spriv); |
@@ -259,10 +207,10 @@ static int pl2303_startup(struct usb_serial *serial) | |||
259 | pl2303_vendor_read(0x8383, 0, serial, buf); | 207 | pl2303_vendor_read(0x8383, 0, serial, buf); |
260 | pl2303_vendor_write(0, 1, serial); | 208 | pl2303_vendor_write(0, 1, serial); |
261 | pl2303_vendor_write(1, 0, serial); | 209 | pl2303_vendor_write(1, 0, serial); |
262 | if (type == type_0 || type == type_1) | 210 | if (type == HX) |
263 | pl2303_vendor_write(2, 0x24, serial); | ||
264 | else | ||
265 | pl2303_vendor_write(2, 0x44, serial); | 211 | pl2303_vendor_write(2, 0x44, serial); |
212 | else | ||
213 | pl2303_vendor_write(2, 0x24, serial); | ||
266 | 214 | ||
267 | kfree(buf); | 215 | kfree(buf); |
268 | return 0; | 216 | return 0; |
@@ -316,174 +264,65 @@ static int pl2303_set_control_lines(struct usb_serial_port *port, u8 value) | |||
316 | return retval; | 264 | return retval; |
317 | } | 265 | } |
318 | 266 | ||
319 | static int pl2303_baudrate_encode_direct(int baud, enum pl2303_type type, | 267 | static void pl2303_encode_baudrate(struct tty_struct *tty, |
320 | u8 buf[4]) | 268 | struct usb_serial_port *port, |
269 | u8 buf[4]) | ||
321 | { | 270 | { |
322 | /* | ||
323 | * NOTE: Only the values defined in baud_sup are supported ! | ||
324 | * => if unsupported values are set, the PL2303 uses 9600 baud instead | ||
325 | * => HX clones just don't work at unsupported baud rates < 115200 baud, | ||
326 | * for baud rates > 115200 they run at 115200 baud | ||
327 | */ | ||
328 | const int baud_sup[] = { 75, 150, 300, 600, 1200, 1800, 2400, 3600, | 271 | const int baud_sup[] = { 75, 150, 300, 600, 1200, 1800, 2400, 3600, |
329 | 4800, 7200, 9600, 14400, 19200, 28800, 38400, | 272 | 4800, 7200, 9600, 14400, 19200, 28800, 38400, |
330 | 57600, 115200, 230400, 460800, 614400, 921600, | 273 | 57600, 115200, 230400, 460800, 500000, 614400, |
331 | 1228800, 2457600, 3000000, 6000000, 12000000 }; | 274 | 921600, 1228800, 2457600, 3000000, 6000000 }; |
275 | |||
276 | struct usb_serial *serial = port->serial; | ||
277 | struct pl2303_serial_private *spriv = usb_get_serial_data(serial); | ||
278 | int baud; | ||
279 | int i; | ||
280 | |||
332 | /* | 281 | /* |
333 | * NOTE: With the exception of type_0/1 devices, the following | 282 | * NOTE: Only the values defined in baud_sup are supported! |
334 | * additional baud rates are supported (tested with HX rev. 3A only): | 283 | * => if unsupported values are set, the PL2303 seems to use |
335 | * 110*, 56000*, 128000, 134400, 161280, 201600, 256000*, 268800, | 284 | * 9600 baud (at least my PL2303X always does) |
336 | * 403200, 806400. (*: not HX and HX clones) | ||
337 | * | ||
338 | * Maximum values: HXD, TB: 12000000; HX, TA: 6000000; | ||
339 | * type_0+1: 1228800; RA: 921600; HX clones, SA: 115200 | ||
340 | * | ||
341 | * As long as we are not using this encoding method for anything else | ||
342 | * than the type_0+1, HX and HX clone chips, there is no point in | ||
343 | * complicating the code to support them. | ||
344 | */ | 285 | */ |
345 | int i; | 286 | baud = tty_get_baud_rate(tty); |
287 | dev_dbg(&port->dev, "baud requested = %d\n", baud); | ||
288 | if (!baud) | ||
289 | return; | ||
346 | 290 | ||
347 | /* Set baudrate to nearest supported value */ | 291 | /* Set baudrate to nearest supported value */ |
348 | for (i = 0; i < ARRAY_SIZE(baud_sup); ++i) { | 292 | for (i = 0; i < ARRAY_SIZE(baud_sup); ++i) { |
349 | if (baud_sup[i] > baud) | 293 | if (baud_sup[i] > baud) |
350 | break; | 294 | break; |
351 | } | 295 | } |
296 | |||
352 | if (i == ARRAY_SIZE(baud_sup)) | 297 | if (i == ARRAY_SIZE(baud_sup)) |
353 | baud = baud_sup[i - 1]; | 298 | baud = baud_sup[i - 1]; |
354 | else if (i > 0 && (baud_sup[i] - baud) > (baud - baud_sup[i - 1])) | 299 | else if (i > 0 && (baud_sup[i] - baud) > (baud - baud_sup[i - 1])) |
355 | baud = baud_sup[i - 1]; | 300 | baud = baud_sup[i - 1]; |
356 | else | 301 | else |
357 | baud = baud_sup[i]; | 302 | baud = baud_sup[i]; |
358 | /* Respect the chip type specific baud rate limits */ | ||
359 | /* | ||
360 | * FIXME: as long as we don't know how to distinguish between the | ||
361 | * HXD, EA, RA, and SA chip variants, allow the max. value of 12M. | ||
362 | */ | ||
363 | if (type == HX_TA) | ||
364 | baud = min_t(int, baud, 6000000); | ||
365 | else if (type == type_0 || type == type_1) | ||
366 | baud = min_t(int, baud, 1228800); | ||
367 | else if (type == HX_CLONE) | ||
368 | baud = min_t(int, baud, 115200); | ||
369 | /* Direct (standard) baud rate encoding method */ | ||
370 | put_unaligned_le32(baud, buf); | ||
371 | |||
372 | return baud; | ||
373 | } | ||
374 | 303 | ||
375 | static int pl2303_baudrate_encode_divisor(int baud, enum pl2303_type type, | 304 | /* type_0, type_1 only support up to 1228800 baud */ |
376 | u8 buf[4]) | 305 | if (spriv->type != HX) |
377 | { | 306 | baud = min_t(int, baud, 1228800); |
378 | /* | ||
379 | * Divisor based baud rate encoding method | ||
380 | * | ||
381 | * NOTE: HX clones do NOT support this method. | ||
382 | * It's not clear if the type_0/1 chips support it. | ||
383 | * | ||
384 | * divisor = 12MHz * 32 / baudrate = 2^A * B | ||
385 | * | ||
386 | * with | ||
387 | * | ||
388 | * A = buf[1] & 0x0e | ||
389 | * B = buf[0] + (buf[1] & 0x01) << 8 | ||
390 | * | ||
391 | * Special cases: | ||
392 | * => 8 < B < 16: device seems to work not properly | ||
393 | * => B <= 8: device uses the max. value B = 512 instead | ||
394 | */ | ||
395 | unsigned int A, B; | ||
396 | 307 | ||
397 | /* | 308 | if (baud <= 115200) { |
398 | * NOTE: The Windows driver allows maximum baud rates of 110% of the | 309 | put_unaligned_le32(baud, buf); |
399 | * specified maximium value. | ||
400 | * Quick tests with early (2004) HX (rev. A) chips suggest, that even | ||
401 | * higher baud rates (up to the maximum of 24M baud !) are working fine, | ||
402 | * but that should really be tested carefully in "real life" scenarios | ||
403 | * before removing the upper limit completely. | ||
404 | * Baud rates smaller than the specified 75 baud are definitely working | ||
405 | * fine. | ||
406 | */ | ||
407 | if (type == type_0 || type == type_1) | ||
408 | baud = min_t(int, baud, 1228800 * 1.1); | ||
409 | else if (type == HX_TA) | ||
410 | baud = min_t(int, baud, 6000000 * 1.1); | ||
411 | else if (type == HXD_EA_RA_SA) | ||
412 | /* HXD, EA: 12Mbps; RA: 1Mbps; SA: 115200 bps */ | ||
413 | /* | ||
414 | * FIXME: as long as we don't know how to distinguish between | ||
415 | * these chip variants, allow the max. of these values | ||
416 | */ | ||
417 | baud = min_t(int, baud, 12000000 * 1.1); | ||
418 | else if (type == TB) | ||
419 | baud = min_t(int, baud, 12000000 * 1.1); | ||
420 | /* Determine factors A and B */ | ||
421 | A = 0; | ||
422 | B = 12000000 * 32 / baud; /* 12MHz */ | ||
423 | B <<= 1; /* Add one bit for rounding */ | ||
424 | while (B > (512 << 1) && A <= 14) { | ||
425 | A += 2; | ||
426 | B >>= 2; | ||
427 | } | ||
428 | if (A > 14) { /* max. divisor = min. baudrate reached */ | ||
429 | A = 14; | ||
430 | B = 512; | ||
431 | /* => ~45.78 baud */ | ||
432 | } else { | 310 | } else { |
433 | B = (B + 1) >> 1; /* Round the last bit */ | ||
434 | } | ||
435 | /* Handle special cases */ | ||
436 | if (B == 512) | ||
437 | B = 0; /* also: 1 to 8 */ | ||
438 | else if (B < 16) | ||
439 | /* | 311 | /* |
440 | * NOTE: With the current algorithm this happens | 312 | * Apparently the formula for higher speeds is: |
441 | * only for A=0 and means that the min. divisor | 313 | * baudrate = 12M * 32 / (2^buf[1]) / buf[0] |
442 | * (respectively: the max. baudrate) is reached. | ||
443 | */ | 314 | */ |
444 | B = 16; /* => 24 MBaud */ | 315 | unsigned tmp = 12000000 * 32 / baud; |
445 | /* Encode the baud rate */ | 316 | buf[3] = 0x80; |
446 | buf[3] = 0x80; /* Select divisor encoding method */ | 317 | buf[2] = 0; |
447 | buf[2] = 0; | 318 | buf[1] = (tmp >= 256); |
448 | buf[1] = (A & 0x0e); /* A */ | 319 | while (tmp >= 256) { |
449 | buf[1] |= ((B & 0x100) >> 8); /* MSB of B */ | 320 | tmp >>= 2; |
450 | buf[0] = B & 0xff; /* 8 LSBs of B */ | 321 | buf[1] <<= 1; |
451 | /* Calculate the actual/resulting baud rate */ | 322 | } |
452 | if (B <= 8) | 323 | buf[0] = tmp; |
453 | B = 512; | 324 | } |
454 | baud = 12000000 * 32 / ((1 << A) * B); | ||
455 | |||
456 | return baud; | ||
457 | } | ||
458 | |||
459 | static void pl2303_encode_baudrate(struct tty_struct *tty, | ||
460 | struct usb_serial_port *port, | ||
461 | enum pl2303_type type, | ||
462 | u8 buf[4]) | ||
463 | { | ||
464 | int baud; | ||
465 | 325 | ||
466 | baud = tty_get_baud_rate(tty); | ||
467 | dev_dbg(&port->dev, "baud requested = %d\n", baud); | ||
468 | if (!baud) | ||
469 | return; | ||
470 | /* | ||
471 | * There are two methods for setting/encoding the baud rate | ||
472 | * 1) Direct method: encodes the baud rate value directly | ||
473 | * => supported by all chip types | ||
474 | * 2) Divisor based method: encodes a divisor to a base value (12MHz*32) | ||
475 | * => not supported by HX clones (and likely type_0/1 chips) | ||
476 | * | ||
477 | * NOTE: Although the divisor based baud rate encoding method is much | ||
478 | * more flexible, some of the standard baud rate values can not be | ||
479 | * realized exactly. But the difference is very small (max. 0.2%) and | ||
480 | * the device likely uses the same baud rate generator for both methods | ||
481 | * so that there is likley no difference. | ||
482 | */ | ||
483 | if (type == type_0 || type == type_1 || type == HX_CLONE) | ||
484 | baud = pl2303_baudrate_encode_direct(baud, type, buf); | ||
485 | else | ||
486 | baud = pl2303_baudrate_encode_divisor(baud, type, buf); | ||
487 | /* Save resulting baud rate */ | 326 | /* Save resulting baud rate */ |
488 | tty_encode_baud_rate(tty, baud, baud); | 327 | tty_encode_baud_rate(tty, baud, baud); |
489 | dev_dbg(&port->dev, "baud set = %d\n", baud); | 328 | dev_dbg(&port->dev, "baud set = %d\n", baud); |
@@ -540,8 +379,8 @@ static void pl2303_set_termios(struct tty_struct *tty, | |||
540 | dev_dbg(&port->dev, "data bits = %d\n", buf[6]); | 379 | dev_dbg(&port->dev, "data bits = %d\n", buf[6]); |
541 | } | 380 | } |
542 | 381 | ||
543 | /* For reference: buf[0]:buf[3] baud rate value */ | 382 | /* For reference buf[0]:buf[3] baud rate value */ |
544 | pl2303_encode_baudrate(tty, port, spriv->type, buf); | 383 | pl2303_encode_baudrate(tty, port, &buf[0]); |
545 | 384 | ||
546 | /* For reference buf[4]=0 is 1 stop bits */ | 385 | /* For reference buf[4]=0 is 1 stop bits */ |
547 | /* For reference buf[4]=1 is 1.5 stop bits */ | 386 | /* For reference buf[4]=1 is 1.5 stop bits */ |
@@ -618,10 +457,10 @@ static void pl2303_set_termios(struct tty_struct *tty, | |||
618 | dev_dbg(&port->dev, "0xa1:0x21:0:0 %d - %7ph\n", i, buf); | 457 | dev_dbg(&port->dev, "0xa1:0x21:0:0 %d - %7ph\n", i, buf); |
619 | 458 | ||
620 | if (C_CRTSCTS(tty)) { | 459 | if (C_CRTSCTS(tty)) { |
621 | if (spriv->type == type_0 || spriv->type == type_1) | 460 | if (spriv->type == HX) |
622 | pl2303_vendor_write(0x0, 0x41, serial); | ||
623 | else | ||
624 | pl2303_vendor_write(0x0, 0x61, serial); | 461 | pl2303_vendor_write(0x0, 0x61, serial); |
462 | else | ||
463 | pl2303_vendor_write(0x0, 0x41, serial); | ||
625 | } else { | 464 | } else { |
626 | pl2303_vendor_write(0x0, 0x0, serial); | 465 | pl2303_vendor_write(0x0, 0x0, serial); |
627 | } | 466 | } |
@@ -658,7 +497,7 @@ static int pl2303_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
658 | struct pl2303_serial_private *spriv = usb_get_serial_data(serial); | 497 | struct pl2303_serial_private *spriv = usb_get_serial_data(serial); |
659 | int result; | 498 | int result; |
660 | 499 | ||
661 | if (spriv->type == type_0 || spriv->type == type_1) { | 500 | if (spriv->type != HX) { |
662 | usb_clear_halt(serial->dev, port->write_urb->pipe); | 501 | usb_clear_halt(serial->dev, port->write_urb->pipe); |
663 | usb_clear_halt(serial->dev, port->read_urb->pipe); | 502 | usb_clear_halt(serial->dev, port->read_urb->pipe); |
664 | } else { | 503 | } else { |
@@ -833,7 +672,6 @@ static void pl2303_break_ctl(struct tty_struct *tty, int break_state) | |||
833 | result = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), | 672 | result = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), |
834 | BREAK_REQUEST, BREAK_REQUEST_TYPE, state, | 673 | BREAK_REQUEST, BREAK_REQUEST_TYPE, state, |
835 | 0, NULL, 0, 100); | 674 | 0, NULL, 0, 100); |
836 | /* NOTE: HX clones don't support sending breaks, -EPIPE is returned */ | ||
837 | if (result) | 675 | if (result) |
838 | dev_err(&port->dev, "error sending break = %d\n", result); | 676 | dev_err(&port->dev, "error sending break = %d\n", result); |
839 | } | 677 | } |
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index 760b78560f67..c9a35697ebe9 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c | |||
@@ -190,6 +190,7 @@ static struct usb_device_id ti_id_table_combined[] = { | |||
190 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454B_PRODUCT_ID) }, | 190 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454B_PRODUCT_ID) }, |
191 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454C_PRODUCT_ID) }, | 191 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454C_PRODUCT_ID) }, |
192 | { USB_DEVICE(ABBOTT_VENDOR_ID, ABBOTT_PRODUCT_ID) }, | 192 | { USB_DEVICE(ABBOTT_VENDOR_ID, ABBOTT_PRODUCT_ID) }, |
193 | { USB_DEVICE(ABBOTT_VENDOR_ID, ABBOTT_STRIP_PORT_ID) }, | ||
193 | { USB_DEVICE(TI_VENDOR_ID, FRI2_PRODUCT_ID) }, | 194 | { USB_DEVICE(TI_VENDOR_ID, FRI2_PRODUCT_ID) }, |
194 | { } /* terminator */ | 195 | { } /* terminator */ |
195 | }; | 196 | }; |
diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c index 94d75edef77f..18509e6c21ab 100644 --- a/drivers/usb/storage/scsiglue.c +++ b/drivers/usb/storage/scsiglue.c | |||
@@ -211,8 +211,11 @@ static int slave_configure(struct scsi_device *sdev) | |||
211 | /* | 211 | /* |
212 | * Many devices do not respond properly to READ_CAPACITY_16. | 212 | * Many devices do not respond properly to READ_CAPACITY_16. |
213 | * Tell the SCSI layer to try READ_CAPACITY_10 first. | 213 | * Tell the SCSI layer to try READ_CAPACITY_10 first. |
214 | * However some USB 3.0 drive enclosures return capacity | ||
215 | * modulo 2TB. Those must use READ_CAPACITY_16 | ||
214 | */ | 216 | */ |
215 | sdev->try_rc_10_first = 1; | 217 | if (!(us->fflags & US_FL_NEEDS_CAP16)) |
218 | sdev->try_rc_10_first = 1; | ||
216 | 219 | ||
217 | /* assume SPC3 or latter devices support sense size > 18 */ | 220 | /* assume SPC3 or latter devices support sense size > 18 */ |
218 | if (sdev->scsi_level > SCSI_SPC_2) | 221 | if (sdev->scsi_level > SCSI_SPC_2) |
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index c015f2c16729..de32cfa5bfa6 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h | |||
@@ -1925,6 +1925,13 @@ UNUSUAL_DEV( 0x1652, 0x6600, 0x0201, 0x0201, | |||
1925 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 1925 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
1926 | US_FL_IGNORE_RESIDUE ), | 1926 | US_FL_IGNORE_RESIDUE ), |
1927 | 1927 | ||
1928 | /* Reported by Oliver Neukum <oneukum@suse.com> */ | ||
1929 | UNUSUAL_DEV( 0x174c, 0x55aa, 0x0100, 0x0100, | ||
1930 | "ASMedia", | ||
1931 | "AS2105", | ||
1932 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | ||
1933 | US_FL_NEEDS_CAP16), | ||
1934 | |||
1928 | /* Reported by Jesse Feddema <jdfeddema@gmail.com> */ | 1935 | /* Reported by Jesse Feddema <jdfeddema@gmail.com> */ |
1929 | UNUSUAL_DEV( 0x177f, 0x0400, 0x0000, 0x0000, | 1936 | UNUSUAL_DEV( 0x177f, 0x0400, 0x0000, 0x0000, |
1930 | "Yarvik", | 1937 | "Yarvik", |