1. 15 11月, 2011 1 次提交
  2. 18 9月, 2011 1 次提交
    • D
      usb: cdc-acm: Owen SI-30 support · 65e52f41
      Denis Pershin 提交于
      here is the patch to support Owen SI-30 device.
      This is a pulse counter controller.
      http://www.owen.ru/en/catalog/93788515
      
      usb-drivers output:
      T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  4 Spd=12  MxCh= 0
      D:  Ver= 2.00 Cls=02(commc) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
      P:  Vendor=03eb ProdID=0030 Rev=01.01
      C:  #Ifs= 2 Cfg#= 1 Atr=c0 MxPwr=0mA
      I:  If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=02 Prot=00 Driver=cdc_acm
      I:  If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm
      
      This patch is installed on my home system which receives data from this
      controller connected to cold water counter.
      Signed-off-by: NDenis Pershin <dyp@perchine.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      65e52f41
  3. 24 8月, 2011 1 次提交
    • K
      USB: use usb_endpoint_maxp() instead of le16_to_cpu() · 29cc8897
      Kuninori Morimoto 提交于
      Now ${LINUX}/drivers/usb/* can use usb_endpoint_maxp(desc) to get maximum packet size
      instead of le16_to_cpu(desc->wMaxPacketSize).
      This patch fix it up
      
      Cc: Armin Fuerst <fuerst@in.tum.de>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Johannes Erdfelt <johannes@erdfelt.com>
      Cc: Vojtech Pavlik <vojtech@suse.cz>
      Cc: Oliver Neukum <oliver@neukum.name>
      Cc: David Kubicek <dave@awk.cz>
      Cc: Johan Hovold <jhovold@gmail.com>
      Cc: Brad Hards <bhards@bigpond.net.au>
      Acked-by: NFelipe Balbi <balbi@ti.com>
      Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
      Cc: Thomas Dahlmann <dahlmann.thomas@arcor.de>
      Cc: David Brownell <david-b@pacbell.net>
      Cc: David Lopo <dlopo@chipidea.mips.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Michal Nazarewicz <m.nazarewicz@samsung.com>
      Cc: Xie Xiaobo <X.Xie@freescale.com>
      Cc: Li Yang <leoli@freescale.com>
      Cc: Jiang Bo <tanya.jiang@freescale.com>
      Cc: Yuan-hsin Chen <yhchen@faraday-tech.com>
      Cc: Darius Augulis <augulis.darius@gmail.com>
      Cc: Xiaochen Shen <xiaochen.shen@intel.com>
      Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
      Cc: OKI SEMICONDUCTOR, <toshiharu-linux@dsn.okisemi.com>
      Cc: Robert Jarzmik <robert.jarzmik@free.fr>
      Cc: Ben Dooks <ben@simtec.co.uk>
      Cc: Thomas Abraham <thomas.ab@samsung.com>
      Cc: Herbert Pötzl <herbert@13thfloor.at>
      Cc: Arnaud Patard <arnaud.patard@rtp-net.org>
      Cc: Roman Weissgaerber <weissg@vienna.at>
      Acked-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: Tony Olech <tony.olech@elandigitalsystems.com>
      Cc: Florian Floe Echtler <echtler@fs.tum.de>
      Cc: Christian Lucht <lucht@codemercs.com>
      Cc: Juergen Stuber <starblue@sourceforge.net>
      Cc: Georges Toth <g.toth@e-biz.lu>
      Cc: Bill Ryder <bryder@sgi.com>
      Cc: Kuba Ober <kuba@mareimbrium.org>
      Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
      Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      29cc8897
  4. 20 8月, 2011 1 次提交
  5. 07 6月, 2011 1 次提交
  6. 12 5月, 2011 1 次提交
  7. 14 4月, 2011 13 次提交
  8. 24 3月, 2011 3 次提交
    • J
      USB: cdc-acm: fix potential null-pointer dereference on disconnect · 7e7797e7
      Johan Hovold 提交于
      Fix potential null-pointer exception on disconnect introduced by commit
      11ea859d (USB: additional power savings
      for cdc-acm devices that support remote wakeup).
      
      Only access acm->dev after making sure it is non-null in control urb
      completion handler.
      
      Cc: stable <stable@kernel.org>
      Signed-off-by: NJohan Hovold <jhovold@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7e7797e7
    • J
      USB: cdc-acm: fix potential null-pointer dereference · 15e5bee3
      Johan Hovold 提交于
      Must check return value of tty_port_tty_get.
      
      Cc: stable <stable@kernel.org>
      Signed-off-by: NJohan Hovold <jhovold@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      15e5bee3
    • J
      USB: cdc-acm: fix memory corruption / panic · 23b80550
      Johan Hovold 提交于
      Prevent read urbs from being resubmitted from tasklet after port close.
      
      The receive tasklet was not disabled on port close, which could lead to
      corruption of receive lists on consecutive port open. In particular,
      read urbs could be re-submitted before port open, added to free list in
      open, and then added a second time to the free list in the completion
      handler.
      
      cdc-acm.c: Entering acm_tty_open.
      cdc-acm.c: acm_control_msg: rq: 0x22 val: 0x3 len: 0x0 result: 0
      cdc-acm.c: Entering acm_rx_tasklet
      cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da280, rcv 0xf57fbc24, buf 0xf57fbd64
      cdc-acm.c: set line: 115200 0 0 8
      cdc-acm.c: acm_control_msg: rq: 0x20 val: 0x0 len: 0x7 result: 7
      cdc-acm.c: acm_tty_close
      cdc-acm.c: acm_port_down
      cdc-acm.c: acm_control_msg: rq: 0x22 val: 0x0 len: 0x0 result: 0
      cdc-acm.c: acm_ctrl_irq - urb shutting down with status: -2
      cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da300, rcv 0xf57fbc10, buf 0xf57fbd50
      cdc-acm.c: Entering acm_read_bulk with status -2
      cdc_acm 4-1:1.1: Aborting, acm not ready
      cdc-acm.c: Entering acm_read_bulk with status -2
      cdc_acm 4-1:1.1: Aborting, acm not ready
      cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da380, rcv 0xf57fbbfc, buf 0xf57fbd3c
      cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da400, rcv 0xf57fbbe8, buf 0xf57fbd28
      cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da480, rcv 0xf57fbbd4, buf 0xf57fbd14
      cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da900, rcv 0xf57fbbc0, buf 0xf57fbd00
      cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da980, rcv 0xf57fbbac, buf 0xf57fbcec
      cdc-acm.c: acm_rx_tasklet: sending urb 0xf50daa00, rcv 0xf57fbb98, buf 0xf57fbcd8
      cdc-acm.c: acm_rx_tasklet: sending urb 0xf50daa80, rcv 0xf57fbb84, buf 0xf57fbcc4
      cdc-acm.c: acm_rx_tasklet: sending urb 0xf50dab00, rcv 0xf57fbb70, buf 0xf57fbcb0
      cdc-acm.c: acm_rx_tasklet: sending urb 0xf50dab80, rcv 0xf57fbb5c, buf 0xf57fbc9c
      cdc-acm.c: acm_rx_tasklet: sending urb 0xf50dac00, rcv 0xf57fbb48, buf 0xf57fbc88
      cdc-acm.c: acm_rx_tasklet: sending urb 0xf50dac80, rcv 0xf57fbb34, buf 0xf57fbc74
      cdc-acm.c: acm_rx_tasklet: sending urb 0xf50dad00, rcv 0xf57fbb20, buf 0xf57fbc60
      cdc-acm.c: acm_rx_tasklet: sending urb 0xf50dad80, rcv 0xf57fbb0c, buf 0xf57fbc4c
      cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da880, rcv 0xf57fbaf8, buf 0xf57fbc38
      cdc-acm.c: Entering acm_tty_open.
      cdc-acm.c: acm_control_msg: rq: 0x22 val: 0x3 len: 0x0 result: 0
      cdc-acm.c: Entering acm_rx_tasklet
      cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da280, rcv 0xf57fbc24, buf 0xf57fbd64
      cdc-acm.c: Entering acm_tty_write to write 3 bytes,
      cdc-acm.c: Get 3 bytes...
      cdc-acm.c: acm_write_start susp_count: 0
      cdc-acm.c: Entering acm_read_bulk with status 0
      ------------[ cut here ]------------
      WARNING: at /home/johan/src/linux/linux-2.6/lib/list_debug.c:57 list_del+0x10c/0x120()
      Hardware name: Vostro 1520
      list_del corruption. next->prev should be f57fbc10, but was f57fbaf8
      Modules linked in: cdc_acm
      Pid: 3, comm: ksoftirqd/0 Not tainted 2.6.37+ #39
      Call Trace:
       [<c103c7e2>] warn_slowpath_common+0x72/0xa0
       [<c11dd8ac>] ? list_del+0x10c/0x120
       [<c11dd8ac>] ? list_del+0x10c/0x120
       [<c103c8b3>] warn_slowpath_fmt+0x33/0x40
       [<c11dd8ac>] list_del+0x10c/0x120
       [<f8051dbf>] acm_rx_tasklet+0xef/0x3e0 [cdc_acm]
       [<c135465d>] ? net_rps_action_and_irq_enable+0x6d/0x80
       [<c1042bb6>] tasklet_action+0xe6/0x140
       [<c104342f>] __do_softirq+0xaf/0x210
       [<c1043380>] ? __do_softirq+0x0/0x210
       <IRQ>  [<c1042c9a>] ? run_ksoftirqd+0x8a/0x1c0
       [<c1042c10>] ? run_ksoftirqd+0x0/0x1c0
       [<c105ac24>] ? kthread+0x74/0x80
       [<c105abb0>] ? kthread+0x0/0x80
       [<c100337a>] ? kernel_thread_helper+0x6/0x10
      ---[ end trace efd9a11434f0082e ]---
      ------------[ cut here ]------------
      WARNING: at /home/johan/src/linux/linux-2.6/lib/list_debug.c:57 list_del+0x10c/0x120()
      Hardware name: Vostro 1520
      list_del corruption. next->prev should be f57fbd50, but was f57fbdb0
      Modules linked in: cdc_acm
      Pid: 3, comm: ksoftirqd/0 Tainted: G        W   2.6.37+ #39
      Call Trace:
       [<c103c7e2>] warn_slowpath_common+0x72/0xa0
       [<c11dd8ac>] ? list_del+0x10c/0x120
       [<c11dd8ac>] ? list_del+0x10c/0x120
       [<c103c8b3>] warn_slowpath_fmt+0x33/0x40
       [<c11dd8ac>] list_del+0x10c/0x120
       [<f8051dd6>] acm_rx_tasklet+0x106/0x3e0 [cdc_acm]
       [<c135465d>] ? net_rps_action_and_irq_enable+0x6d/0x80
       [<c1042bb6>] tasklet_action+0xe6/0x140
       [<c104342f>] __do_softirq+0xaf/0x210
       [<c1043380>] ? __do_softirq+0x0/0x210
       <IRQ>  [<c1042c9a>] ? run_ksoftirqd+0x8a/0x1c0
       [<c1042c10>] ? run_ksoftirqd+0x0/0x1c0
       [<c105ac24>] ? kthread+0x74/0x80
       [<c105abb0>] ? kthread+0x0/0x80
       [<c100337a>] ? kernel_thread_helper+0x6/0x10
      ---[ end trace efd9a11434f0082f ]---
      cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da300, rcv 0xf57fbc10, buf 0xf57fbd50
      cdc-acm.c: disconnected from network
      cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da380, rcv 0xf57fbbfc, buf 0xf57fbd3c
      cdc-acm.c: Entering acm_rx_tasklet
      ------------[ cut here ]------------
      WARNING: at /home/johan/src/linux/linux-2.6/lib/list_debug.c:48 list_del+0xd5/0x120()
      Hardware name: Vostro 1520
      list_del corruption, next is LIST_POISON1 (00100100)
      Modules linked in: cdc_acm
      Pid: 3, comm: ksoftirqd/0 Tainted: G        W   2.6.37+ #39
      Call Trace:
       [<c103c7e2>] warn_slowpath_common+0x72/0xa0
       [<c11dd875>] ? list_del+0xd5/0x120
       [<c11dd875>] ? list_del+0xd5/0x120
       [<c103c8b3>] warn_slowpath_fmt+0x33/0x40
       [<c11dd875>] list_del+0xd5/0x120
       [<f8051fac>] acm_rx_tasklet+0x2dc/0x3e0 [cdc_acm]
       [<c106dbab>] ? trace_hardirqs_on+0xb/0x10
       [<c1042b30>] ? tasklet_action+0x60/0x140
       [<c1042bb6>] tasklet_action+0xe6/0x140
       [<c104342f>] __do_softirq+0xaf/0x210
       [<c1043380>] ? __do_softirq+0x0/0x210
       <IRQ>  [<c1042c9a>] ? run_ksoftirqd+0x8a/0x1c0
       [<c1042c10>] ? run_ksoftirqd+0x0/0x1c0
       [<c105ac24>] ? kthread+0x74/0x80
       [<c105abb0>] ? kthread+0x0/0x80
       [<c100337a>] ? kernel_thread_helper+0x6/0x10
      ---[ end trace efd9a11434f00830 ]---
      BUG: unable to handle kernel paging request at 00200200
      IP: [<c11dd7bd>] list_del+0x1d/0x120
      *pde = 00000000
      Oops: 0000 [#1] PREEMPT SMP
      last sysfs file: /sys/devices/pci0000:00/0000:00:1a.1/usb4/4-1/4-1:1.0/tty/ttyACM0/uevent
      Modules linked in: cdc_acm
      Pid: 3, comm: ksoftirqd/0 Tainted: G        W   2.6.37+ #39 0T816J/Vostro 1520
      EIP: 0060:[<c11dd7bd>] EFLAGS: 00010046 CPU: 0
      EIP is at list_del+0x1d/0x120
      EAX: f57fbd3c EBX: f57fb800 ECX: ffff8000 EDX: 00200200
      ESI: f57fbe90 EDI: f57fbd3c EBP: f600bf54 ESP: f600bf3c
       DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
      Process ksoftirqd/0 (pid: 3, ti=f600a000 task=f60791c0 task.ti=f6082000)
      Stack:
       c1527e84 00000030 c1527e54 00100100 f57fb800 f57fbd3c f600bf98 f8051fac
       f8053104 f8052b94 f600bf6c c106dbab f600bf80 00000286 f60791c0 c1042b30
       f57fbda8 f57f5800 f57fbdb0 f57fbd80 f57fbe7c c1656b04 00000000 f600bfb0
      Call Trace:
       [<f8051fac>] ? acm_rx_tasklet+0x2dc/0x3e0 [cdc_acm]
       [<c106dbab>] ? trace_hardirqs_on+0xb/0x10
       [<c1042b30>] ? tasklet_action+0x60/0x140
       [<c1042bb6>] ? tasklet_action+0xe6/0x140
       [<c104342f>] ? __do_softirq+0xaf/0x210
       [<c1043380>] ? __do_softirq+0x0/0x210
       <IRQ>
       [<c1042c9a>] ? run_ksoftirqd+0x8a/0x1c0
       [<c1042c10>] ? run_ksoftirqd+0x0/0x1c0
       [<c105ac24>] ? kthread+0x74/0x80
       [<c105abb0>] ? kthread+0x0/0x80
       [<c100337a>] ? kernel_thread_helper+0x6/0x10
      Code: ff 48 14 e9 57 ff ff ff 90 90 90 90 90 90 55 89 e5 83 ec 18 81 38 00 01 10 00 0f 84 9c 00 00 00 8b 50 04 81 fa 00 02 20 00 74 33 <8b> 12 39 d0 75 5c 8b 10 8b 4a 04 39 c8 0f 85 b5 00 00 00 8b 48
      EIP: [<c11dd7bd>] list_del+0x1d/0x120 SS:ESP 0068:f600bf3c
      CR2: 0000000000200200
      ---[ end trace efd9a11434f00831 ]---
      Kernel panic - not syncing: Fatal exception in interrupt
      Pid: 3, comm: ksoftirqd/0 Tainted: G      D W   2.6.37+ #39
      Call Trace:
       [<c13fede1>] ? printk+0x1d/0x24
       [<c13fecce>] panic+0x66/0x15c
       [<c10067df>] oops_end+0x8f/0x90
       [<c1025476>] no_context+0xc6/0x160
       [<c10255a8>] __bad_area_nosemaphore+0x98/0x140
       [<c103cf68>] ? release_console_sem+0x1d8/0x210
       [<c1025667>] bad_area_nosemaphore+0x17/0x20
       [<c1025a49>] do_page_fault+0x279/0x420
       [<c1006a8f>] ? show_trace+0x1f/0x30
       [<c13fede1>] ? printk+0x1d/0x24
       [<c10257d0>] ? do_page_fault+0x0/0x420
       [<c140333b>] error_code+0x5f/0x64
       [<c103007b>] ? select_task_rq_fair+0x37b/0x6a0
       [<c10257d0>] ? do_page_fault+0x0/0x420
       [<c11dd7bd>] ? list_del+0x1d/0x120
       [<f8051fac>] acm_rx_tasklet+0x2dc/0x3e0 [cdc_acm]
       [<c106dbab>] ? trace_hardirqs_on+0xb/0x10
       [<c1042b30>] ? tasklet_action+0x60/0x140
       [<c1042bb6>] tasklet_action+0xe6/0x140
       [<c104342f>] __do_softirq+0xaf/0x210
       [<c1043380>] ? __do_softirq+0x0/0x210
       <IRQ>  [<c1042c9a>] ? run_ksoftirqd+0x8a/0x1c0
       [<c1042c10>] ? run_ksoftirqd+0x0/0x1c0
       [<c105ac24>] ? kthread+0x74/0x80
       [<c105abb0>] ? kthread+0x0/0x80
       [<c100337a>] ? kernel_thread_helper+0x6/0x10
      panic occurred, switching back to text console
      ------------[ cut here ]------------
      
      Cc: stable <stable@kernel.org>
      Signed-off-by: NJohan Hovold <jhovold@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      23b80550
  9. 18 2月, 2011 3 次提交
  10. 05 2月, 2011 1 次提交
  11. 23 10月, 2010 1 次提交
  12. 04 9月, 2010 3 次提交
  13. 11 8月, 2010 1 次提交
  14. 27 7月, 2010 1 次提交
  15. 19 7月, 2010 1 次提交
  16. 05 6月, 2010 1 次提交
    • A
      USB: cdc-acm: fix resource reclaim in error path of acm_probe · c2572b78
      Axel Lin 提交于
      This patch fixes resource reclaim in error path of acm_probe:
      
      1. In the case of "out of memory (read urbs usb_alloc_urb)\n")", there
         is no need to call acm_read_buffers_free(acm) here.  Fix it by goto
         alloc_fail6 instead of alloc_fail7.
      2. In the case of "out of memory (write urbs usb_alloc_urb)",
         usb_alloc_urb may fail in any iteration of the for loop.  Current
         implementation does not properly free allocated snd->urb.  Fix it by
         goto alloc_fail8 instead of alloc_fail7.
      3. In the case of device_create_file(&intf->dev,&dev_attr_iCountryCodeRelDate)
         fail, acm->country_codes is kfreed. As a result, device_remove_file
         for dev_attr_wCountryCodes will not be executed in acm_disconnect.
         Fix it by calling device_remove_file for dev_attr_wCountryCodes
         before goto skip_countries.
      Signed-off-by: NAxel Lin <axel.lin@gmail.com>
      Acked-by: NOliver Neukum <oneukum@suse.de>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c2572b78
  17. 21 5月, 2010 1 次提交
  18. 01 5月, 2010 1 次提交
  19. 19 3月, 2010 1 次提交
  20. 03 3月, 2010 3 次提交