1. 11 6月, 2009 4 次提交
  2. 29 5月, 2009 1 次提交
    • A
      usb-serial: fix crash when sub-driver updates firmware · 0a3c8549
      Alan Stern 提交于
      This patch (as1244) fixes a crash in usb-serial that occurs when a
      sub-driver returns a positive value from its attach method, indicating
      that new firmware was loaded and the device will disconnect and
      reconnect.  The usb-serial core then skips the step of registering the
      port devices; when the disconnect occurs, the attempt to unregister
      the ports fails dramatically.
      
      This problem shows up with Keyspan devices and it might affect others
      as well.
      
      When the attach method returns a positive value, the patch sets
      num_ports to 0.  This tells usb_serial_disconnect() not to try
      unregistering any of the ports; instead they are cleaned up by
      destroy_serial().
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Tested-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      0a3c8549
  3. 18 5月, 2009 1 次提交
    • D
      Fix oops on close of hot-unplugged FTDI serial converter · 80193195
      David Woodhouse 提交于
      Commit c45d6320 ("fix reference counting of ftdi_private") stopped
      ftdi_sio_port_remove() from directly freeing the port-private data, with
      the intention if the port was still open, it would be freed when
      ftdi_close() is eventually called and releases the last refcount on the
      structure.
      
      That's all very well, but ftdi_sio_port_remove() still contains a call
      to usb_set_serial_port_data(port, NULL) -- so by the time we get to
      ftdi_close() for the port which was unplugged, it _still_ oopses on
      dereferencing that NULL pointer, as it did before (and does in 2.6.29).
      
      The fix is just not to clear the private data in ftdi_sio_port_remove().
      Then the refcount is properly reduced to zero when the final kref_put()
      happens in ftdi_close().
      
      Remove a bogus comment too, while we're at it. And stop doing things
      inside "if (priv)" -- it must _always_ be there.
      
      Based loosely on an earlier patch by Daniel Mack, and suggestions by
      Alan Stern.
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      Tested-by: NDaniel Mack <daniel@caiaq.de>
      Cc: stable@kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      80193195
  4. 09 5月, 2009 2 次提交
  5. 24 4月, 2009 5 次提交
  6. 18 4月, 2009 6 次提交
  7. 14 4月, 2009 1 次提交
  8. 07 4月, 2009 2 次提交
  9. 01 4月, 2009 1 次提交
  10. 30 3月, 2009 2 次提交
  11. 25 3月, 2009 15 次提交
    • A
      fd8345f8
    • V
      USB: Fix cp2101 USB serial device driver termios functions for console use · d2ad67b3
      VomLehn 提交于
      This is really a follow up to the modifications Alan Cox made for commit
      95da310e to pass a tty_struct to various
      interface functions, which broke the serial configuration (termios) functions
      when the device is being used as a console. These changes restore the
      configuration to proper functioning both as a tty and as a console.  As Alan
      notes in that commit, these changes will need to be tweaked when we have
      a proper console abstraction.
      Signed-off-by: NDavid VomLehn <dvomlehn@cisco.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d2ad67b3
    • A
      USB: CP2101 New Device ID · d23bac9f
      Alex Stephens 提交于
      One new device ID for CP2101 driver.
      
      Signed-off-by: Alex Stephens alex@miranova.com
      d23bac9f
    • M
      USB: ipaq: handle 4 endpoint devices · 1b8fb414
      Mark Ellis 提交于
      The ipaq driver currently enforces one port on all devices. This
      is correct for 2 and 3 endpoint devices, but with 4 endpoint devices
      meaningful communication occurs on the second pair.
      
      This patch allows 2 ports for 4 endpoint devices.
      Signed-off-by: NMark Ellis <mark@mpellis.org.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1b8fb414
    • G
      USB: serial: rename cp2101 driver to cp210x · 03ee2515
      Greg Kroah-Hartman 提交于
      Lots of users are getting confused about the cp2101 driver.  It really
      does support more than just the cp2101 device, so rename it to cp210x to
      try to prevent confusion.
      
      Cc: Craig Shelley <craig@microtron.org.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      03ee2515
    • C
      USB: CP2101 Reduce Error Logging · 97324955
      Craig Shelley 提交于
      This patch lowers the logging priority of certain messages to prevent
      users from flooding the log files.
      Signed-off-by: NCraig Shelley <craig@microtron.org.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      97324955
    • C
      USB: CP2101 Support AN205 baud rates · ef8b6bcb
      Craig Shelley 提交于
      This patch adds support for the extended range of baud rates supported
      by CP2102 and CP2103 devices described in SiLabs AN205.  An additional
      function cp2101_quantise_baudrate rounds the baud rate as per AN205
      Table 1.  A modification to the baud rate calculation removes a rounding
      error, allowing the full range of baud rates to be used.
      Signed-off-by: NCraig Shelley <craig@microtron.org.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ef8b6bcb
    • G
      USB: make actual_length in struct urb field u32 · 8c209e67
      Greg Kroah-Hartman 提交于
      actual_length should also be a u32 and not a signed value.  This patch
      changes this field to be 'u32' to prevent any potential negative
      conversion and comparison errors.
      
      This triggered a few compiler warning messages when these fields were
      being used with the min macro, so they have also been fixed up in this
      patch.
      
      Cc: Roel Kluin <roel.kluin@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      8c209e67
    • M
      USB: ch341 serial: fix port number changed after resume · 1ded7ea4
      Ming Lei 提交于
      This patch fixes the following bug:
      	.plug ch341 usb serial port into a hub port;
      	.ch341 driver bound to the device and /dev/ttyUSB0 comes
      	.open /dev/ttyUSB0 by minicom and we can use the serial successfully
      	.suspend the ch341 usb serial device(such as: echo suspend > power/level)
      	.resume the ch341 usb serial device (such as: echo on > power/level)
      	.new port /dev/ttyUSB1 comes ,and the original /dev/ttyUSB0 still exists,
      but is no longer usable by minicom
      
      The patch adds suspend and resume callback to ch341 usb driver to prevent it
      from unbinding during suspend. The /dev/ttyUSB0 is not released until being
      closed, so /dev/ttyUSB1 comes after resume, and the original /dev/ttyUSB0 is
      no longer usable by minicom. It is really a mess for a minicom user.
      
      This patch also adds the reset_resume callback to make it usable after resuming
      from STR or hibernation, for generally STR or hibernation will make the vbus
      of root-hub lost.
      
      Finally enable the driver's supports_autosuspend, for the device is in working
      order with it.
      Signed-off-by: NMing Lei <tom.leiming@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1ded7ea4
    • D
      usb-serial: fix usb_serial_register bug when boot with nousb param · e4abe665
      Dave Young 提交于
      With "nousb" cmdline booting, built-in serial drivers (ie. airecable)
      will trigger kernel oops.
      
      Indeed, if nousb, usb_serial_init will failed, and the usb serial bus type
      will not be registerd, then usb_serial_register call driver_register
      which try to register the driver to a not registered bus.
      
      Here add usb_disabled() check in usb_serial_register to fix it.
      Signed-off-by: NDave Young <hidave.darkstar@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e4abe665
    • G
      USB: serial: add qualcomm wireless modem driver · a78b4282
      Greg Kroah-Hartman 提交于
      Driver originally written by Qualcomm, but rewritten by me due to the
      totally different coding style.  Cleaned up the probe logic to make a
      bit more sense, this is one wierd device.  They could have prevented all
      of this by just writing sane firmware for the modem.
      
      Cc: Tamm Liu <tamml@qualcomm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a78b4282
    • G
      USB: symbolserial: log the ioctl commands · 3d940b7d
      Greg Kroah-Hartman 提交于
      We need to figure out what userspace programs are expecting from this
      driver, so log them so we can try to get it right.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      3d940b7d
    • G
      USB: serial: add symbol serial driver · 68b44eae
      Greg Kroah-Hartman 提交于
      This is for the Symbol 6608 barcode scanner in a fake "HID" mode.
      
      Thanks to Dalibor Grgec for working with me to get this to start to work
      properly.
      
      Cc: Dalibor Grgec <dalibor.grgec@zemris.fer.hr>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      68b44eae
    • J
      USB: serial: refuse to open recently removed USB Serial devices · 331879fd
      James Woodcock 提交于
      A USB-serial converter device is plugged into a system, and a process
      opens it's device node.  If the device is physically removed whilst the
      process still has its device node open, then other processes can
      sucessfully open the now non-existent device's node.  I would expect
      that open() on a device that has been physically removed should return
      ENODEV.
      
      This is manifesting itself with getty on my system.  I do the following:
      1.  set up inittab to spawn getty on ttyUSB0, eg:
          T1:23:respawn:/sbin/getty -L ttyUSB0 115200 vt100
      2.  Plug in USB-serial converter cable
      3.  Wait for a login prompt on a terminal program attached to the serial
          cable
      4.  Login
      5.  Pull the USB-serial converter cable from the box
      6.  getty doesn't realise that ttyUSB0 no longer exists as /dev/ttyUSB0
          can still be opened.
      7.  Re-insert the USB-serial converter cable
      8.  You should no longer get a login prompt over the serial cable, as
          the the USB-serial cable now shows up as /dev/ttyUSB1, and getty is
          trying to talk to /dev/ttyUSB0.
      
      The attached patch will cause open("/dev/ttyUSB0", O_RDONLY) to return
      ENODEV after the USB-serial converter has been pulled.  The patch was
      created against 2.6.28.1.  I can supply it against something else if
      needs be.  It is fairly simple, so should be OK.
      
      I am using a pl2303 device, although I don't think that makes any
      difference.
      
      
      From: James Woodcock <James.Woodcock@ACULAB.COM>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      331879fd
    • O
      USB: serial: remove recourse to generic method · 1c27ae67
      Oliver Neukum 提交于
      This removes the fallback to the generic method. It is cleaner to
      explicitely request it. Introducing this was my mistake. This will
      be solved by an explicit test and the driver being allowed to request
      what it needs to be done upon resumption.
      Signed-off-by: NOliver Neukum <oneukum@suse.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1c27ae67