All of lore.kernel.org
 help / color / mirror / Atom feed
* Failure prints during format or mounting a usb storage device
@ 2020-07-04 18:21 Sai Pavan Boddu
  2020-07-04 18:24 ` Paul Zimmerman
  0 siblings, 1 reply; 12+ messages in thread
From: Sai Pavan Boddu @ 2020-07-04 18:21 UTC (permalink / raw)
  To: Gerd Hoffmann, pauldzim; +Cc: Peter Maydell, qemu-devel, Vikram Garhwal

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

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<mailto:peter.maydell@linaro.org>

=====================
Steps to reproduce:

  1.  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
  2.  Hotplug usb-storage:
                                device_add usb-storage,bus=xhci1.0,port=1,id=usbdev1,drive=stick

  1.  Format &  mount the detected device
mkfs.vfat -F 32 /dev/sda
mount /dev/sda /mnt
You 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


[-- Attachment #2: Type: text/html, Size: 8613 bytes --]

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

end of thread, other threads:[~2020-07-09 21:56 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-04 18:21 Failure prints during format or mounting a usb storage device Sai Pavan Boddu
2020-07-04 18:24 ` Paul Zimmerman
2020-07-06 22:21   ` Paul Zimmerman
2020-07-06 23:12     ` Paul Zimmerman
2020-07-07  7:57       ` Gerd Hoffmann
2020-07-07 20:23         ` Paul Zimmerman
2020-07-08  7:29           ` Gerd Hoffmann
2020-07-08  7:57             ` Paul Zimmerman
2020-07-08 10:29               ` Gerd Hoffmann
2020-07-09  6:02                 ` Paul Zimmerman
2020-07-09  7:57                   ` Gerd Hoffmann
2020-07-09 21:55                     ` Paul Zimmerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.