An error occurred fetching the project authors.
  1. 03 May, 2012 1 commit
  2. 09 Apr, 2012 2 commits
    • Simon Arlott's avatar
      USB: ftdi_sio: fix race condition in TIOCMIWAIT, and abort of TIOCMIWAIT when the device is removed · 876ae50d
      Simon Arlott authored
      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: default avatarSimon Arlott <simon@fire.lp0.eu>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      876ae50d
    • Simon Arlott's avatar
      USB: ftdi_sio: fix status line change handling for TIOCMIWAIT and TIOCGICOUNT · fca5430d
      Simon Arlott authored
      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: default avatarSimon Arlott <simon@fire.lp0.eu>
      Cc: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fca5430d
  3. 30 Mar, 2012 1 commit
  4. 15 Mar, 2012 1 commit
  5. 14 Mar, 2012 1 commit
    • Jim Paris's avatar
      USB: ftdi_sio: add support for FT-X series devices · dc0827c1
      Jim Paris authored
      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: default avatarJim Paris <jim@jtan.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      dc0827c1
  6. 09 Mar, 2012 1 commit
  7. 08 Mar, 2012 1 commit
  8. 01 Mar, 2012 1 commit
  9. 28 Feb, 2012 1 commit
  10. 25 Feb, 2012 1 commit
  11. 24 Feb, 2012 1 commit
  12. 03 Feb, 2012 1 commit
  13. 26 Jan, 2012 1 commit
  14. 24 Jan, 2012 4 commits
  15. 12 Jan, 2012 1 commit
  16. 01 Dec, 2011 1 commit
  17. 27 Nov, 2011 1 commit
  18. 18 Nov, 2011 1 commit
    • Andrew Worsley's avatar
      USB: Fix Corruption issue in USB ftdi driver ftdi_sio.c · b1ffb4c8
      Andrew Worsley authored
      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: default avatarAndrew 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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      b1ffb4c8
  19. 18 Oct, 2011 7 commits
  20. 04 Oct, 2011 1 commit
  21. 25 Aug, 2011 1 commit
  22. 23 Aug, 2011 1 commit
    • Kuninori Morimoto's avatar
      USB: use usb_endpoint_maxp() instead of le16_to_cpu() · 29cc8897
      Kuninori Morimoto authored
      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: default avatarFelipe 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: default avatarSarah 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: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      29cc8897
  23. 11 Aug, 2011 1 commit
  24. 08 Aug, 2011 2 commits
    • Uwe Bonnes's avatar
      usb: serial: ftdi_sio.c: For the FT232H FTDI_SIO_SET_BAUDRATE_REQUEST, index... · 0ee404cc
      Uwe Bonnes authored
      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: default avatarUwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      0ee404cc
    • Ionut Nicu's avatar
      USB: ftdi_sio: fix minor typo in get_ftdi_divisor · 1862cdd5
      Ionut Nicu authored
      Even if it's unlikely for this to cause an error,
      there is a typo in the code that uses the bitwise-AND
      operator instead of the logical one.
      Signed-off-by: default avatarIonut Nicu <ionut.nicu@cloudbit.ro>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      1862cdd5
  25. 27 Jun, 2011 1 commit
  26. 08 Jun, 2011 1 commit
  27. 29 Apr, 2011 1 commit
  28. 13 Apr, 2011 2 commits