1. 20 4月, 2012 1 次提交
  2. 18 4月, 2012 1 次提交
  3. 11 4月, 2012 1 次提交
    • J
      USB: serial: fix race between probe and open · a65a6f14
      Johan Hovold 提交于
      Fix race between probe and open by making sure that the disconnected
      flag is not cleared until all ports have been registered.
      
      A call to tty_open while probe is running may get a reference to the
      serial structure in serial_install before its ports have been
      registered. This may lead to usb_serial_core calling driver open before
      port is fully initialised.
      
      With ftdi_sio this result in the following NULL-pointer dereference as
      the private data has not been initialised at open:
      
      [  199.698286] IP: [<f811a089>] ftdi_open+0x59/0xe0 [ftdi_sio]
      [  199.698297] *pde = 00000000
      [  199.698303] Oops: 0000 [#1] PREEMPT SMP
      [  199.698313] Modules linked in: ftdi_sio usbserial
      [  199.698323]
      [  199.698327] Pid: 1146, comm: ftdi_open Not tainted 3.2.11 #70 Dell Inc. Vostro 1520/0T816J
      [  199.698339] EIP: 0060:[<f811a089>] EFLAGS: 00010286 CPU: 0
      [  199.698344] EIP is at ftdi_open+0x59/0xe0 [ftdi_sio]
      [  199.698348] EAX: 0000003e EBX: f5067000 ECX: 00000000 EDX: 80000600
      [  199.698352] ESI: f48d8800 EDI: 00000001 EBP: f515dd54 ESP: f515dcfc
      [  199.698356]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
      [  199.698361] Process ftdi_open (pid: 1146, ti=f515c000 task=f481e040 task.ti=f515c000)
      [  199.698364] Stack:
      [  199.698368]  f811a9fe f811a9e0 f811b3ef 00000000 00000000 00001388 00000000 f4a86800
      [  199.698387]  00000002 00000000 f806e68e 00000000 f532765c f481e040 00000246 22222222
      [  199.698479]  22222222 22222222 22222222 f5067004 f5327600 f5327638 f515dd74 f806e6ab
      [  199.698496] Call Trace:
      [  199.698504]  [<f806e68e>] ? serial_activate+0x2e/0x70 [usbserial]
      [  199.698511]  [<f806e6ab>] serial_activate+0x4b/0x70 [usbserial]
      [  199.698521]  [<c126380c>] tty_port_open+0x7c/0xd0
      [  199.698527]  [<f806e660>] ? serial_set_termios+0xa0/0xa0 [usbserial]
      [  199.698534]  [<f806e76f>] serial_open+0x2f/0x70 [usbserial]
      [  199.698540]  [<c125d07c>] tty_open+0x20c/0x510
      [  199.698546]  [<c10e9eb7>] chrdev_open+0xe7/0x230
      [  199.698553]  [<c10e48f2>] __dentry_open+0x1f2/0x390
      [  199.698559]  [<c144bfec>] ? _raw_spin_unlock+0x2c/0x50
      [  199.698565]  [<c10e4b76>] nameidata_to_filp+0x66/0x80
      [  199.698570]  [<c10e9dd0>] ? cdev_put+0x20/0x20
      [  199.698576]  [<c10f3e08>] do_last+0x198/0x730
      [  199.698581]  [<c10f4440>] path_openat+0xa0/0x350
      [  199.698587]  [<c10f47d5>] do_filp_open+0x35/0x80
      [  199.698593]  [<c144bfec>] ? _raw_spin_unlock+0x2c/0x50
      [  199.698599]  [<c10ff110>] ? alloc_fd+0xc0/0x100
      [  199.698605]  [<c10f0b72>] ? getname_flags+0x72/0x120
      [  199.698611]  [<c10e4450>] do_sys_open+0xf0/0x1c0
      [  199.698617]  [<c11fcc08>] ? trace_hardirqs_on_thunk+0xc/0x10
      [  199.698623]  [<c10e458e>] sys_open+0x2e/0x40
      [  199.698628]  [<c144c990>] sysenter_do_call+0x12/0x36
      [  199.698632] Code: 85 89 00 00 00 8b 16 8b 4d c0 c1 e2 08 c7 44 24 14 88 13 00 00 81 ca 00 00 00 80 c7 44 24 10 00 00 00 00 c7 44 24 0c 00 00 00 00 <0f> b7 41 78 31 c9 89 44 24 08 c7 44 24 04 00 00 00 00 c7 04 24
      [  199.698884] EIP: [<f811a089>] ftdi_open+0x59/0xe0 [ftdi_sio] SS:ESP 0068:f515dcfc
      [  199.698893] CR2: 0000000000000078
      [  199.698925] ---[ end trace 77c43ec023940cff ]---
      Reported-and-tested-by: NKen Huang <csuhgw@gmail.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NJohan Hovold <jhovold@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a65a6f14
  4. 10 4月, 2012 7 次提交
  5. 31 3月, 2012 1 次提交
  6. 26 3月, 2012 1 次提交
  7. 17 3月, 2012 2 次提交
  8. 16 3月, 2012 1 次提交
  9. 15 3月, 2012 2 次提交
    • J
      USB: ftdi_sio: add support for FT-X series devices · dc0827c1
      Jim Paris 提交于
      Add PID 0x6015, corresponding to the new series of FT-X chips
      (FT220XD, FT201X, FT220X, FT221X, FT230X, FT231X, FT240X).  They all
      appear as serial devices, and seem indistinguishable except for the
      default product string stored in their EEPROM.  The baudrate
      generation matches FT232RL devices.
      
      Tested with a FT201X and FT230X at various baudrates (100 - 3000000).
      
      Sample dmesg:
          ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver
          usb 2-1: new full-speed USB device number 6 using ohci_hcd
          usb 2-1: New USB device found, idVendor=0403, idProduct=6015
          usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
          usb 2-1: Product: FT230X USB Half UART
          usb 2-1: Manufacturer: FTDI
          usb 2-1: SerialNumber: DC001WI6
          ftdi_sio 2-1:1.0: FTDI USB Serial Device converter detected
          drivers/usb/serial/ftdi_sio.c: ftdi_sio_port_probe
          drivers/usb/serial/ftdi_sio.c: ftdi_determine_type: bcdDevice = 0x1000, bNumInterfaces = 1
          usb 2-1: Detected FT-X
          usb 2-1: Number of endpoints 2
          usb 2-1: Endpoint 1 MaxPacketSize 64
          usb 2-1: Endpoint 2 MaxPacketSize 64
          usb 2-1: Setting MaxPacketSize 64
          drivers/usb/serial/ftdi_sio.c: read_latency_timer
          drivers/usb/serial/ftdi_sio.c: write_latency_timer: setting latency timer = 1
          drivers/usb/serial/ftdi_sio.c: create_sysfs_attrs
          drivers/usb/serial/ftdi_sio.c: sysfs attributes for FT-X
          usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB0
      Signed-off-by: NJim Paris <jim@jtan.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      dc0827c1
    • D
      USB: serial: mos7840: Fixed MCS7820 device attach problem · 093ea2d3
      Donald Lee 提交于
      A MCS7820 device supports two serial ports and a MCS7840 device supports
      four serial ports. Both devices use the same driver, but the attach function
      in driver was unable to correctly handle the port numbers for MCS7820
      device. This problem has been fixed in this patch and this fix has been
      verified on x86 Linux kernel 3.2.9 with both MCS7820 and MCS7840 devices.
      Signed-off-by: NDonald Lee <donald@asix.com.tw>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      093ea2d3
  10. 10 3月, 2012 1 次提交
  11. 09 3月, 2012 13 次提交
  12. 03 3月, 2012 1 次提交
    • P
      usb: cp210x: Update to support CP2105 and multiple interface devices · a5360a53
      Preston Fick 提交于
      This patch updates the cp210x driver to support CP210x multiple
      interface devices devices from Silicon Labs. The existing driver
      always sends control requests to interface 0, which is hardcoded in
      the usb_control_msg function calls. This only allows for single
      interface devices to be used, and causes a bug when using ports on an
      interface other than 0 in the multiple interface devices.
      
      Here are the changes included in this patch:
      - Updated the device list to contain the Silicon Labs factory default
        VID/PID for multiple interface CP210x devices
      - Created a cp210x_port_private struct created for each port on
        startup, this struct holds the interface number
      - Added a cp210x_release function to clean up the cp210x_port_private
        memory created on startup
      - Modified usb_get_config and usb_set_config to get a pointer to the
        cp210x_port_private struct, and use the interface number there in the
        usb_control_message wIndex param
      Signed-off-by: NPreston Fick <preston.fick@silabs.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a5360a53
  13. 02 3月, 2012 2 次提交
  14. 29 2月, 2012 6 次提交