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. 10 10月, 2020 1 次提交
  7. 09 10月, 2020 1 次提交
  8. 08 10月, 2020 7 次提交
  9. 07 10月, 2020 1 次提交
  10. 05 10月, 2020 3 次提交
    • V
      usb: cdc-acm: add quirk to blacklist ETAS ES58X devices · a4f88430
      Vincent Mailhol 提交于
      The ES58X devices has a CDC ACM interface (used for debug
      purpose). During probing, the device is thus recognized as USB Modem
      (CDC ACM), preventing the etas-es58x module to load:
        usbcore: registered new interface driver etas_es58x
        usb 1-1.1: new full-speed USB device number 14 using xhci_hcd
        usb 1-1.1: New USB device found, idVendor=108c, idProduct=0159, bcdDevice= 1.00
        usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
        usb 1-1.1: Product: ES581.4
        usb 1-1.1: Manufacturer: ETAS GmbH
        usb 1-1.1: SerialNumber: 2204355
        cdc_acm 1-1.1:1.0: No union descriptor, testing for castrated device
        cdc_acm 1-1.1:1.0: ttyACM0: USB ACM device
      
      Thus, these have been added to the ignore list in
      drivers/usb/class/cdc-acm.c
      
      N.B. Future firmware release of the ES58X will remove the CDC-ACM
      interface.
      
      `lsusb -v` of the three devices variant (ES581.4, ES582.1 and
      ES584.1):
      
        Bus 001 Device 011: ID 108c:0159 Robert Bosch GmbH ES581.4
        Device Descriptor:
          bLength                18
          bDescriptorType         1
          bcdUSB               1.10
          bDeviceClass            2 Communications
          bDeviceSubClass         0
          bDeviceProtocol         0
          bMaxPacketSize0        64
          idVendor           0x108c Robert Bosch GmbH
          idProduct          0x0159
          bcdDevice            1.00
          iManufacturer           1 ETAS GmbH
          iProduct                2 ES581.4
          iSerial                 3 2204355
          bNumConfigurations      1
          Configuration Descriptor:
            bLength                 9
            bDescriptorType         2
            wTotalLength       0x0035
            bNumInterfaces          1
            bConfigurationValue     1
            iConfiguration          5 Bus Powered Configuration
            bmAttributes         0x80
              (Bus Powered)
            MaxPower              100mA
            Interface Descriptor:
              bLength                 9
              bDescriptorType         4
              bInterfaceNumber        0
              bAlternateSetting       0
              bNumEndpoints           3
              bInterfaceClass         2 Communications
              bInterfaceSubClass      2 Abstract (modem)
              bInterfaceProtocol      0
              iInterface              4 ACM Control Interface
              CDC Header:
                bcdCDC               1.10
              CDC Call Management:
                bmCapabilities       0x01
                  call management
                bDataInterface          0
              CDC ACM:
                bmCapabilities       0x06
                  sends break
                  line coding and serial state
              Endpoint Descriptor:
                bLength                 7
                bDescriptorType         5
                bEndpointAddress     0x81  EP 1 IN
                bmAttributes            3
                  Transfer Type            Interrupt
                  Synch Type               None
                  Usage Type               Data
                wMaxPacketSize     0x0010  1x 16 bytes
                bInterval              10
              Endpoint Descriptor:
                bLength                 7
                bDescriptorType         5
                bEndpointAddress     0x82  EP 2 IN
                bmAttributes            2
                  Transfer Type            Bulk
                  Synch Type               None
                  Usage Type               Data
                wMaxPacketSize     0x0040  1x 64 bytes
                bInterval               0
              Endpoint Descriptor:
                bLength                 7
                bDescriptorType         5
                bEndpointAddress     0x03  EP 3 OUT
                bmAttributes            2
                  Transfer Type            Bulk
                  Synch Type               None
                  Usage Type               Data
                wMaxPacketSize     0x0040  1x 64 bytes
                bInterval               0
        Device Status:     0x0000
          (Bus Powered)
      
        Bus 001 Device 012: ID 108c:0168 Robert Bosch GmbH ES582
        Device Descriptor:
          bLength                18
          bDescriptorType         1
          bcdUSB               2.00
          bDeviceClass            2 Communications
          bDeviceSubClass         0
          bDeviceProtocol         0
          bMaxPacketSize0        64
          idVendor           0x108c Robert Bosch GmbH
          idProduct          0x0168
          bcdDevice            1.00
          iManufacturer           1 ETAS GmbH
          iProduct                2 ES582
          iSerial                 3 0108933
          bNumConfigurations      1
          Configuration Descriptor:
            bLength                 9
            bDescriptorType         2
            wTotalLength       0x0043
            bNumInterfaces          2
            bConfigurationValue     1
            iConfiguration          0
            bmAttributes         0x80
              (Bus Powered)
            MaxPower              500mA
            Interface Descriptor:
              bLength                 9
              bDescriptorType         4
              bInterfaceNumber        0
              bAlternateSetting       0
              bNumEndpoints           1
              bInterfaceClass         2 Communications
              bInterfaceSubClass      2 Abstract (modem)
              bInterfaceProtocol      1 AT-commands (v.25ter)
              iInterface              0
              CDC Header:
                bcdCDC               1.10
              CDC ACM:
                bmCapabilities       0x02
                  line coding and serial state
              CDC Union:
                bMasterInterface        0
                bSlaveInterface         1
              CDC Call Management:
                bmCapabilities       0x03
                  call management
                  use DataInterface
                bDataInterface          1
              Endpoint Descriptor:
                bLength                 7
                bDescriptorType         5
                bEndpointAddress     0x83  EP 3 IN
                bmAttributes            3
                  Transfer Type            Interrupt
                  Synch Type               None
                  Usage Type               Data
                wMaxPacketSize     0x0040  1x 64 bytes
                bInterval              16
            Interface Descriptor:
              bLength                 9
              bDescriptorType         4
              bInterfaceNumber        1
              bAlternateSetting       0
              bNumEndpoints           2
              bInterfaceClass        10 CDC Data
              bInterfaceSubClass      0
              bInterfaceProtocol      0
              iInterface              0
              Endpoint Descriptor:
                bLength                 7
                bDescriptorType         5
                bEndpointAddress     0x81  EP 1 IN
                bmAttributes            2
                  Transfer Type            Bulk
                  Synch Type               None
                  Usage Type               Data
                wMaxPacketSize     0x0200  1x 512 bytes
                bInterval               0
              Endpoint Descriptor:
                bLength                 7
                bDescriptorType         5
                bEndpointAddress     0x02  EP 2 OUT
                bmAttributes            2
                  Transfer Type            Bulk
                  Synch Type               None
                  Usage Type               Data
                wMaxPacketSize     0x0200  1x 512 bytes
                bInterval               0
        Device Qualifier (for other device speed):
          bLength                10
          bDescriptorType         6
          bcdUSB               2.00
          bDeviceClass            2 Communications
          bDeviceSubClass         0
          bDeviceProtocol         0
          bMaxPacketSize0        64
          bNumConfigurations      1
        Device Status:     0x0000
          (Bus Powered)
      
        Bus 001 Device 013: ID 108c:0169 Robert Bosch GmbH ES584.1
        Device Descriptor:
          bLength                18
          bDescriptorType         1
          bcdUSB               2.00
          bDeviceClass            2 Communications
          bDeviceSubClass         0
          bDeviceProtocol         0
          bMaxPacketSize0        64
          idVendor           0x108c Robert Bosch GmbH
          idProduct          0x0169
          bcdDevice            1.00
          iManufacturer           1 ETAS GmbH
          iProduct                2 ES584.1
          iSerial                 3 0100320
          bNumConfigurations      1
          Configuration Descriptor:
            bLength                 9
            bDescriptorType         2
            wTotalLength       0x0043
            bNumInterfaces          2
            bConfigurationValue     1
            iConfiguration          0
            bmAttributes         0x80
              (Bus Powered)
            MaxPower              500mA
            Interface Descriptor:
              bLength                 9
              bDescriptorType         4
              bInterfaceNumber        0
              bAlternateSetting       0
              bNumEndpoints           1
              bInterfaceClass         2 Communications
              bInterfaceSubClass      2 Abstract (modem)
              bInterfaceProtocol      1 AT-commands (v.25ter)
              iInterface              0
              CDC Header:
                bcdCDC               1.10
              CDC ACM:
                bmCapabilities       0x02
                  line coding and serial state
              CDC Union:
                bMasterInterface        0
                bSlaveInterface         1
              CDC Call Management:
                bmCapabilities       0x03
                  call management
                  use DataInterface
                bDataInterface          1
              Endpoint Descriptor:
                bLength                 7
                bDescriptorType         5
                bEndpointAddress     0x83  EP 3 IN
                bmAttributes            3
                  Transfer Type            Interrupt
                  Synch Type               None
                  Usage Type               Data
                wMaxPacketSize     0x0040  1x 64 bytes
                bInterval              16
            Interface Descriptor:
              bLength                 9
              bDescriptorType         4
              bInterfaceNumber        1
              bAlternateSetting       0
              bNumEndpoints           2
              bInterfaceClass        10 CDC Data
              bInterfaceSubClass      0
              bInterfaceProtocol      0
              iInterface              0
              Endpoint Descriptor:
                bLength                 7
                bDescriptorType         5
                bEndpointAddress     0x81  EP 1 IN
                bmAttributes            2
                  Transfer Type            Bulk
                  Synch Type               None
                  Usage Type               Data
                wMaxPacketSize     0x0200  1x 512 bytes
                bInterval               0
              Endpoint Descriptor:
                bLength                 7
                bDescriptorType         5
                bEndpointAddress     0x02  EP 2 OUT
                bmAttributes            2
                  Transfer Type            Bulk
                  Synch Type               None
                  Usage Type               Data
                wMaxPacketSize     0x0200  1x 512 bytes
                bInterval               0
        Device Qualifier (for other device speed):
          bLength                10
          bDescriptorType         6
          bcdUSB               2.00
          bDeviceClass            2 Communications
          bDeviceSubClass         0
          bDeviceProtocol         0
          bMaxPacketSize0        64
          bNumConfigurations      1
        Device Status:     0x0000
          (Bus Powered)
      Signed-off-by: NVincent Mailhol <mailhol.vincent@wanadoo.fr>
      Cc: stable <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20201002154219.4887-8-mailhol.vincent@wanadoo.frSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a4f88430
    • M
      USB: serial: ftdi_sio: use cur_altsetting for consistency · 711a3781
      Mychaela N. Falconia 提交于
      ftdi_determine_type() function had this construct in it to get the
      number of the interface it is operating on:
      
        inter = serial->interface->altsetting->desc.bInterfaceNumber;
      
      Elsewhere in this driver cur_altsetting is used instead for this
      purpose.  Change ftdi_determine_type() to use cur_altsetting
      for consistency.
      Signed-off-by: NMychaela N. Falconia <falcon@freecalypso.org>
      [ johan: fix old style issues; drop braces and random white space ]
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      711a3781
    • L
      USB: serial: option: Add Telit FT980-KS composition · 924a9213
      Leonid Bloch 提交于
      This commit adds the following Telit FT980-KS composition:
      
      0x1054: rndis, diag, adb, nmea, modem, modem, aux
      
      AT commands can be sent to /dev/ttyUSB2.
      Signed-off-by: NLeonid Bloch <lb.workbox@gmail.com>
      Cc: stable@vger.kernel.org
      Link: https://lore.kernel.org/r/ce86bc05-f4e2-b199-0cdc-792715e3f275@asocscloud.com
      Link: https://lore.kernel.org/r/20201004155813.2342-1-lb.workbox@gmail.comSigned-off-by: NJohan Hovold <johan@kernel.org>
      924a9213
  11. 02 10月, 2020 5 次提交