diff options
Diffstat (limited to 'drivers/usb')
38 files changed, 568 insertions, 199 deletions
diff --git a/drivers/usb/chipidea/Kconfig b/drivers/usb/chipidea/Kconfig index 4a851e15e58c..77b47d82c9a6 100644 --- a/drivers/usb/chipidea/Kconfig +++ b/drivers/usb/chipidea/Kconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | config USB_CHIPIDEA | 1 | config USB_CHIPIDEA |
2 | tristate "ChipIdea Highspeed Dual Role Controller" | 2 | tristate "ChipIdea Highspeed Dual Role Controller" |
3 | depends on (USB_EHCI_HCD && USB_GADGET) || (USB_EHCI_HCD && !USB_GADGET) || (!USB_EHCI_HCD && USB_GADGET) | 3 | depends on ((USB_EHCI_HCD && USB_GADGET) || (USB_EHCI_HCD && !USB_GADGET) || (!USB_EHCI_HCD && USB_GADGET)) && HAS_DMA |
4 | help | 4 | help |
5 | Say Y here if your system has a dual role high speed USB | 5 | Say Y here if your system has a dual role high speed USB |
6 | controller based on ChipIdea silicon IP. Currently, only the | 6 | controller based on ChipIdea silicon IP. Currently, only the |
diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c index 74d998d9b45b..be822a2c1776 100644 --- a/drivers/usb/chipidea/ci_hdrc_imx.c +++ b/drivers/usb/chipidea/ci_hdrc_imx.c | |||
@@ -131,7 +131,7 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev) | |||
131 | if (ret) { | 131 | if (ret) { |
132 | dev_err(&pdev->dev, "usbmisc init failed, ret=%d\n", | 132 | dev_err(&pdev->dev, "usbmisc init failed, ret=%d\n", |
133 | ret); | 133 | ret); |
134 | goto err_clk; | 134 | goto err_phy; |
135 | } | 135 | } |
136 | } | 136 | } |
137 | 137 | ||
@@ -143,7 +143,7 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev) | |||
143 | dev_err(&pdev->dev, | 143 | dev_err(&pdev->dev, |
144 | "Can't register ci_hdrc platform device, err=%d\n", | 144 | "Can't register ci_hdrc platform device, err=%d\n", |
145 | ret); | 145 | ret); |
146 | goto err_clk; | 146 | goto err_phy; |
147 | } | 147 | } |
148 | 148 | ||
149 | if (data->usbmisc_data) { | 149 | if (data->usbmisc_data) { |
@@ -164,6 +164,9 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev) | |||
164 | 164 | ||
165 | disable_device: | 165 | disable_device: |
166 | ci_hdrc_remove_device(data->ci_pdev); | 166 | ci_hdrc_remove_device(data->ci_pdev); |
167 | err_phy: | ||
168 | if (data->phy) | ||
169 | usb_phy_shutdown(data->phy); | ||
167 | err_clk: | 170 | err_clk: |
168 | clk_disable_unprepare(data->clk); | 171 | clk_disable_unprepare(data->clk); |
169 | return ret; | 172 | return ret; |
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/core.c b/drivers/usb/chipidea/core.c index 94626409559a..23763dcec069 100644 --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c | |||
@@ -605,6 +605,7 @@ static int ci_hdrc_remove(struct platform_device *pdev) | |||
605 | dbg_remove_files(ci); | 605 | dbg_remove_files(ci); |
606 | free_irq(ci->irq, ci); | 606 | free_irq(ci->irq, ci); |
607 | ci_role_destroy(ci); | 607 | ci_role_destroy(ci); |
608 | kfree(ci->hw_bank.regmap); | ||
608 | 609 | ||
609 | return 0; | 610 | return 0; |
610 | } | 611 | } |
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/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 6b4c2f2eb946..9333083dd111 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c | |||
@@ -1600,6 +1600,8 @@ static void destroy_eps(struct ci_hdrc *ci) | |||
1600 | for (i = 0; i < ci->hw_ep_max; i++) { | 1600 | for (i = 0; i < ci->hw_ep_max; i++) { |
1601 | struct ci_hw_ep *hwep = &ci->ci_hw_ep[i]; | 1601 | struct ci_hw_ep *hwep = &ci->ci_hw_ep[i]; |
1602 | 1602 | ||
1603 | if (hwep->pending_td) | ||
1604 | free_pending_td(hwep); | ||
1603 | dma_pool_free(ci->qh_pool, hwep->qh.ptr, hwep->qh.dma); | 1605 | dma_pool_free(ci->qh_pool, hwep->qh.ptr, hwep->qh.dma); |
1604 | } | 1606 | } |
1605 | } | 1607 | } |
@@ -1667,13 +1669,13 @@ static int ci_udc_stop(struct usb_gadget *gadget, | |||
1667 | if (ci->platdata->notify_event) | 1669 | if (ci->platdata->notify_event) |
1668 | ci->platdata->notify_event(ci, | 1670 | ci->platdata->notify_event(ci, |
1669 | CI_HDRC_CONTROLLER_STOPPED_EVENT); | 1671 | CI_HDRC_CONTROLLER_STOPPED_EVENT); |
1670 | ci->driver = NULL; | ||
1671 | spin_unlock_irqrestore(&ci->lock, flags); | 1672 | spin_unlock_irqrestore(&ci->lock, flags); |
1672 | _gadget_stop_activity(&ci->gadget); | 1673 | _gadget_stop_activity(&ci->gadget); |
1673 | spin_lock_irqsave(&ci->lock, flags); | 1674 | spin_lock_irqsave(&ci->lock, flags); |
1674 | pm_runtime_put(&ci->gadget.dev); | 1675 | pm_runtime_put(&ci->gadget.dev); |
1675 | } | 1676 | } |
1676 | 1677 | ||
1678 | ci->driver = NULL; | ||
1677 | spin_unlock_irqrestore(&ci->lock, flags); | 1679 | spin_unlock_irqrestore(&ci->lock, flags); |
1678 | 1680 | ||
1679 | return 0; | 1681 | return 0; |
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index 737e3c19967b..71dc5d768fa5 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c | |||
@@ -742,6 +742,22 @@ static int check_ctrlrecip(struct dev_state *ps, unsigned int requesttype, | |||
742 | if ((index & ~USB_DIR_IN) == 0) | 742 | if ((index & ~USB_DIR_IN) == 0) |
743 | return 0; | 743 | return 0; |
744 | ret = findintfep(ps->dev, index); | 744 | ret = findintfep(ps->dev, index); |
745 | if (ret < 0) { | ||
746 | /* | ||
747 | * Some not fully compliant Win apps seem to get | ||
748 | * index wrong and have the endpoint number here | ||
749 | * rather than the endpoint address (with the | ||
750 | * correct direction). Win does let this through, | ||
751 | * so we'll not reject it here but leave it to | ||
752 | * the device to not break KVM. But we warn. | ||
753 | */ | ||
754 | ret = findintfep(ps->dev, index ^ 0x80); | ||
755 | if (ret >= 0) | ||
756 | dev_info(&ps->dev->dev, | ||
757 | "%s: process %i (%s) requesting ep %02x but needs %02x\n", | ||
758 | __func__, task_pid_nr(current), | ||
759 | current->comm, index, index ^ 0x80); | ||
760 | } | ||
745 | if (ret >= 0) | 761 | if (ret >= 0) |
746 | ret = checkintf(ps, ret); | 762 | ret = checkintf(ps, ret); |
747 | break; | 763 | break; |
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index dde4c83516a1..e6b682c6c236 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -3426,6 +3426,9 @@ static int usb_req_set_sel(struct usb_device *udev, enum usb3_link_state state) | |||
3426 | unsigned long long u2_pel; | 3426 | unsigned long long u2_pel; |
3427 | int ret; | 3427 | int ret; |
3428 | 3428 | ||
3429 | if (udev->state != USB_STATE_CONFIGURED) | ||
3430 | return 0; | ||
3431 | |||
3429 | /* Convert SEL and PEL stored in ns to us */ | 3432 | /* Convert SEL and PEL stored in ns to us */ |
3430 | u1_sel = DIV_ROUND_UP(udev->u1_params.sel, 1000); | 3433 | u1_sel = DIV_ROUND_UP(udev->u1_params.sel, 1000); |
3431 | u1_pel = DIV_ROUND_UP(udev->u1_params.pel, 1000); | 3434 | u1_pel = DIV_ROUND_UP(udev->u1_params.pel, 1000); |
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/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c index 997ebe420bc9..2e252aae51ca 100644 --- a/drivers/usb/dwc3/dwc3-pci.c +++ b/drivers/usb/dwc3/dwc3-pci.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #define PCI_VENDOR_ID_SYNOPSYS 0x16c3 | 29 | #define PCI_VENDOR_ID_SYNOPSYS 0x16c3 |
30 | #define PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3 0xabcd | 30 | #define PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3 0xabcd |
31 | #define PCI_DEVICE_ID_INTEL_BYT 0x0f37 | 31 | #define PCI_DEVICE_ID_INTEL_BYT 0x0f37 |
32 | #define PCI_DEVICE_ID_INTEL_MRFLD 0x119e | ||
32 | 33 | ||
33 | struct dwc3_pci { | 34 | struct dwc3_pci { |
34 | struct device *dev; | 35 | struct device *dev; |
@@ -189,6 +190,7 @@ static DEFINE_PCI_DEVICE_TABLE(dwc3_pci_id_table) = { | |||
189 | PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3), | 190 | PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3), |
190 | }, | 191 | }, |
191 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BYT), }, | 192 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BYT), }, |
193 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_MRFLD), }, | ||
192 | { } /* Terminating Entry */ | 194 | { } /* Terminating Entry */ |
193 | }; | 195 | }; |
194 | MODULE_DEVICE_TABLE(pci, dwc3_pci_id_table); | 196 | MODULE_DEVICE_TABLE(pci, dwc3_pci_id_table); |
diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c index 1a66c5baa0d1..44cf775a8627 100644 --- a/drivers/usb/gadget/f_fs.c +++ b/drivers/usb/gadget/f_fs.c | |||
@@ -1034,37 +1034,19 @@ struct ffs_sb_fill_data { | |||
1034 | struct ffs_file_perms perms; | 1034 | struct ffs_file_perms perms; |
1035 | umode_t root_mode; | 1035 | umode_t root_mode; |
1036 | const char *dev_name; | 1036 | const char *dev_name; |
1037 | union { | 1037 | struct ffs_data *ffs_data; |
1038 | /* set by ffs_fs_mount(), read by ffs_sb_fill() */ | ||
1039 | void *private_data; | ||
1040 | /* set by ffs_sb_fill(), read by ffs_fs_mount */ | ||
1041 | struct ffs_data *ffs_data; | ||
1042 | }; | ||
1043 | }; | 1038 | }; |
1044 | 1039 | ||
1045 | static int ffs_sb_fill(struct super_block *sb, void *_data, int silent) | 1040 | static int ffs_sb_fill(struct super_block *sb, void *_data, int silent) |
1046 | { | 1041 | { |
1047 | struct ffs_sb_fill_data *data = _data; | 1042 | struct ffs_sb_fill_data *data = _data; |
1048 | struct inode *inode; | 1043 | struct inode *inode; |
1049 | struct ffs_data *ffs; | 1044 | struct ffs_data *ffs = data->ffs_data; |
1050 | 1045 | ||
1051 | ENTER(); | 1046 | ENTER(); |
1052 | 1047 | ||
1053 | /* Initialise data */ | ||
1054 | ffs = ffs_data_new(); | ||
1055 | if (unlikely(!ffs)) | ||
1056 | goto Enomem; | ||
1057 | |||
1058 | ffs->sb = sb; | 1048 | ffs->sb = sb; |
1059 | ffs->dev_name = kstrdup(data->dev_name, GFP_KERNEL); | 1049 | data->ffs_data = NULL; |
1060 | if (unlikely(!ffs->dev_name)) | ||
1061 | goto Enomem; | ||
1062 | ffs->file_perms = data->perms; | ||
1063 | ffs->private_data = data->private_data; | ||
1064 | |||
1065 | /* used by the caller of this function */ | ||
1066 | data->ffs_data = ffs; | ||
1067 | |||
1068 | sb->s_fs_info = ffs; | 1050 | sb->s_fs_info = ffs; |
1069 | sb->s_blocksize = PAGE_CACHE_SIZE; | 1051 | sb->s_blocksize = PAGE_CACHE_SIZE; |
1070 | sb->s_blocksize_bits = PAGE_CACHE_SHIFT; | 1052 | sb->s_blocksize_bits = PAGE_CACHE_SHIFT; |
@@ -1080,17 +1062,14 @@ static int ffs_sb_fill(struct super_block *sb, void *_data, int silent) | |||
1080 | &data->perms); | 1062 | &data->perms); |
1081 | sb->s_root = d_make_root(inode); | 1063 | sb->s_root = d_make_root(inode); |
1082 | if (unlikely(!sb->s_root)) | 1064 | if (unlikely(!sb->s_root)) |
1083 | goto Enomem; | 1065 | return -ENOMEM; |
1084 | 1066 | ||
1085 | /* EP0 file */ | 1067 | /* EP0 file */ |
1086 | if (unlikely(!ffs_sb_create_file(sb, "ep0", ffs, | 1068 | if (unlikely(!ffs_sb_create_file(sb, "ep0", ffs, |
1087 | &ffs_ep0_operations, NULL))) | 1069 | &ffs_ep0_operations, NULL))) |
1088 | goto Enomem; | 1070 | return -ENOMEM; |
1089 | 1071 | ||
1090 | return 0; | 1072 | return 0; |
1091 | |||
1092 | Enomem: | ||
1093 | return -ENOMEM; | ||
1094 | } | 1073 | } |
1095 | 1074 | ||
1096 | static int ffs_fs_parse_opts(struct ffs_sb_fill_data *data, char *opts) | 1075 | static int ffs_fs_parse_opts(struct ffs_sb_fill_data *data, char *opts) |
@@ -1193,6 +1172,7 @@ ffs_fs_mount(struct file_system_type *t, int flags, | |||
1193 | struct dentry *rv; | 1172 | struct dentry *rv; |
1194 | int ret; | 1173 | int ret; |
1195 | void *ffs_dev; | 1174 | void *ffs_dev; |
1175 | struct ffs_data *ffs; | ||
1196 | 1176 | ||
1197 | ENTER(); | 1177 | ENTER(); |
1198 | 1178 | ||
@@ -1200,18 +1180,30 @@ ffs_fs_mount(struct file_system_type *t, int flags, | |||
1200 | if (unlikely(ret < 0)) | 1180 | if (unlikely(ret < 0)) |
1201 | return ERR_PTR(ret); | 1181 | return ERR_PTR(ret); |
1202 | 1182 | ||
1183 | ffs = ffs_data_new(); | ||
1184 | if (unlikely(!ffs)) | ||
1185 | return ERR_PTR(-ENOMEM); | ||
1186 | ffs->file_perms = data.perms; | ||
1187 | |||
1188 | ffs->dev_name = kstrdup(dev_name, GFP_KERNEL); | ||
1189 | if (unlikely(!ffs->dev_name)) { | ||
1190 | ffs_data_put(ffs); | ||
1191 | return ERR_PTR(-ENOMEM); | ||
1192 | } | ||
1193 | |||
1203 | ffs_dev = functionfs_acquire_dev_callback(dev_name); | 1194 | ffs_dev = functionfs_acquire_dev_callback(dev_name); |
1204 | if (IS_ERR(ffs_dev)) | 1195 | if (IS_ERR(ffs_dev)) { |
1205 | return ffs_dev; | 1196 | ffs_data_put(ffs); |
1197 | return ERR_CAST(ffs_dev); | ||
1198 | } | ||
1199 | ffs->private_data = ffs_dev; | ||
1200 | data.ffs_data = ffs; | ||
1206 | 1201 | ||
1207 | data.dev_name = dev_name; | ||
1208 | data.private_data = ffs_dev; | ||
1209 | rv = mount_nodev(t, flags, &data, ffs_sb_fill); | 1202 | rv = mount_nodev(t, flags, &data, ffs_sb_fill); |
1210 | 1203 | if (IS_ERR(rv) && data.ffs_data) { | |
1211 | /* data.ffs_data is set by ffs_sb_fill */ | ||
1212 | if (IS_ERR(rv)) | ||
1213 | functionfs_release_dev_callback(data.ffs_data); | 1204 | functionfs_release_dev_callback(data.ffs_data); |
1214 | 1205 | ffs_data_put(data.ffs_data); | |
1206 | } | ||
1215 | return rv; | 1207 | return rv; |
1216 | } | 1208 | } |
1217 | 1209 | ||
@@ -2264,6 +2256,8 @@ static int ffs_func_bind(struct usb_configuration *c, | |||
2264 | data->raw_descs + ret, | 2256 | data->raw_descs + ret, |
2265 | (sizeof data->raw_descs) - ret, | 2257 | (sizeof data->raw_descs) - ret, |
2266 | __ffs_func_bind_do_descs, func); | 2258 | __ffs_func_bind_do_descs, func); |
2259 | if (unlikely(ret < 0)) | ||
2260 | goto error; | ||
2267 | } | 2261 | } |
2268 | 2262 | ||
2269 | /* | 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/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index 4449f565d6c6..f2407b2e8a99 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c | |||
@@ -130,7 +130,7 @@ static int usb_hcd_fsl_probe(const struct hc_driver *driver, | |||
130 | } | 130 | } |
131 | 131 | ||
132 | /* Enable USB controller, 83xx or 8536 */ | 132 | /* Enable USB controller, 83xx or 8536 */ |
133 | if (pdata->have_sysif_regs) | 133 | if (pdata->have_sysif_regs && pdata->controller_ver < FSL_USB_VER_1_6) |
134 | setbits32(hcd->regs + FSL_SOC_USB_CTRL, 0x4); | 134 | setbits32(hcd->regs + FSL_SOC_USB_CTRL, 0x4); |
135 | 135 | ||
136 | /* Don't need to set host mode here. It will be done by tdi_reset() */ | 136 | /* Don't need to set host mode here. It will be done by tdi_reset() */ |
@@ -232,15 +232,9 @@ static int ehci_fsl_setup_phy(struct usb_hcd *hcd, | |||
232 | case FSL_USB2_PHY_ULPI: | 232 | case FSL_USB2_PHY_ULPI: |
233 | if (pdata->have_sysif_regs && pdata->controller_ver) { | 233 | if (pdata->have_sysif_regs && pdata->controller_ver) { |
234 | /* controller version 1.6 or above */ | 234 | /* controller version 1.6 or above */ |
235 | clrbits32(non_ehci + FSL_SOC_USB_CTRL, UTMI_PHY_EN); | ||
235 | setbits32(non_ehci + FSL_SOC_USB_CTRL, | 236 | setbits32(non_ehci + FSL_SOC_USB_CTRL, |
236 | ULPI_PHY_CLK_SEL); | 237 | ULPI_PHY_CLK_SEL | USB_CTRL_USB_EN); |
237 | /* | ||
238 | * Due to controller issue of PHY_CLK_VALID in ULPI | ||
239 | * mode, we set USB_CTRL_USB_EN before checking | ||
240 | * PHY_CLK_VALID, otherwise PHY_CLK_VALID doesn't work. | ||
241 | */ | ||
242 | clrsetbits_be32(non_ehci + FSL_SOC_USB_CTRL, | ||
243 | UTMI_PHY_EN, USB_CTRL_USB_EN); | ||
244 | } | 238 | } |
245 | portsc |= PORT_PTS_ULPI; | 239 | portsc |= PORT_PTS_ULPI; |
246 | break; | 240 | break; |
@@ -270,8 +264,9 @@ static int ehci_fsl_setup_phy(struct usb_hcd *hcd, | |||
270 | if (pdata->have_sysif_regs && pdata->controller_ver && | 264 | if (pdata->have_sysif_regs && pdata->controller_ver && |
271 | (phy_mode == FSL_USB2_PHY_ULPI)) { | 265 | (phy_mode == FSL_USB2_PHY_ULPI)) { |
272 | /* check PHY_CLK_VALID to get phy clk valid */ | 266 | /* check PHY_CLK_VALID to get phy clk valid */ |
273 | if (!spin_event_timeout(in_be32(non_ehci + FSL_SOC_USB_CTRL) & | 267 | if (!(spin_event_timeout(in_be32(non_ehci + FSL_SOC_USB_CTRL) & |
274 | PHY_CLK_VALID, FSL_USB_PHY_CLK_TIMEOUT, 0)) { | 268 | PHY_CLK_VALID, FSL_USB_PHY_CLK_TIMEOUT, 0) || |
269 | in_be32(non_ehci + FSL_SOC_USB_PRICTRL))) { | ||
275 | printk(KERN_WARNING "fsl-ehci: USB PHY clock invalid\n"); | 270 | printk(KERN_WARNING "fsl-ehci: USB PHY clock invalid\n"); |
276 | return -EINVAL; | 271 | return -EINVAL; |
277 | } | 272 | } |
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c index 6bd299e61f58..854c2ec7b699 100644 --- a/drivers/usb/host/ehci-pci.c +++ b/drivers/usb/host/ehci-pci.c | |||
@@ -361,7 +361,7 @@ static struct pci_driver ehci_pci_driver = { | |||
361 | .remove = usb_hcd_pci_remove, | 361 | .remove = usb_hcd_pci_remove, |
362 | .shutdown = usb_hcd_pci_shutdown, | 362 | .shutdown = usb_hcd_pci_shutdown, |
363 | 363 | ||
364 | #ifdef CONFIG_PM_SLEEP | 364 | #ifdef CONFIG_PM |
365 | .driver = { | 365 | .driver = { |
366 | .pm = &usb_hcd_pci_pm_ops | 366 | .pm = &usb_hcd_pci_pm_ops |
367 | }, | 367 | }, |
diff --git a/drivers/usb/host/imx21-hcd.c b/drivers/usb/host/imx21-hcd.c index 60a5de505ca1..adb01d950a16 100644 --- a/drivers/usb/host/imx21-hcd.c +++ b/drivers/usb/host/imx21-hcd.c | |||
@@ -824,13 +824,13 @@ static int imx21_hc_urb_enqueue_isoc(struct usb_hcd *hcd, | |||
824 | i = DIV_ROUND_UP(wrap_frame( | 824 | i = DIV_ROUND_UP(wrap_frame( |
825 | cur_frame - urb->start_frame), | 825 | cur_frame - urb->start_frame), |
826 | urb->interval); | 826 | urb->interval); |
827 | if (urb->transfer_flags & URB_ISO_ASAP) { | 827 | |
828 | /* Treat underruns as if URB_ISO_ASAP was set */ | ||
829 | if ((urb->transfer_flags & URB_ISO_ASAP) || | ||
830 | i >= urb->number_of_packets) { | ||
828 | urb->start_frame = wrap_frame(urb->start_frame | 831 | urb->start_frame = wrap_frame(urb->start_frame |
829 | + i * urb->interval); | 832 | + i * urb->interval); |
830 | i = 0; | 833 | i = 0; |
831 | } else if (i >= urb->number_of_packets) { | ||
832 | ret = -EXDEV; | ||
833 | goto alloc_dmem_failed; | ||
834 | } | 834 | } |
835 | } | 835 | } |
836 | } | 836 | } |
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 8f6b695af6a4..604cad1bcf9c 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c | |||
@@ -216,31 +216,26 @@ static int ohci_urb_enqueue ( | |||
216 | frame &= ~(ed->interval - 1); | 216 | frame &= ~(ed->interval - 1); |
217 | frame |= ed->branch; | 217 | frame |= ed->branch; |
218 | urb->start_frame = frame; | 218 | urb->start_frame = frame; |
219 | ed->last_iso = frame + ed->interval * (size - 1); | ||
219 | } | 220 | } |
220 | } else if (ed->type == PIPE_ISOCHRONOUS) { | 221 | } else if (ed->type == PIPE_ISOCHRONOUS) { |
221 | u16 next = ohci_frame_no(ohci) + 1; | 222 | u16 next = ohci_frame_no(ohci) + 1; |
222 | u16 frame = ed->last_iso + ed->interval; | 223 | u16 frame = ed->last_iso + ed->interval; |
224 | u16 length = ed->interval * (size - 1); | ||
223 | 225 | ||
224 | /* Behind the scheduling threshold? */ | 226 | /* Behind the scheduling threshold? */ |
225 | if (unlikely(tick_before(frame, next))) { | 227 | if (unlikely(tick_before(frame, next))) { |
226 | 228 | ||
227 | /* USB_ISO_ASAP: Round up to the first available slot */ | 229 | /* URB_ISO_ASAP: Round up to the first available slot */ |
228 | if (urb->transfer_flags & URB_ISO_ASAP) { | 230 | if (urb->transfer_flags & URB_ISO_ASAP) { |
229 | frame += (next - frame + ed->interval - 1) & | 231 | frame += (next - frame + ed->interval - 1) & |
230 | -ed->interval; | 232 | -ed->interval; |
231 | 233 | ||
232 | /* | 234 | /* |
233 | * Not ASAP: Use the next slot in the stream. If | 235 | * Not ASAP: Use the next slot in the stream, |
234 | * the entire URB falls before the threshold, fail. | 236 | * no matter what. |
235 | */ | 237 | */ |
236 | } else { | 238 | } else { |
237 | if (tick_before(frame + ed->interval * | ||
238 | (urb->number_of_packets - 1), next)) { | ||
239 | retval = -EXDEV; | ||
240 | usb_hcd_unlink_urb_from_ep(hcd, urb); | ||
241 | goto fail; | ||
242 | } | ||
243 | |||
244 | /* | 239 | /* |
245 | * Some OHCI hardware doesn't handle late TDs | 240 | * Some OHCI hardware doesn't handle late TDs |
246 | * correctly. After retiring them it proceeds | 241 | * correctly. After retiring them it proceeds |
@@ -251,9 +246,16 @@ static int ohci_urb_enqueue ( | |||
251 | urb_priv->td_cnt = DIV_ROUND_UP( | 246 | urb_priv->td_cnt = DIV_ROUND_UP( |
252 | (u16) (next - frame), | 247 | (u16) (next - frame), |
253 | ed->interval); | 248 | ed->interval); |
249 | if (urb_priv->td_cnt >= urb_priv->length) { | ||
250 | ++urb_priv->td_cnt; /* Mark it */ | ||
251 | ohci_dbg(ohci, "iso underrun %p (%u+%u < %u)\n", | ||
252 | urb, frame, length, | ||
253 | next); | ||
254 | } | ||
254 | } | 255 | } |
255 | } | 256 | } |
256 | urb->start_frame = frame; | 257 | urb->start_frame = frame; |
258 | ed->last_iso = frame + length; | ||
257 | } | 259 | } |
258 | 260 | ||
259 | /* fill the TDs and link them to the ed; and | 261 | /* fill the TDs and link them to the ed; and |
diff --git a/drivers/usb/host/ohci-q.c b/drivers/usb/host/ohci-q.c index df4a6707322d..e7f577e63624 100644 --- a/drivers/usb/host/ohci-q.c +++ b/drivers/usb/host/ohci-q.c | |||
@@ -41,9 +41,13 @@ finish_urb(struct ohci_hcd *ohci, struct urb *urb, int status) | |||
41 | __releases(ohci->lock) | 41 | __releases(ohci->lock) |
42 | __acquires(ohci->lock) | 42 | __acquires(ohci->lock) |
43 | { | 43 | { |
44 | struct device *dev = ohci_to_hcd(ohci)->self.controller; | 44 | struct device *dev = ohci_to_hcd(ohci)->self.controller; |
45 | struct usb_host_endpoint *ep = urb->ep; | ||
46 | struct urb_priv *urb_priv; | ||
47 | |||
45 | // ASSERT (urb->hcpriv != 0); | 48 | // ASSERT (urb->hcpriv != 0); |
46 | 49 | ||
50 | restart: | ||
47 | urb_free_priv (ohci, urb->hcpriv); | 51 | urb_free_priv (ohci, urb->hcpriv); |
48 | urb->hcpriv = NULL; | 52 | urb->hcpriv = NULL; |
49 | if (likely(status == -EINPROGRESS)) | 53 | if (likely(status == -EINPROGRESS)) |
@@ -80,6 +84,21 @@ __acquires(ohci->lock) | |||
80 | ohci->hc_control &= ~(OHCI_CTRL_PLE|OHCI_CTRL_IE); | 84 | ohci->hc_control &= ~(OHCI_CTRL_PLE|OHCI_CTRL_IE); |
81 | ohci_writel (ohci, ohci->hc_control, &ohci->regs->control); | 85 | ohci_writel (ohci, ohci->hc_control, &ohci->regs->control); |
82 | } | 86 | } |
87 | |||
88 | /* | ||
89 | * An isochronous URB that is sumitted too late won't have any TDs | ||
90 | * (marked by the fact that the td_cnt value is larger than the | ||
91 | * actual number of TDs). If the next URB on this endpoint is like | ||
92 | * that, give it back now. | ||
93 | */ | ||
94 | if (!list_empty(&ep->urb_list)) { | ||
95 | urb = list_first_entry(&ep->urb_list, struct urb, urb_list); | ||
96 | urb_priv = urb->hcpriv; | ||
97 | if (urb_priv->td_cnt > urb_priv->length) { | ||
98 | status = 0; | ||
99 | goto restart; | ||
100 | } | ||
101 | } | ||
83 | } | 102 | } |
84 | 103 | ||
85 | 104 | ||
@@ -546,7 +565,6 @@ td_fill (struct ohci_hcd *ohci, u32 info, | |||
546 | td->hwCBP = cpu_to_hc32 (ohci, data & 0xFFFFF000); | 565 | td->hwCBP = cpu_to_hc32 (ohci, data & 0xFFFFF000); |
547 | *ohci_hwPSWp(ohci, td, 0) = cpu_to_hc16 (ohci, | 566 | *ohci_hwPSWp(ohci, td, 0) = cpu_to_hc16 (ohci, |
548 | (data & 0x0FFF) | 0xE000); | 567 | (data & 0x0FFF) | 0xE000); |
549 | td->ed->last_iso = info & 0xffff; | ||
550 | } else { | 568 | } else { |
551 | td->hwCBP = cpu_to_hc32 (ohci, data); | 569 | td->hwCBP = cpu_to_hc32 (ohci, data); |
552 | } | 570 | } |
@@ -996,7 +1014,7 @@ rescan_this: | |||
996 | urb_priv->td_cnt++; | 1014 | urb_priv->td_cnt++; |
997 | 1015 | ||
998 | /* if URB is done, clean up */ | 1016 | /* if URB is done, clean up */ |
999 | if (urb_priv->td_cnt == urb_priv->length) { | 1017 | if (urb_priv->td_cnt >= urb_priv->length) { |
1000 | modified = completed = 1; | 1018 | modified = completed = 1; |
1001 | finish_urb(ohci, urb, 0); | 1019 | finish_urb(ohci, urb, 0); |
1002 | } | 1020 | } |
@@ -1086,7 +1104,7 @@ static void takeback_td(struct ohci_hcd *ohci, struct td *td) | |||
1086 | urb_priv->td_cnt++; | 1104 | urb_priv->td_cnt++; |
1087 | 1105 | ||
1088 | /* If all this urb's TDs are done, call complete() */ | 1106 | /* If all this urb's TDs are done, call complete() */ |
1089 | if (urb_priv->td_cnt == urb_priv->length) | 1107 | if (urb_priv->td_cnt >= urb_priv->length) |
1090 | finish_urb(ohci, urb, status); | 1108 | finish_urb(ohci, urb, status); |
1091 | 1109 | ||
1092 | /* clean schedule: unlink EDs that are no longer busy */ | 1110 | /* clean schedule: unlink EDs that are no longer busy */ |
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/uhci-pci.c b/drivers/usb/host/uhci-pci.c index c300bd2f7d1c..0f228c46eeda 100644 --- a/drivers/usb/host/uhci-pci.c +++ b/drivers/usb/host/uhci-pci.c | |||
@@ -293,7 +293,7 @@ static struct pci_driver uhci_pci_driver = { | |||
293 | .remove = usb_hcd_pci_remove, | 293 | .remove = usb_hcd_pci_remove, |
294 | .shutdown = uhci_shutdown, | 294 | .shutdown = uhci_shutdown, |
295 | 295 | ||
296 | #ifdef CONFIG_PM_SLEEP | 296 | #ifdef CONFIG_PM |
297 | .driver = { | 297 | .driver = { |
298 | .pm = &usb_hcd_pci_pm_ops | 298 | .pm = &usb_hcd_pci_pm_ops |
299 | }, | 299 | }, |
diff --git a/drivers/usb/host/uhci-q.c b/drivers/usb/host/uhci-q.c index 041c6ddb695c..da6f56d996ce 100644 --- a/drivers/usb/host/uhci-q.c +++ b/drivers/usb/host/uhci-q.c | |||
@@ -1303,7 +1303,7 @@ static int uhci_submit_isochronous(struct uhci_hcd *uhci, struct urb *urb, | |||
1303 | } | 1303 | } |
1304 | 1304 | ||
1305 | /* Fell behind? */ | 1305 | /* Fell behind? */ |
1306 | if (uhci_frame_before_eq(frame, next)) { | 1306 | if (!uhci_frame_before_eq(next, frame)) { |
1307 | 1307 | ||
1308 | /* USB_ISO_ASAP: Round up to the first available slot */ | 1308 | /* USB_ISO_ASAP: Round up to the first available slot */ |
1309 | if (urb->transfer_flags & URB_ISO_ASAP) | 1309 | if (urb->transfer_flags & URB_ISO_ASAP) |
@@ -1311,13 +1311,17 @@ static int uhci_submit_isochronous(struct uhci_hcd *uhci, struct urb *urb, | |||
1311 | -qh->period; | 1311 | -qh->period; |
1312 | 1312 | ||
1313 | /* | 1313 | /* |
1314 | * Not ASAP: Use the next slot in the stream. If | 1314 | * Not ASAP: Use the next slot in the stream, |
1315 | * the entire URB falls before the threshold, fail. | 1315 | * no matter what. |
1316 | */ | 1316 | */ |
1317 | else if (!uhci_frame_before_eq(next, | 1317 | else if (!uhci_frame_before_eq(next, |
1318 | frame + (urb->number_of_packets - 1) * | 1318 | frame + (urb->number_of_packets - 1) * |
1319 | qh->period)) | 1319 | qh->period)) |
1320 | return -EXDEV; | 1320 | dev_dbg(uhci_dev(uhci), "iso underrun %p (%u+%u < %u)\n", |
1321 | urb, frame, | ||
1322 | (urb->number_of_packets - 1) * | ||
1323 | qh->period, | ||
1324 | next); | ||
1321 | } | 1325 | } |
1322 | } | 1326 | } |
1323 | 1327 | ||
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index fae697ed0b70..e8b4c56dcf62 100644 --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c | |||
@@ -287,7 +287,7 @@ static int xhci_stop_device(struct xhci_hcd *xhci, int slot_id, int suspend) | |||
287 | if (virt_dev->eps[i].ring && virt_dev->eps[i].ring->dequeue) | 287 | if (virt_dev->eps[i].ring && virt_dev->eps[i].ring->dequeue) |
288 | xhci_queue_stop_endpoint(xhci, slot_id, i, suspend); | 288 | xhci_queue_stop_endpoint(xhci, slot_id, i, suspend); |
289 | } | 289 | } |
290 | cmd->command_trb = xhci->cmd_ring->enqueue; | 290 | cmd->command_trb = xhci_find_next_enqueue(xhci->cmd_ring); |
291 | list_add_tail(&cmd->cmd_list, &virt_dev->cmd_list); | 291 | list_add_tail(&cmd->cmd_list, &virt_dev->cmd_list); |
292 | xhci_queue_stop_endpoint(xhci, slot_id, 0, suspend); | 292 | xhci_queue_stop_endpoint(xhci, slot_id, 0, suspend); |
293 | xhci_ring_cmd_db(xhci); | 293 | xhci_ring_cmd_db(xhci); |
@@ -552,11 +552,15 @@ void xhci_del_comp_mod_timer(struct xhci_hcd *xhci, u32 status, u16 wIndex) | |||
552 | * - Mark a port as being done with device resume, | 552 | * - Mark a port as being done with device resume, |
553 | * and ring the endpoint doorbells. | 553 | * and ring the endpoint doorbells. |
554 | * - Stop the Synopsys redriver Compliance Mode polling. | 554 | * - Stop the Synopsys redriver Compliance Mode polling. |
555 | * - Drop and reacquire the xHCI lock, in order to wait for port resume. | ||
555 | */ | 556 | */ |
556 | static u32 xhci_get_port_status(struct usb_hcd *hcd, | 557 | static u32 xhci_get_port_status(struct usb_hcd *hcd, |
557 | struct xhci_bus_state *bus_state, | 558 | struct xhci_bus_state *bus_state, |
558 | __le32 __iomem **port_array, | 559 | __le32 __iomem **port_array, |
559 | u16 wIndex, u32 raw_port_status) | 560 | u16 wIndex, u32 raw_port_status, |
561 | unsigned long flags) | ||
562 | __releases(&xhci->lock) | ||
563 | __acquires(&xhci->lock) | ||
560 | { | 564 | { |
561 | struct xhci_hcd *xhci = hcd_to_xhci(hcd); | 565 | struct xhci_hcd *xhci = hcd_to_xhci(hcd); |
562 | u32 status = 0; | 566 | u32 status = 0; |
@@ -591,21 +595,42 @@ static u32 xhci_get_port_status(struct usb_hcd *hcd, | |||
591 | return 0xffffffff; | 595 | return 0xffffffff; |
592 | if (time_after_eq(jiffies, | 596 | if (time_after_eq(jiffies, |
593 | bus_state->resume_done[wIndex])) { | 597 | bus_state->resume_done[wIndex])) { |
598 | int time_left; | ||
599 | |||
594 | xhci_dbg(xhci, "Resume USB2 port %d\n", | 600 | xhci_dbg(xhci, "Resume USB2 port %d\n", |
595 | wIndex + 1); | 601 | wIndex + 1); |
596 | bus_state->resume_done[wIndex] = 0; | 602 | bus_state->resume_done[wIndex] = 0; |
597 | clear_bit(wIndex, &bus_state->resuming_ports); | 603 | clear_bit(wIndex, &bus_state->resuming_ports); |
604 | |||
605 | set_bit(wIndex, &bus_state->rexit_ports); | ||
598 | xhci_set_link_state(xhci, port_array, wIndex, | 606 | xhci_set_link_state(xhci, port_array, wIndex, |
599 | XDEV_U0); | 607 | XDEV_U0); |
600 | xhci_dbg(xhci, "set port %d resume\n", | 608 | |
601 | wIndex + 1); | 609 | spin_unlock_irqrestore(&xhci->lock, flags); |
602 | slot_id = xhci_find_slot_id_by_port(hcd, xhci, | 610 | time_left = wait_for_completion_timeout( |
603 | wIndex + 1); | 611 | &bus_state->rexit_done[wIndex], |
604 | if (!slot_id) { | 612 | msecs_to_jiffies( |
605 | xhci_dbg(xhci, "slot_id is zero\n"); | 613 | XHCI_MAX_REXIT_TIMEOUT)); |
606 | return 0xffffffff; | 614 | spin_lock_irqsave(&xhci->lock, flags); |
615 | |||
616 | if (time_left) { | ||
617 | slot_id = xhci_find_slot_id_by_port(hcd, | ||
618 | xhci, wIndex + 1); | ||
619 | if (!slot_id) { | ||
620 | xhci_dbg(xhci, "slot_id is zero\n"); | ||
621 | return 0xffffffff; | ||
622 | } | ||
623 | xhci_ring_device(xhci, slot_id); | ||
624 | } else { | ||
625 | int port_status = xhci_readl(xhci, | ||
626 | port_array[wIndex]); | ||
627 | xhci_warn(xhci, "Port resume took longer than %i msec, port status = 0x%x\n", | ||
628 | XHCI_MAX_REXIT_TIMEOUT, | ||
629 | port_status); | ||
630 | status |= USB_PORT_STAT_SUSPEND; | ||
631 | clear_bit(wIndex, &bus_state->rexit_ports); | ||
607 | } | 632 | } |
608 | xhci_ring_device(xhci, slot_id); | 633 | |
609 | bus_state->port_c_suspend |= 1 << wIndex; | 634 | bus_state->port_c_suspend |= 1 << wIndex; |
610 | bus_state->suspended_ports &= ~(1 << wIndex); | 635 | bus_state->suspended_ports &= ~(1 << wIndex); |
611 | } else { | 636 | } else { |
@@ -728,7 +753,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, | |||
728 | break; | 753 | break; |
729 | } | 754 | } |
730 | status = xhci_get_port_status(hcd, bus_state, port_array, | 755 | status = xhci_get_port_status(hcd, bus_state, port_array, |
731 | wIndex, temp); | 756 | wIndex, temp, flags); |
732 | if (status == 0xffffffff) | 757 | if (status == 0xffffffff) |
733 | goto error; | 758 | goto error; |
734 | 759 | ||
@@ -1132,18 +1157,6 @@ int xhci_bus_suspend(struct usb_hcd *hcd) | |||
1132 | t1 = xhci_port_state_to_neutral(t1); | 1157 | t1 = xhci_port_state_to_neutral(t1); |
1133 | if (t1 != t2) | 1158 | if (t1 != t2) |
1134 | xhci_writel(xhci, t2, port_array[port_index]); | 1159 | xhci_writel(xhci, t2, port_array[port_index]); |
1135 | |||
1136 | if (hcd->speed != HCD_USB3) { | ||
1137 | /* enable remote wake up for USB 2.0 */ | ||
1138 | __le32 __iomem *addr; | ||
1139 | u32 tmp; | ||
1140 | |||
1141 | /* Get the port power control register address. */ | ||
1142 | addr = port_array[port_index] + PORTPMSC; | ||
1143 | tmp = xhci_readl(xhci, addr); | ||
1144 | tmp |= PORT_RWE; | ||
1145 | xhci_writel(xhci, tmp, addr); | ||
1146 | } | ||
1147 | } | 1160 | } |
1148 | hcd->state = HC_STATE_SUSPENDED; | 1161 | hcd->state = HC_STATE_SUSPENDED; |
1149 | bus_state->next_statechange = jiffies + msecs_to_jiffies(10); | 1162 | bus_state->next_statechange = jiffies + msecs_to_jiffies(10); |
@@ -1222,20 +1235,6 @@ int xhci_bus_resume(struct usb_hcd *hcd) | |||
1222 | xhci_ring_device(xhci, slot_id); | 1235 | xhci_ring_device(xhci, slot_id); |
1223 | } else | 1236 | } else |
1224 | xhci_writel(xhci, temp, port_array[port_index]); | 1237 | xhci_writel(xhci, temp, port_array[port_index]); |
1225 | |||
1226 | if (hcd->speed != HCD_USB3) { | ||
1227 | /* disable remote wake up for USB 2.0 */ | ||
1228 | __le32 __iomem *addr; | ||
1229 | u32 tmp; | ||
1230 | |||
1231 | /* Add one to the port status register address to get | ||
1232 | * the port power control register address. | ||
1233 | */ | ||
1234 | addr = port_array[port_index] + PORTPMSC; | ||
1235 | tmp = xhci_readl(xhci, addr); | ||
1236 | tmp &= ~PORT_RWE; | ||
1237 | xhci_writel(xhci, tmp, addr); | ||
1238 | } | ||
1239 | } | 1238 | } |
1240 | 1239 | ||
1241 | (void) xhci_readl(xhci, &xhci->op_regs->command); | 1240 | (void) xhci_readl(xhci, &xhci->op_regs->command); |
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 53b972c2a09f..83bcd13622c3 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c | |||
@@ -2428,6 +2428,8 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags) | |||
2428 | for (i = 0; i < USB_MAXCHILDREN; ++i) { | 2428 | for (i = 0; i < USB_MAXCHILDREN; ++i) { |
2429 | xhci->bus_state[0].resume_done[i] = 0; | 2429 | xhci->bus_state[0].resume_done[i] = 0; |
2430 | xhci->bus_state[1].resume_done[i] = 0; | 2430 | xhci->bus_state[1].resume_done[i] = 0; |
2431 | /* Only the USB 2.0 completions will ever be used. */ | ||
2432 | init_completion(&xhci->bus_state[1].rexit_done[i]); | ||
2431 | } | 2433 | } |
2432 | 2434 | ||
2433 | if (scratchpad_alloc(xhci, flags)) | 2435 | if (scratchpad_alloc(xhci, flags)) |
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index c2d495057eb5..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 | ||
@@ -351,7 +376,7 @@ static struct pci_driver xhci_pci_driver = { | |||
351 | /* suspend and resume implemented later */ | 376 | /* suspend and resume implemented later */ |
352 | 377 | ||
353 | .shutdown = usb_hcd_pci_shutdown, | 378 | .shutdown = usb_hcd_pci_shutdown, |
354 | #ifdef CONFIG_PM_SLEEP | 379 | #ifdef CONFIG_PM |
355 | .driver = { | 380 | .driver = { |
356 | .pm = &usb_hcd_pci_pm_ops | 381 | .pm = &usb_hcd_pci_pm_ops |
357 | }, | 382 | }, |
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 411da1fc7ae8..6bfbd80ec2b9 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c | |||
@@ -123,6 +123,16 @@ static int enqueue_is_link_trb(struct xhci_ring *ring) | |||
123 | return TRB_TYPE_LINK_LE32(link->control); | 123 | return TRB_TYPE_LINK_LE32(link->control); |
124 | } | 124 | } |
125 | 125 | ||
126 | union xhci_trb *xhci_find_next_enqueue(struct xhci_ring *ring) | ||
127 | { | ||
128 | /* Enqueue pointer can be left pointing to the link TRB, | ||
129 | * we must handle that | ||
130 | */ | ||
131 | if (TRB_TYPE_LINK_LE32(ring->enqueue->link.control)) | ||
132 | return ring->enq_seg->next->trbs; | ||
133 | return ring->enqueue; | ||
134 | } | ||
135 | |||
126 | /* Updates trb to point to the next TRB in the ring, and updates seg if the next | 136 | /* Updates trb to point to the next TRB in the ring, and updates seg if the next |
127 | * TRB is in a new segment. This does not skip over link TRBs, and it does not | 137 | * TRB is in a new segment. This does not skip over link TRBs, and it does not |
128 | * effect the ring dequeue or enqueue pointers. | 138 | * effect the ring dequeue or enqueue pointers. |
@@ -859,8 +869,12 @@ remove_finished_td: | |||
859 | /* Otherwise ring the doorbell(s) to restart queued transfers */ | 869 | /* Otherwise ring the doorbell(s) to restart queued transfers */ |
860 | ring_doorbell_for_active_rings(xhci, slot_id, ep_index); | 870 | ring_doorbell_for_active_rings(xhci, slot_id, ep_index); |
861 | } | 871 | } |
862 | ep->stopped_td = NULL; | 872 | |
863 | ep->stopped_trb = NULL; | 873 | /* Clear stopped_td and stopped_trb if endpoint is not halted */ |
874 | if (!(ep->ep_state & EP_HALTED)) { | ||
875 | ep->stopped_td = NULL; | ||
876 | ep->stopped_trb = NULL; | ||
877 | } | ||
864 | 878 | ||
865 | /* | 879 | /* |
866 | * Drop the lock and complete the URBs in the cancelled TD list. | 880 | * Drop the lock and complete the URBs in the cancelled TD list. |
@@ -1414,6 +1428,12 @@ static void handle_cmd_completion(struct xhci_hcd *xhci, | |||
1414 | inc_deq(xhci, xhci->cmd_ring); | 1428 | inc_deq(xhci, xhci->cmd_ring); |
1415 | return; | 1429 | return; |
1416 | } | 1430 | } |
1431 | /* There is no command to handle if we get a stop event when the | ||
1432 | * command ring is empty, event->cmd_trb points to the next | ||
1433 | * unset command | ||
1434 | */ | ||
1435 | if (xhci->cmd_ring->dequeue == xhci->cmd_ring->enqueue) | ||
1436 | return; | ||
1417 | } | 1437 | } |
1418 | 1438 | ||
1419 | switch (le32_to_cpu(xhci->cmd_ring->dequeue->generic.field[3]) | 1439 | switch (le32_to_cpu(xhci->cmd_ring->dequeue->generic.field[3]) |
@@ -1743,6 +1763,19 @@ static void handle_port_status(struct xhci_hcd *xhci, | |||
1743 | } | 1763 | } |
1744 | } | 1764 | } |
1745 | 1765 | ||
1766 | /* | ||
1767 | * Check to see if xhci-hub.c is waiting on RExit to U0 transition (or | ||
1768 | * RExit to a disconnect state). If so, let the the driver know it's | ||
1769 | * out of the RExit state. | ||
1770 | */ | ||
1771 | if (!DEV_SUPERSPEED(temp) && | ||
1772 | test_and_clear_bit(faked_port_index, | ||
1773 | &bus_state->rexit_ports)) { | ||
1774 | complete(&bus_state->rexit_done[faked_port_index]); | ||
1775 | bogus_port_status = true; | ||
1776 | goto cleanup; | ||
1777 | } | ||
1778 | |||
1746 | if (hcd->speed != HCD_USB3) | 1779 | if (hcd->speed != HCD_USB3) |
1747 | xhci_test_and_clear_bit(xhci, port_array, faked_port_index, | 1780 | xhci_test_and_clear_bit(xhci, port_array, faked_port_index, |
1748 | PORT_PLC); | 1781 | PORT_PLC); |
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 49b6edb84a79..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; |
@@ -2598,15 +2610,7 @@ static int xhci_configure_endpoint(struct xhci_hcd *xhci, | |||
2598 | if (command) { | 2610 | if (command) { |
2599 | cmd_completion = command->completion; | 2611 | cmd_completion = command->completion; |
2600 | cmd_status = &command->status; | 2612 | cmd_status = &command->status; |
2601 | command->command_trb = xhci->cmd_ring->enqueue; | 2613 | command->command_trb = xhci_find_next_enqueue(xhci->cmd_ring); |
2602 | |||
2603 | /* Enqueue pointer can be left pointing to the link TRB, | ||
2604 | * we must handle that | ||
2605 | */ | ||
2606 | if (TRB_TYPE_LINK_LE32(command->command_trb->link.control)) | ||
2607 | command->command_trb = | ||
2608 | xhci->cmd_ring->enq_seg->next->trbs; | ||
2609 | |||
2610 | list_add_tail(&command->cmd_list, &virt_dev->cmd_list); | 2614 | list_add_tail(&command->cmd_list, &virt_dev->cmd_list); |
2611 | } else { | 2615 | } else { |
2612 | cmd_completion = &virt_dev->cmd_completion; | 2616 | cmd_completion = &virt_dev->cmd_completion; |
@@ -2614,7 +2618,7 @@ static int xhci_configure_endpoint(struct xhci_hcd *xhci, | |||
2614 | } | 2618 | } |
2615 | init_completion(cmd_completion); | 2619 | init_completion(cmd_completion); |
2616 | 2620 | ||
2617 | cmd_trb = xhci->cmd_ring->dequeue; | 2621 | cmd_trb = xhci_find_next_enqueue(xhci->cmd_ring); |
2618 | if (!ctx_change) | 2622 | if (!ctx_change) |
2619 | ret = xhci_queue_configure_endpoint(xhci, in_ctx->dma, | 2623 | ret = xhci_queue_configure_endpoint(xhci, in_ctx->dma, |
2620 | udev->slot_id, must_succeed); | 2624 | udev->slot_id, must_succeed); |
@@ -3439,14 +3443,7 @@ int xhci_discover_or_reset_device(struct usb_hcd *hcd, struct usb_device *udev) | |||
3439 | 3443 | ||
3440 | /* Attempt to submit the Reset Device command to the command ring */ | 3444 | /* Attempt to submit the Reset Device command to the command ring */ |
3441 | spin_lock_irqsave(&xhci->lock, flags); | 3445 | spin_lock_irqsave(&xhci->lock, flags); |
3442 | reset_device_cmd->command_trb = xhci->cmd_ring->enqueue; | 3446 | reset_device_cmd->command_trb = xhci_find_next_enqueue(xhci->cmd_ring); |
3443 | |||
3444 | /* Enqueue pointer can be left pointing to the link TRB, | ||
3445 | * we must handle that | ||
3446 | */ | ||
3447 | if (TRB_TYPE_LINK_LE32(reset_device_cmd->command_trb->link.control)) | ||
3448 | reset_device_cmd->command_trb = | ||
3449 | xhci->cmd_ring->enq_seg->next->trbs; | ||
3450 | 3447 | ||
3451 | list_add_tail(&reset_device_cmd->cmd_list, &virt_dev->cmd_list); | 3448 | list_add_tail(&reset_device_cmd->cmd_list, &virt_dev->cmd_list); |
3452 | ret = xhci_queue_reset_device(xhci, slot_id); | 3449 | ret = xhci_queue_reset_device(xhci, slot_id); |
@@ -3650,7 +3647,7 @@ int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev) | |||
3650 | union xhci_trb *cmd_trb; | 3647 | union xhci_trb *cmd_trb; |
3651 | 3648 | ||
3652 | spin_lock_irqsave(&xhci->lock, flags); | 3649 | spin_lock_irqsave(&xhci->lock, flags); |
3653 | cmd_trb = xhci->cmd_ring->dequeue; | 3650 | cmd_trb = xhci_find_next_enqueue(xhci->cmd_ring); |
3654 | ret = xhci_queue_slot_control(xhci, TRB_ENABLE_SLOT, 0); | 3651 | ret = xhci_queue_slot_control(xhci, TRB_ENABLE_SLOT, 0); |
3655 | if (ret) { | 3652 | if (ret) { |
3656 | spin_unlock_irqrestore(&xhci->lock, flags); | 3653 | spin_unlock_irqrestore(&xhci->lock, flags); |
@@ -3785,7 +3782,7 @@ int xhci_address_device(struct usb_hcd *hcd, struct usb_device *udev) | |||
3785 | slot_ctx->dev_info >> 27); | 3782 | slot_ctx->dev_info >> 27); |
3786 | 3783 | ||
3787 | spin_lock_irqsave(&xhci->lock, flags); | 3784 | spin_lock_irqsave(&xhci->lock, flags); |
3788 | cmd_trb = xhci->cmd_ring->dequeue; | 3785 | cmd_trb = xhci_find_next_enqueue(xhci->cmd_ring); |
3789 | ret = xhci_queue_address_device(xhci, virt_dev->in_ctx->dma, | 3786 | ret = xhci_queue_address_device(xhci, virt_dev->in_ctx->dma, |
3790 | udev->slot_id); | 3787 | udev->slot_id); |
3791 | if (ret) { | 3788 | if (ret) { |
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index 46aa14894148..941d5f59e4dc 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h | |||
@@ -1412,8 +1412,18 @@ struct xhci_bus_state { | |||
1412 | unsigned long resume_done[USB_MAXCHILDREN]; | 1412 | unsigned long resume_done[USB_MAXCHILDREN]; |
1413 | /* which ports have started to resume */ | 1413 | /* which ports have started to resume */ |
1414 | unsigned long resuming_ports; | 1414 | unsigned long resuming_ports; |
1415 | /* Which ports are waiting on RExit to U0 transition. */ | ||
1416 | unsigned long rexit_ports; | ||
1417 | struct completion rexit_done[USB_MAXCHILDREN]; | ||
1415 | }; | 1418 | }; |
1416 | 1419 | ||
1420 | |||
1421 | /* | ||
1422 | * It can take up to 20 ms to transition from RExit to U0 on the | ||
1423 | * Intel Lynx Point LP xHCI host. | ||
1424 | */ | ||
1425 | #define XHCI_MAX_REXIT_TIMEOUT (20 * 1000) | ||
1426 | |||
1417 | static inline unsigned int hcd_index(struct usb_hcd *hcd) | 1427 | static inline unsigned int hcd_index(struct usb_hcd *hcd) |
1418 | { | 1428 | { |
1419 | if (hcd->speed == HCD_USB3) | 1429 | if (hcd->speed == HCD_USB3) |
@@ -1538,6 +1548,8 @@ struct xhci_hcd { | |||
1538 | #define XHCI_COMP_MODE_QUIRK (1 << 14) | 1548 | #define XHCI_COMP_MODE_QUIRK (1 << 14) |
1539 | #define XHCI_AVOID_BEI (1 << 15) | 1549 | #define XHCI_AVOID_BEI (1 << 15) |
1540 | #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) | ||
1541 | unsigned int num_active_eps; | 1553 | unsigned int num_active_eps; |
1542 | unsigned int limit_active_eps; | 1554 | unsigned int limit_active_eps; |
1543 | /* 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 */ |
@@ -1840,6 +1852,7 @@ int xhci_cancel_cmd(struct xhci_hcd *xhci, struct xhci_command *command, | |||
1840 | union xhci_trb *cmd_trb); | 1852 | union xhci_trb *cmd_trb); |
1841 | void xhci_ring_ep_doorbell(struct xhci_hcd *xhci, unsigned int slot_id, | 1853 | void xhci_ring_ep_doorbell(struct xhci_hcd *xhci, unsigned int slot_id, |
1842 | unsigned int ep_index, unsigned int stream_id); | 1854 | unsigned int ep_index, unsigned int stream_id); |
1855 | union xhci_trb *xhci_find_next_enqueue(struct xhci_ring *ring); | ||
1843 | 1856 | ||
1844 | /* xHCI roothub code */ | 1857 | /* xHCI roothub code */ |
1845 | void xhci_set_link_state(struct xhci_hcd *xhci, __le32 __iomem **port_array, | 1858 | void xhci_set_link_state(struct xhci_hcd *xhci, __le32 __iomem **port_array, |
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/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/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", |