Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'usb-3.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg Kroah-Hartman:
"Here are a few tiny USB fixes for 3.8-rc6.

Nothing major here, some host controller bug fixes to resolve a number
of bugs that people have reported, and a bunch of additional device
ids are added to a number of drivers (which caused code to be deleted
from the usb-storage driver, always nice)"

* tag 'usb-3.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (22 commits)
USB: storage: optimize to match the Huawei USB storage devices and support new switch command
USB: storage: Define a new macro for USB storage match rules
USB: ftdi_sio: add Zolix FTDI PID
USB: option: add Changhong CH690
USB: ftdi_sio: add PID/VID entries for ELV WS 300 PC II
USB: add OWL CM-160 support to cp210x driver
USB: EHCI: fix bug in scheduling periodic split transfers
USB: EHCI: fix for leaking isochronous data
USB: option: add support for Telit LE920
USB: qcserial: add Telit Gobi QDL device
USB: EHCI: fix timer bug affecting port resume
USB: UHCI: notify usbcore about port resumes
USB: EHCI: notify usbcore about port resumes
USB: add usb_hcd_{start,end}_port_resume
USB: EHCI: unlink one async QH at a time
USB: EHCI: remove ASS/PSS polling timeout
usb: Using correct way to clear usb3.0 device's remote wakeup feature.
usb: Prevent dead ports when xhci is not enabled
USB: XHCI: fix memory leak of URB-private data
drivers: xhci: fix incorrect bit test
...

