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

Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
USB: adding comment for ipaq forcing number of ports
USB: fix Oops on loading ipaq module since 2.6.26
USB: add a pl2303 device id
USB: another option device id
USB: don't lose disconnections during suspend
USB: fix interrupt disabling for HCDs with shared interrupt handlers
USB: New device ID for ftdi_sio driver
sisusbvga: Fix oops on disconnect.
USB: mass storage: new id for US_SC_CYP_ATACB
USB: ohci - record data toggle after unlink
USB: ehci - fix timer regression
USB: fix cdc-acm resume()
OHCI: Fix problem if SM501 and another platform driver is selected

+89 -37
-3
drivers/usb/class/cdc-acm.c
··· 1125 1125 for (i = 0; i < acm->rx_buflimit; i++) 1126 1126 usb_kill_urb(acm->ru[i].urb); 1127 1127 1128 - INIT_LIST_HEAD(&acm->filled_read_bufs); 1129 - INIT_LIST_HEAD(&acm->spare_read_bufs); 1130 - 1131 1128 tasklet_enable(&acm->urb_task); 1132 1129 1133 1130 cancel_work_sync(&acm->work);
+28 -10
drivers/usb/core/hcd.c
··· 1684 1684 irqreturn_t usb_hcd_irq (int irq, void *__hcd) 1685 1685 { 1686 1686 struct usb_hcd *hcd = __hcd; 1687 - int start = hcd->state; 1687 + unsigned long flags; 1688 + irqreturn_t rc; 1688 1689 1689 - if (unlikely(start == HC_STATE_HALT || 1690 - !test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags))) 1691 - return IRQ_NONE; 1692 - if (hcd->driver->irq (hcd) == IRQ_NONE) 1693 - return IRQ_NONE; 1690 + /* IRQF_DISABLED doesn't work correctly with shared IRQs 1691 + * when the first handler doesn't use it. So let's just 1692 + * assume it's never used. 1693 + */ 1694 + local_irq_save(flags); 1694 1695 1695 - set_bit(HCD_FLAG_SAW_IRQ, &hcd->flags); 1696 + if (unlikely(hcd->state == HC_STATE_HALT || 1697 + !test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags))) { 1698 + rc = IRQ_NONE; 1699 + } else if (hcd->driver->irq(hcd) == IRQ_NONE) { 1700 + rc = IRQ_NONE; 1701 + } else { 1702 + set_bit(HCD_FLAG_SAW_IRQ, &hcd->flags); 1696 1703 1697 - if (unlikely(hcd->state == HC_STATE_HALT)) 1698 - usb_hc_died (hcd); 1699 - return IRQ_HANDLED; 1704 + if (unlikely(hcd->state == HC_STATE_HALT)) 1705 + usb_hc_died(hcd); 1706 + rc = IRQ_HANDLED; 1707 + } 1708 + 1709 + local_irq_restore(flags); 1710 + return rc; 1700 1711 } 1701 1712 1702 1713 /*-------------------------------------------------------------------------*/ ··· 1871 1860 1872 1861 /* enable irqs just before we start the controller */ 1873 1862 if (hcd->driver->irq) { 1863 + 1864 + /* IRQF_DISABLED doesn't work as advertised when used together 1865 + * with IRQF_SHARED. As usb_hcd_irq() will always disable 1866 + * interrupts we can remove it here. 1867 + */ 1868 + irqflags &= ~IRQF_DISABLED; 1869 + 1874 1870 snprintf(hcd->irq_descr, sizeof(hcd->irq_descr), "%s:usb%d", 1875 1871 hcd->driver->description, hcd->self.busnum); 1876 1872 if ((retval = request_irq(irqnum, &usb_hcd_irq, irqflags,
+4 -11
drivers/usb/core/hub.c
··· 713 713 } 714 714 715 715 /* Was the power session lost while we were suspended? */ 716 - switch (type) { 717 - case HUB_RESET_RESUME: 718 - portstatus = 0; 719 - portchange = USB_PORT_STAT_C_CONNECTION; 720 - break; 716 + status = hub_port_status(hub, port1, &portstatus, &portchange); 721 717 722 - case HUB_RESET: 723 - case HUB_RESUME: 724 - status = hub_port_status(hub, port1, 725 - &portstatus, &portchange); 726 - break; 727 - } 718 + /* If the device is gone, khubd will handle it later */ 719 + if (status == 0 && !(portstatus & USB_PORT_STAT_CONNECTION)) 720 + continue; 728 721 729 722 /* For "USB_PERSIST"-enabled children we must 730 723 * mark the child device for reset-resume and
+10 -9
drivers/usb/host/ehci.h
··· 177 177 static inline void 178 178 timer_action (struct ehci_hcd *ehci, enum ehci_timer_action action) 179 179 { 180 + /* Don't override timeouts which shrink or (later) disable 181 + * the async ring; just the I/O watchdog. Note that if a 182 + * SHRINK were pending, OFF would never be requested. 183 + */ 184 + if (timer_pending(&ehci->watchdog) 185 + && ((BIT(TIMER_ASYNC_SHRINK) | BIT(TIMER_ASYNC_OFF)) 186 + & ehci->actions)) 187 + return; 188 + 180 189 if (!test_and_set_bit (action, &ehci->actions)) { 181 190 unsigned long t; 182 191 ··· 201 192 t = EHCI_SHRINK_JIFFIES; 202 193 break; 203 194 } 204 - t += jiffies; 205 - // all timings except IAA watchdog can be overridden. 206 - // async queue SHRINK often precedes IAA. while it's ready 207 - // to go OFF neither can matter, and afterwards the IO 208 - // watchdog stops unless there's still periodic traffic. 209 - if (time_before_eq(t, ehci->watchdog.expires) 210 - && timer_pending (&ehci->watchdog)) 211 - return; 212 - mod_timer (&ehci->watchdog, t); 195 + mod_timer(&ehci->watchdog, t + jiffies); 213 196 } 214 197 } 215 198
+14 -1
drivers/usb/host/ohci-hcd.c
··· 1054 1054 1055 1055 #ifdef CONFIG_MFD_SM501 1056 1056 #include "ohci-sm501.c" 1057 - #define PLATFORM_DRIVER ohci_hcd_sm501_driver 1057 + #define SM501_OHCI_DRIVER ohci_hcd_sm501_driver 1058 1058 #endif 1059 1059 1060 1060 #if !defined(PCI_DRIVER) && \ ··· 1062 1062 !defined(OF_PLATFORM_DRIVER) && \ 1063 1063 !defined(SA1111_DRIVER) && \ 1064 1064 !defined(PS3_SYSTEM_BUS_DRIVER) && \ 1065 + !defined(SM501_OHCI_DRIVER) && \ 1065 1066 !defined(SSB_OHCI_DRIVER) 1066 1067 #error "missing bus glue for ohci-hcd" 1067 1068 #endif ··· 1122 1121 goto error_ssb; 1123 1122 #endif 1124 1123 1124 + #ifdef SM501_OHCI_DRIVER 1125 + retval = platform_driver_register(&SM501_OHCI_DRIVER); 1126 + if (retval < 0) 1127 + goto error_sm501; 1128 + #endif 1129 + 1125 1130 return retval; 1126 1131 1127 1132 /* Error path */ 1133 + #ifdef SM501_OHCI_DRIVER 1134 + error_sm501: 1135 + #endif 1128 1136 #ifdef SSB_OHCI_DRIVER 1129 1137 error_ssb: 1130 1138 #endif ··· 1169 1159 1170 1160 static void __exit ohci_hcd_mod_exit(void) 1171 1161 { 1162 + #ifdef SM501_OHCI_DRIVER 1163 + platform_driver_unregister(&SM501_OHCI_DRIVER); 1164 + #endif 1172 1165 #ifdef SSB_OHCI_DRIVER 1173 1166 ssb_driver_unregister(&SSB_OHCI_DRIVER); 1174 1167 #endif
+12
drivers/usb/host/ohci-q.c
··· 952 952 struct urb *urb; 953 953 urb_priv_t *urb_priv; 954 954 __hc32 savebits; 955 + u32 tdINFO; 955 956 956 957 td = list_entry (entry, struct td, td_list); 957 958 urb = td->urb; ··· 966 965 /* patch pointer hc uses */ 967 966 savebits = *prev & ~cpu_to_hc32 (ohci, TD_MASK); 968 967 *prev = td->hwNextTD | savebits; 968 + 969 + /* If this was unlinked, the TD may not have been 970 + * retired ... so manually save the data toggle. 971 + * The controller ignores the value we save for 972 + * control and ISO endpoints. 973 + */ 974 + tdINFO = hc32_to_cpup(ohci, &td->hwINFO); 975 + if ((tdINFO & TD_T) == TD_T_DATA0) 976 + ed->hwHeadP &= ~cpu_to_hc32(ohci, ED_C); 977 + else if ((tdINFO & TD_T) == TD_T_DATA1) 978 + ed->hwHeadP |= cpu_to_hc32(ohci, ED_C); 969 979 970 980 /* HC may have partly processed this TD */ 971 981 td_done (ohci, urb, td);
-2
drivers/usb/misc/sisusbvga/sisusb.c
··· 3264 3264 3265 3265 /* decrement our usage count */ 3266 3266 kref_put(&sisusb->kref, sisusb_delete); 3267 - 3268 - dev_info(&sisusb->sisusb_dev->dev, "Disconnected\n"); 3269 3267 } 3270 3268 3271 3269 static struct usb_device_id sisusb_table [] = {
+1
drivers/usb/serial/ftdi_sio.c
··· 637 637 { USB_DEVICE(FTDI_VID, FTDI_OOCDLINK_PID), 638 638 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, 639 639 { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID_USB60F) }, 640 + { USB_DEVICE(FTDI_VID, FTDI_REU_TINY_PID) }, 640 641 { }, /* Optional parameter entry */ 641 642 { } /* Terminating entry */ 642 643 };
+3
drivers/usb/serial/ftdi_sio.h
··· 828 828 /* Propox devices */ 829 829 #define FTDI_PROPOX_JTAGCABLEII_PID 0xD738 830 830 831 + /* Rig Expert Ukraine devices */ 832 + #define FTDI_REU_TINY_PID 0xED22 /* RigExpert Tiny */ 833 + 831 834 /* Commands */ 832 835 #define FTDI_SIO_RESET 0 /* Reset the port */ 833 836 #define FTDI_SIO_MODEM_CTRL 1 /* Set the modem control register */
+6 -1
drivers/usb/serial/ipaq.c
··· 570 570 .description = "PocketPC PDA", 571 571 .usb_driver = &ipaq_driver, 572 572 .id_table = ipaq_id_table, 573 - .num_ports = 2, 573 + /* 574 + * some devices have an extra endpoint, which 575 + * must be ignored as it would make the core 576 + * create a second port which oopses when used 577 + */ 578 + .num_ports = 1, 574 579 .open = ipaq_open, 575 580 .close = ipaq_close, 576 581 .attach = ipaq_startup,
+1
drivers/usb/serial/option.c
··· 306 306 { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) }, 307 307 { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) }, 308 308 { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) }, 309 + { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6000)}, /* ZTE AC8700 */ 309 310 { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ 310 311 { USB_DEVICE(MAXON_VENDOR_ID, 0x6280) }, /* BP3-USB & BP3-EXT HSDPA */ 311 312 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) },
+1
drivers/usb/serial/pl2303.c
··· 57 57 { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_PHAROS) }, 58 58 { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_ALDIGA) }, 59 59 { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_MMX) }, 60 + { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_GPRS) }, 60 61 { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) }, 61 62 { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) }, 62 63 { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) },
+1
drivers/usb/serial/pl2303.h
··· 15 15 #define PL2303_PRODUCT_ID_RSAQ3 0xaaa2 16 16 #define PL2303_PRODUCT_ID_ALDIGA 0x0611 17 17 #define PL2303_PRODUCT_ID_MMX 0x0612 18 + #define PL2303_PRODUCT_ID_GPRS 0x0609 18 19 19 20 #define ATEN_VENDOR_ID 0x0557 20 21 #define ATEN_VENDOR_ID2 0x0547
+8
drivers/usb/storage/unusual_devs.h
··· 402 402 US_FL_IGNORE_RESIDUE ), 403 403 404 404 #ifdef CONFIG_USB_STORAGE_CYPRESS_ATACB 405 + /* CY7C68300 : support atacb */ 405 406 UNUSUAL_DEV( 0x04b4, 0x6830, 0x0000, 0x9999, 406 407 "Cypress", 407 408 "Cypress AT2LP", 409 + US_SC_CYP_ATACB, US_PR_DEVICE, NULL, 410 + 0), 411 + 412 + /* CY7C68310 : support atacb and atacb2 */ 413 + UNUSUAL_DEV( 0x04b4, 0x6831, 0x0000, 0x9999, 414 + "Cypress", 415 + "Cypress ISD-300LP", 408 416 US_SC_CYP_ATACB, US_PR_DEVICE, NULL, 409 417 0), 410 418 #endif