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

* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (23 commits)
USB Elan FTDI: check for workqueue creation
USB: fix spinlock recursion in cdc-acm.c
USB: fix Unaligned access in EHCI driver
USB: Product ID for FT232RL in ftdi_sio
USBNET: DM9501: Add Corega FEther USB-TXC support.
USB: ipaq.c: Additional devices
USB: further fix for usb-serial
USB: fix usb-serial device naming bug
USB: RTS/DTR signal patch for airprime driver
USB: ftdi_sio: use port_probe / port_remove thereby fixing access to the latency_timer
usb-serial: fix shutdown / device_unregister order
USB: add Additional PIDs in ftdi_sio
USB: add QL355P power supply ids to fdti_sio
USB: New device IDs for cp2101 driver
USB: kill dead code from hub.c
USB: ratelimit debounce error messages
USB: pxa2xx_udc: fix hardcoded irq number
UHCI: fix port resume problem
USB: set the correct interval for interrupt URBs
USB: goku_udc: Remove crude cache coherency code
...

+186 -127
+4 -4
drivers/usb/class/cdc-acm.c
··· 332 if (!ACM_READY(acm)) 333 return; 334 335 - spin_lock(&acm->throttle_lock); 336 throttled = acm->throttle; 337 - spin_unlock(&acm->throttle_lock); 338 if (throttled) 339 return; 340 ··· 352 dbg("acm_rx_tasklet: procesing buf 0x%p, size = %d", buf, buf->size); 353 354 tty_buffer_request_room(tty, buf->size); 355 - spin_lock(&acm->throttle_lock); 356 throttled = acm->throttle; 357 - spin_unlock(&acm->throttle_lock); 358 if (!throttled) 359 tty_insert_flip_string(tty, buf->base, buf->size); 360 tty_flip_buffer_push(tty);
··· 332 if (!ACM_READY(acm)) 333 return; 334 335 + spin_lock_irqsave(&acm->throttle_lock, flags); 336 throttled = acm->throttle; 337 + spin_unlock_irqrestore(&acm->throttle_lock, flags); 338 if (throttled) 339 return; 340 ··· 352 dbg("acm_rx_tasklet: procesing buf 0x%p, size = %d", buf, buf->size); 353 354 tty_buffer_request_room(tty, buf->size); 355 + spin_lock_irqsave(&acm->throttle_lock, flags); 356 throttled = acm->throttle; 357 + spin_unlock_irqrestore(&acm->throttle_lock, flags); 358 if (!throttled) 359 tty_insert_flip_string(tty, buf->base, buf->size); 360 tty_flip_buffer_push(tty);
+6 -7
drivers/usb/core/devio.c
··· 912 struct async *as; 913 struct usb_ctrlrequest *dr = NULL; 914 unsigned int u, totlen, isofrmlen; 915 - int ret, interval = 0, ifnum = -1; 916 917 if (uurb->flags & ~(USBDEVFS_URB_ISO_ASAP|USBDEVFS_URB_SHORT_NOT_OK| 918 URB_NO_FSBR|URB_ZERO_PACKET)) ··· 992 if ((ep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) 993 != USB_ENDPOINT_XFER_ISOC) 994 return -EINVAL; 995 - interval = 1 << min (15, ep->desc.bInterval - 1); 996 isofrmlen = sizeof(struct usbdevfs_iso_packet_desc) * uurb->number_of_packets; 997 if (!(isopkt = kmalloc(isofrmlen, GFP_KERNEL))) 998 return -ENOMEM; ··· 1020 if ((ep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) 1021 != USB_ENDPOINT_XFER_INT) 1022 return -EINVAL; 1023 - if (ps->dev->speed == USB_SPEED_HIGH) 1024 - interval = 1 << min (15, ep->desc.bInterval - 1); 1025 - else 1026 - interval = ep->desc.bInterval; 1027 if (uurb->buffer_length > MAX_USBFS_BUFFER_SIZE) 1028 return -EINVAL; 1029 if (!access_ok((uurb->endpoint & USB_DIR_IN) ? VERIFY_WRITE : VERIFY_READ, uurb->buffer, uurb->buffer_length)) ··· 1048 as->urb->setup_packet = (unsigned char*)dr; 1049 as->urb->start_frame = uurb->start_frame; 1050 as->urb->number_of_packets = uurb->number_of_packets; 1051 - as->urb->interval = interval; 1052 as->urb->context = as; 1053 as->urb->complete = async_completed; 1054 for (totlen = u = 0; u < uurb->number_of_packets; u++) {
··· 912 struct async *as; 913 struct usb_ctrlrequest *dr = NULL; 914 unsigned int u, totlen, isofrmlen; 915 + int ret, ifnum = -1; 916 917 if (uurb->flags & ~(USBDEVFS_URB_ISO_ASAP|USBDEVFS_URB_SHORT_NOT_OK| 918 URB_NO_FSBR|URB_ZERO_PACKET)) ··· 992 if ((ep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) 993 != USB_ENDPOINT_XFER_ISOC) 994 return -EINVAL; 995 isofrmlen = sizeof(struct usbdevfs_iso_packet_desc) * uurb->number_of_packets; 996 if (!(isopkt = kmalloc(isofrmlen, GFP_KERNEL))) 997 return -ENOMEM; ··· 1021 if ((ep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) 1022 != USB_ENDPOINT_XFER_INT) 1023 return -EINVAL; 1024 if (uurb->buffer_length > MAX_USBFS_BUFFER_SIZE) 1025 return -EINVAL; 1026 if (!access_ok((uurb->endpoint & USB_DIR_IN) ? VERIFY_WRITE : VERIFY_READ, uurb->buffer, uurb->buffer_length)) ··· 1053 as->urb->setup_packet = (unsigned char*)dr; 1054 as->urb->start_frame = uurb->start_frame; 1055 as->urb->number_of_packets = uurb->number_of_packets; 1056 + if (uurb->type == USBDEVFS_URB_TYPE_ISO || 1057 + ps->dev->speed == USB_SPEED_HIGH) 1058 + as->urb->interval = 1 << min(15, ep->desc.bInterval - 1); 1059 + else 1060 + as->urb->interval = ep->desc.bInterval; 1061 as->urb->context = as; 1062 as->urb->complete = async_completed; 1063 for (totlen = u = 0; u < uurb->number_of_packets; u++) {
+1 -8
drivers/usb/core/hub.c
··· 1281 { 1282 int err; 1283 1284 - /* Lock ourself into memory in order to keep a probe sequence 1285 - * sleeping in a new thread from allowing us to be unloaded. 1286 - */ 1287 - if (!try_module_get(THIS_MODULE)) 1288 - return -EINVAL; 1289 - 1290 /* Determine quirks */ 1291 usb_detect_quirks(udev); 1292 ··· 1384 usb_autoresume_device(udev->parent); 1385 1386 exit: 1387 - module_put(THIS_MODULE); 1388 return err; 1389 1390 fail: ··· 2436 2437 if (portchange & USB_PORT_STAT_C_CONNECTION) { 2438 status = hub_port_debounce(hub, port1); 2439 - if (status < 0) { 2440 dev_err (hub_dev, 2441 "connect-debounce failed, port %d disabled\n", 2442 port1);
··· 1281 { 1282 int err; 1283 1284 /* Determine quirks */ 1285 usb_detect_quirks(udev); 1286 ··· 1390 usb_autoresume_device(udev->parent); 1391 1392 exit: 1393 return err; 1394 1395 fail: ··· 2443 2444 if (portchange & USB_PORT_STAT_C_CONNECTION) { 2445 status = hub_port_debounce(hub, port1); 2446 + if (status < 0 && printk_ratelimit()) { 2447 dev_err (hub_dev, 2448 "connect-debounce failed, port %d disabled\n", 2449 port1);
+7 -2
drivers/usb/core/message.c
··· 221 222 if ((ep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == 223 USB_ENDPOINT_XFER_INT) { 224 pipe = (pipe & ~(3 << 30)) | (PIPE_INTERRUPT << 30); 225 usb_fill_int_urb(urb, usb_dev, pipe, data, len, 226 - usb_api_blocking_completion, NULL, 227 - ep->desc.bInterval); 228 } else 229 usb_fill_bulk_urb(urb, usb_dev, pipe, data, len, 230 usb_api_blocking_completion, NULL);
··· 221 222 if ((ep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == 223 USB_ENDPOINT_XFER_INT) { 224 + int interval; 225 + 226 + if (usb_dev->speed == USB_SPEED_HIGH) 227 + interval = 1 << min(15, ep->desc.bInterval - 1); 228 + else 229 + interval = ep->desc.bInterval; 230 pipe = (pipe & ~(3 << 30)) | (PIPE_INTERRUPT << 30); 231 usb_fill_int_urb(urb, usb_dev, pipe, data, len, 232 + usb_api_blocking_completion, NULL, interval); 233 } else 234 usb_fill_bulk_urb(urb, usb_dev, pipe, data, len, 235 usb_api_blocking_completion, NULL);
+3 -3
drivers/usb/gadget/at91_udc.c
··· 1835 #define at91udc_resume NULL 1836 #endif 1837 1838 - static struct platform_driver at91_udc = { 1839 .remove = __exit_p(at91udc_remove), 1840 .shutdown = at91udc_shutdown, 1841 .suspend = at91udc_suspend, ··· 1848 1849 static int __init udc_init_module(void) 1850 { 1851 - return platform_driver_probe(&at91_udc, at91udc_probe); 1852 } 1853 module_init(udc_init_module); 1854 1855 static void __exit udc_exit_module(void) 1856 { 1857 - platform_driver_unregister(&at91_udc); 1858 } 1859 module_exit(udc_exit_module); 1860
··· 1835 #define at91udc_resume NULL 1836 #endif 1837 1838 + static struct platform_driver at91_udc_driver = { 1839 .remove = __exit_p(at91udc_remove), 1840 .shutdown = at91udc_shutdown, 1841 .suspend = at91udc_suspend, ··· 1848 1849 static int __init udc_init_module(void) 1850 { 1851 + return platform_driver_probe(&at91_udc_driver, at91udc_probe); 1852 } 1853 module_init(udc_init_module); 1854 1855 static void __exit udc_exit_module(void) 1856 { 1857 + platform_driver_unregister(&at91_udc_driver); 1858 } 1859 module_exit(udc_exit_module); 1860
-29
drivers/usb/gadget/goku_udc.c
··· 297 298 /*-------------------------------------------------------------------------*/ 299 300 - #undef USE_KMALLOC 301 - 302 - /* many common platforms have dma-coherent caches, which means that it's 303 - * safe to use kmalloc() memory for all i/o buffers without using any 304 - * cache flushing calls. (unless you're trying to share cache lines 305 - * between dma and non-dma activities, which is a slow idea in any case.) 306 - * 307 - * other platforms need more care, with 2.6 having a moderately general 308 - * solution except for the common "buffer is smaller than a page" case. 309 - */ 310 - #if defined(CONFIG_X86) 311 - #define USE_KMALLOC 312 - 313 - #elif defined(CONFIG_MIPS) && !defined(CONFIG_DMA_NONCOHERENT) 314 - #define USE_KMALLOC 315 - 316 - #elif defined(CONFIG_PPC) && !defined(CONFIG_NOT_COHERENT_CACHE) 317 - #define USE_KMALLOC 318 - 319 - #endif 320 - 321 /* allocating buffers this way eliminates dma mapping overhead, which 322 * on some platforms will mean eliminating a per-io buffer copy. with 323 * some kinds of system caches, further tweaks may still be needed. ··· 313 return NULL; 314 *dma = DMA_ADDR_INVALID; 315 316 - #if defined(USE_KMALLOC) 317 - retval = kmalloc(bytes, gfp_flags); 318 - if (retval) 319 - *dma = virt_to_phys(retval); 320 - #else 321 if (ep->dma) { 322 /* the main problem with this call is that it wastes memory 323 * on typical 1/N page allocations: it allocates 1-N pages. ··· 322 bytes, dma, gfp_flags); 323 } else 324 retval = kmalloc(bytes, gfp_flags); 325 - #endif 326 return retval; 327 } 328 ··· 329 goku_free_buffer(struct usb_ep *_ep, void *buf, dma_addr_t dma, unsigned bytes) 330 { 331 /* free memory into the right allocator */ 332 - #ifndef USE_KMALLOC 333 if (dma != DMA_ADDR_INVALID) { 334 struct goku_ep *ep; 335 ··· 337 return; 338 dma_free_coherent(&ep->dev->pdev->dev, bytes, buf, dma); 339 } else 340 - #endif 341 kfree (buf); 342 } 343
··· 297 298 /*-------------------------------------------------------------------------*/ 299 300 /* allocating buffers this way eliminates dma mapping overhead, which 301 * on some platforms will mean eliminating a per-io buffer copy. with 302 * some kinds of system caches, further tweaks may still be needed. ··· 334 return NULL; 335 *dma = DMA_ADDR_INVALID; 336 337 if (ep->dma) { 338 /* the main problem with this call is that it wastes memory 339 * on typical 1/N page allocations: it allocates 1-N pages. ··· 348 bytes, dma, gfp_flags); 349 } else 350 retval = kmalloc(bytes, gfp_flags); 351 return retval; 352 } 353 ··· 356 goku_free_buffer(struct usb_ep *_ep, void *buf, dma_addr_t dma, unsigned bytes) 357 { 358 /* free memory into the right allocator */ 359 if (dma != DMA_ADDR_INVALID) { 360 struct goku_ep *ep; 361 ··· 365 return; 366 dma_free_coherent(&ep->dev->pdev->dev, bytes, buf, dma); 367 } else 368 kfree (buf); 369 } 370
+1 -1
drivers/usb/gadget/pxa2xx_udc.c
··· 2616 if (retval != 0) { 2617 printk(KERN_ERR "%s: can't get irq %i, err %d\n", 2618 driver_name, vbus_irq, retval); 2619 - free_irq(IRQ_USB, dev); 2620 return -EBUSY; 2621 } 2622 }
··· 2616 if (retval != 0) { 2617 printk(KERN_ERR "%s: can't get irq %i, err %d\n", 2618 driver_name, vbus_irq, retval); 2619 + free_irq(irq, dev); 2620 return -EBUSY; 2621 } 2622 }
+1 -2
drivers/usb/host/ehci-hub.c
··· 653 if (status & ~0xffff) /* only if wPortChange is interesting */ 654 #endif 655 dbg_port (ehci, "GetStatus", wIndex + 1, temp); 656 - // we "know" this alignment is good, caller used kmalloc()... 657 - *((__le32 *) buf) = cpu_to_le32 (status); 658 break; 659 case SetHubFeature: 660 switch (wValue) {
··· 653 if (status & ~0xffff) /* only if wPortChange is interesting */ 654 #endif 655 dbg_port (ehci, "GetStatus", wIndex + 1, temp); 656 + put_unaligned(cpu_to_le32 (status), (__le32 *) buf); 657 break; 658 case SetHubFeature: 659 switch (wValue) {
+7 -4
drivers/usb/host/uhci-hub.c
··· 33 /* status change bits: nonzero writes will clear */ 34 #define RWC_BITS (USBPORTSC_OCC | USBPORTSC_PEC | USBPORTSC_CSC) 35 36 /* A port that either is connected or has a changed-bit set will prevent 37 * us from AUTO_STOPPING. 38 */ ··· 99 int status; 100 int i; 101 102 - if (inw(port_addr) & (USBPORTSC_SUSP | USBPORTSC_RD)) { 103 - CLR_RH_PORTSTAT(USBPORTSC_SUSP | USBPORTSC_RD); 104 if (test_bit(port, &uhci->resuming_ports)) 105 set_bit(port, &uhci->port_c_suspend); 106 ··· 110 * Experiments show that some controllers take longer, so 111 * we'll poll for completion. */ 112 for (i = 0; i < 10; ++i) { 113 - if (!(inw(port_addr) & USBPORTSC_RD)) 114 break; 115 udelay(1); 116 } ··· 292 wPortStatus |= USB_PORT_STAT_CONNECTION; 293 if (status & USBPORTSC_PE) { 294 wPortStatus |= USB_PORT_STAT_ENABLE; 295 - if (status & (USBPORTSC_SUSP | USBPORTSC_RD)) 296 wPortStatus |= USB_PORT_STAT_SUSPEND; 297 } 298 if (status & USBPORTSC_OC)
··· 33 /* status change bits: nonzero writes will clear */ 34 #define RWC_BITS (USBPORTSC_OCC | USBPORTSC_PEC | USBPORTSC_CSC) 35 36 + /* suspend/resume bits: port suspended or port resuming */ 37 + #define SUSPEND_BITS (USBPORTSC_SUSP | USBPORTSC_RD) 38 + 39 /* A port that either is connected or has a changed-bit set will prevent 40 * us from AUTO_STOPPING. 41 */ ··· 96 int status; 97 int i; 98 99 + if (inw(port_addr) & SUSPEND_BITS) { 100 + CLR_RH_PORTSTAT(SUSPEND_BITS); 101 if (test_bit(port, &uhci->resuming_ports)) 102 set_bit(port, &uhci->port_c_suspend); 103 ··· 107 * Experiments show that some controllers take longer, so 108 * we'll poll for completion. */ 109 for (i = 0; i < 10; ++i) { 110 + if (!(inw(port_addr) & SUSPEND_BITS)) 111 break; 112 udelay(1); 113 } ··· 289 wPortStatus |= USB_PORT_STAT_CONNECTION; 290 if (status & USBPORTSC_PE) { 291 wPortStatus |= USB_PORT_STAT_ENABLE; 292 + if (status & SUSPEND_BITS) 293 wPortStatus |= USB_PORT_STAT_SUSPEND; 294 } 295 if (status & USBPORTSC_OC)
+16 -2
drivers/usb/misc/ftdi-elan.c
··· 2905 { 2906 int result; 2907 printk(KERN_INFO "driver %s built at %s on %s\n", ftdi_elan_driver.name, 2908 - __TIME__, __DATE__); 2909 init_MUTEX(&ftdi_module_lock); 2910 INIT_LIST_HEAD(&ftdi_static_list); 2911 status_queue = create_singlethread_workqueue("ftdi-status-control"); 2912 command_queue = create_singlethread_workqueue("ftdi-command-engine"); 2913 respond_queue = create_singlethread_workqueue("ftdi-respond-engine"); 2914 result = usb_register(&ftdi_elan_driver); 2915 if (result) 2916 printk(KERN_ERR "usb_register failed. Error number %d\n", 2917 - result); 2918 return result; 2919 } 2920 2921 static void __exit ftdi_elan_exit(void)
··· 2905 { 2906 int result; 2907 printk(KERN_INFO "driver %s built at %s on %s\n", ftdi_elan_driver.name, 2908 + __TIME__, __DATE__); 2909 init_MUTEX(&ftdi_module_lock); 2910 INIT_LIST_HEAD(&ftdi_static_list); 2911 status_queue = create_singlethread_workqueue("ftdi-status-control"); 2912 + if (!status_queue) 2913 + goto err1; 2914 command_queue = create_singlethread_workqueue("ftdi-command-engine"); 2915 + if (!command_queue) 2916 + goto err2; 2917 respond_queue = create_singlethread_workqueue("ftdi-respond-engine"); 2918 + if (!respond_queue) 2919 + goto err3; 2920 result = usb_register(&ftdi_elan_driver); 2921 if (result) 2922 printk(KERN_ERR "usb_register failed. Error number %d\n", 2923 + result); 2924 return result; 2925 + 2926 + err3: 2927 + destroy_workqueue(command_queue); 2928 + err2: 2929 + destroy_workqueue(status_queue); 2930 + err1: 2931 + printk(KERN_ERR "%s couldn't create workqueue\n", ftdi_elan_driver.name); 2932 + return -ENOMEM; 2933 } 2934 2935 static void __exit ftdi_elan_exit(void)
+4
drivers/usb/net/dm9601.c
··· 571 572 static const struct usb_device_id products[] = { 573 { 574 USB_DEVICE(0x0a46, 0x9601), /* Davicom USB-100 */ 575 .driver_info = (unsigned long)&dm9601_info, 576 },
··· 571 572 static const struct usb_device_id products[] = { 573 { 574 + USB_DEVICE(0x07aa, 0x9601), /* Corega FEther USB-TXC */ 575 + .driver_info = (unsigned long)&dm9601_info, 576 + }, 577 + { 578 USB_DEVICE(0x0a46, 0x9601), /* Davicom USB-100 */ 579 .driver_info = (unsigned long)&dm9601_info, 580 },
+47
drivers/usb/serial/airprime.c
··· 44 int outstanding_urbs; 45 int throttled; 46 struct urb *read_urbp[NUM_READ_URBS]; 47 }; 48 49 static void airprime_read_bulk_callback(struct urb *urb) 50 { ··· 153 usb_set_serial_port_data(port, priv); 154 } 155 156 for (i = 0; i < NUM_READ_URBS; ++i) { 157 buffer = kmalloc(buffer_size, GFP_KERNEL); 158 if (!buffer) { ··· 190 /* remember this urb so we can kill it when the port is closed */ 191 priv->read_urbp[i] = urb; 192 } 193 goto out; 194 195 errout: ··· 217 int i; 218 219 dbg("%s - port %d", __FUNCTION__, port->number); 220 221 for (i = 0; i < NUM_READ_URBS; ++i) { 222 usb_kill_urb (priv->read_urbp[i]);
··· 44 int outstanding_urbs; 45 int throttled; 46 struct urb *read_urbp[NUM_READ_URBS]; 47 + 48 + /* Settings for the port */ 49 + int rts_state; /* Handshaking pins (outputs) */ 50 + int dtr_state; 51 + int cts_state; /* Handshaking pins (inputs) */ 52 + int dsr_state; 53 + int dcd_state; 54 + int ri_state; 55 }; 56 + 57 + static int airprime_send_setup(struct usb_serial_port *port) 58 + { 59 + struct usb_serial *serial = port->serial; 60 + struct airprime_private *priv; 61 + 62 + dbg("%s", __FUNCTION__); 63 + 64 + if (port->number != 0) 65 + return 0; 66 + 67 + priv = usb_get_serial_port_data(port); 68 + 69 + if (port->tty) { 70 + int val = 0; 71 + if (priv->dtr_state) 72 + val |= 0x01; 73 + if (priv->rts_state) 74 + val |= 0x02; 75 + 76 + return usb_control_msg(serial->dev, 77 + usb_rcvctrlpipe(serial->dev, 0), 78 + 0x22,0x21,val,0,NULL,0,USB_CTRL_SET_TIMEOUT); 79 + } 80 + 81 + return 0; 82 + } 83 84 static void airprime_read_bulk_callback(struct urb *urb) 85 { ··· 118 usb_set_serial_port_data(port, priv); 119 } 120 121 + /* Set some sane defaults */ 122 + priv->rts_state = 1; 123 + priv->dtr_state = 1; 124 + 125 for (i = 0; i < NUM_READ_URBS; ++i) { 126 buffer = kmalloc(buffer_size, GFP_KERNEL); 127 if (!buffer) { ··· 151 /* remember this urb so we can kill it when the port is closed */ 152 priv->read_urbp[i] = urb; 153 } 154 + 155 + airprime_send_setup(port); 156 + 157 goto out; 158 159 errout: ··· 175 int i; 176 177 dbg("%s - port %d", __FUNCTION__, port->number); 178 + 179 + priv->rts_state = 0; 180 + priv->dtr_state = 0; 181 + 182 + airprime_send_setup(port); 183 184 for (i = 0; i < NUM_READ_URBS; ++i) { 185 usb_kill_urb (priv->read_urbp[i]);
+2
drivers/usb/serial/cp2101.c
··· 63 { USB_DEVICE(0x10C4, 0x80CA) }, /* Degree Controls Inc */ 64 { USB_DEVICE(0x10C4, 0x80F6) }, /* Suunto sports instrument */ 65 { USB_DEVICE(0x10C4, 0x813D) }, /* Burnside Telecom Deskmobile */ 66 { USB_DEVICE(0x10C4, 0x815E) }, /* Helicomm IP-Link 1220-DVM */ 67 { USB_DEVICE(0x10C4, 0x81C8) }, /* Lipowsky Industrie Elektronik GmbH, Baby-JTAG */ 68 { USB_DEVICE(0x10C4, 0x81E2) }, /* Lipowsky Industrie Elektronik GmbH, Baby-LIN */
··· 63 { USB_DEVICE(0x10C4, 0x80CA) }, /* Degree Controls Inc */ 64 { USB_DEVICE(0x10C4, 0x80F6) }, /* Suunto sports instrument */ 65 { USB_DEVICE(0x10C4, 0x813D) }, /* Burnside Telecom Deskmobile */ 66 + { USB_DEVICE(0x10C4, 0x814A) }, /* West Mountain Radio RIGblaster P&P */ 67 + { USB_DEVICE(0x10C4, 0x814B) }, /* West Mountain Radio RIGtalk */ 68 { USB_DEVICE(0x10C4, 0x815E) }, /* Helicomm IP-Link 1220-DVM */ 69 { USB_DEVICE(0x10C4, 0x81C8) }, /* Lipowsky Industrie Elektronik GmbH, Baby-JTAG */ 70 { USB_DEVICE(0x10C4, 0x81E2) }, /* Lipowsky Industrie Elektronik GmbH, Baby-LIN */
+46 -44
drivers/usb/serial/ftdi_sio.c
··· 315 { USB_DEVICE(FTDI_VID, FTDI_SIO_PID) }, 316 { USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) }, 317 { USB_DEVICE(FTDI_VID, FTDI_8U232AM_ALT_PID) }, 318 { USB_DEVICE(FTDI_VID, FTDI_8U2232C_PID) }, 319 { USB_DEVICE(FTDI_VID, FTDI_MICRO_CHAMELEON_PID) }, 320 { USB_DEVICE(FTDI_VID, FTDI_RELAIS_PID) }, ··· 421 { USB_DEVICE(FTDI_VID, FTDI_ELV_ALC8500_PID) }, 422 { USB_DEVICE(FTDI_VID, FTDI_PYRAMID_PID) }, 423 { USB_DEVICE(FTDI_VID, FTDI_ELV_FHZ1000PC_PID) }, 424 /* 425 * These will probably use user-space drivers. Uncomment them if 426 * you need them or use the user-specified vendor/product module ··· 468 { USB_DEVICE(FALCOM_VID, FALCOM_TWIST_PID) }, 469 { USB_DEVICE(FALCOM_VID, FALCOM_SAMBA_PID) }, 470 { USB_DEVICE(FTDI_VID, FTDI_SUUNTO_SPORTS_PID) }, 471 { USB_DEVICE(FTDI_VID, FTDI_RM_CANVIEW_PID) }, 472 { USB_DEVICE(BANDB_VID, BANDB_USOTL4_PID) }, 473 { USB_DEVICE(BANDB_VID, BANDB_USTL4_PID) }, ··· 543 [FT8U232AM] = "FT8U232AM", 544 [FT232BM] = "FT232BM", 545 [FT2232C] = "FT2232C", 546 }; 547 548 ··· 599 static int ftdi_sio_probe (struct usb_serial *serial, const struct usb_device_id *id); 600 static int ftdi_sio_attach (struct usb_serial *serial); 601 static void ftdi_shutdown (struct usb_serial *serial); 602 static int ftdi_open (struct usb_serial_port *port, struct file *filp); 603 static void ftdi_close (struct usb_serial_port *port, struct file *filp); 604 static int ftdi_write (struct usb_serial_port *port, const unsigned char *buf, int count); ··· 635 .num_bulk_out = 1, 636 .num_ports = 1, 637 .probe = ftdi_sio_probe, 638 .open = ftdi_open, 639 .close = ftdi_close, 640 .throttle = ftdi_throttle, ··· 1039 { 1040 struct usb_serial_port *port = to_usb_serial_port(dev); 1041 struct ftdi_private *priv = usb_get_serial_port_data(port); 1042 - struct usb_device *udev; 1043 unsigned short latency = 0; 1044 int rv = 0; 1045 1046 - udev = to_usb_device(dev); 1047 1048 dbg("%s",__FUNCTION__); 1049 ··· 1066 { 1067 struct usb_serial_port *port = to_usb_serial_port(dev); 1068 struct ftdi_private *priv = usb_get_serial_port_data(port); 1069 - struct usb_device *udev; 1070 char buf[1]; 1071 int v = simple_strtoul(valbuf, NULL, 10); 1072 int rv = 0; 1073 - 1074 - udev = to_usb_device(dev); 1075 1076 dbg("%s: setting latency timer = %i", __FUNCTION__, v); 1077 ··· 1095 { 1096 struct usb_serial_port *port = to_usb_serial_port(dev); 1097 struct ftdi_private *priv = usb_get_serial_port_data(port); 1098 - struct usb_device *udev; 1099 char buf[1]; 1100 int v = simple_strtoul(valbuf, NULL, 10); 1101 int rv = 0; 1102 - 1103 - udev = to_usb_device(dev); 1104 1105 dbg("%s: setting event char = %i", __FUNCTION__, v); 1106 ··· 1120 static DEVICE_ATTR(latency_timer, S_IWUSR | S_IRUGO, show_latency_timer, store_latency_timer); 1121 static DEVICE_ATTR(event_char, S_IWUSR, NULL, store_event_char); 1122 1123 - static int create_sysfs_attrs(struct usb_serial *serial) 1124 { 1125 - struct ftdi_private *priv; 1126 - struct usb_device *udev; 1127 int retval = 0; 1128 1129 dbg("%s",__FUNCTION__); 1130 - 1131 - priv = usb_get_serial_port_data(serial->port[0]); 1132 - udev = serial->dev; 1133 1134 /* XXX I've no idea if the original SIO supports the event_char 1135 * sysfs parameter, so I'm playing it safe. */ 1136 if (priv->chip_type != SIO) { 1137 dbg("sysfs attributes for %s", ftdi_chip_name[priv->chip_type]); 1138 - retval = device_create_file(&udev->dev, &dev_attr_event_char); 1139 if ((!retval) && 1140 (priv->chip_type == FT232BM || priv->chip_type == FT2232C)) { 1141 - retval = device_create_file(&udev->dev, 1142 &dev_attr_latency_timer); 1143 } 1144 } 1145 return retval; 1146 } 1147 1148 - static void remove_sysfs_attrs(struct usb_serial *serial) 1149 { 1150 - struct ftdi_private *priv; 1151 - struct usb_device *udev; 1152 1153 dbg("%s",__FUNCTION__); 1154 1155 - priv = usb_get_serial_port_data(serial->port[0]); 1156 - udev = serial->dev; 1157 - 1158 /* XXX see create_sysfs_attrs */ 1159 if (priv->chip_type != SIO) { 1160 - device_remove_file(&udev->dev, &dev_attr_event_char); 1161 if (priv->chip_type == FT232BM || priv->chip_type == FT2232C) { 1162 - device_remove_file(&udev->dev, &dev_attr_latency_timer); 1163 } 1164 } 1165 ··· 1171 return (0); 1172 } 1173 1174 - /* attach subroutine */ 1175 - static int ftdi_sio_attach (struct usb_serial *serial) 1176 { 1177 - struct usb_serial_port *port = serial->port[0]; 1178 struct ftdi_private *priv; 1179 - struct ftdi_sio_quirk *quirk; 1180 - int retval; 1181 1182 dbg("%s",__FUNCTION__); 1183 ··· 1213 kfree(port->bulk_out_buffer); 1214 port->bulk_out_buffer = NULL; 1215 1216 - usb_set_serial_port_data(serial->port[0], priv); 1217 1218 - ftdi_determine_type (serial->port[0]); 1219 - retval = create_sysfs_attrs(serial); 1220 - if (retval) 1221 - dev_err(&serial->dev->dev, "Error creating sysfs files, " 1222 - "continuing\n"); 1223 1224 /* Check for device requiring special set up. */ 1225 - quirk = (struct ftdi_sio_quirk *)usb_get_serial_data(serial); 1226 - if (quirk && quirk->setup) { 1227 quirk->setup(serial); 1228 - } 1229 1230 return 0; 1231 } /* ftdi_sio_attach */ ··· 1271 * calls __serial_close for each open of the port 1272 * shutdown is called then (ie ftdi_shutdown) 1273 */ 1274 - 1275 - 1276 static void ftdi_shutdown (struct usb_serial *serial) 1277 - { /* ftdi_shutdown */ 1278 1279 - struct usb_serial_port *port = serial->port[0]; 1280 struct ftdi_private *priv = usb_get_serial_port_data(port); 1281 1282 dbg("%s", __FUNCTION__); 1283 1284 - remove_sysfs_attrs(serial); 1285 1286 /* all open ports are closed at this point 1287 * (by usbserial.c:__serial_close, which calls ftdi_close) ··· 1292 usb_set_serial_port_data(port, NULL); 1293 kfree(priv); 1294 } 1295 - } /* ftdi_shutdown */ 1296 1297 1298 static int ftdi_open (struct usb_serial_port *port, struct file *filp) 1299 { /* ftdi_open */
··· 315 { USB_DEVICE(FTDI_VID, FTDI_SIO_PID) }, 316 { USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) }, 317 { USB_DEVICE(FTDI_VID, FTDI_8U232AM_ALT_PID) }, 318 + { USB_DEVICE(FTDI_VID, FTDI_232RL_PID) }, 319 { USB_DEVICE(FTDI_VID, FTDI_8U2232C_PID) }, 320 { USB_DEVICE(FTDI_VID, FTDI_MICRO_CHAMELEON_PID) }, 321 { USB_DEVICE(FTDI_VID, FTDI_RELAIS_PID) }, ··· 420 { USB_DEVICE(FTDI_VID, FTDI_ELV_ALC8500_PID) }, 421 { USB_DEVICE(FTDI_VID, FTDI_PYRAMID_PID) }, 422 { USB_DEVICE(FTDI_VID, FTDI_ELV_FHZ1000PC_PID) }, 423 + { USB_DEVICE(FTDI_VID, FTDI_IBS_US485_PID) }, 424 + { USB_DEVICE(FTDI_VID, FTDI_IBS_PICPRO_PID) }, 425 + { USB_DEVICE(FTDI_VID, FTDI_IBS_PCMCIA_PID) }, 426 + { USB_DEVICE(FTDI_VID, FTDI_IBS_PK1_PID) }, 427 + { USB_DEVICE(FTDI_VID, FTDI_IBS_RS232MON_PID) }, 428 + { USB_DEVICE(FTDI_VID, FTDI_IBS_APP70_PID) }, 429 + { USB_DEVICE(FTDI_VID, FTDI_IBS_PEDO_PID) }, 430 + { USB_DEVICE(FTDI_VID, FTDI_IBS_PROD_PID) }, 431 /* 432 * These will probably use user-space drivers. Uncomment them if 433 * you need them or use the user-specified vendor/product module ··· 459 { USB_DEVICE(FALCOM_VID, FALCOM_TWIST_PID) }, 460 { USB_DEVICE(FALCOM_VID, FALCOM_SAMBA_PID) }, 461 { USB_DEVICE(FTDI_VID, FTDI_SUUNTO_SPORTS_PID) }, 462 + { USB_DEVICE(TTI_VID, TTI_QL355P_PID) }, 463 { USB_DEVICE(FTDI_VID, FTDI_RM_CANVIEW_PID) }, 464 { USB_DEVICE(BANDB_VID, BANDB_USOTL4_PID) }, 465 { USB_DEVICE(BANDB_VID, BANDB_USTL4_PID) }, ··· 533 [FT8U232AM] = "FT8U232AM", 534 [FT232BM] = "FT232BM", 535 [FT2232C] = "FT2232C", 536 + [FT232RL] = "FT232RL", 537 }; 538 539 ··· 588 static int ftdi_sio_probe (struct usb_serial *serial, const struct usb_device_id *id); 589 static int ftdi_sio_attach (struct usb_serial *serial); 590 static void ftdi_shutdown (struct usb_serial *serial); 591 + static int ftdi_sio_port_probe (struct usb_serial_port *port); 592 + static int ftdi_sio_port_remove (struct usb_serial_port *port); 593 static int ftdi_open (struct usb_serial_port *port, struct file *filp); 594 static void ftdi_close (struct usb_serial_port *port, struct file *filp); 595 static int ftdi_write (struct usb_serial_port *port, const unsigned char *buf, int count); ··· 622 .num_bulk_out = 1, 623 .num_ports = 1, 624 .probe = ftdi_sio_probe, 625 + .port_probe = ftdi_sio_port_probe, 626 + .port_remove = ftdi_sio_port_remove, 627 .open = ftdi_open, 628 .close = ftdi_close, 629 .throttle = ftdi_throttle, ··· 1024 { 1025 struct usb_serial_port *port = to_usb_serial_port(dev); 1026 struct ftdi_private *priv = usb_get_serial_port_data(port); 1027 + struct usb_device *udev = port->serial->dev; 1028 unsigned short latency = 0; 1029 int rv = 0; 1030 1031 1032 dbg("%s",__FUNCTION__); 1033 ··· 1052 { 1053 struct usb_serial_port *port = to_usb_serial_port(dev); 1054 struct ftdi_private *priv = usb_get_serial_port_data(port); 1055 + struct usb_device *udev = port->serial->dev; 1056 char buf[1]; 1057 int v = simple_strtoul(valbuf, NULL, 10); 1058 int rv = 0; 1059 1060 dbg("%s: setting latency timer = %i", __FUNCTION__, v); 1061 ··· 1083 { 1084 struct usb_serial_port *port = to_usb_serial_port(dev); 1085 struct ftdi_private *priv = usb_get_serial_port_data(port); 1086 + struct usb_device *udev = port->serial->dev; 1087 char buf[1]; 1088 int v = simple_strtoul(valbuf, NULL, 10); 1089 int rv = 0; 1090 1091 dbg("%s: setting event char = %i", __FUNCTION__, v); 1092 ··· 1110 static DEVICE_ATTR(latency_timer, S_IWUSR | S_IRUGO, show_latency_timer, store_latency_timer); 1111 static DEVICE_ATTR(event_char, S_IWUSR, NULL, store_event_char); 1112 1113 + static int create_sysfs_attrs(struct usb_serial_port *port) 1114 { 1115 + struct ftdi_private *priv = usb_get_serial_port_data(port); 1116 int retval = 0; 1117 1118 dbg("%s",__FUNCTION__); 1119 1120 /* XXX I've no idea if the original SIO supports the event_char 1121 * sysfs parameter, so I'm playing it safe. */ 1122 if (priv->chip_type != SIO) { 1123 dbg("sysfs attributes for %s", ftdi_chip_name[priv->chip_type]); 1124 + retval = device_create_file(&port->dev, &dev_attr_event_char); 1125 if ((!retval) && 1126 (priv->chip_type == FT232BM || priv->chip_type == FT2232C)) { 1127 + retval = device_create_file(&port->dev, 1128 &dev_attr_latency_timer); 1129 } 1130 } 1131 return retval; 1132 } 1133 1134 + static void remove_sysfs_attrs(struct usb_serial_port *port) 1135 { 1136 + struct ftdi_private *priv = usb_get_serial_port_data(port); 1137 1138 dbg("%s",__FUNCTION__); 1139 1140 /* XXX see create_sysfs_attrs */ 1141 if (priv->chip_type != SIO) { 1142 + device_remove_file(&port->dev, &dev_attr_event_char); 1143 if (priv->chip_type == FT232BM || priv->chip_type == FT2232C) { 1144 + device_remove_file(&port->dev, &dev_attr_latency_timer); 1145 } 1146 } 1147 ··· 1169 return (0); 1170 } 1171 1172 + static int ftdi_sio_port_probe(struct usb_serial_port *port) 1173 { 1174 struct ftdi_private *priv; 1175 1176 dbg("%s",__FUNCTION__); 1177 ··· 1215 kfree(port->bulk_out_buffer); 1216 port->bulk_out_buffer = NULL; 1217 1218 + usb_set_serial_port_data(port, priv); 1219 1220 + ftdi_determine_type (port); 1221 + create_sysfs_attrs(port); 1222 + return 0; 1223 + } 1224 1225 + /* attach subroutine */ 1226 + static int ftdi_sio_attach (struct usb_serial *serial) 1227 + { 1228 /* Check for device requiring special set up. */ 1229 + struct ftdi_sio_quirk *quirk = usb_get_serial_data(serial); 1230 + 1231 + if (quirk && quirk->setup) 1232 quirk->setup(serial); 1233 1234 return 0; 1235 } /* ftdi_sio_attach */ ··· 1271 * calls __serial_close for each open of the port 1272 * shutdown is called then (ie ftdi_shutdown) 1273 */ 1274 static void ftdi_shutdown (struct usb_serial *serial) 1275 + { 1276 + dbg("%s", __FUNCTION__); 1277 + } 1278 1279 + static int ftdi_sio_port_remove(struct usb_serial_port *port) 1280 + { 1281 struct ftdi_private *priv = usb_get_serial_port_data(port); 1282 1283 dbg("%s", __FUNCTION__); 1284 1285 + remove_sysfs_attrs(port); 1286 1287 /* all open ports are closed at this point 1288 * (by usbserial.c:__serial_close, which calls ftdi_close) ··· 1291 usb_set_serial_port_data(port, NULL); 1292 kfree(priv); 1293 } 1294 1295 + return 0; 1296 + } 1297 1298 static int ftdi_open (struct usb_serial_port *port, struct file *filp) 1299 { /* ftdi_open */
+21
drivers/usb/serial/ftdi_sio.h
··· 27 #define FTDI_8U232AM_PID 0x6001 /* Similar device to SIO above */ 28 #define FTDI_8U232AM_ALT_PID 0x6006 /* FTDI's alternate PID for above */ 29 #define FTDI_8U2232C_PID 0x6010 /* Dual channel device */ 30 #define FTDI_RELAIS_PID 0xFA10 /* Relais device from Rudolf Gugler */ 31 #define FTDI_NF_RIC_VID 0x0DCD /* Vendor Id */ 32 #define FTDI_NF_RIC_PID 0x0001 /* Product Id */ ··· 340 #define FTDI_SUUNTO_SPORTS_PID 0xF680 /* Suunto Sports instrument */ 341 342 /* 343 * Definitions for B&B Electronics products. 344 */ 345 #define BANDB_VID 0x0856 /* B&B Electronics Vendor ID */ ··· 504 #define TELLDUS_VID 0x1781 /* Vendor ID */ 505 #define TELLDUS_TELLSTICK_PID 0x0C30 /* RF control dongle 433 MHz using FT232RL */ 506 507 /* Commands */ 508 #define FTDI_SIO_RESET 0 /* Reset the port */ 509 #define FTDI_SIO_MODEM_CTRL 1 /* Set the modem control register */ ··· 640 FT8U232AM = 2, 641 FT232BM = 3, 642 FT2232C = 4, 643 } ftdi_chip_type_t; 644 645 typedef enum {
··· 27 #define FTDI_8U232AM_PID 0x6001 /* Similar device to SIO above */ 28 #define FTDI_8U232AM_ALT_PID 0x6006 /* FTDI's alternate PID for above */ 29 #define FTDI_8U2232C_PID 0x6010 /* Dual channel device */ 30 + #define FTDI_232RL_PID 0xFBFA /* Product ID for FT232RL */ 31 #define FTDI_RELAIS_PID 0xFA10 /* Relais device from Rudolf Gugler */ 32 #define FTDI_NF_RIC_VID 0x0DCD /* Vendor Id */ 33 #define FTDI_NF_RIC_PID 0x0001 /* Product Id */ ··· 339 #define FTDI_SUUNTO_SPORTS_PID 0xF680 /* Suunto Sports instrument */ 340 341 /* 342 + * TTi (Thurlby Thandar Instruments) 343 + */ 344 + #define TTI_VID 0x103E /* Vendor Id */ 345 + #define TTI_QL355P_PID 0x03E8 /* TTi QL355P power supply */ 346 + 347 + /* 348 * Definitions for B&B Electronics products. 349 */ 350 #define BANDB_VID 0x0856 /* B&B Electronics Vendor ID */ ··· 497 #define TELLDUS_VID 0x1781 /* Vendor ID */ 498 #define TELLDUS_TELLSTICK_PID 0x0C30 /* RF control dongle 433 MHz using FT232RL */ 499 500 + /* 501 + * IBS elektronik product ids 502 + * Submitted by Thomas Schleusener 503 + */ 504 + #define FTDI_IBS_US485_PID 0xff38 /* IBS US485 (USB<-->RS422/485 interface) */ 505 + #define FTDI_IBS_PICPRO_PID 0xff39 /* IBS PIC-Programmer */ 506 + #define FTDI_IBS_PCMCIA_PID 0xff3a /* IBS Card reader for PCMCIA SRAM-cards */ 507 + #define FTDI_IBS_PK1_PID 0xff3b /* IBS PK1 - Particel counter */ 508 + #define FTDI_IBS_RS232MON_PID 0xff3c /* IBS RS232 - Monitor */ 509 + #define FTDI_IBS_APP70_PID 0xff3d /* APP 70 (dust monitoring system) */ 510 + #define FTDI_IBS_PEDO_PID 0xff3e /* IBS PEDO-Modem (RF modem 868.35 MHz) */ 511 + #define FTDI_IBS_PROD_PID 0xff3f /* future device */ 512 + 513 /* Commands */ 514 #define FTDI_SIO_RESET 0 /* Reset the port */ 515 #define FTDI_SIO_MODEM_CTRL 1 /* Set the modem control register */ ··· 620 FT8U232AM = 2, 621 FT232BM = 3, 622 FT2232C = 4, 623 + FT232RL = 5, 624 } ftdi_chip_type_t; 625 626 typedef enum {
+2
drivers/usb/serial/ipaq.c
··· 247 { USB_DEVICE(0x04AD, 0x0301) }, /* USB Sync 0301 */ 248 { USB_DEVICE(0x04AD, 0x0302) }, /* USB Sync 0302 */ 249 { USB_DEVICE(0x04AD, 0x0303) }, /* USB Sync 0303 */ 250 { USB_DEVICE(0x04C5, 0x1058) }, /* FUJITSU USB Sync */ 251 { USB_DEVICE(0x04C5, 0x1079) }, /* FUJITSU USB Sync */ 252 { USB_DEVICE(0x04DA, 0x2500) }, /* Panasonic USB Sync */
··· 247 { USB_DEVICE(0x04AD, 0x0301) }, /* USB Sync 0301 */ 248 { USB_DEVICE(0x04AD, 0x0302) }, /* USB Sync 0302 */ 249 { USB_DEVICE(0x04AD, 0x0303) }, /* USB Sync 0303 */ 250 + { USB_DEVICE(0x04AD, 0x0306) }, /* GPS Pocket PC USB Sync */ 251 + { USB_DEVICE(0x04B7, 0x0531) }, /* MyGuide 7000 XL USB Sync */ 252 { USB_DEVICE(0x04C5, 0x1058) }, /* FUJITSU USB Sync */ 253 { USB_DEVICE(0x04C5, 0x1079) }, /* FUJITSU USB Sync */ 254 { USB_DEVICE(0x04DA, 0x2500) }, /* Panasonic USB Sync */
+11 -11
drivers/usb/serial/usb-serial.c
··· 99 continue; 100 101 *minor = i; 102 dbg("%s - minor base = %d", __FUNCTION__, *minor); 103 - for (i = *minor; (i < (*minor + num_ports)) && (i < SERIAL_TTY_MINORS); ++i) 104 serial_table[i] = serial; 105 spin_unlock(&table_lock); 106 return serial; 107 } ··· 138 139 dbg("%s - %s", __FUNCTION__, serial->type->description); 140 141 - serial->type->shutdown(serial); 142 - 143 - /* return the minor range that this device had */ 144 - return_serial(serial); 145 - 146 for (i = 0; i < serial->num_ports; ++i) 147 serial->port[i]->open_count = 0; 148 ··· 147 device_unregister(&serial->port[i]->dev); 148 serial->port[i] = NULL; 149 } 150 151 /* If this is a "fake" port, we have to clean it up here, as it will 152 * not get cleaned up in port_release() as it was never registered with ··· 830 num_ports = type->num_ports; 831 } 832 833 - serial->minor = minor; 834 serial->num_ports = num_ports; 835 serial->num_bulk_in = num_bulk_in; 836 serial->num_bulk_out = num_bulk_out; ··· 850 port = kzalloc(sizeof(struct usb_serial_port), GFP_KERNEL); 851 if (!port) 852 goto probe_error; 853 - port->number = i + serial->minor; 854 port->serial = serial; 855 spin_lock_init(&port->lock); 856 mutex_init(&port->mutex); ··· 982 dev_err(&interface->dev, "No more free serial devices\n"); 983 goto probe_error; 984 } 985 986 /* register all of the individual ports with the driver core */ 987 for (i = 0; i < num_ports; ++i) { ··· 1036 usb_free_urb(port->interrupt_out_urb); 1037 kfree(port->interrupt_out_buffer); 1038 } 1039 - 1040 - /* return the minor range that this device had */ 1041 - return_serial (serial); 1042 1043 /* free up any memory that we allocated */ 1044 for (i = 0; i < serial->num_port_pointers; ++i)
··· 99 continue; 100 101 *minor = i; 102 + j = 0; 103 dbg("%s - minor base = %d", __FUNCTION__, *minor); 104 + for (i = *minor; (i < (*minor + num_ports)) && (i < SERIAL_TTY_MINORS); ++i) { 105 serial_table[i] = serial; 106 + serial->port[j++]->number = i; 107 + } 108 spin_unlock(&table_lock); 109 return serial; 110 } ··· 135 136 dbg("%s - %s", __FUNCTION__, serial->type->description); 137 138 for (i = 0; i < serial->num_ports; ++i) 139 serial->port[i]->open_count = 0; 140 ··· 149 device_unregister(&serial->port[i]->dev); 150 serial->port[i] = NULL; 151 } 152 + 153 + if (serial->type->shutdown) 154 + serial->type->shutdown(serial); 155 + 156 + /* return the minor range that this device had */ 157 + return_serial(serial); 158 159 /* If this is a "fake" port, we have to clean it up here, as it will 160 * not get cleaned up in port_release() as it was never registered with ··· 826 num_ports = type->num_ports; 827 } 828 829 serial->num_ports = num_ports; 830 serial->num_bulk_in = num_bulk_in; 831 serial->num_bulk_out = num_bulk_out; ··· 847 port = kzalloc(sizeof(struct usb_serial_port), GFP_KERNEL); 848 if (!port) 849 goto probe_error; 850 port->serial = serial; 851 spin_lock_init(&port->lock); 852 mutex_init(&port->mutex); ··· 980 dev_err(&interface->dev, "No more free serial devices\n"); 981 goto probe_error; 982 } 983 + serial->minor = minor; 984 985 /* register all of the individual ports with the driver core */ 986 for (i = 0; i < num_ports; ++i) { ··· 1033 usb_free_urb(port->interrupt_out_urb); 1034 kfree(port->interrupt_out_buffer); 1035 } 1036 1037 /* free up any memory that we allocated */ 1038 for (i = 0; i < serial->num_port_pointers; ++i)
+7 -10
drivers/usb/storage/unusual_devs.h
··· 146 US_SC_DEVICE, US_PR_DEVICE, NULL, 147 US_FL_IGNORE_RESIDUE ), 148 149 /* Reported by Mario Rettig <mariorettig@web.de> */ 150 UNUSUAL_DEV( 0x0421, 0x042e, 0x0100, 0x0100, 151 "Nokia", ··· 1401 "HD-35PUK-B", 1402 US_SC_DEVICE, US_PR_DEVICE, NULL, 1403 US_FL_IGNORE_RESIDUE ), 1404 - 1405 - /* Reported by Thomas Baechler <thomas@archlinux.org> 1406 - * Fixes I/O errors with Teac HD-35PU devices 1407 - */ 1408 - 1409 - UNUSUAL_DEV( 0x1652, 0x6600, 0x0201, 0x0201, 1410 - "Super Top", 1411 - "USB 2.0 IDE DEVICE", 1412 - US_SC_DEVICE, US_PR_DEVICE, NULL, 1413 - US_FL_IGNORE_RESIDUE), 1414 1415 /* patch submitted by Davide Perini <perini.davide@dpsoftware.org> 1416 * and Renato Perini <rperini@email.it>
··· 146 US_SC_DEVICE, US_PR_DEVICE, NULL, 147 US_FL_IGNORE_RESIDUE ), 148 149 + /* Reported by Andrew Nayenko <relan@bk.ru> */ 150 + UNUSUAL_DEV( 0x0421, 0x0019, 0x0592, 0x0592, 151 + "Nokia", 152 + "Nokia 6288", 153 + US_SC_DEVICE, US_PR_DEVICE, NULL, 154 + US_FL_MAX_SECTORS_64 ), 155 + 156 /* Reported by Mario Rettig <mariorettig@web.de> */ 157 UNUSUAL_DEV( 0x0421, 0x042e, 0x0100, 0x0100, 158 "Nokia", ··· 1394 "HD-35PUK-B", 1395 US_SC_DEVICE, US_PR_DEVICE, NULL, 1396 US_FL_IGNORE_RESIDUE ), 1397 1398 /* patch submitted by Davide Perini <perini.davide@dpsoftware.org> 1399 * and Renato Perini <rperini@email.it>