cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
takinsrss
Observer
Observer
7,008 Views
Registered: ‎09-19-2011

Problem w/ USB mass storage on ZC702 using linux-xlnx 4.9

I have been successfully using Linux 4.0.0 with my own hardware (zynq 45 with usb3320).  When I upgraded to linux 4.6 (and then to 4.9), the USB drive would be properly detected, but I would get the following message when I would mount the drive or write to the drive.  I then moved over to the ZC702 board which uses the same usb transceiver.  I get the same error.  USB to ethernet adapter works fine.    I built the default zynq kernel and zynq-zc702 device tree.   Anybody see similar issues?

 

ci_hdrc ci_hdrc.0: fatal error
ci_hdrc ci_hdrc.0: HC died; cleaning up
usb 1-1: USB disconnect, device number 2
sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 00 00 7f 00 00 08 00
blk_update_request: I/O error, dev sda, sector 127
sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 00 00 87 00 00 08 00
blk_update_request: I/O error, dev sda, sector 135
sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 00 00 8f 00 00 40 00
blk_update_request: I/O error, dev sda, sector 143
usb 1-1.1: USB disconnect, device number 4
ax88179_178a 1-1.1:1.0 eth1: unregister 'ax88179_178a' usb-ci_hdrc.0-1.1, ASIX AX88179 USB 3.0 Gigabit Ethernet
ax88179_178a 1-1.1:1.0 eth1: Failed to read reg index 0x0002: -19
ax88179_178a 1-1.1:1.0 eth1: Failed to write reg index 0x0002: -19
ax88179_178a 1-1.1:1.0 eth1 (unregistered): Failed to write reg index 0x0002: -19
sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 00 00 97 00 00 38 00
blk_update_request: I/O error, dev sda, sector 151
ax88179_178a 1-1.1:1.0 eth1 (unregistered): Failed to write reg index 0x0001: -19
ax88179_178a 1-1.1:1.0 eth1 (unregistered): Failed to write reg index 0x0002: -19
usb 1-1.4: USB disconnect, device number 6
sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x01 driverbyte=0x00
sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 00 00 77 00 00 08 00
blk_update_request: I/O error, dev sda, sector 119
EXT4-fs error (device sda1): __ext4_get_inode_loc:4323: inode #2: block 7: comm mount: unable to read itable block
sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x01 driverbyte=0x00
sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 00 00 cf 00 00 b0 00
blk_update_request: I/O error, dev sda, sector 207
EXT4-fs (sda1): get root inode failed
EXT4-fs (sda1): mount failed
VFS: Dirty inode writeback failed for block device sda1 (err=-5).
mount: mounting /dev/sda1 on /mnt2 failed: No such device or address                                          
 
0 Kudos
10 Replies
zoucao
Newbie
Newbie
6,971 Views
Registered: ‎11-14-2016

I also meet the same problem:

[ 845.573160] sda: sda1
[ 845.589910] sda: sda1
[ 899.091221] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[ 1067.799311] ci_hdrc ci_hdrc.0: fatal error
[ 1067.802028] ci_hdrc ci_hdrc.0: HC died; cleaning up
[ 1067.805729] usb 1-1: USB disconnect, device number 2
[ 1067.809398] usb 1-1.3: USB disconnect, device number 3
[ 1067.851510] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x01 driverbyte=0x00
[ 1067.851523] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x2a 2a 00 00 1d fe 90 00 00 f0 00
[ 1067.851530] blk_update_request: I/O error, dev sda, sector 1965712
[ 1067.869674] EXT4-fs warning (device sda1): ext4_end_bio:314: I/O error -5 writing to inode 12 (offset 830472192 size 8388608 starting block 246016)
[ 1067.881595] Buffer I/O error on device sda1, logical block 245504
[ 1067.881614] Buffer I/O error on device sda1, logical block 245505
[ 1067.881623] Buffer I/O error on device sda1, logical block 245506
[ 1067.881632] Buffer I/O error on device sda1, logical block 245507
[ 1067.881641] Buffer I/O error on device sda1, logical block 245508
[ 1067.881649] Buffer I/O error on device sda1, logical block 245509
[ 1067.881658] Buffer I/O error on device sda1, logical block 245510
[ 1067.881666] Buffer I/O error on device sda1, logical block 245511
[ 1067.881675] Buffer I/O error on device sda1, logical block 245512
[ 1067.881683] Buffer I/O error on device sda1, logical block 245513

