|
From: | Paul Zimmerman |
Subject: | Re: Failure prints during format or mounting a usb storage device |
Date: | Sat, 4 Jul 2020 11:24:38 -0700 |
Hi,
We are seeing some errors when a usb-storage device is formatted or mounted on the guest. Below is commit I have bisected it.
**************
Errors:
/ # mount /dev/sda /mnt
[New Thread 0x7fffd4680700 (LWP 23270)]
[ 33.258454] usb 2-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd
[ 33.399528] usb 2-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd
[ 33.544621] usb 2-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd
[ 33.560460] sd 2:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[ 33.562405] sd 2:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 00 10 00 00 00 01 00
[ 33.563389] blk_update_request: I/O error, dev sda, sector 4096 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
/ # [Thread 0x7fffd4680700 (LWP 23270) exited]
================
Bisect commit :
commit 7ad3d51ebb8a522ffcad391c4bef281245739dde
Author: Paul Zimmerman <pauldzim@gmail.com>
Date: Wed May 20 16:53:47 2020 -0700
usb: add short-packet handling to usb-storage driver
The dwc-hsotg (dwc2) USB host depends on a short packet to
indicate the end of an IN transfer. The usb-storage driver
currently doesn't provide this, so fix it.
I have tested this change rather extensively using a PC
emulation with xhci, ehci, and uhci controllers, and have
not observed any regressions.
Signed-off-by: Paul Zimmerman <pauldzim@gmail.com>
Message-id: 20200520235349.21215-6-pauldzim@gmail.com
Signed-off-by: Peter Maydell peter.maydell@linaro.org
=====================
Steps to reproduce:
- x86_64-softmmu/qemu-system-x86_64 -kernel bzImage -nographic -append "console=ttyS0" -m 512M -initrd initramfs.cpio.gz -device qemu-xhci,id=xhci1 -drive file=./usb.img,if=none,id=stick
- Hotplug usb-storage:
device_add usb-storage,bus=xhci1.0,port=1,id=usbdev1,drive=stick
- Format & mount the detected device
mkfs.vfat -F 32 /dev/sda
mount /dev/sda /mntYou can find the similar errors mentioned above at this stage.
Test Environment:
Host: Ubuntu 16.04 LTS
Guest: kernel version: 5.4.0 & BusyBox v1.31.1
Thanks & Regards,
Sai Pavan
[Prev in Thread] | Current Thread | [Next in Thread] |