+310 -392
+44
drivers/usb/core/hcd.c
··· 39 39 #include <asm/unaligned.h> 40 40 #include <linux/platform_device.h> 41 41 #include <linux/workqueue.h> 42 + #include <linux/pm_runtime.h> 42 43 43 44 #include <linux/usb.h> 44 45 #include <linux/usb/hcd.h> ··· 1026 1025 return retval; 1027 1026 } 1028 1027 1028 + /* 1029 + * usb_hcd_start_port_resume - a root-hub port is sending a resume signal 1030 + * @bus: the bus which the root hub belongs to 1031 + * @portnum: the port which is being resumed 1032 + * 1033 + * HCDs should call this function when they know that a resume signal is 1034 + * being sent to a root-hub port. The root hub will be prevented from 1035 + * going into autosuspend until usb_hcd_end_port_resume() is called. 1036 + * 1037 + * The bus's private lock must be held by the caller. 1038 + */ 1039 + void usb_hcd_start_port_resume(struct usb_bus *bus, int portnum) 1040 + { 1041 + unsigned bit = 1 << portnum; 1042 + 1043 + if (!(bus->resuming_ports & bit)) { 1044 + bus->resuming_ports |= bit; 1045 + pm_runtime_get_noresume(&bus->root_hub->dev); 1046 + } 1047 + } 1048 + EXPORT_SYMBOL_GPL(usb_hcd_start_port_resume); 1049 + 1050 + /* 1051 + * usb_hcd_end_port_resume - a root-hub port has stopped sending a resume signal 1052 + * @bus: the bus which the root hub belongs to 1053 + * @portnum: the port which is being resumed 1054 + * 1055 + * HCDs should call this function when they know that a resume signal has 1056 + * stopped being sent to a root-hub port. The root hub will be allowed to 1057 + * autosuspend again. 1058 + * 1059 + * The bus's private lock must be held by the caller. 1060 + */ 1061 + void usb_hcd_end_port_resume(struct usb_bus *bus, int portnum) 1062 + { 1063 + unsigned bit = 1 << portnum; 1064 + 1065 + if (bus->resuming_ports & bit) { 1066 + bus->resuming_ports &= ~bit; 1067 + pm_runtime_put_noidle(&bus->root_hub->dev); 1068 + } 1069 + } 1070 + EXPORT_SYMBOL_GPL(usb_hcd_end_port_resume); 1029 1071 1030 1072 /*-------------------------------------------------------------------------*/ 1031 1073
+52 -18
drivers/usb/core/hub.c
··· 2838 2838 EXPORT_SYMBOL_GPL(usb_enable_ltm); 2839 2839 2840 2840 #ifdef CONFIG_USB_SUSPEND 2841 + /* 2842 + * usb_disable_function_remotewakeup - disable usb3.0 2843 + * device's function remote wakeup 2844 + * @udev: target device 2845 + * 2846 + * Assume there's only one function on the USB 3.0 2847 + * device and disable remote wake for the first 2848 + * interface. FIXME if the interface association 2849 + * descriptor shows there's more than one function. 2850 + */ 2851 + static int usb_disable_function_remotewakeup(struct usb_device *udev) 2852 + { 2853 + return usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 2854 + USB_REQ_CLEAR_FEATURE, USB_RECIP_INTERFACE, 2855 + USB_INTRF_FUNC_SUSPEND, 0, NULL, 0, 2856 + USB_CTRL_SET_TIMEOUT); 2857 + } 2841 2858 2842 2859 /* 2843 2860 * usb_port_suspend - suspend a usb device's upstream port ··· 2972 2955 dev_dbg(hub->intfdev, "can't suspend port %d, status %d\n", 2973 2956 port1, status); 2974 2957 /* paranoia: "should not happen" */ 2975 - if (udev->do_remote_wakeup) 2976 - (void) usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 2977 - USB_REQ_CLEAR_FEATURE, USB_RECIP_DEVICE, 2978 - USB_DEVICE_REMOTE_WAKEUP, 0, 2979 - NULL, 0, 2980 - USB_CTRL_SET_TIMEOUT); 2958 + if (udev->do_remote_wakeup) { 2959 + if (!hub_is_superspeed(hub->hdev)) { 2960 + (void) usb_control_msg(udev, 2961 + usb_sndctrlpipe(udev, 0), 2962 + USB_REQ_CLEAR_FEATURE, 2963 + USB_RECIP_DEVICE, 2964 + USB_DEVICE_REMOTE_WAKEUP, 0, 2965 + NULL, 0, 2966 + USB_CTRL_SET_TIMEOUT); 2967 + } else 2968 + (void) usb_disable_function_remotewakeup(udev); 2969 + 2970 + } 2981 2971 2982 2972 /* Try to enable USB2 hardware LPM again */ 2983 2973 if (udev->usb2_hw_lpm_capable == 1) ··· 3076 3052 * udev->reset_resume 3077 3053 */ 3078 3054 } else if (udev->actconfig && !udev->reset_resume) { 3079 - le16_to_cpus(&devstatus); 3080 - if (devstatus & (1 << USB_DEVICE_REMOTE_WAKEUP)) { 3081 - status = usb_control_msg(udev, 3082 - usb_sndctrlpipe(udev, 0), 3083 - USB_REQ_CLEAR_FEATURE, 3055 + if (!hub_is_superspeed(udev->parent)) { 3056 + le16_to_cpus(&devstatus); 3057 + if (devstatus & (1 << USB_DEVICE_REMOTE_WAKEUP)) 3058 + status = usb_control_msg(udev, 3059 + usb_sndctrlpipe(udev, 0), 3060 + USB_REQ_CLEAR_FEATURE, 3084 3061 USB_RECIP_DEVICE, 3085 - USB_DEVICE_REMOTE_WAKEUP, 0, 3086 - NULL, 0, 3087 - USB_CTRL_SET_TIMEOUT); 3088 - if (status) 3089 - dev_dbg(&udev->dev, 3090 - "disable remote wakeup, status %d\n", 3091 - status); 3062 + USB_DEVICE_REMOTE_WAKEUP, 0, 3063 + NULL, 0, 3064 + USB_CTRL_SET_TIMEOUT); 3065 + } else { 3066 + status = usb_get_status(udev, USB_RECIP_INTERFACE, 0, 3067 + &devstatus); 3068 + le16_to_cpus(&devstatus); 3069 + if (!status && devstatus & (USB_INTRF_STAT_FUNC_RW_CAP 3070 + | USB_INTRF_STAT_FUNC_RW)) 3071 + status = 3072 + usb_disable_function_remotewakeup(udev); 3092 3073 } 3074 + 3075 + if (status) 3076 + dev_dbg(&udev->dev, 3077 + "disable remote wakeup, status %d\n", 3078 + status); 3093 3079 status = 0; 3094 3080 } 3095 3081 return status;
+1
drivers/usb/host/ehci-hcd.c
··· 797 797 ehci->reset_done[i] = jiffies + msecs_to_jiffies(25); 798 798 set_bit(i, &ehci->resuming_ports); 799 799 ehci_dbg (ehci, "port %d remote wakeup\n", i + 1); 800 + usb_hcd_start_port_resume(&hcd->self, i); 800 801 mod_timer(&hcd->rh_timer, ehci->reset_done[i]); 801 802 } 802 803 }
+8 -1
drivers/usb/host/ehci-hub.c
··· 649 649 status = STS_PCD; 650 650 } 651 651 } 652 - /* FIXME autosuspend idle root hubs */ 652 + 653 + /* If a resume is in progress, make sure it can finish */ 654 + if (ehci->resuming_ports) 655 + mod_timer(&hcd->rh_timer, jiffies + msecs_to_jiffies(25)); 656 + 653 657 spin_unlock_irqrestore (&ehci->lock, flags); 654 658 return status ? retval : 0; 655 659 } ··· 855 851 /* resume signaling for 20 msec */ 856 852 ehci->reset_done[wIndex] = jiffies 857 853 + msecs_to_jiffies(20); 854 + usb_hcd_start_port_resume(&hcd->self, wIndex); 858 855 /* check the port again */ 859 856 mod_timer(&ehci_to_hcd(ehci)->rh_timer, 860 857 ehci->reset_done[wIndex]); ··· 867 862 clear_bit(wIndex, &ehci->suspended_ports); 868 863 set_bit(wIndex, &ehci->port_c_suspend); 869 864 ehci->reset_done[wIndex] = 0; 865 + usb_hcd_end_port_resume(&hcd->self, wIndex); 870 866 871 867 /* stop resume signaling */ 872 868 temp = ehci_readl(ehci, status_reg); ··· 956 950 ehci->reset_done[wIndex] = 0; 957 951 if (temp & PORT_PE) 958 952 set_bit(wIndex, &ehci->port_c_suspend); 953 + usb_hcd_end_port_resume(&hcd->self, wIndex); 959 954 } 960 955 961 956 if (temp & PORT_OC)
+30 -20
drivers/usb/host/ehci-q.c
··· 1197 1197 if (ehci->async_iaa || ehci->async_unlinking) 1198 1198 return; 1199 1199 1200 - /* Do all the waiting QHs at once */ 1201 - ehci->async_iaa = ehci->async_unlink; 1202 - ehci->async_unlink = NULL; 1203 - 1204 1200 /* If the controller isn't running, we don't have to wait for it */ 1205 1201 if (unlikely(ehci->rh_state < EHCI_RH_RUNNING)) { 1202 + 1203 + /* Do all the waiting QHs */ 1204 + ehci->async_iaa = ehci->async_unlink; 1205 + ehci->async_unlink = NULL; 1206 + 1206 1207 if (!nested) /* Avoid recursion */ 1207 1208 end_unlink_async(ehci); 1208 1209 1209 1210 /* Otherwise start a new IAA cycle */ 1210 1211 } else if (likely(ehci->rh_state == EHCI_RH_RUNNING)) { 1212 + struct ehci_qh *qh; 1213 + 1214 + /* Do only the first waiting QH (nVidia bug?) */ 1215 + qh = ehci->async_unlink; 1216 + ehci->async_iaa = qh; 1217 + ehci->async_unlink = qh->unlink_next; 1218 + qh->unlink_next = NULL; 1219 + 1211 1220 /* Make sure the unlinks are all visible to the hardware */ 1212 1221 wmb(); 1213 1222 ··· 1264 1255 } 1265 1256 } 1266 1257 1258 + static void start_unlink_async(struct ehci_hcd *ehci, struct ehci_qh *qh); 1259 + 1267 1260 static void unlink_empty_async(struct ehci_hcd *ehci) 1268 1261 { 1269 - struct ehci_qh *qh, *next; 1270 - bool stopped = (ehci->rh_state < EHCI_RH_RUNNING); 1262 + struct ehci_qh *qh; 1263 + struct ehci_qh *qh_to_unlink = NULL; 1271 1264 bool check_unlinks_later = false; 1265 + int count = 0; 1272 1266 1273 - /* Unlink all the async QHs that have been empty for a timer cycle */ 1274 - next = ehci->async->qh_next.qh; 1275 - while (next) { 1276 - qh = next; 1277 - next = qh->qh_next.qh; 1278 - 1267 + /* Find the last async QH which has been empty for a timer cycle */ 1268 + for (qh = ehci->async->qh_next.qh; qh; qh = qh->qh_next.qh) { 1279 1269 if (list_empty(&qh->qtd_list) && 1280 1270 qh->qh_state == QH_STATE_LINKED) { 1281 - if (!stopped && qh->unlink_cycle == 1282 - ehci->async_unlink_cycle) 1271 + ++count; 1272 + if (qh->unlink_cycle == ehci->async_unlink_cycle) 1283 1273 check_unlinks_later = true; 1284 1274 else 1285 - single_unlink_async(ehci, qh); 1275 + qh_to_unlink = qh; 1286 1276 } 1287 1277 } 1288 1278 1289 - /* Start a new IAA cycle if any QHs are waiting for it */ 1290 - if (ehci->async_unlink) 1291 - start_iaa_cycle(ehci, false); 1279 + /* If nothing else is being unlinked, unlink the last empty QH */ 1280 + if (!ehci->async_iaa && !ehci->async_unlink && qh_to_unlink) { 1281 + start_unlink_async(ehci, qh_to_unlink); 1282 + --count; 1283 + } 1292 1284 1293 - /* QHs that haven't been empty for long enough will be handled later */ 1294 - if (check_unlinks_later) { 1285 + /* Other QHs will be handled later */ 1286 + if (count > 0) { 1295 1287 ehci_enable_event(ehci, EHCI_HRTIMER_ASYNC_UNLINKS, true); 1296 1288 ++ehci->async_unlink_cycle; 1297 1289 }
+6 -3
drivers/usb/host/ehci-sched.c
··· 213 213 } 214 214 215 215 static const unsigned char 216 - max_tt_usecs[] = { 125, 125, 125, 125, 125, 125, 30, 0 }; 216 + max_tt_usecs[] = { 125, 125, 125, 125, 125, 125, 125, 25 }; 217 217 218 218 /* carryover low/fullspeed bandwidth that crosses uframe boundries */ 219 219 static inline void carryover_tt_bandwidth(unsigned short tt_usecs[8]) ··· 2212 2212 } 2213 2213 ehci->now_frame = now_frame; 2214 2214 2215 + frame = ehci->last_iso_frame; 2215 2216 for (;;) { 2216 2217 union ehci_shadow q, *q_p; 2217 2218 __hc32 type, *hw_p; 2218 2219 2219 - frame = ehci->last_iso_frame; 2220 2220 restart: 2221 2221 /* scan each element in frame's queue for completions */ 2222 2222 q_p = &ehci->pshadow [frame]; ··· 2321 2321 /* Stop when we have reached the current frame */ 2322 2322 if (frame == now_frame) 2323 2323 break; 2324 - ehci->last_iso_frame = (frame + 1) & fmask; 2324 + 2325 + /* The last frame may still have active siTDs */ 2326 + ehci->last_iso_frame = frame; 2327 + frame = (frame + 1) & fmask; 2325 2328 } 2326 2329 }
+15 -14
drivers/usb/host/ehci-timer.c
··· 113 113 114 114 if (want != actual) { 115 115 116 - /* Poll again later, but give up after about 20 ms */ 117 - if (ehci->ASS_poll_count++ < 20) { 118 - ehci_enable_event(ehci, EHCI_HRTIMER_POLL_ASS, true); 119 - return; 120 - } 121 - ehci_dbg(ehci, "Waited too long for the async schedule status (%x/%x), giving up\n", 122 - want, actual); 116 + /* Poll again later */ 117 + ehci_enable_event(ehci, EHCI_HRTIMER_POLL_ASS, true); 118 + ++ehci->ASS_poll_count; 119 + return; 123 120 } 121 + 122 + if (ehci->ASS_poll_count > 20) 123 + ehci_dbg(ehci, "ASS poll count reached %d\n", 124 + ehci->ASS_poll_count); 124 125 ehci->ASS_poll_count = 0; 125 126 126 127 /* The status is up-to-date; restart or stop the schedule as needed */ ··· 160 159 161 160 if (want != actual) { 162 161 163 - /* Poll again later, but give up after about 20 ms */ 164 - if (ehci->PSS_poll_count++ < 20) { 165 - ehci_enable_event(ehci, EHCI_HRTIMER_POLL_PSS, true); 166 - return; 167 - } 168 - ehci_dbg(ehci, "Waited too long for the periodic schedule status (%x/%x), giving up\n", 169 - want, actual); 162 + /* Poll again later */ 163 + ehci_enable_event(ehci, EHCI_HRTIMER_POLL_PSS, true); 164 + return; 170 165 } 166 + 167 + if (ehci->PSS_poll_count > 20) 168 + ehci_dbg(ehci, "PSS poll count reached %d\n", 169 + ehci->PSS_poll_count); 171 170 ehci->PSS_poll_count = 0; 172 171 173 172 /* The status is up-to-date; restart or stop the schedule as needed */
+1
drivers/usb/host/pci-quirks.c
··· 780 780 "defaulting to EHCI.\n"); 781 781 dev_warn(&xhci_pdev->dev, 782 782 "USB 3.0 devices will work at USB 2.0 speeds.\n"); 783 + usb_disable_xhci_ports(xhci_pdev); 783 784 return; 784 785 } 785 786
+3
drivers/usb/host/uhci-hub.c
··· 116 116 } 117 117 } 118 118 clear_bit(port, &uhci->resuming_ports); 119 + usb_hcd_end_port_resume(&uhci_to_hcd(uhci)->self, port); 119 120 } 120 121 121 122 /* Wait for the UHCI controller in HP's iLO2 server management chip. ··· 168 167 set_bit(port, &uhci->resuming_ports); 169 168 uhci->ports_timeout = jiffies + 170 169 msecs_to_jiffies(25); 170 + usb_hcd_start_port_resume( 171 + &uhci_to_hcd(uhci)->self, port); 171 172 172 173 /* Make sure we see the port again 173 174 * after the resuming period is over. */
+9 -4
drivers/usb/host/xhci-ring.c
··· 1698 1698 faked_port_index + 1); 1699 1699 if (slot_id && xhci->devs[slot_id]) 1700 1700 xhci_ring_device(xhci, slot_id); 1701 - if (bus_state->port_remote_wakeup && (1 << faked_port_index)) { 1701 + if (bus_state->port_remote_wakeup & (1 << faked_port_index)) { 1702 1702 bus_state->port_remote_wakeup &= 1703 1703 ~(1 << faked_port_index); 1704 1704 xhci_test_and_clear_bit(xhci, port_array, ··· 2589 2589 (trb_comp_code != COMP_STALL && 2590 2590 trb_comp_code != COMP_BABBLE)) 2591 2591 xhci_urb_free_priv(xhci, urb_priv); 2592 + else 2593 + kfree(urb_priv); 2592 2594 2593 2595 usb_hcd_unlink_urb_from_ep(bus_to_hcd(urb->dev->bus), urb); 2594 2596 if ((urb->actual_length != urb->transfer_buffer_length && ··· 3110 3108 * running_total. 3111 3109 */ 3112 3110 packets_transferred = (running_total + trb_buff_len) / 3113 - usb_endpoint_maxp(&urb->ep->desc); 3111 + GET_MAX_PACKET(usb_endpoint_maxp(&urb->ep->desc)); 3114 3112 3115 3113 if ((total_packet_count - packets_transferred) > 31) 3116 3114 return 31 << 17; ··· 3644 3642 td_len = urb->iso_frame_desc[i].length; 3645 3643 td_remain_len = td_len; 3646 3644 total_packet_count = DIV_ROUND_UP(td_len, 3647 - usb_endpoint_maxp(&urb->ep->desc)); 3645 + GET_MAX_PACKET( 3646 + usb_endpoint_maxp(&urb->ep->desc))); 3648 3647 /* A zero-length transfer still involves at least one packet. */ 3649 3648 if (total_packet_count == 0) 3650 3649 total_packet_count++; ··· 3667 3664 td = urb_priv->td[i]; 3668 3665 for (j = 0; j < trbs_per_td; j++) { 3669 3666 u32 remainder = 0; 3670 - field = TRB_TBC(burst_count) | TRB_TLBPC(residue); 3667 + field = 0; 3671 3668 3672 3669 if (first_trb) { 3670 + field = TRB_TBC(burst_count) | 3671 + TRB_TLBPC(residue); 3673 3672 /* Queue the isoc TRB */ 3674 3673 field |= TRB_TYPE(TRB_ISOC); 3675 3674 /* Assume URB_ISO_ASAP is set */
+1
drivers/usb/serial/cp210x.c
··· 60 60 { USB_DEVICE(0x0FCF, 0x1003) }, /* Dynastream ANT development board */ 61 61 { USB_DEVICE(0x0FCF, 0x1004) }, /* Dynastream ANT2USB */ 62 62 { USB_DEVICE(0x0FCF, 0x1006) }, /* Dynastream ANT development board */ 63 + { USB_DEVICE(0x0FDE, 0xCA05) }, /* OWL Wireless Electricity Monitor CM-160 */ 63 64 { USB_DEVICE(0x10A6, 0xAA26) }, /* Knock-off DCU-11 cable */ 64 65 { USB_DEVICE(0x10AB, 0x10C5) }, /* Siemens MC60 Cable */ 65 66 { USB_DEVICE(0x10B5, 0xAC70) }, /* Nokia CA-42 USB */
+2
drivers/usb/serial/ftdi_sio.c
··· 584 584 /* 585 585 * ELV devices: 586 586 */ 587 + { USB_DEVICE(FTDI_ELV_VID, FTDI_ELV_WS300_PID) }, 587 588 { USB_DEVICE(FTDI_VID, FTDI_ELV_USR_PID) }, 588 589 { USB_DEVICE(FTDI_VID, FTDI_ELV_MSM1_PID) }, 589 590 { USB_DEVICE(FTDI_VID, FTDI_ELV_KL100_PID) }, ··· 671 670 { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_5_PID) }, 672 671 { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_6_PID) }, 673 672 { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_7_PID) }, 673 + { USB_DEVICE(FTDI_VID, FTDI_OMNI1509) }, 674 674 { USB_DEVICE(MOBILITY_VID, MOBILITY_USB_SERIAL_PID) }, 675 675 { USB_DEVICE(FTDI_VID, FTDI_ACTIVE_ROBOTS_PID) }, 676 676 { USB_DEVICE(FTDI_VID, FTDI_MHAM_KW_PID) },
+8 -1
drivers/usb/serial/ftdi_sio_ids.h
··· 147 147 #define XSENS_CONVERTER_6_PID 0xD38E 148 148 #define XSENS_CONVERTER_7_PID 0xD38F 149 149 150 + /** 151 + * Zolix (www.zolix.com.cb) product ids 152 + */ 153 + #define FTDI_OMNI1509 0xD491 /* Omni1509 embedded USB-serial */ 154 + 150 155 /* 151 156 * NDI (www.ndigital.com) product ids 152 157 */ ··· 209 204 210 205 /* 211 206 * ELV USB devices submitted by Christian Abt of ELV (www.elv.de). 212 - * All of these devices use FTDI's vendor ID (0x0403). 207 + * Almost all of these devices use FTDI's vendor ID (0x0403). 213 208 * Further IDs taken from ELV Windows .inf file. 214 209 * 215 210 * The previously included PID for the UO 100 module was incorrect. ··· 217 212 * 218 213 * Armin Laeuger originally sent the PID for the UM 100 module. 219 214 */ 215 + #define FTDI_ELV_VID 0x1B1F /* ELV AG */ 216 + #define FTDI_ELV_WS300_PID 0xC006 /* eQ3 WS 300 PC II */ 220 217 #define FTDI_ELV_USR_PID 0xE000 /* ELV Universal-Sound-Recorder */ 221 218 #define FTDI_ELV_MSM1_PID 0xE001 /* ELV Mini-Sound-Modul */ 222 219 #define FTDI_ELV_KL100_PID 0xE002 /* ELV Kfz-Leistungsmesser KL 100 */
+13
drivers/usb/serial/option.c
··· 242 242 #define TELIT_PRODUCT_CC864_DUAL 0x1005 243 243 #define TELIT_PRODUCT_CC864_SINGLE 0x1006 244 244 #define TELIT_PRODUCT_DE910_DUAL 0x1010 245 + #define TELIT_PRODUCT_LE920 0x1200 245 246 246 247 /* ZTE PRODUCTS */ 247 248 #define ZTE_VENDOR_ID 0x19d2 ··· 454 453 #define TPLINK_VENDOR_ID 0x2357 455 454 #define TPLINK_PRODUCT_MA180 0x0201 456 455 456 + /* Changhong products */ 457 + #define CHANGHONG_VENDOR_ID 0x2077 458 + #define CHANGHONG_PRODUCT_CH690 0x7001 459 + 457 460 /* some devices interfaces need special handling due to a number of reasons */ 458 461 enum option_blacklist_reason { 459 462 OPTION_BLACKLIST_NONE = 0, ··· 537 532 538 533 static const struct option_blacklist_info zte_1255_blacklist = { 539 534 .reserved = BIT(3) | BIT(4), 535 + }; 536 + 537 + static const struct option_blacklist_info telit_le920_blacklist = { 538 + .sendsetup = BIT(0), 539 + .reserved = BIT(1) | BIT(5), 540 540 }; 541 541 542 542 static const struct usb_device_id option_ids[] = { ··· 794 784 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_CC864_DUAL) }, 795 785 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_CC864_SINGLE) }, 796 786 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_DE910_DUAL) }, 787 + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920), 788 + .driver_info = (kernel_ulong_t)&telit_le920_blacklist }, 797 789 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622, 0xff, 0xff, 0xff) }, /* ZTE WCDMA products */ 798 790 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0002, 0xff, 0xff, 0xff), 799 791 .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, ··· 1330 1318 { USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T) }, 1331 1319 { USB_DEVICE(TPLINK_VENDOR_ID, TPLINK_PRODUCT_MA180), 1332 1320 .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, 1321 + { USB_DEVICE(CHANGHONG_VENDOR_ID, CHANGHONG_PRODUCT_CH690) }, 1333 1322 { } /* Terminating entry */ 1334 1323 }; 1335 1324 MODULE_DEVICE_TABLE(usb, option_ids);
+1
drivers/usb/serial/qcserial.c
··· 53 53 {DEVICE_G1K(0x05c6, 0x9221)}, /* Generic Gobi QDL device */ 54 54 {DEVICE_G1K(0x05c6, 0x9231)}, /* Generic Gobi QDL device */ 55 55 {DEVICE_G1K(0x1f45, 0x0001)}, /* Unknown Gobi QDL device */ 56 + {DEVICE_G1K(0x1bc7, 0x900e)}, /* Telit Gobi QDL device */ 56 57 57 58 /* Gobi 2000 devices */ 58 59 {USB_DEVICE(0x1410, 0xa010)}, /* Novatel Gobi 2000 QDL device */
+74 -2
drivers/usb/storage/initializers.c
··· 92 92 return 0; 93 93 } 94 94 95 - /* This places the HUAWEI E220 devices in multi-port mode */ 96 - int usb_stor_huawei_e220_init(struct us_data *us) 95 + /* This places the HUAWEI usb dongles in multi-port mode */ 96 + static int usb_stor_huawei_feature_init(struct us_data *us) 97 97 { 98 98 int result; 99 99 ··· 103 103 0x01, 0x0, NULL, 0x0, 1000); 104 104 US_DEBUGP("Huawei mode set result is %d\n", result); 105 105 return 0; 106 + } 107 + 108 + /* 109 + * It will send a scsi switch command called rewind' to huawei dongle. 110 + * When the dongle receives this command at the first time, 111 + * it will reboot immediately. After rebooted, it will ignore this command. 112 + * So it is unnecessary to read its response. 113 + */ 114 + static int usb_stor_huawei_scsi_init(struct us_data *us) 115 + { 116 + int result = 0; 117 + int act_len = 0; 118 + struct bulk_cb_wrap *bcbw = (struct bulk_cb_wrap *) us->iobuf; 119 + char rewind_cmd[] = {0x11, 0x06, 0x20, 0x00, 0x00, 0x01, 0x01, 0x00, 120 + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; 121 + 122 + bcbw->Signature = cpu_to_le32(US_BULK_CB_SIGN); 123 + bcbw->Tag = 0; 124 + bcbw->DataTransferLength = 0; 125 + bcbw->Flags = bcbw->Lun = 0; 126 + bcbw->Length = sizeof(rewind_cmd); 127 + memset(bcbw->CDB, 0, sizeof(bcbw->CDB)); 128 + memcpy(bcbw->CDB, rewind_cmd, sizeof(rewind_cmd)); 129 + 130 + result = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe, bcbw, 131 + US_BULK_CB_WRAP_LEN, &act_len); 132 + US_DEBUGP("transfer actual length=%d, result=%d\n", act_len, result); 133 + return result; 134 + } 135 + 136 + /* 137 + * It tries to find the supported Huawei USB dongles. 138 + * In Huawei, they assign the following product IDs 139 + * for all of their mobile broadband dongles, 140 + * including the new dongles in the future. 141 + * So if the product ID is not included in this list, 142 + * it means it is not Huawei's mobile broadband dongles. 143 + */ 144 + static int usb_stor_huawei_dongles_pid(struct us_data *us) 145 + { 146 + struct usb_interface_descriptor *idesc; 147 + int idProduct; 148 + 149 + idesc = &us->pusb_intf->cur_altsetting->desc; 150 + idProduct = us->pusb_dev->descriptor.idProduct; 151 + /* The first port is CDROM, 152 + * means the dongle in the single port mode, 153 + * and a switch command is required to be sent. */ 154 + if (idesc && idesc->bInterfaceNumber == 0) { 155 + if ((idProduct == 0x1001) 156 + || (idProduct == 0x1003) 157 + || (idProduct == 0x1004) 158 + || (idProduct >= 0x1401 && idProduct <= 0x1500) 159 + || (idProduct >= 0x1505 && idProduct <= 0x1600) 160 + || (idProduct >= 0x1c02 && idProduct <= 0x2202)) { 161 + return 1; 162 + } 163 + } 164 + return 0; 165 + } 166 + 167 + int usb_stor_huawei_init(struct us_data *us) 168 + { 169 + int result = 0; 170 + 171 + if (usb_stor_huawei_dongles_pid(us)) { 172 + if (us->pusb_dev->descriptor.idProduct >= 0x1446) 173 + result = usb_stor_huawei_scsi_init(us); 174 + else 175 + result = usb_stor_huawei_feature_init(us); 176 + } 177 + return result; 106 178 }
+2 -2
drivers/usb/storage/initializers.h
··· 46 46 * flash reader */ 47 47 int usb_stor_ucr61s2b_init(struct us_data *us); 48 48 49 - /* This places the HUAWEI E220 devices in multi-port mode */ 50 - int usb_stor_huawei_e220_init(struct us_data *us); 49 + /* This places the HUAWEI usb dongles in multi-port mode */ 50 + int usb_stor_huawei_init(struct us_data *us);
+2 -327
drivers/usb/storage/unusual_devs.h
··· 1527 1527 /* Reported by fangxiaozhi <huananhu@huawei.com> 1528 1528 * This brings the HUAWEI data card devices into multi-port mode 1529 1529 */ 1530 - UNUSUAL_DEV( 0x12d1, 0x1001, 0x0000, 0x0000, 1530 + UNUSUAL_VENDOR_INTF(0x12d1, 0x08, 0x06, 0x50, 1531 1531 "HUAWEI MOBILE", 1532 1532 "Mass Storage", 1533 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1534 - 0), 1535 - UNUSUAL_DEV( 0x12d1, 0x1003, 0x0000, 0x0000, 1536 - "HUAWEI MOBILE", 1537 - "Mass Storage", 1538 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1539 - 0), 1540 - UNUSUAL_DEV( 0x12d1, 0x1004, 0x0000, 0x0000, 1541 - "HUAWEI MOBILE", 1542 - "Mass Storage", 1543 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1544 - 0), 1545 - UNUSUAL_DEV( 0x12d1, 0x1401, 0x0000, 0x0000, 1546 - "HUAWEI MOBILE", 1547 - "Mass Storage", 1548 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1549 - 0), 1550 - UNUSUAL_DEV( 0x12d1, 0x1402, 0x0000, 0x0000, 1551 - "HUAWEI MOBILE", 1552 - "Mass Storage", 1553 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1554 - 0), 1555 - UNUSUAL_DEV( 0x12d1, 0x1403, 0x0000, 0x0000, 1556 - "HUAWEI MOBILE", 1557 - "Mass Storage", 1558 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1559 - 0), 1560 - UNUSUAL_DEV( 0x12d1, 0x1404, 0x0000, 0x0000, 1561 - "HUAWEI MOBILE", 1562 - "Mass Storage", 1563 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1564 - 0), 1565 - UNUSUAL_DEV( 0x12d1, 0x1405, 0x0000, 0x0000, 1566 - "HUAWEI MOBILE", 1567 - "Mass Storage", 1568 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1569 - 0), 1570 - UNUSUAL_DEV( 0x12d1, 0x1406, 0x0000, 0x0000, 1571 - "HUAWEI MOBILE", 1572 - "Mass Storage", 1573 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1574 - 0), 1575 - UNUSUAL_DEV( 0x12d1, 0x1407, 0x0000, 0x0000, 1576 - "HUAWEI MOBILE", 1577 - "Mass Storage", 1578 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1579 - 0), 1580 - UNUSUAL_DEV( 0x12d1, 0x1408, 0x0000, 0x0000, 1581 - "HUAWEI MOBILE", 1582 - "Mass Storage", 1583 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1584 - 0), 1585 - UNUSUAL_DEV( 0x12d1, 0x1409, 0x0000, 0x0000, 1586 - "HUAWEI MOBILE", 1587 - "Mass Storage", 1588 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1589 - 0), 1590 - UNUSUAL_DEV( 0x12d1, 0x140A, 0x0000, 0x0000, 1591 - "HUAWEI MOBILE", 1592 - "Mass Storage", 1593 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1594 - 0), 1595 - UNUSUAL_DEV( 0x12d1, 0x140B, 0x0000, 0x0000, 1596 - "HUAWEI MOBILE", 1597 - "Mass Storage", 1598 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1599 - 0), 1600 - UNUSUAL_DEV( 0x12d1, 0x140C, 0x0000, 0x0000, 1601 - "HUAWEI MOBILE", 1602 - "Mass Storage", 1603 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1604 - 0), 1605 - UNUSUAL_DEV( 0x12d1, 0x140D, 0x0000, 0x0000, 1606 - "HUAWEI MOBILE", 1607 - "Mass Storage", 1608 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1609 - 0), 1610 - UNUSUAL_DEV( 0x12d1, 0x140E, 0x0000, 0x0000, 1611 - "HUAWEI MOBILE", 1612 - "Mass Storage", 1613 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1614 - 0), 1615 - UNUSUAL_DEV( 0x12d1, 0x140F, 0x0000, 0x0000, 1616 - "HUAWEI MOBILE", 1617 - "Mass Storage", 1618 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1619 - 0), 1620 - UNUSUAL_DEV( 0x12d1, 0x1410, 0x0000, 0x0000, 1621 - "HUAWEI MOBILE", 1622 - "Mass Storage", 1623 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1624 - 0), 1625 - UNUSUAL_DEV( 0x12d1, 0x1411, 0x0000, 0x0000, 1626 - "HUAWEI MOBILE", 1627 - "Mass Storage", 1628 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1629 - 0), 1630 - UNUSUAL_DEV( 0x12d1, 0x1412, 0x0000, 0x0000, 1631 - "HUAWEI MOBILE", 1632 - "Mass Storage", 1633 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1634 - 0), 1635 - UNUSUAL_DEV( 0x12d1, 0x1413, 0x0000, 0x0000, 1636 - "HUAWEI MOBILE", 1637 - "Mass Storage", 1638 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1639 - 0), 1640 - UNUSUAL_DEV( 0x12d1, 0x1414, 0x0000, 0x0000, 1641 - "HUAWEI MOBILE", 1642 - "Mass Storage", 1643 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1644 - 0), 1645 - UNUSUAL_DEV( 0x12d1, 0x1415, 0x0000, 0x0000, 1646 - "HUAWEI MOBILE", 1647 - "Mass Storage", 1648 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1649 - 0), 1650 - UNUSUAL_DEV( 0x12d1, 0x1416, 0x0000, 0x0000, 1651 - "HUAWEI MOBILE", 1652 - "Mass Storage", 1653 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1654 - 0), 1655 - UNUSUAL_DEV( 0x12d1, 0x1417, 0x0000, 0x0000, 1656 - "HUAWEI MOBILE", 1657 - "Mass Storage", 1658 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1659 - 0), 1660 - UNUSUAL_DEV( 0x12d1, 0x1418, 0x0000, 0x0000, 1661 - "HUAWEI MOBILE", 1662 - "Mass Storage", 1663 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1664 - 0), 1665 - UNUSUAL_DEV( 0x12d1, 0x1419, 0x0000, 0x0000, 1666 - "HUAWEI MOBILE", 1667 - "Mass Storage", 1668 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1669 - 0), 1670 - UNUSUAL_DEV( 0x12d1, 0x141A, 0x0000, 0x0000, 1671 - "HUAWEI MOBILE", 1672 - "Mass Storage", 1673 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1674 - 0), 1675 - UNUSUAL_DEV( 0x12d1, 0x141B, 0x0000, 0x0000, 1676 - "HUAWEI MOBILE", 1677 - "Mass Storage", 1678 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1679 - 0), 1680 - UNUSUAL_DEV( 0x12d1, 0x141C, 0x0000, 0x0000, 1681 - "HUAWEI MOBILE", 1682 - "Mass Storage", 1683 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1684 - 0), 1685 - UNUSUAL_DEV( 0x12d1, 0x141D, 0x0000, 0x0000, 1686 - "HUAWEI MOBILE", 1687 - "Mass Storage", 1688 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1689 - 0), 1690 - UNUSUAL_DEV( 0x12d1, 0x141E, 0x0000, 0x0000, 1691 - "HUAWEI MOBILE", 1692 - "Mass Storage", 1693 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1694 - 0), 1695 - UNUSUAL_DEV( 0x12d1, 0x141F, 0x0000, 0x0000, 1696 - "HUAWEI MOBILE", 1697 - "Mass Storage", 1698 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1699 - 0), 1700 - UNUSUAL_DEV( 0x12d1, 0x1420, 0x0000, 0x0000, 1701 - "HUAWEI MOBILE", 1702 - "Mass Storage", 1703 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1704 - 0), 1705 - UNUSUAL_DEV( 0x12d1, 0x1421, 0x0000, 0x0000, 1706 - "HUAWEI MOBILE", 1707 - "Mass Storage", 1708 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1709 - 0), 1710 - UNUSUAL_DEV( 0x12d1, 0x1422, 0x0000, 0x0000, 1711 - "HUAWEI MOBILE", 1712 - "Mass Storage", 1713 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1714 - 0), 1715 - UNUSUAL_DEV( 0x12d1, 0x1423, 0x0000, 0x0000, 1716 - "HUAWEI MOBILE", 1717 - "Mass Storage", 1718 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1719 - 0), 1720 - UNUSUAL_DEV( 0x12d1, 0x1424, 0x0000, 0x0000, 1721 - "HUAWEI MOBILE", 1722 - "Mass Storage", 1723 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1724 - 0), 1725 - UNUSUAL_DEV( 0x12d1, 0x1425, 0x0000, 0x0000, 1726 - "HUAWEI MOBILE", 1727 - "Mass Storage", 1728 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1729 - 0), 1730 - UNUSUAL_DEV( 0x12d1, 0x1426, 0x0000, 0x0000, 1731 - "HUAWEI MOBILE", 1732 - "Mass Storage", 1733 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1734 - 0), 1735 - UNUSUAL_DEV( 0x12d1, 0x1427, 0x0000, 0x0000, 1736 - "HUAWEI MOBILE", 1737 - "Mass Storage", 1738 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1739 - 0), 1740 - UNUSUAL_DEV( 0x12d1, 0x1428, 0x0000, 0x0000, 1741 - "HUAWEI MOBILE", 1742 - "Mass Storage", 1743 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1744 - 0), 1745 - UNUSUAL_DEV( 0x12d1, 0x1429, 0x0000, 0x0000, 1746 - "HUAWEI MOBILE", 1747 - "Mass Storage", 1748 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1749 - 0), 1750 - UNUSUAL_DEV( 0x12d1, 0x142A, 0x0000, 0x0000, 1751 - "HUAWEI MOBILE", 1752 - "Mass Storage", 1753 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1754 - 0), 1755 - UNUSUAL_DEV( 0x12d1, 0x142B, 0x0000, 0x0000, 1756 - "HUAWEI MOBILE", 1757 - "Mass Storage", 1758 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1759 - 0), 1760 - UNUSUAL_DEV( 0x12d1, 0x142C, 0x0000, 0x0000, 1761 - "HUAWEI MOBILE", 1762 - "Mass Storage", 1763 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1764 - 0), 1765 - UNUSUAL_DEV( 0x12d1, 0x142D, 0x0000, 0x0000, 1766 - "HUAWEI MOBILE", 1767 - "Mass Storage", 1768 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1769 - 0), 1770 - UNUSUAL_DEV( 0x12d1, 0x142E, 0x0000, 0x0000, 1771 - "HUAWEI MOBILE", 1772 - "Mass Storage", 1773 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1774 - 0), 1775 - UNUSUAL_DEV( 0x12d1, 0x142F, 0x0000, 0x0000, 1776 - "HUAWEI MOBILE", 1777 - "Mass Storage", 1778 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1779 - 0), 1780 - UNUSUAL_DEV( 0x12d1, 0x1430, 0x0000, 0x0000, 1781 - "HUAWEI MOBILE", 1782 - "Mass Storage", 1783 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1784 - 0), 1785 - UNUSUAL_DEV( 0x12d1, 0x1431, 0x0000, 0x0000, 1786 - "HUAWEI MOBILE", 1787 - "Mass Storage", 1788 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1789 - 0), 1790 - UNUSUAL_DEV( 0x12d1, 0x1432, 0x0000, 0x0000, 1791 - "HUAWEI MOBILE", 1792 - "Mass Storage", 1793 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1794 - 0), 1795 - UNUSUAL_DEV( 0x12d1, 0x1433, 0x0000, 0x0000, 1796 - "HUAWEI MOBILE", 1797 - "Mass Storage", 1798 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1799 - 0), 1800 - UNUSUAL_DEV( 0x12d1, 0x1434, 0x0000, 0x0000, 1801 - "HUAWEI MOBILE", 1802 - "Mass Storage", 1803 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1804 - 0), 1805 - UNUSUAL_DEV( 0x12d1, 0x1435, 0x0000, 0x0000, 1806 - "HUAWEI MOBILE", 1807 - "Mass Storage", 1808 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1809 - 0), 1810 - UNUSUAL_DEV( 0x12d1, 0x1436, 0x0000, 0x0000, 1811 - "HUAWEI MOBILE", 1812 - "Mass Storage", 1813 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1814 - 0), 1815 - UNUSUAL_DEV( 0x12d1, 0x1437, 0x0000, 0x0000, 1816 - "HUAWEI MOBILE", 1817 - "Mass Storage", 1818 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1819 - 0), 1820 - UNUSUAL_DEV( 0x12d1, 0x1438, 0x0000, 0x0000, 1821 - "HUAWEI MOBILE", 1822 - "Mass Storage", 1823 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1824 - 0), 1825 - UNUSUAL_DEV( 0x12d1, 0x1439, 0x0000, 0x0000, 1826 - "HUAWEI MOBILE", 1827 - "Mass Storage", 1828 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1829 - 0), 1830 - UNUSUAL_DEV( 0x12d1, 0x143A, 0x0000, 0x0000, 1831 - "HUAWEI MOBILE", 1832 - "Mass Storage", 1833 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1834 - 0), 1835 - UNUSUAL_DEV( 0x12d1, 0x143B, 0x0000, 0x0000, 1836 - "HUAWEI MOBILE", 1837 - "Mass Storage", 1838 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1839 - 0), 1840 - UNUSUAL_DEV( 0x12d1, 0x143C, 0x0000, 0x0000, 1841 - "HUAWEI MOBILE", 1842 - "Mass Storage", 1843 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1844 - 0), 1845 - UNUSUAL_DEV( 0x12d1, 0x143D, 0x0000, 0x0000, 1846 - "HUAWEI MOBILE", 1847 - "Mass Storage", 1848 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1849 - 0), 1850 - UNUSUAL_DEV( 0x12d1, 0x143E, 0x0000, 0x0000, 1851 - "HUAWEI MOBILE", 1852 - "Mass Storage", 1853 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1854 - 0), 1855 - UNUSUAL_DEV( 0x12d1, 0x143F, 0x0000, 0x0000, 1856 - "HUAWEI MOBILE", 1857 - "Mass Storage", 1858 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1533 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_init, 1859 1534 0), 1860 1535 1861 1536 /* Reported by Vilius Bilinkevicius <vilisas AT xxx DOT lt) */
+12
drivers/usb/storage/usb.c
··· 120 120 .useTransport = use_transport, \ 121 121 } 122 122 123 + #define UNUSUAL_VENDOR_INTF(idVendor, cl, sc, pr, \ 124 + vendor_name, product_name, use_protocol, use_transport, \ 125 + init_function, Flags) \ 126 + { \ 127 + .vendorName = vendor_name, \ 128 + .productName = product_name, \ 129 + .useProtocol = use_protocol, \ 130 + .useTransport = use_transport, \ 131 + .initFunction = init_function, \ 132 + } 133 + 123 134 static struct us_unusual_dev us_unusual_dev_list[] = { 124 135 # include "unusual_devs.h" 125 136 { } /* Terminating entry */ ··· 142 131 #undef UNUSUAL_DEV 143 132 #undef COMPLIANT_DEV 144 133 #undef USUAL_DEV 134 + #undef UNUSUAL_VENDOR_INTF 145 135 146 136 #ifdef CONFIG_LOCKDEP 147 137
+15
drivers/usb/storage/usual-tables.c
··· 41 41 #define USUAL_DEV(useProto, useTrans) \ 42 42 { USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, useProto, useTrans) } 43 43 44 + /* Define the device is matched with Vendor ID and interface descriptors */ 45 + #define UNUSUAL_VENDOR_INTF(id_vendor, cl, sc, pr, \ 46 + vendorName, productName, useProtocol, useTransport, \ 47 + initFunction, flags) \ 48 + { \ 49 + .match_flags = USB_DEVICE_ID_MATCH_INT_INFO \ 50 + | USB_DEVICE_ID_MATCH_VENDOR, \ 51 + .idVendor = (id_vendor), \ 52 + .bInterfaceClass = (cl), \ 53 + .bInterfaceSubClass = (sc), \ 54 + .bInterfaceProtocol = (pr), \ 55 + .driver_info = (flags) \ 56 + } 57 + 44 58 struct usb_device_id usb_storage_usb_ids[] = { 45 59 # include "unusual_devs.h" 46 60 { } /* Terminating entry */ ··· 64 50 #undef UNUSUAL_DEV 65 51 #undef COMPLIANT_DEV 66 52 #undef USUAL_DEV 53 + #undef UNUSUAL_VENDOR_INTF 67 54 68 55 /* 69 56 * The table of devices to ignore
+2
include/linux/usb.h
··· 357 357 int bandwidth_int_reqs; /* number of Interrupt requests */ 358 358 int bandwidth_isoc_reqs; /* number of Isoc. requests */ 359 359 360 + unsigned resuming_ports; /* bit array: resuming root-hub ports */ 361 + 360 362 #if defined(CONFIG_USB_MON) || defined(CONFIG_USB_MON_MODULE) 361 363 struct mon_bus *mon_bus; /* non-null when associated */ 362 364 int monitored; /* non-zero when monitored */
+3
include/linux/usb/hcd.h
··· 430 430 extern void usb_wakeup_notification(struct usb_device *hdev, 431 431 unsigned int portnum); 432 432 433 + extern void usb_hcd_start_port_resume(struct usb_bus *bus, int portnum); 434 + extern void usb_hcd_end_port_resume(struct usb_bus *bus, int portnum); 435 + 433 436 /* The D0/D1 toggle bits ... USE WITH CAUTION (they're almost hcd-internal) */ 434 437 #define usb_gettoggle(dev, ep, out) (((dev)->toggle[out] >> (ep)) & 1) 435 438 #define usb_dotoggle(dev, ep, out) ((dev)->toggle[out] ^= (1 << (ep)))
+6
include/uapi/linux/usb/ch9.h
··· 152 152 #define USB_INTRF_FUNC_SUSPEND_LP (1 << (8 + 0)) 153 153 #define USB_INTRF_FUNC_SUSPEND_RW (1 << (8 + 1)) 154 154 155 + /* 156 + * Interface status, Figure 9-5 USB 3.0 spec 157 + */ 158 + #define USB_INTRF_STAT_FUNC_RW_CAP 1 159 + #define USB_INTRF_STAT_FUNC_RW 2 160 + 155 161 #define USB_ENDPOINT_HALT 0 /* IN/OUT will STALL */ 156 162 157 163 /* Bit array elements as returned by the USB_REQ_GET_STATUS request. */