0 Kudos
takinsrss
Observer
Observer
6,958 Views
Registered: ‎09-19-2011

I think I am also seeing something similar on my PCIe USB3.0 controller (See below).  I can use a USB3.0 to ethernet adapter and not have any issues.   If I use a mass storage device, I get the following error.

 

[root@ /mnt2]$ bonnie\+\+ -u root
Using uid:0, gid:0.
Writing with putc()...xilinx-pcie 50000000.axi-pcie: Master slave error
xhci_hcd 0000:01:00.0: Stopped the command ring failed, maybe the host is dead
xhci_hcd 0000:01:00.0: Host not halted after 16000 microseconds.
xhci_hcd 0000:01:00.0: Abort command ring failed
xhci_hcd 0000:01:00.0: HC died; cleaning up
usb 1-1: USB disconnect, device number 2

0 Kudos
hbachmann
Adventurer
Adventurer
6,924 Views
Registered: ‎05-03-2012

Hi,

i've the same problem on my custom board with running Kernel 4.6.0 (tag: xilinx-v2016.4) 

Linux (none) 4.6.0-xilinx #39 SMP PREEMPT Thu Feb 16 15:08:23 CET 2017 armv7l GNU/Linux

The error happens during copy to a mass storage device:

ci_hdrc ci_hdrc.1: fatal error
ci_hdrc ci_hdrc.1: HC died; cleaning up
usb 2-1: USB disconnect, device number 2
usb 2-1.1: USB disconnect, device number 8
sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x01 driverbyte=0x00
sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x2a 2a 00 00 81 e3 e8 00 00 f0 00
blk_update_request: I/O error, dev sda, sector 8512488
sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x01 driverbyte=0x00
sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x2a 2a 00 00 81 e4 d8 00 00 f0 00
blk_update_request: I/O error, dev sda, sector 8512728
FAT-fs (sda1): FAT read failed (blocknr 8385)
cp: write error: Input/output error
FAT-fs (sda1): FAT read failed (blocknr 8385)
cp: write error: Input/output error
FAT-fs (sda1): FAT read failed (blocknr 8385)
FAT-fs (sda1): bread failed in fat_clusters_flush
FAT-fs (sda1): unable to read inode block for updating (i_pos 236762629)
cp: write error: Input/output error
Command exited with non-zero status 1

Only a system reboote helps to get USB working again.

 

 

 

 

0 Kudos
probus
Contributor
Contributor
5,887 Views
Registered: ‎04-28-2014

Hi,

 

I have the same problem using Xilinx Kernel 4.9. Any solutions?

ci_hdrc ci_hdrc.0: fatal error
ci_hdrc ci_hdrc.0: HC died; cleaning up
usb 1-1: USB disconnect, device number 2
sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x01 driverbyte=0x00
sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 07 ab 60 00 00 f0 00
blk_update_request: I/O error, dev sda, sector 502624
sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x01 driverbyte=0x00
sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 07 ac 50 00 00 10 00
blk_update_request: I/O error, dev sda, sector 502864

Thanks

0 Kudos
hbachmann
Adventurer
Adventurer
5,817 Views
Registered: ‎05-03-2012

Hi probus,

no solution till now...

I've tried tag 'Xilinx-v2017.1' from https://github.com/Xilinx/linux-xlnx with the same error.

 

What to do next? Can anybody help?

0 Kudos
hbachmann
Adventurer
Adventurer
5,705 Views
Registered: ‎05-03-2012

 

Hi,

the error (HC died) is reproduceable with prebuilt binaries from Xilinx using Release 2017.1 on a ZC702 Board.

 

HW needed:

  • ZC702 Evaluation Board
  • SD Card (for booting)
  • USB flash drive

 

