Re: [linux-sunxi] Re: [PATCH] uas: ignore UAS for Norelsys NS1068(X) chips
From: Icenowy Zheng
Date: Sat Jan 06 2018 - 17:26:41 EST
ä 2018å1æ7æ GMT+08:00 äå6:12:57, Hans de Goede <hdegoede@xxxxxxxxxx> åå:
>Hi,
>
>On 05-01-18 17:56, Icenowy Zheng wrote:
>> The UAS mode of Norelsys NS1068(X) is reported to fail to work on
>> several platforms with the following error message:
>>
>> xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for unknown stream
>ring slot 1 ep 8
>> xhci-hcd xhci-hcd.0.auto: @00000000bf04a400 00000000 00000000
>1b000000 01098001
>>
>> And when trying to mount a partition on the disk the disk will
>> disconnect from the USB controller, then after re-connecting the
>device
>> will be offlined and not working at all.
>>
>> Falling back to USB mass storage can solve this problem, so ignore
>UAS
>> function of this chip.
>>
>> Cc: stable@xxxxxxxxxxxxxxx
>> Signed-off-by: Icenowy Zheng <icenowy@xxxxxxx>
>
>A quick internet search shows various problems with this device even
>under
>Windows, so yes this seems like a good idea:
>
>Acked-by: Hans de Goede <hdegoede@xxxxxxxxxx>
>
>> The NS1066 chip from the same vendor seems to also suffer from this
>> problem (its USB ID is 2537:1066) according to the report of Armbian
>> community. However I don't have such device (I have a USB HDD
>enclosure
>> with USB ID 2537:1066, but it doesn't report UAS function at all; as
>> it's
>
>If it has been reported to not work in uas mode then I think adding
>the same quirk for the 1066 device-id is a good idea, can you please
>submit a patch for that?
I don't have such devices, although as Armbian suggests
the 1066 device needs also to be blacklisted.
Maybe we can wait for an unforunate NS1066 user
to add the 1066 ID.
>
>Regards,
>
>Hans
>
>
>
>>
>> The `lsusb -v` result of my NS1068X is shown below:
>>
>> Bus 004 Device 002: ID 2537:1068
>> Device Descriptor:
>> bLength 18
>> bDescriptorType 1
>> bcdUSB 3.00
>> bDeviceClass 0
>> bDeviceSubClass 0
>> bDeviceProtocol 0
>> bMaxPacketSize0 9
>> idVendor 0x2537
>> idProduct 0x1068
>> bcdDevice 1.00
>> iManufacturer 1 Norelsys
>> iProduct 2 NS1068
>> iSerial 3 0123456789ABCDE
>> bNumConfigurations 1
>> Configuration Descriptor:
>> bLength 9
>> bDescriptorType 2
>> wTotalLength 121
>> bNumInterfaces 1
>> bConfigurationValue 1
>> iConfiguration 0
>> bmAttributes 0xc0
>> Self Powered
>> MaxPower 2mA
>> Interface Descriptor:
>> bLength 9
>> bDescriptorType 4
>> bInterfaceNumber 0
>> bAlternateSetting 0
>> bNumEndpoints 2
>> bInterfaceClass 8
>> bInterfaceSubClass 6
>> bInterfaceProtocol 80
>> 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
>> bInterfaceSubClass 6
>> bInterfaceProtocol 98
>> iInterface 0
>> 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 15
>> MaxStreams 8
>> Status pipe (0x02)
>> Endpoint Descriptor:
>> bLength 7
>> bDescriptorType 5
>> bEndpointAddress 0x06 EP 6 OUT
>> bmAttributes 2
>> Transfer Type Bulk
>> Synch Type None
>> Usage Type Data
>> wMaxPacketSize 0x0400 1x 1024 bytes
>> bInterval 0
>> bMaxBurst 15
>> Command pipe (0x01)
>> Endpoint Descriptor:
>> bLength 7
>> bDescriptorType 5
>> bEndpointAddress 0x84 EP 4 IN
>> bmAttributes 2
>> Transfer Type Bulk
>> Synch Type None
>> Usage Type Data
>> wMaxPacketSize 0x0400 1x 1024 bytes
>> bInterval 0
>> bMaxBurst 15
>> MaxStreams 8
>> Data-in pipe (0x03)
>> Endpoint Descriptor:
>> bLength 7
>> bDescriptorType 5
>> bEndpointAddress 0x05 EP 5 OUT
>> bmAttributes 2
>> Transfer Type Bulk
>> Synch Type None
>> Usage Type Data
>> wMaxPacketSize 0x0400 1x 1024 bytes
>> bInterval 0
>> bMaxBurst 15
>> MaxStreams 8
>> Data-out pipe (0x04)
>> Binary Object Store Descriptor:
>> bLength 5
>> bDescriptorType 15
>> wTotalLength 22
>> bNumDeviceCaps 2
>> USB 2.0 Extension Device Capability:
>> bLength 7
>> bDescriptorType 16
>> bDevCapabilityType 2
>> bmAttributes 0x00000002
>> HIRD Link Power Management (LPM) Supported
>> 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 2047 micro seconds
>> can't get debug descriptor: Resource temporarily unavailable
>> Device Status: 0x0001
>> Self Powered
>>
>> drivers/usb/storage/unusual_uas.h | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/drivers/usb/storage/unusual_uas.h
>b/drivers/usb/storage/unusual_uas.h
>> index 9c2ee55ad32e..38434d88954a 100644
>> --- a/drivers/usb/storage/unusual_uas.h
>> +++ b/drivers/usb/storage/unusual_uas.h
>> @@ -80,6 +80,13 @@ UNUSUAL_DEV(0x2109, 0x0711, 0x0000, 0x9999,
>> USB_SC_DEVICE, USB_PR_DEVICE, NULL,
>> US_FL_NO_ATA_1X),
>>
>> +/* Reported-by: Icenowy Zheng <icenowy@xxxxxxx> */
>> +UNUSUAL_DEV(0x2537, 0x1068, 0x0000, 0x9999,
>> + "Norelsys",
>> + "NS1068X",
>> + USB_SC_DEVICE, USB_PR_DEVICE, NULL,
>> + US_FL_IGNORE_UAS),
>> +
>> /* Reported-by: Takeo Nakayama <javhera@xxxxxxx> */
>> UNUSUAL_DEV(0x357d, 0x7788, 0x0000, 0x9999,
>> "JMicron",
>>