Bug 1164665

Summary: hmp will print "usb-msd: Bad LUN 0" when add usb-bot bus without any device
Product: Red Hat Enterprise Linux 7 Reporter: Jun Li <juli>
Component: qemu-kvm-rhevAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 7.0CC: juzhang, kraxel, michen, qzhang, virt-maint, xfu
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-11-17 08:07:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jun Li 2014-11-17 05:29:06 UTC
Description of problem:
boot guest with usb-bot bus withou any device under this bus, qemu-kvm will print "usb-msd: Bad LUN 0". 

FYI, HMP won't print any warning or error message.

As above show, so set severity as low. 

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.1.2-7.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.boot guest with usb-bot bus only.
# /usr/libexec/qemu-kvm -m 2G -smp 2 -boot menu=on -drive file=/root/RHEL-7.1-20141111.0.qcow2,if=none,id=img,snapshot=on, -device virtio-blk-pci,drive=img,id=sys-img -monitor stdio -qmp tcp::8888,server,nowait -spice port=5931,disable-ticketing -serial unix:/tmp/ttyS0,server,nowait -netdev tap,id=tap0,script=/etc/qemu-ifup,vhost=on -device virtio-net-pci,netdev=tap0,id=net0,mac=24:be:05:12:33:11,mq=on -device nec-usb-xhci,id=xhci0 -device usb-bot,bus=xhci0.0,id=bot0
2.
3.

Actual results:
(qemu) usb-msd: Bad LUN 0
usb-msd: Bad LUN 0
usb-msd: Bad LUN 0
usb-msd: Bad LUN 0
usb-msd: Bad LUN 0

Expected results:
No this hint message.

Additional info:

Comment 2 Gerd Hoffmann 2014-11-17 08:07:38 UTC
(In reply to Jun Li from comment #0)
> Description of problem:
> boot guest with usb-bot bus withou any device under this bus,

That isn't a valid configuration.

In theory we should throw an error when creating such a configuration,
in practice we can't easily do that as scsi devices are hooked up after
usb-bot initialization is complete, so we can't check that at initialization time.