Workflow on ZC702 Evaluation Board:

  • Download ‘2017.1-zc702-release.tar.xz’ from http://www.wiki.xilinx.com/Zynq+2017.1+Release, extract files to SD Card
  • Boot ZC702 Board
  • Connect USB flash drive
    root@plnx_arm:~# usb 1-1: new high-speed USB device number 3 using ci_hdrc
    usb-storage 1-1:1.0: USB Mass Storage device detected
    scsi host0: usb-storage 1-1:1.0
    scsi 0:0:0:0: Direct-Access     Generic  Compact Flash    0.00 PQ: 0 ANSI: 2
    sd 0:0:0:0: Attached scsi generic sg0 type 0
    scsi 0:0:0:1: Direct-Access     Generic  SD/MMC           0.00 PQ: 0 ANSI: 2
    sd 0:0:0:0: [sda] Attached SCSI removable disk
    sd 0:0:0:1: Attached scsi generic sg1 type 0
    sd 0:0:0:1: [sdb] 62333952 512-byte logical blocks: (31.9 GB/29.7 GiB)
    scsi 0:0:0:2: Direct-Access     Generic  MS/MS-PRO        0.00 PQ: 0 ANSI: 2
    sd 0:0:0:2: Attached scsi generic sg2 type 0
    sd 0:0:0:2: [sdc] Attached SCSI removable disk
    sd 0:0:0:1: [sdb] Write Protect is off
    sd 0:0:0:1: [sdb] No Caching mode page found
    sd 0:0:0:1: [sdb] Assuming drive cache: write through
    scsi 0:0:0:3: Direct-Access     Generic  SM/xD-Picture    0.00 PQ: 0 ANSI: 2
    sd 0:0:0:3: Attached scsi generic sg3 type 0
     sdb: sdb1
    sd 0:0:0:1: [sdb] Attached SCSI removable disk
    sd 0:0:0:3: [sdd] Attached SCSI removable disk

 

  • Mount USB flash drive e.g. (mkdir /media/usb; mount –t vfat /dev/sdb1 /media

 

root@plnx_arm:~# mkdir -p /media/sdcard
root@plnx_arm:~# mount -t vfat /dev/sdb1 /media/sdcard/

 

 

  • Calling df (disc free), the error occurs

 

root@plnx_arm:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
deci_hdrc ci_hdrc.0: fatal error
ci_hdrc ci_hdrc.0: HC died; cleaning up
vtmpfs                501396         0    501396   0% /dev
tmpfusb 1-1: USB disconnect, device number 3
s                   515360       112    515248   0% /run
tmpfs sd 0:0:0:1: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
sd 0:0:0:1: [sdb] tag#0 CDB: opcode=0x28 28 00 00 00 24 95 00 00 f0 00
 
blk_update_request: I/O error, dev sdb, sector 9365
sd 0:0:0:1: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x01 driverbyte=0x00
sd 0:0:0:1: [sdb] tag#0 CDB: opcode=0x28 28 00 00 00 24 96 00 00 ef 00
blk_update_request: I/O error, dev sdb, sector 9366
sd 0:0:0:1: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x01 driverbyte=0x00
sd 0:0:0:1: [sdb] tag#0 CDB: opcode=0x28 28 00 00 00 25 85 00 00 0d 00
blk_update_request: I/O error, dev sdb, sector 9605
sd 0:0:0:1: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x01 driverbyte=0x00
sd 0:0:0:1: [sdb] tag#0 CDB: opcode=0x28 28 00 00 00 25 86 00 00 0c 00
blk_update_request: I/O error, dev sdb, sector 9606
sd 0:0:0:1: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x01 driverbyte=0x00
scsi 0:0:0:1: [sdb] tag#0 CDB: opcode=0x28 28 00 00 00 24 95 00 00 01 00
blk_update_request: I/O error, dev sdb, sector 9365
FAT-fs (sdb1): FAT read failed (blocknr 1173)
df: /media/sdcard: Input/output error

 

 

0 Kudos
hbachmann
Adventurer
Adventurer
5,384 Views
Registered: ‎05-03-2012

Hi,

 

solution:

https://github.com/torvalds/linux/commit/7a3cc2a7b2c723aa552028f4e66841cec183756d

(also as attachment)

 

Regards,

H.

 

probus
Contributor
Contributor
4,785 Views
Registered: ‎04-28-2014

Great! Thank you very much for the solution @hbachmann.

0 Kudos
ewong3
Adventurer
Adventurer
3,412 Views
Registered: ‎11-05-2014

I tried this patch and still getting the error.  Any other suggestions I can try?    Thanks.

0 Kudos
allhappy
Visitor
Visitor
1,239 Views
Registered: ‎05-06-2019

Would you share your kernel configurations and device tree about USB? I'm working on my custom board with zynq7010,Petalinux 2016.2. I tried to connect Ethernet using usb and ax88772.But it didn't work. Thanks a lot.

 

0 Kudos