All of lore.kernel.org
 help / color / mirror / Atom feed
* Cypress CDC ACM serial port not working correctly with autosuspend
@ 2023-01-29 11:44 Michael Laß
  2023-01-30 13:03 ` Oliver Neukum
  2023-01-30 13:08 ` Oliver Neukum
  0 siblings, 2 replies; 18+ messages in thread
From: Michael Laß @ 2023-01-29 11:44 UTC (permalink / raw)
  To: linux-usb

Hello,

I noticed an issue with the following USB to serial adapter when
autosuspend is enabled for that device:

    ID 04b4:0008 Cypress Semiconductor Corp. CDC ACM serial port

The problem is that the device silently drops any data received from
the serial connection whenever there is a pause in communication for
longer than one or two seconds. Then one needs to either touch the
device (e.g., /dev/ttyACM0) or send some characters via USB to receive
data again.

The problem can be circumvented by the following udev rule:
ACTION=="add|change", SUBSYSTEM=="usb", ATTR{idVendor}=="04b4", ATTR{idProduct}=="0008", TEST=="power/control", ATTR{power/control}="on"

Is this something that should already be applied by the kernel?

I'm running Linux 6.1.8. Below you find outputs of lspci and lsusb for
the relevant devices.


lspci -v for the USB controler:

06:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne USB 3.1 (prog-if 30 [XHCI])
        Subsystem: Lenovo Device 5082
        Flags: bus master, fast devsel, latency 0, IRQ 75, IOMMU group 7
        Memory at fd100000 (64-bit, non-prefetchable) [size=1M]
        Capabilities: [48] Vendor Specific Information: Len=08 <?>
        Capabilities: [50] Power Management version 3
        Capabilities: [64] Express Endpoint, MSI 00
        Capabilities: [a0] MSI: Enable- Count=1/8 Maskable- 64bit+
        Capabilities: [c0] MSI-X: Enable+ Count=8 Masked-
        Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
        Kernel driver in use: xhci_hcd
        Kernel modules: xhci_pci


lsusb -v for the USB device:

Bus 006 Device 010: ID 04b4:0008 Cypress Semiconductor Corp. CDC ACM serial port
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            2 Communications
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x04b4 Cypress Semiconductor Corp.
  idProduct          0x0008 CDC ACM serial port
  bcdDevice            0.00
  iManufacturer           1 2012 Cypress Semiconductor
  iProduct                2 Cypress-USB2UART-Ver1.0G
  iSerial                 4 827211C2091B
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0043
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          3 USB-UART Configuration
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              100mA
    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       0x00
        bDataInterface          1
      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               2
    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     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)



Best regards,
Michael

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2023-06-13  8:36 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-29 11:44 Cypress CDC ACM serial port not working correctly with autosuspend Michael Laß
2023-01-30 13:03 ` Oliver Neukum
2023-01-30 13:08 ` Oliver Neukum
2023-01-30 15:44   ` Michael Laß
2023-02-07 19:35     ` Michael Laß
2023-03-14 13:16     ` Oliver Neukum
2023-03-18 12:09       ` Michael Laß
2023-03-23  9:51         ` Oliver Neukum
2023-03-23 12:52           ` Michael Laß
2023-03-23 13:53             ` Oliver Neukum
2023-03-23 21:32               ` Michael Laß
2023-03-27  8:05                 ` Oliver Neukum
2023-06-03 23:59                   ` Warren Togami
2023-06-07 13:10                     ` Oliver Neukum
2023-06-08  0:48                       ` Warren Togami
2023-06-13  8:36                         ` Oliver Neukum
2023-06-12 18:39                       ` Michael Laß
2023-06-07 14:33                   ` Michael Laß

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.