1. 11 8月, 2012 1 次提交
  2. 13 6月, 2012 1 次提交
  3. 09 5月, 2012 1 次提交
    • G
      USB: serial: rework usb_serial_register/deregister_drivers() · 68e24113
      Greg Kroah-Hartman 提交于
      This reworks the usb_serial_register_drivers() and
      usb_serial_deregister_drivers() to not need a pointer to a struct
      usb_driver anymore.  The usb_driver structure is now created dynamically
      and registered and unregistered as needed.
      
      This saves lines of code in each usb-serial driver.  All in-kernel users
      of these functions were also fixed up at this time.  The pl2303 driver
      was tested that everything worked properly.
      
      Thanks for the idea to do this from Alan Stern.
      
      Cc: Adhir Ramjiawan <adhirramjiawan0@gmail.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Al Borchers <alborchers@steinerpoint.com>
      Cc: Aleksey Babahin <tamerlan311@gmail.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andrew Worsley <amworsley@gmail.com>
      Cc: Bart Hartgers <bart.hartgers@gmail.com>
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Dan Carpenter <error27@gmail.com>
      Cc: Dan Williams <dcbw@redhat.com>
      Cc: Donald Lee <donald@asix.com.tw>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Felipe Balbi <balbi@ti.com>
      Cc: Gary Brubaker <xavyer@ix.netcom.com>
      Cc: Jesper Juhl <jj@chaosbits.net>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Cc: Johan Hovold <jhovold@gmail.com>
      Cc: Julia Lawall <julia@diku.dk>
      Cc: Kautuk Consul <consul.kautuk@gmail.com>
      Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Cc: Lonnie Mendez <dignome@gmail.com>
      Cc: Matthias Bruestle and Harald Welte <support@reiner-sct.com>
      Cc: Matthias Urlichs <smurf@smurf.noris.de>
      Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
      Cc: Michal Sroczynski <msroczyn@gmail.com>
      Cc: "Michał Wróbel" <michal.wrobel@flytronic.pl>
      Cc: Oliver Neukum <oliver@neukum.name>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Peter Berger <pberger@brimson.com>
      Cc: Preston Fick <preston.fick@silabs.com>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: Rigbert Hamisch <rigbert@gmx.de>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Simon Arlott <simon@fire.lp0.eu>
      Cc: Support Department <support@connecttech.com>
      Cc: Thomas Tuttle <ttuttle@chromium.org>
      Cc: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
      Cc: Wang YanQing <Udknight@gmail.com>
      Cc: William Greathouse <wgreathouse@smva.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      68e24113
  4. 08 5月, 2012 3 次提交
    • É
      USB: ftdi-sio: add support for Physik Instrumente E-861 · b69cc672
      Éric Piel 提交于
      This adds VID/PID for the PI E-861. Without it, I had to do:
      modprobe -q ftdi-sio product=0x1008 vendor=0x1a72
      
      http://www.physikinstrumente.com/en/products/prdetail.php?sortnr=900610Signed-off-by: NÉric Piel <piel@delmic.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b69cc672
    • G
      USB: serial: remove usb_serial_disconnect call in all drivers · 32078f91
      Greg Kroah-Hartman 提交于
      This is now set by the usb-serial core, no need for the driver to
      individually set it.
      
      Thanks to Alan Stern for the idea to get rid of it.
      
      Cc: William Greathouse <wgreathouse@smva.com>
      Cc: Matthias Bruestle and Harald Welte <support@reiner-sct.com>
      Cc: Lonnie Mendez <dignome@gmail.com>
      Cc: Peter Berger <pberger@brimson.com>
      Cc: Al Borchers <alborchers@steinerpoint.com>
      Cc: Gary Brubaker <xavyer@ix.netcom.com>
      Cc: Oliver Neukum <oliver@neukum.name>
      Cc: Matthias Urlichs <smurf@smurf.noris.de>
      Cc: Support Department <support@connecttech.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
      Cc: Kautuk Consul <consul.kautuk@gmail.com>
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Bart Hartgers <bart.hartgers@gmail.com>
      Cc: Johan Hovold <jhovold@gmail.com>
      Cc: Preston Fick <preston.fick@silabs.com>
      Cc: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
      Cc: Simon Arlott <simon@fire.lp0.eu>
      Cc: Andrew Worsley <amworsley@gmail.com>
      Cc: "Michał Wróbel" <michal.wrobel@flytronic.pl>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Felipe Balbi <balbi@ti.com>
      Cc: Aleksey Babahin <tamerlan311@gmail.com>
      Cc: Dan Carpenter <error27@gmail.com>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Cc: Donald Lee <donald@asix.com.tw>
      Cc: Julia Lawall <julia@diku.dk>
      Cc: Michal Sroczynski <msroczyn@gmail.com>
      Cc: Wang YanQing <Udknight@gmail.com>
      Cc: Dan Williams <dcbw@redhat.com>
      Cc: Thomas Tuttle <ttuttle@chromium.org>
      Cc: Rigbert Hamisch <rigbert@gmx.de>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Cc: Jesper Juhl <jj@chaosbits.net>
      Cc: Adhir Ramjiawan <adhirramjiawan0@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      32078f91
    • G
      USB: serial: remove usb_serial_probe call in all drivers · 5026bb07
      Greg Kroah-Hartman 提交于
      This is now set by the usb-serial core, no need for the driver to
      individually set it.
      
      Thanks to Alan Stern for the idea to get rid of it.
      
      Cc: William Greathouse <wgreathouse@smva.com>
      Cc: Matthias Bruestle and Harald Welte <support@reiner-sct.com>
      Cc: Lonnie Mendez <dignome@gmail.com>
      Cc: Peter Berger <pberger@brimson.com>
      Cc: Al Borchers <alborchers@steinerpoint.com>
      Cc: Gary Brubaker <xavyer@ix.netcom.com>
      Cc: Oliver Neukum <oliver@neukum.name>
      Cc: Matthias Urlichs <smurf@smurf.noris.de>
      Cc: Support Department <support@connecttech.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
      Cc: Kautuk Consul <consul.kautuk@gmail.com>
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Bart Hartgers <bart.hartgers@gmail.com>
      Cc: Johan Hovold <jhovold@gmail.com>
      Cc: Preston Fick <preston.fick@silabs.com>
      Cc: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
      Cc: Simon Arlott <simon@fire.lp0.eu>
      Cc: Andrew Worsley <amworsley@gmail.com>
      Cc: "Michał Wróbel" <michal.wrobel@flytronic.pl>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Felipe Balbi <balbi@ti.com>
      Cc: Aleksey Babahin <tamerlan311@gmail.com>
      Cc: Dan Carpenter <error27@gmail.com>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Cc: Donald Lee <donald@asix.com.tw>
      Cc: Julia Lawall <julia@diku.dk>
      Cc: Michal Sroczynski <msroczyn@gmail.com>
      Cc: Wang YanQing <Udknight@gmail.com>
      Cc: Dan Williams <dcbw@redhat.com>
      Cc: Thomas Tuttle <ttuttle@chromium.org>
      Cc: Rigbert Hamisch <rigbert@gmx.de>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Cc: Jesper Juhl <jj@chaosbits.net>
      Cc: Adhir Ramjiawan <adhirramjiawan0@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5026bb07
  5. 04 5月, 2012 1 次提交
  6. 10 4月, 2012 2 次提交
    • S
      USB: ftdi_sio: fix race condition in TIOCMIWAIT, and abort of TIOCMIWAIT when the device is removed · 876ae50d
      Simon Arlott 提交于
      There are two issues here, one is that the device is generating
      spurious very fast modem status line changes somewhere:
      
      CTS becomes high then low 18µs later:
      [121226.924373] ftdi_process_packet: prev rng=0 dsr=10 dcd=0 cts=6
      [121226.924378] ftdi_process_packet: status=10 prev=00 diff=10
      [121226.924382] ftdi_process_packet: now rng=0 dsr=10 dcd=0 cts=7
      (wake_up_interruptible is called)
      [121226.924391] ftdi_process_packet: prev rng=0 dsr=10 dcd=0 cts=7
      [121226.924394] ftdi_process_packet: status=00 prev=10 diff=10
      [121226.924397] ftdi_process_packet: now rng=0 dsr=10 dcd=0 cts=8
      (wake_up_interruptible is called)
      
      This wakes up the task in TIOCMIWAIT:
      [121226.924405] ftdi_ioctl: 19451 rng=0->0 dsr=10->10 dcd=0->0 cts=6->8
      (wait from 20:51:46 returns and observes both changes)
      
      Which then calls TIOCMIWAIT again:
      20:51:46.400239 ioctl(3, TIOCMIWAIT, 0x20) = 0
      22:11:09.441818 ioctl(3, TIOCMGET, [TIOCM_DTR|TIOCM_RTS]) = 0
      22:11:09.442812 ioctl(3, TIOCMIWAIT, 0x20) = -1 EIO (Input/output error)
      (the second wake_up_interruptible takes effect and an I/O error occurs)
      
      The other issue is that TIOCMIWAIT will wait forever (unless the task is
      interrupted) if the device is removed.
      
      This change removes the -EIO return that occurs if the counts don't
      appear to have changed. Multiple counts may have been processed as
      one or the waiting task may have started waiting after recording the
      current count.
      
      It adds a bool to indicate that the device has been removed so that
      TIOCMIWAIT doesn't wait forever, and wakes up any tasks so that they can
      return -EIO.
      Signed-off-by: NSimon Arlott <simon@fire.lp0.eu>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      876ae50d
    • S
      USB: ftdi_sio: fix status line change handling for TIOCMIWAIT and TIOCGICOUNT · fca5430d
      Simon Arlott 提交于
      Handling of TIOCMIWAIT was changed by commit 1d749f9a
       USB: ftdi_sio.c: Use ftdi async_icount structure for TIOCMIWAIT, as in other drivers
      
      FTDI_STATUS_B0_MASK does not indicate the changed modem status lines,
      it indicates the value of the current modem status lines. An xor is
      still required to determine which lines have changed.
      
      The count was only being incremented if the line was high. The only
      reason TIOCMIWAIT still worked was because the status packet is
      repeated every 1ms, so the count was always changing. The wakeup
      itself still ran based on the status lines changing.
      
      This change fixes handling of updates to the modem status lines and
      allows multiple processes to use TIOCMIWAIT concurrently.
      
      Tested with two processes waiting on different status lines being
      toggled independently.
      Signed-off-by: NSimon Arlott <simon@fire.lp0.eu>
      Cc: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fca5430d
  7. 31 3月, 2012 1 次提交
  8. 16 3月, 2012 1 次提交
  9. 15 3月, 2012 1 次提交
    • 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
  10. 10 3月, 2012 1 次提交
  11. 09 3月, 2012 1 次提交
  12. 02 3月, 2012 1 次提交
  13. 29 2月, 2012 1 次提交
  14. 25 2月, 2012 2 次提交
  15. 04 2月, 2012 1 次提交
  16. 27 1月, 2012 1 次提交
  17. 25 1月, 2012 4 次提交
  18. 13 1月, 2012 1 次提交
  19. 02 12月, 2011 1 次提交
  20. 27 11月, 2011 1 次提交
  21. 19 11月, 2011 1 次提交
    • A
      USB: Fix Corruption issue in USB ftdi driver ftdi_sio.c · b1ffb4c8
      Andrew Worsley 提交于
      Fix for ftdi_set_termios() glitching output
      
      ftdi_set_termios() is constantly setting the baud rate, data bits and parity
      unnecessarily on every call, . When called while characters are being
      transmitted can cause the FTDI chip to corrupt the serial port bit stream
      output by stalling the output half a bit during the output of a character.
      Simple fix by skipping this setting if the baud rate/data bits/parity are
      unchanged.
      Signed-off-by: NAndrew Worsley <amworsley@gmail.com>
      Cc: stable <stable@vger.kernel.org>
      ----
      
        I had a brief run with strace on the getty and it was doing ioctl()s on
        each call but it didn't look relavant to the problem. I think the issue is
        that XON/XOFF flow control was being implmented via hardware - for the ixoff
        to allow the user to use XON/XOFF to control output. Unfortunately it would
        send 3 Control URBs updating all of the settings after each piece of input
      
        I am trying to work around the issue of gmail messing with the tab/spacing
        by submitting via SMTP via gmail which I believe should fix the issue.
      
        The patch is against v3.2-rc2 and compiles - but no additional testing in
        this kernel has been done.
      
        Thanks
      
         Andrew
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b1ffb4c8
  22. 19 10月, 2011 7 次提交
  23. 05 10月, 2011 1 次提交
  24. 26 8月, 2011 1 次提交
  25. 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
  26. 11 8月, 2011 1 次提交
  27. 09 8月, 2011 1 次提交
    • U
      usb: serial: ftdi_sio.c: For the FT232H FTDI_SIO_SET_BAUDRATE_REQUEST, index... · 0ee404cc
      Uwe Bonnes 提交于
      usb: serial: ftdi_sio.c: For the FT232H FTDI_SIO_SET_BAUDRATE_REQUEST, index needs to be shifted too
      
      the recent addition of the FT232H showed that baudrate was set wrong. See
      gmane.linux.usb.general: "[ftdi_sio] FT232H support".  With the old code,
      the MSB of the 4 encoded fractional divider bits and more important the
      clock predivider bits got lost. Adding the FT232H to the code patch were
      these bits are shifted solves the problem. I verified baud rates with a
      scope now.
      
      I suspect, that the BM device probably needs these bits shifted too. But
      there is no predivider bit, so this is not obvious, and a missing MSB of the
      encoded fractional divider only shifts the resulting baudrate minimal.
      The AM has only 3 bits of encoded fractional divider, so it is not impacted.
      
      I have no BM device to test, so I only added a comment and left the code for
      the BM untouched.
      Signed-off-by: NUwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0ee404cc