1. 04 11月, 2017 2 次提交
  2. 27 10月, 2017 1 次提交
  3. 17 10月, 2017 1 次提交
    • M
      usb: cdc_acm: Add quirk for Elatec TWN3 · 765fb2f1
      Maksim Salau 提交于
      Elatec TWN3 has the union descriptor on data interface. This results in
      failure to bind the device to the driver with the following log:
        usb 1-1.2: new full speed USB device using streamplug-ehci and address 4
        usb 1-1.2: New USB device found, idVendor=09d8, idProduct=0320
        usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
        usb 1-1.2: Product: RFID Device (COM)
        usb 1-1.2: Manufacturer: OEM
        cdc_acm 1-1.2:1.0: Zero length descriptor references
        cdc_acm: probe of 1-1.2:1.0 failed with error -22
      
      Adding the NO_UNION_NORMAL quirk for the device fixes the issue.
      
      `lsusb -v` of the device:
      
      Bus 001 Device 003: ID 09d8:0320
      Device Descriptor:
        bLength                18
        bDescriptorType         1
        bcdUSB               2.00
        bDeviceClass            2 Communications
        bDeviceSubClass         0
        bDeviceProtocol         0
        bMaxPacketSize0        32
        idVendor           0x09d8
        idProduct          0x0320
        bcdDevice            3.00
        iManufacturer           1 OEM
        iProduct                2 RFID Device (COM)
        iSerial                 0
        bNumConfigurations      1
        Configuration Descriptor:
          bLength                 9
          bDescriptorType         2
          wTotalLength           67
          bNumInterfaces          2
          bConfigurationValue     1
          iConfiguration          0
          bmAttributes         0x80
            (Bus Powered)
          MaxPower              250mA
          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
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x83  EP 3 IN
              bmAttributes            3
                Transfer Type            Interrupt
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0020  1x 32 bytes
              bInterval               2
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        1
            bAlternateSetting       0
            bNumEndpoints           2
            bInterfaceClass        10 CDC Data
            bInterfaceSubClass      0 Unused
            bInterfaceProtocol      0
            iInterface              0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x02  EP 2 OUT
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0020  1x 32 bytes
              bInterval               0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x81  EP 1 IN
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0020  1x 32 bytes
              bInterval               0
            CDC Header:
              bcdCDC               1.10
            CDC Call Management:
              bmCapabilities       0x03
                call management
                use DataInterface
              bDataInterface          1
            CDC ACM:
              bmCapabilities       0x06
                sends break
                line coding and serial state
            CDC Union:
              bMasterInterface        0
              bSlaveInterface         1
      Device Status:     0x0000
        (Bus Powered)
      Signed-off-by: NMaksim Salau <msalau@iotecha.com>
      Acked-by: NOliver Neukum <oneukum@suse.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      765fb2f1
  4. 25 9月, 2017 1 次提交
    • B
      USB: cdc-wdm: ignore -EPIPE from GetEncapsulatedResponse · 8fec9355
      Bjørn Mork 提交于
      The driver will forward errors to userspace after turning most of them
      into -EIO. But all status codes are not equal. The -EPIPE (stall) in
      particular can be seen more as a result of normal USB signaling than
      an actual error. The state is automatically cleared by the USB core
      without intervention from either driver or userspace.
      
      And most devices and firmwares will never trigger a stall as a result
      of GetEncapsulatedResponse. This is in fact a requirement for CDC WDM
      devices. Quoting from section 7.1 of the CDC WMC spec revision 1.1:
      
        The function shall not return STALL in response to
        GetEncapsulatedResponse.
      
      But this driver is also handling GetEncapsulatedResponse on behalf of
      the qmi_wwan and cdc_mbim drivers. Unfortunately the relevant specs
      are not as clear wrt stall. So some QMI and MBIM devices *will*
      occasionally stall, causing the GetEncapsulatedResponse to return an
      -EPIPE status. Translating this into -EIO for userspace has proven to
      be harmful. Treating it as an empty read is safer, making the driver
      behave as if the device was conforming to the CDC WDM spec.
      
      There have been numerous reports of issues related to -EPIPE errors
      from some newer CDC MBIM devices in particular, like for example the
      Fibocom L831-EAU.  Testing on this device has shown that the issues
      go away if we simply ignore the -EPIPE status.  Similar handling of
      -EPIPE is already known from e.g. usb_get_string()
      
      The -EPIPE log message is still kept to let us track devices with this
      unexpected behaviour, hoping that it attracts attention from firmware
      developers.
      
      Cc: <stable@vger.kernel.org>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100938Reported-and-tested-by: NChristian Ehrig <christian.ehrig@mediamarktsaturn-bt.com>
      Reported-and-tested-by: NPatrick Chilton <chpatrick@gmail.com>
      Reported-and-tested-by: NAndreas Böhler <news@aboehler.at>
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Acked-by: NOliver Neukum <oneukum@suse.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8fec9355
  5. 11 8月, 2017 1 次提交
  6. 22 7月, 2017 1 次提交
  7. 17 7月, 2017 1 次提交
  8. 17 5月, 2017 1 次提交
  9. 26 4月, 2017 1 次提交
  10. 18 4月, 2017 1 次提交
  11. 01 4月, 2017 4 次提交
  12. 29 3月, 2017 1 次提交
  13. 23 3月, 2017 2 次提交
  14. 17 3月, 2017 2 次提交
    • J
      USB: usbtmc: fix probe error path · 2e47c535
      Johan Hovold 提交于
      Make sure to initialise the return value to avoid having allocation
      failures going unnoticed when allocating interrupt-endpoint resources.
      
      This prevents use-after-free or worse when the device is later unbound.
      
      Fixes: dbf3e7f6 ("Implement an ioctl to support the USMTMC-USB488 READ_STATUS_BYTE operation.")
      Cc: stable <stable@vger.kernel.org>     # 4.6
      Cc: Dave Penkler <dpenkler@gmail.com>
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2e47c535
    • J
      USB: usbtmc: add missing endpoint sanity check · 687e0687
      Johan Hovold 提交于
      USBTMC devices are required to have a bulk-in and a bulk-out endpoint,
      but the driver failed to verify this, something which could lead to the
      endpoint addresses being taken from uninitialised memory.
      
      Make sure to zero all private data as part of allocation, and add the
      missing endpoint sanity check.
      
      Note that this also addresses a more recently introduced issue, where
      the interrupt-in-presence flag would also be uninitialised whenever the
      optional interrupt-in endpoint is not present. This in turn could lead
      to an interrupt urb being allocated, initialised and submitted based on
      uninitialised values.
      
      Fixes: dbf3e7f6 ("Implement an ioctl to support the USMTMC-USB488 READ_STATUS_BYTE operation.")
      Fixes: 5b775f67 ("USB: add USB test and measurement class driver")
      Cc: stable <stable@vger.kernel.org>     # 2.6.28
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      687e0687
  15. 02 3月, 2017 1 次提交
  16. 16 2月, 2017 1 次提交
  17. 27 1月, 2017 1 次提交
    • J
      USB: cdc-acm: fix TIOCGSERIAL flags · 4ddecf76
      Johan Hovold 提交于
      The driver reports that it always uses a low-latency mode by returning
      the ASYNC_LOW_LATENCY flag through TIOCGSERIAL.
      
      Even if this behaviour could not be changed, this may have made some
      sense prior to 7a9a65ce ("cdc-acm: Fix long standing abuse of
      tty->low_latency") which removed the unconditional setting of the
      corresponding tty low_latency flag (something which had always been
      broken in itself).
      
      Since the driver does not have a low-latency mode, let's drop the flag.
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4ddecf76
  18. 05 12月, 2016 1 次提交
  19. 21 11月, 2016 6 次提交
  20. 10 11月, 2016 3 次提交
  21. 07 11月, 2016 1 次提交
  22. 24 10月, 2016 1 次提交
  23. 28 9月, 2016 1 次提交
  24. 21 9月, 2016 1 次提交
  25. 13 9月, 2016 2 次提交
  26. 09 9月, 2016 1 次提交