Project

General

Profile

Actions

Bug #13843

open

USB errors: slot in wrong state: 19

Added by Stephan Althaus 13 days ago. Updated 10 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Hello!

Since a few weeks i get I/O errors "failed to read cluster"
when i read my SDCard with 2 different adapters. It worked fine last
year, i think january, too.

I checked the SDCard with badblocks on a linux with the same Adapter in
a USB2 port - all went ok.
I checked the SDCard on a different OI box with the same Adapter in
a USB3 port - all went ok.

I use a fuse for the exfat filesystem, but i think it is a USB driver
bug.

What can i do to get to the root cause ?

Any hints are welcome!

Stephan

This i got this morning when i did a copy:

/home1/home/steven/Documents/Pictures/Test/2021-05-31/DS306054.ARW: I/O error
/home1/home/steven/Documents/Pictures/Test/2021-05-31/DS306055.ARW: I/O error
cp: cannot access /media/sdcard/DCIM/103MSDCF/*

steven@dell6510:~$ dmesg

May 31, 2021 at 07:18:39 AM CEST
May 31 07:18:23 dell6510 xhci: [ID 617155 kern.info] NOTICE: xhci2: endpoint is in state 3
May 31 07:18:23 dell6510 mount.exfat-fus2691: [ID 251512 user.error] failed to read cluster 0xb7f8
May 31 07:18:23 dell6510 xhci: [ID 902155 kern.info] NOTICE: xhci2: xhci stop endpoint command (2)/slot (8) in wrong state: 19
May 31 07:18:23 dell6510 xhci: [ID 617155 kern.info] NOTICE: xhci2: endpoint is in state 3
May 31 07:18:23 dell6510 xhci: [ID 902155 kern.info] NOTICE: xhci2: xhci stop endpoint command (3)/slot (8) in wrong state: 19
May 31 07:18:23 dell6510 xhci: [ID 617155 kern.info] NOTICE: xhci2: endpoint is in state 3

Actions #1

Updated by Stephan Althaus 13 days ago

$ sudo prtconf -dD | grep -i xhci
pci1028,7b1 (pciex8086,a12f) [Intel Corporation 100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller], instance #2 (driver name: xhci)
pci1028,7b1 (pciex8086,15db) [Intel Corporation JHL6340 Thunderbolt 3 USB 3.1 Controller (C step) [Alpine Ridge 2C 2016]] (driver name: xhci)

$ mdb -ke '::prtusb'
INDEX DRIVER INST NODE GEN VID.PID PRODUCT
1 xhci 2 pci1028,7b1 3.0 0000.0000 No Product String
2 hid 39 mouse 1.1 045e.0040 Microsoft 3-Button Mouse with IntelliEye(TM)
3 usb_mid 31 device 1.1 0bf8.100c FSC KBPC PX
4 hubd 18 hub 2.0 413c.2513 No Product String
5 usb_mid 32 device 2.0 8087.0a2b No Product String
6 hubd 19 hub 2.0 413c.2513 No Product String
7 usb_mid 33 device 1.1 0a5c.5832 5880
8 scsa2usb 24 storage 3.1 0781.cfca SDDR-409

Actions #2

Updated by Stephan Althaus 13 days ago

$ mdb ke '::xhci_device'
<--
snip --->

SANDISK - SDDR-409
Port 21 | Slot 10 | # Endpoints 01
EP Type State Head Tail
0 CONTROL Running 0xdb 0xdb

Actions #3

Updated by Stephan Althaus 12 days ago

$ mdb ke "::prtusb -v"
<-
snip -->
INDEX DRIVER INST NODE GEN VID.PID PRODUCT
8 scsa2usb 24 storage 3.1 0781.cfca SDDR-409

Device Descriptor {
bLength = 0x12
bDescriptorType = 0x1
bcdUSB = 0x310
bDeviceClass = 0
bDeviceSubClass = 0
bDeviceProtocol = 0
bMaxPacketSize0 = 0x9
idVendor = 0x781
idProduct = 0xcfca
bcdDevice = 0x3
iManufacturer = 0x3
iProduct = 0x4
iSerialNumber = 0x2
bNumConfigurations = 0x1
}
-- Active Config Index 0
Configuration Descriptor {
bLength = 0x9
bDescriptorType = 0x2
wTotalLength = 0x2c
bNumInterfaces = 0x1
bConfigurationValue = 0x1
iConfiguration = 0x0
bmAttributes = 0x80
bMaxPower = 0x70
}
Interface Descriptor {
bLength = 0x9
bDescriptorType = 0x4
bInterfaceNumber = 0x0
bAlternateSetting = 0x0
bNumEndpoints = 0x2
bInterfaceClass = 0x8
bInterfaceSubClass = 0x6
bInterfaceProtocol = 0x50
iInterface = 0x0
}
Endpoint Descriptor {
bLength = 0x7
bDescriptorType = 0x5
bEndpointAddress = 0x81
bmAttributes = 0x2
wMaxPacketSize = 0x400
bInterval = 0x0
}
SuperSpeed Endpoint Companion Descriptor {
bLength = 0x6
bDescriptorType = 0x30
bMaxBurst = 0x4
bmAttributes = 0x0
wBytesPerInterval = 0x0
}
Endpoint Descriptor {
bLength = 0x7
bDescriptorType = 0x5
bEndpointAddress = 0x2
bmAttributes = 0x2
wMaxPacketSize = 0x400
bInterval = 0x0
}
SuperSpeed Endpoint Companion Descriptor {
bLength = 0x6
bDescriptorType = 0x30
bMaxBurst = 0x4
bmAttributes = 0x0
wBytesPerInterval = 0x0
}

Actions #4

Updated by Stephan Althaus 10 days ago

Hello!

I would happily run some dtrace script on my laptop setup to get closer to the root cause.

May someone please provide such a script ?

Thanks!
Stephan

Actions #5

Updated by Stephan Althaus 10 days ago

BTW, there is a small typo in
illumos-gate/usr/src/uts/common/io/usb/hcd/xhci/xhci_command.c

on line 720

xhci_log (xhcip, "!unexpected error when resetting enpoint : %d",
Actions

Also available in: Atom PDF