1. 04 12月, 2020 2 次提交
    • J
      USB: serial: cp210x: clean up line-control handling · d4297629
      Johan Hovold 提交于
      Update the line-control settings in one request unconditionally instead
      of setting the word-length, parity and stop-bit settings separately.
      
      This avoids multiple requests when several settings are changed even if
      this scheme could potentially also be used to detect unsupported device
      settings. Since all device types but CP2101 appears to support all
      settings, let's handle that one specifically and also report back the
      unsupported settings properly through termios by clearing the
      corresponding bits.
      
      Also drop the related unnecessary debug printks.
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      d4297629
    • J
      USB: serial: cp210x: return early on unchanged termios · 95168d62
      Johan Hovold 提交于
      Return early from set_termios() in case no relevant terminal settings
      have changed.
      
      This avoids testing each parameter in turn and specifically allows the
      line-control handling to be cleaned up further.
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      95168d62
  2. 20 11月, 2020 1 次提交
    • D
      USB: serial: mos7720: defer state restore to a workqueue · 053af9e6
      Davidlohr Bueso 提交于
      The parallel port restore operation currently defers writes
      to a tasklet, if it sees a locked disconnect mutex. The
      driver goes to a lot of trouble to ensure writes happen
      in a non-blocking context, but things can be greatly
      simplified if it's done in regular process context and
      this is not a system performance critical path. As such,
      instead of doing the state restore writes in softirq context,
      use a workqueue and just do regular synchronous writes.
      
      In addition to the cleanup, this also imposes less on the
      overall system as tasklets have been deprecated because
      of it's softirq implications, potentially blocking a higher
      priority task from running.
      Signed-off-by: NDavidlohr Bueso <dbueso@suse.de>
      Link: https://lore.kernel.org/r/20201120045300.28804-1-dave@stgolabs.net
      [johan: amend commit message ("softirq context")]
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      053af9e6
  3. 05 11月, 2020 1 次提交
  4. 04 11月, 2020 16 次提交
  5. 27 10月, 2020 2 次提交
  6. 08 10月, 2020 1 次提交
  7. 05 10月, 2020 2 次提交
  8. 01 10月, 2020 2 次提交
  9. 29 9月, 2020 2 次提交
    • S
      USB: serial: pl2303: add device-id for HP GC device · 031f9664
      Scott Chen 提交于
      This is adds a device id for HP LD381 which is a pl2303GC-base device.
      Signed-off-by: NScott Chen <scott@labau.com.tw>
      Cc: stable@vger.kernel.org
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      031f9664
    • M
      USB: serial: ftdi_sio: add support for FreeCalypso JTAG+UART adapters · 6cf87e5e
      Mychaela N. Falconia 提交于
      There exist many FT2232-based JTAG+UART adapter designs in which
      FT2232 Channel A is used for JTAG and Channel B is used for UART.
      The best way to handle them in Linux is to have the ftdi_sio driver
      create a ttyUSB device only for Channel B and not for Channel A:
      a ttyUSB device for Channel A would be bogus and will disappear as
      soon as the user runs OpenOCD or other applications that access
      Channel A for JTAG from userspace, causing undesirable noise for
      users.  The ftdi_sio driver already has a dedicated quirk for such
      JTAG+UART FT2232 adapters, and it requires assigning custom USB IDs
      to such adapters and adding these IDs to the driver with the
      ftdi_jtag_quirk applied.
      
      Boutique hardware manufacturer Falconia Partners LLC has created a
      couple of JTAG+UART adapter designs (one buffered, one unbuffered)
      as part of FreeCalypso project, and this hardware is specifically made
      to be used with Linux hosts, with the intent that Channel A will be
      accessed only from userspace via appropriate applications, and that
      Channel B will be supported by the ftdi_sio kernel driver, presenting
      a standard ttyUSB device to userspace.  Toward this end the hardware
      manufacturer will be programming FT2232 EEPROMs with custom USB IDs,
      specifically with the intent that these IDs will be recognized by
      the ftdi_sio driver with the ftdi_jtag_quirk applied.
      Signed-off-by: NMychaela N. Falconia <falcon@freecalypso.org>
      [johan: insert in PID order and drop unused define]
      Cc: stable@vger.kernel.org
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      6cf87e5e
  10. 31 8月, 2020 2 次提交
    • B
      USB: serial: option: support dynamic Quectel USB compositions · 2bb70f0a
      Bjørn Mork 提交于
      The USB composition, defining the set of exported functions, is dynamic
      in newer Quectel modems.  Default functions can be disabled and
      alternative functions can be enabled instead.  The alternatives
      includes class functions using interface pairs, which should be
      handled by the respective class drivers.
      
      Active interfaces are numbered consecutively, so static
      blacklisting based on interface numbers will fail when the
      composition changes.  An example of such an error, where the
      option driver has bound to the CDC ECM data interface,
      preventing cdc_ether from handling this function:
      
       T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0
       D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1
       P: Vendor=2c7c ProdID=0125 Rev= 3.18
       S: Manufacturer=Quectel
       S: Product=EC25-AF
       C:* #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA
       A: FirstIf#= 4 IfCount= 2 Cls=02(comm.) Sub=06 Prot=00
       I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
       E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
       E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
       E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
       E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
       E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
       E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
       E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       I:* If#= 4 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=(none)
       E: Ad=89(I) Atr=03(Int.) MxPS= 16 Ivl=32ms
       I:* If#= 5 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=option
       I: If#= 5 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=option
       E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      
      Another device with the same id gets correct drivers, since the
      interface of the network function happens to be blacklisted by option:
      
       T: Bus=01 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#= 3 Spd=480 MxCh= 0
       D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1
       P: Vendor=2c7c ProdID=0125 Rev= 3.18
       S: Manufacturer=Android
       S: Product=Android
       C:* #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA
       I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
       E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
       E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
       E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
       E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
       E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
       E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
       E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
       E: Ad=89(I) Atr=03(Int.) MxPS= 8 Ivl=32ms
       E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      
      Change rules for EC21, EC25, BG96 and EG95 to match vendor specific
      serial functions only, to prevent binding to class functions. Require
      2 endpoints on ff/ff/ff functions, avoiding the 3 endpoint QMI/RMNET
      network functions.
      
      Cc: AceLan Kao <acelan.kao@canonical.com>
      Cc: Sebastian Sjoholm <ssjoholm@mac.com>
      Cc: Dan Williams <dcbw@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      2bb70f0a
    • A
      USB: serial: option: add support for SIM7070/SIM7080/SIM7090 modules · 1ac69879
      Aleksander Morgado 提交于
      These modules have 2 different USB layouts:
      
      The default layout with PID 0x9205 (AT+CUSBSELNV=1) exposes 4 TTYs and
      an ECM interface:
      
        T:  Bus=02 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  6 Spd=480 MxCh= 0
        D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
        P:  Vendor=1e0e ProdID=9205 Rev=00.00
        S:  Manufacturer=SimTech, Incorporated
        S:  Product=SimTech SIM7080
        S:  SerialNumber=1234567890ABCDEF
        C:  #Ifs= 6 Cfg#= 1 Atr=e0 MxPwr=500mA
        I:  If#=0x0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
        I:  If#=0x1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
        I:  If#=0x2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
        I:  If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
        I:  If#=0x4 Alt= 0 #EPs= 1 Cls=02(commc) Sub=06 Prot=00 Driver=cdc_ether
        I:  If#=0x5 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether
      
      The purpose of each TTY is as follows:
       * ttyUSB0: DIAG/QCDM port.
       * ttyUSB1: GNSS data.
       * ttyUSB2: AT-capable port (control).
       * ttyUSB3: AT-capable port (data).
      
      In the secondary layout with PID=0x9206 (AT+CUSBSELNV=86) the module
      exposes 6 TTY ports:
      
        T:  Bus=02 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  8 Spd=480 MxCh= 0
        D:  Ver= 2.00 Cls=02(commc) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
        P:  Vendor=1e0e ProdID=9206 Rev=00.00
        S:  Manufacturer=SimTech, Incorporated
        S:  Product=SimTech SIM7080
        S:  SerialNumber=1234567890ABCDEF
        C:  #Ifs= 6 Cfg#= 1 Atr=e0 MxPwr=500mA
        I:  If#=0x0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
        I:  If#=0x1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
        I:  If#=0x2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
        I:  If#=0x3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
        I:  If#=0x4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
        I:  If#=0x5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
      
      The purpose of each TTY is as follows:
       * ttyUSB0: DIAG/QCDM port.
       * ttyUSB1: GNSS data.
       * ttyUSB2: AT-capable port (control).
       * ttyUSB3: QFLOG interface.
       * ttyUSB4: DAM interface.
       * ttyUSB5: AT-capable port (data).
      Signed-off-by: NAleksander Morgado <aleksander@aleksander.es>
      Cc: stable@vger.kernel.org
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      1ac69879
  11. 24 8月, 2020 1 次提交
  12. 18 8月, 2020 1 次提交
  13. 21 7月, 2020 2 次提交
  14. 16 7月, 2020 1 次提交
  15. 14 7月, 2020 4 次提交