linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* No SuperSpeedPlus on ASM2142
@ 2019-09-16  2:41 Loïc Yhuel
  2019-09-16 12:59 ` Mathias Nyman
  0 siblings, 1 reply; 7+ messages in thread
From: Loïc Yhuel @ 2019-09-16  2:41 UTC (permalink / raw)
  To: linux-usb

[-- Attachment #1: Type: text/plain, Size: 1740 bytes --]

Hello,

I'm trying to get Gen 2 working on this controller.
It drives 2 USB ports on the back panel of an ASUS Prime X399-A (latest BIOS).
ASM2142 FW is 170308_70_02_00 (seen with ASM2142A_MPTool on Windows).
On Windows 10 it uses the Microsoft xhci driver, and Gen 2 works.

On 5.3, I get :
[    1.008270] xhci_hcd 0000:08:00.0: Host supports USB 3.0 SuperSpeed
...
[    1.333145] usb 4-1: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd

lsusb shows 10 Gbps support in "SuperSpeedPlus USB Device Capability" for
both the root hub and the device.

For the root hub, commit ddd57980 broke the detection, since
xhci->usb3_rhub.min_rev is 0x1 instead of expected 0x10 (SBRN is 0x30).
Reverting it changes to "Host supports USB 3.1 Enhanced SuperSpeed", and the
speed of the root hub is 10000 in sysfs.
However, I only got the device detected as "SuperSpeedPlus Gen 2 USB" once,
and the performance didn't increase, so even if the "speed" in sysfs was 10000,
I think it didn't work. After a reboot, it reverted to being detected as Gen 1.

The device (JMS580 USB Gen 2 to SATA bridge, with an SSD) seems to have a
performance issue on Gen 1 (doesn't depend on the controller or the OS), with
about 280MB/s read (almost the same without UAS).
But Gen 2 on Windows gives 510MB/s read, so even the only time Linux reported
10 Gbps speed, if it was working "hdparm -t" should have improved.

As a side note, the runtime power management doesn't seem to work either, but
since it isn't the default configuration, unless this controller is
used on laptops
it probably doesn't matter.
If the power/control of the PCIe device and its two root hubs are all set to
"auto", it is suspended if there is no USB device, and doesn't wake up on plug.

[-- Attachment #2: lsusb_5.3.txt --]
[-- Type: text/plain, Size: 9244 bytes --]

Bus 004 Device 002: ID 0578:0578 Intrinsix Corp. JMS580
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.10
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         9
  idVendor           0x0578 Intrinsix Corp.
  idProduct          0x0578 
  bcdDevice           41.01
  iManufacturer           1 JMicron
  iProduct                2 JMS580
  iSerial                 3 000000001114030541CB
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0079
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower                8mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      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     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       1
      bNumEndpoints           4
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     98 
      iInterface             10 MSC USB Attached SCSI
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst               0
        Command pipe (0x01)
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst               0
        MaxStreams             32
        Status pipe (0x02)
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              14
        MaxStreams             32
        Data-in pipe (0x03)
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15
        MaxStreams             32
        Data-out pipe (0x04)
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength       0x002a
  bNumDeviceCaps          3
  USB 2.0 Extension Device Capability:
    bLength                 7
    bDescriptorType        16
    bDevCapabilityType      2
    bmAttributes   0x00000f0e
      BESL Link Power Management (LPM) Supported
    BESL value     3840 us 
  SuperSpeed USB Device Capability:
    bLength                10
    bDescriptorType        16
    bDevCapabilityType      3
    bmAttributes         0x00
    wSpeedsSupported   0x000e
      Device can operate at Full Speed (12Mbps)
      Device can operate at High Speed (480Mbps)
      Device can operate at SuperSpeed (5Gbps)
    bFunctionalitySupport   1
      Lowest fully-functional device speed is Full Speed (12Mbps)
    bU1DevExitLat          10 micro seconds
    bU2DevExitLat          32 micro seconds
  SuperSpeedPlus USB Device Capability:
    bLength                20
    bDescriptorType        16
    bDevCapabilityType     10
    bmAttributes         0x00000001
      Sublink Speed Attribute count 1
      Sublink Speed ID count 0
    wFunctionalitySupport   0x1100
    bmSublinkSpeedAttr[0]   0x000a4030
      Speed Attribute ID: 0 10Gb/s Symmetric RX SuperSpeedPlus
    bmSublinkSpeedAttr[1]   0x000a40b0
      Speed Attribute ID: 0 10Gb/s Symmetric TX SuperSpeedPlus
Device Status:     0x0001
  Self Powered

Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 
  bDeviceProtocol         3 
  bMaxPacketSize0         9
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0003 3.0 root hub
  bcdDevice            5.03
  iManufacturer           3 Linux 5.3.0-rc8+ xhci-hcd
  iProduct                2 xHCI Host Controller
  iSerial                 1 0000:08:00.0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x001f
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval              12
        bMaxBurst               0
Hub Descriptor:
  bLength              12
  bDescriptorType      42
  nNbrPorts             2
  wHubCharacteristic 0x000a
    No power switching (usb 1.0)
    Per-port overcurrent protection
  bPwrOn2PwrGood       10 * 2 milli seconds
  bHubContrCurrent      0 milli Ampere
  bHubDecLat          0.0 micro seconds
  wHubDelay             0 nano seconds
  DeviceRemovable    0x00
 Hub Port Status:
   Port 1: 0000.0203 5Gbps power U0 enable connect
   Port 2: 0000.02a0 5Gbps power Rx.Detect
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength       0x002b
  bNumDeviceCaps          2
  SuperSpeed USB Device Capability:
    bLength                10
    bDescriptorType        16
    bDevCapabilityType      3
    bmAttributes         0x00
    wSpeedsSupported   0x0008
      Device can operate at SuperSpeed (5Gbps)
    bFunctionalitySupport   3
      Lowest fully-functional device speed is SuperSpeed (5Gbps)
    bU1DevExitLat           0 micro seconds
    bU2DevExitLat           0 micro seconds
  SuperSpeedPlus USB Device Capability:
    bLength                28
    bDescriptorType        16
    bDevCapabilityType     10
    bmAttributes         0x00000023
      Sublink Speed Attribute count 3
      Sublink Speed ID count 1
    wFunctionalitySupport   0x0001
    bmSublinkSpeedAttr[0]   0x00050034
      Speed Attribute ID: 4 5Gb/s Symmetric RX SuperSpeed
    bmSublinkSpeedAttr[1]   0x000500b4
      Speed Attribute ID: 4 5Gb/s Symmetric TX SuperSpeed
    bmSublinkSpeedAttr[2]   0x000a4035
      Speed Attribute ID: 5 10Gb/s Symmetric RX SuperSpeedPlus
    bmSublinkSpeedAttr[3]   0x000a40b5
      Speed Attribute ID: 5 10Gb/s Symmetric TX SuperSpeedPlus
Device Status:     0x0001
  Self Powered

[-- Attachment #3: lspci_5.3.txt --]
[-- Type: text/plain, Size: 2967 bytes --]

08:00.0 USB controller: ASMedia Technology Inc. ASM2142 USB 3.1 Host Controller (prog-if 30 [XHCI])
	Subsystem: ASUSTeK Computer Inc. Device 8756
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 64 bytes
	Interrupt: pin A routed to IRQ 54
	NUMA node: 0
	Region 0: Memory at ba300000 (64-bit, non-prefetchable) [size=32K]
	Capabilities: [50] MSI: Enable+ Count=1/8 Maskable- 64bit+
		Address: 00000000fee0d000  Data: 4021
	Capabilities: [78] Power Management version 3
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0+,D1-,D2-,D3hot-,D3cold-)
		Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [80] Express (v2) Legacy Endpoint, MSI 00
		DevCap:	MaxPayload 512 bytes, PhantFunc 0, Latency L0s <64ns, L1 <2us
			ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
		DevCtl:	CorrErr- NonFatalErr- FatalErr- UnsupReq-
			RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+
			MaxPayload 512 bytes, MaxReadReq 512 bytes
		DevSta:	CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-
		LnkCap:	Port #0, Speed 8GT/s, Width x2, ASPM L0s L1, Exit Latency L0s <2us, L1 unlimited
			ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp+
		LnkCtl:	ASPM Disabled; RCB 64 bytes Disabled- CommClk+
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 5GT/s (downgraded), Width x2 (ok)
			TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
		DevCap2: Completion Timeout: Not Supported, TimeoutDis-, LTR+, OBFF Not Supported
			 AtomicOpsCap: 32bit- 64bit- 128bitCAS-
		DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled
			 AtomicOpsCtl: ReqEn-
		LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-
			 Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
			 Compliance De-emphasis: -6dB
		LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-, EqualizationPhase1-
			 EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
	Capabilities: [100 v1] Advanced Error Reporting
		UESta:	DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
		UEMsk:	DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
		UESvrt:	DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
		CESta:	RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
		CEMsk:	RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
		AERCap:	First Error Pointer: 00, ECRCGenCap+ ECRCGenEn- ECRCChkCap- ECRCChkEn-
			MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
		HeaderLog: 00000000 00000000 00000000 00000000
	Capabilities: [200 v1] Secondary PCI Express <?>
	Capabilities: [300 v1] Latency Tolerance Reporting
		Max snoop latency: 0ns
		Max no snoop latency: 0ns
	Kernel driver in use: xhci_hcd

[-- Attachment #4: dmesg_5.3.txt --]
[-- Type: text/plain, Size: 3007 bytes --]

[    0.177632] pci 0000:08:00.0: [1b21:2142] type 00 class 0x0c0330
[    0.177667] pci 0000:08:00.0: reg 0x10: [mem 0xba300000-0xba307fff 64bit]
[    0.177853] pci 0000:08:00.0: PME# supported from D0
[    0.177897] pci 0000:08:00.0: 8.000 Gb/s available PCIe bandwidth, limited by 5 GT/s x2 link at 0000:02:09.0 (capable of 15.752 Gb/s with 8 GT/s x2 link)
...
[    0.953061] xhci_hcd 0000:08:00.0: xHCI Host Controller
[    0.953086] xhci_hcd 0000:08:00.0: new USB bus registered, assigned bus number 3
[    1.007915] xhci_hcd 0000:08:00.0: hcc params 0x0200ef81 hci version 0x110 quirks 0x0000000000000010
[    1.008103] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.03
[    1.008104] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.008105] usb usb3: Product: xHCI Host Controller
[    1.008105] usb usb3: Manufacturer: Linux 5.3.0-rc8+ xhci-hcd
[    1.008106] usb usb3: SerialNumber: 0000:08:00.0
[    1.008159] hub 3-0:1.0: USB hub found
[    1.008164] hub 3-0:1.0: 2 ports detected
[    1.008247] xhci_hcd 0000:08:00.0: xHCI Host Controller
[    1.008269] xhci_hcd 0000:08:00.0: new USB bus registered, assigned bus number 4
[    1.008270] xhci_hcd 0000:08:00.0: Host supports USB 3.0 SuperSpeed
[    1.008296] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[    1.008306] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.03
[    1.008307] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.008308] usb usb4: Product: xHCI Host Controller
[    1.008308] usb usb4: Manufacturer: Linux 5.3.0-rc8+ xhci-hcd
[    1.008309] usb usb4: SerialNumber: 0000:08:00.0
[    1.008353] hub 4-0:1.0: USB hub found
[    1.008358] hub 4-0:1.0: 2 ports detected
...
[    1.333145] usb 4-1: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd
[    1.350639] usb 4-1: New USB device found, idVendor=0578, idProduct=0578, bcdDevice=41.01
[    1.350640] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    1.350641] usb 4-1: Product: JMS580
[    1.350641] usb 4-1: Manufacturer: JMicron
[    1.350642] usb 4-1: SerialNumber: 000000001114030541CB
...
[    3.948947] scsi host10: uas
[    3.949320] scsi 10:0:0:0: Direct-Access     M4-CT128 M4SSD2           4101 PQ: 0 ANSI: 6
[    3.949722] sd 10:0:0:0: Attached scsi generic sg1 type 0
[    3.949875] usbcore: registered new interface driver uas
[    3.950157] sd 10:0:0:0: [sdb] 250069680 512-byte logical blocks: (128 GB/119 GiB)
[    3.950159] sd 10:0:0:0: [sdb] 4096-byte physical blocks
[    3.950250] sd 10:0:0:0: [sdb] Write Protect is off
[    3.950251] sd 10:0:0:0: [sdb] Mode Sense: 53 00 00 08
[    3.950426] sd 10:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.950936] sd 10:0:0:0: [sdb] Optimal transfer size 33553920 bytes not a multiple of physical block size (4096 bytes)
[    3.951940]  sdb: sdb1 sdb2
[    3.953018] sd 10:0:0:0: [sdb] Attached SCSI disk

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

end of thread, other threads:[~2019-10-07 23:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-16  2:41 No SuperSpeedPlus on ASM2142 Loïc Yhuel
2019-09-16 12:59 ` Mathias Nyman
2019-09-16 15:19   ` Loïc Yhuel
2019-09-16 20:53     ` Loïc Yhuel
2019-09-24  7:57       ` Mathias Nyman
2019-09-24 15:50         ` Loïc Yhuel
2019-10-07 23:37           ` ASM2142 issues Loïc Yhuel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).