1. 31 7月, 2015 5 次提交
    • P
      USB: io_ti: Add heartbeat to keep idle EP/416 ports from disconnecting · 26c78daa
      Peter E. Berger 提交于
      When using Edgeport/416 models with newer firmware (sometime after
      firmware version 4.80.0), idle ports are automatically bounced
      (disconnected and then reconnected) approximately every 60 seconds.
      This breaks programs (e.g: minicom) where idle periods are common,
      normal and expected.
      
      I confirmed with the manufacturer (Digi International) that Edgeport/416
      models now ship from the factory with firmware that expects periodic
      "heartbeat" queries from the driver to keep idle ports alive.  This
      patch implements heartbeat support using the mechanism Digi suggested
      (periodically requesting an I2C descriptor address) that appears effective
      on Edgeports running the newer firmware (that require it) and benign on
      Edgeport devices running older firmware.  Since we know that Edgeport
      firmware version 4.80 (the version distributed in /lib/firmware/down3.bin
      and used for Edgeports that are either running still older versions or
      have no onboard non-volatile firmware image) does not require heartbeat
      support, this patch schedules heartbeats only on Edgeport/416 devices,
      and only if they are running firmware versions newer than 4.80.
      Signed-off-by: NPeter E. Berger <pberger@brimson.com>
      [johan: minor style changes ]
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      26c78daa
    • P
      USB: io_ti: Add firmware image sanity checks · dcb8e99d
      Peter E. Berger 提交于
      Do what we can to verify that the driver's firmware image is valid
      (before attempting to download it to the Edgeport) by adding a new
      function, check_fw_sanity(), and a call to it in in download_fw().
      
      Note: It looks like some Edgeports (models like the EP/416 with on-board
      E2PROM) may be able to function even if the on-disk firmware image is
      bad or missing, iff their local E2PROM versions are valid.  But most
      Edgeport models (I've tried EP/1 and EP/8) do not appear to have this
      capability and they always rely on the on-disk firmware image.
      
      I tested an implementation that calls the new check_fw_sanity()
      function at the top of download_fw() and, rather than simply returning
      an error if the firmware image is bad or missing, it saves the result
      and defers the decision until later when it may find that it is running
      on a E2PROM-equipped device with a valid image.  But I think this is
      messier than it is worth (adding still more messiness to the already
      very messy download_fw()) for such a marginal possible benefit.  So, at
      least for now, I have chosen the much simpler approach of returning an
      error whenever edge_startup() fails to load an on-disk firmware image, or
      check_fw_sanity() indicates that it is unusable.
      Signed-off-by: NPeter E. Berger <pberger@brimson.com>
      [johan: drop redundant checksum mask ]
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      dcb8e99d
    • P
      USB: io_ti: Fix firmware version handling · c0e34831
      Peter E. Berger 提交于
      The io_ti driver fails to download firmware to Edgeport
      devices such as the EP/416, even when the on-disk firmware image
      (/lib/firmware/edgeport/down3.bin) is more current than the version
      on the EP/416.  The current download code is broken in a few ways.
      Notably it mis-uses global variables OperationalMajorVersion and
      OperationalMinorVersion (reading their values before they've been
      properly initialized and subsequently initializing them multiple times
      without synchronization).  This patch drops the global variables and
      replaces the redundant calls to request_firmware()/release_firmware()
      in download_fw() with a single call pair in edge_startup(); the firmware
      image pointer is then passed to download_fw() and build_i2c_fw_hdr().
      Signed-off-by: NPeter E. Berger <pberger@brimson.com>
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      c0e34831
    • P
      USB: io_ti: Increase insufficient timeout for firmware downloads · c3ece7e7
      Peter E. Berger 提交于
      The io_ti driver fails to download firmware to Edgeport devices such as
      the EP/416 and EP/421 (devices with on-board E2PROM).  One of the problems
      is that the default 1 second timeout in ti_vsend_sync() is insufficient
      for download operations.  This patch increases the download timeout to
      10 seconds.
      Signed-off-by: NPeter E. Berger <pberger@brimson.com>
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      c3ece7e7
    • M
      USB: pl2303: fix baud-rate divisor calculations · 49bda212
      Michał Pecio 提交于
      This commit fixes the following issues:
      
      1. The 9th bit of buf was believed to be the LSB of divisor's
      exponent, but the hardware interprets it as MSB (9th bit) of the
      mantissa. The exponent is actually one bit shorter and applies
      to base 4, not 2 as previously believed.
      
      2. Loop iterations doubled the exponent instead of incrementing.
      
      3. The exponent wasn't checked for overflow.
      
      4. The function returned requested rate instead of actual rate.
      
      Due to issue #2, the old code deviated from the wrong formula
      described in #1 and actually yielded correct rates when divisor
      was lower than 4096 by using exponents of 0, 2 or 4 base-2,
      interpreted as 0, 1, 2 base-4 with the 9th mantissa bit clear.
      However, at 93.75 kbaud or less the rate turned out too slow
      due to #2 or too fast due to #2 and #3.
      
      I tested this patch by sending and validating 0x00,0x01,..,0xff
      to an FTDI dongle at 234, 987, 2401, 9601, 31415, 115199, 250k,
      500k, 750k, 1M, 1.5M, 3M+1 baud. All rates passed.
      
      I also used pv to check speed at some rates unsupported by FTDI:
      45 (the lowest possible), 2M, 4M, 5M and 6M-1. Looked sane.
      Signed-off-by: NMichal Pecio <michal.pecio@gmail.com>
      Fixes: 399aa9a7 ("USB: pl2303: use divisors for unsupported baud
      rates")
      Cc: stable <stable@vger.kernel.org> # v3.18
      [johan: update summary ]
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      49bda212
  2. 20 7月, 2015 1 次提交
  3. 09 7月, 2015 1 次提交
    • J
      USB: serial: Destroy serial_minors IDR on module exit · d23f47d4
      Johannes Thumshirn 提交于
      Destroy serial_minors IDR on module exit, reclaiming the allocated memory.
      
      This was detected by the following semantic patch (written by Luis
      Rodriguez <mcgrof@suse.com>)
      
      <SmPL>
      @ defines_module_init @
      declarer name module_init, module_exit;
      declarer name DEFINE_IDR;
      identifier init;
      @@
      
      module_init(init);
      
      @ defines_module_exit @
      identifier exit;
      @@
      
      module_exit(exit);
      
      @ declares_idr depends on defines_module_init && defines_module_exit @
      identifier idr;
      @@
      
      DEFINE_IDR(idr);
      
      @ on_exit_calls_destroy depends on declares_idr && defines_module_exit @
      identifier declares_idr.idr, defines_module_exit.exit;
      @@
      
      exit(void)
      {
       ...
       idr_destroy(&idr);
       ...
      }
      
      @ missing_module_idr_destroy depends on declares_idr && defines_module_exit && !on_exit_calls_destroy @
      identifier declares_idr.idr, defines_module_exit.exit;
      @@
      
      exit(void)
      {
       ...
       +idr_destroy(&idr);
      }
      </SmPL>
      Signed-off-by: NJohannes Thumshirn <jthumshirn@suse.de>
      Cc: stable <stable@vger.kernel.org>	# v3.11
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      d23f47d4
  4. 06 7月, 2015 3 次提交
    • P
      USB: cp210x: add ID for Aruba Networks controllers · f98a7aa8
      Peter Sanford 提交于
      Add the USB serial console device ID for Aruba Networks 7xxx series
      controllers which have a USB port for their serial console.
      Signed-off-by: NPeter Sanford <peter@sanford.io>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      f98a7aa8
    • S
      USB: mos7720: rename registers · ee5729ec
      Sudip Mukherjee 提交于
      Some of the register names defined here are matching with registers
      defined in other places. Like DCR is defined here and DCR is also
      a register in mn10300 architecture. So when we are building this with
      mn10300, build fails.
      To avoid we rename all the registers.
      Signed-off-by: NSudip Mukherjee <sudip@vectorindia.org>
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      ee5729ec
    • C
      USB: option: add 2020:4000 ID · f6d7fb37
      Claudio Cappelli 提交于
      Add device Olivetti Olicard 300 (Network Connect: MT6225) - IDs 2020:4000.
      
      T:  Bus=01 Lev=02 Prnt=04 Port=00 Cnt=01 Dev#= 10 Spd=480 MxCh= 0
      D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=2020 ProdID=4000 Rev=03.00
      S:  Manufacturer=Network Connect
      S:  Product=MT6225
      C:  #Ifs= 7 Cfg#= 1 Atr=a0 MxPwr=500mA
      I:  If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim
      I:  If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
      I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=02 Prot=01 Driver=option
      I:  If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      I:  If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      I:  If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      I:  If#= 6 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
      Signed-off-by: NClaudio Cappelli <claudio.cappelli.linux@gmail.com>
      Suggested-by: NLars Melin <larsm17@gmail.com>
      Cc: stable <stable@vger.kernel.org>
      [johan: amend commit message with devices info ]
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      f6d7fb37
  5. 05 6月, 2015 1 次提交
  6. 01 6月, 2015 1 次提交
  7. 26 5月, 2015 1 次提交
  8. 21 5月, 2015 1 次提交
  9. 29 4月, 2015 3 次提交
  10. 28 3月, 2015 11 次提交
  11. 25 3月, 2015 1 次提交
  12. 20 3月, 2015 1 次提交
  13. 16 3月, 2015 1 次提交
  14. 07 3月, 2015 1 次提交
  15. 03 3月, 2015 1 次提交
  16. 02 3月, 2015 1 次提交
    • N
      USB: ch341: set tty baud speed according to tty struct · aa91def4
      Nicolas PLANEL 提交于
      The ch341_set_baudrate() function initialize the device baud speed
      according to the value on priv->baud_rate. By default the ch341_open() set
      it to a hardcoded value (DEFAULT_BAUD_RATE 9600). Unfortunately, the
      tty_struct is not initialized with the same default value. (usually 56700)
      
      This means that the tty_struct and the device baud rate generator are not
      synchronized after opening the port.
      
      Fixup is done by calling ch341_set_termios() if tty exist.
      Remove unnecessary variable priv->baud_rate setup as it's already done by
      ch341_port_probe().
      Remove unnecessary call to ch341_set_{handshake,baudrate}() in
      ch341_open() as there already called in ch341_configure() and
      ch341_set_termios()
      Signed-off-by: NNicolas PLANEL <nicolas.planel@enovance.com>
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      aa91def4
  17. 27 2月, 2015 6 次提交