usb: misc fixes.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJXhK6ZAAoJEEy22O7T6HE4CJUP/1BFqjyFTCARP0ju3qD0mgWv A58V5tAryL+pA4CkcxZdqtb6Kktw0WAQf5/zhS3MCk6Te/LzCglgRnWlppCi6xkT d7/dF1B6GQ0434TSt46UOkuRsZLyheqS1bgjKAFHoYtlegQihKjSWdBGDjf6QflT U3zVMOM9mzJUNwHLftKc6uRr8qpw70rEK/V83np87Qn/vIucawESjGp/2LsKjar6 junoBcjz8BUd+VX6XtwowuKBKQG3UdgW9BTVy01psslWaf9g+SdlMr09XbXIQPRP ByCBIWkVcfhCSeQt07WzV2MYNc/0w4AzCiPEFQRq1ddtQZNErSD/OL6thjd0F9Gp EJ62kK+pnFvXntJq5/sz+VanUczeebBvWJMfhLjskI5u5vzgl2mRE/xmUN2woKUA pSB0PUSZRDV95XYj8X3ZHVCjyxycsdk1cm045uwx5GoK3cKukV5i1KKnxsxS37wV lHiCVJwcpZZcJ2s8ee/34RuTl2a3Xu3rN9kJfXQWq+ALJG6RrgRDQFwMltfG6L2z 1SRlIx3fsn5I97Zq3s60qgkF/ODLA7qPjz8Kkvqk27Lt1UMmhvvAy+zYYPZ53h2Q e7s1rAJM4yE7fXbPEPc4H3Dlt5FjCmoQtBtEEDPi879gMPT2AJwtAeAYHc/ItcGa ZBet8h2z+thgqIrEUBzx =DO24 -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-20160712-1' into staging usb: misc fixes. # gpg: Signature made Tue 12 Jul 2016 09:47:21 BST # gpg: using RSA key 0x4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/pull-usb-20160712-1: xen-usb: Fix 32bit build usb: add storage hotplug documentation nec-usb-xhci: set the device state to USB_STATE_DEFAULT Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
c1ac514a04
@ -40,6 +40,18 @@ numbers must be continuous, i.e. for three devices you must use 0+1+2.
|
||||
The 0+1+5 numbering from the "usb-uas" example isn't going to work
|
||||
with "usb-bot".
|
||||
|
||||
Starting with qemu version 2.7 usb-bot and usb-uas devices can be
|
||||
hotplugged. In the hotplug case they are added with "attached =
|
||||
false" so the guest will not see the device until the "attached"
|
||||
property is explicitly set to true. That allows to attach one or more
|
||||
scsi devices before making the device visible to the guest, i.e. the
|
||||
workflow looks like this:
|
||||
|
||||
(1) device-add usb-bot,id=foo
|
||||
(2) device-add scsi-{hd,cd},bus=foo.0,lun=0
|
||||
(2b) optionally add more devices (luns 1 ... 15).
|
||||
(3) scripts/qmp/qom-set foo.attached = true
|
||||
|
||||
enjoy,
|
||||
Gerd
|
||||
|
||||
|
@ -2364,6 +2364,8 @@ static TRBCCode xhci_address_slot(XHCIState *xhci, unsigned int slotid,
|
||||
slot->uport = uport;
|
||||
slot->ctx = octx;
|
||||
|
||||
/* Make sure device is in USB_STATE_DEFAULT state */
|
||||
usb_device_reset(dev);
|
||||
if (bsr) {
|
||||
slot_ctx[3] = SLOT_DEFAULT << SLOT_STATE_SHIFT;
|
||||
} else {
|
||||
@ -2371,7 +2373,6 @@ static TRBCCode xhci_address_slot(XHCIState *xhci, unsigned int slotid,
|
||||
uint8_t buf[1];
|
||||
|
||||
slot_ctx[3] = (SLOT_ADDRESSED << SLOT_STATE_SHIFT) | slotid;
|
||||
usb_device_reset(dev);
|
||||
memset(&p, 0, sizeof(p));
|
||||
usb_packet_addbuf(&p, buf, sizeof(buf));
|
||||
usb_packet_setup(&p, USB_TOKEN_OUT,
|
||||
|
@ -253,7 +253,8 @@ static int usbback_init_packet(struct usbback_req *usbback_req)
|
||||
|
||||
case USBIF_PIPE_TYPE_CTRL:
|
||||
packet->parameter = *(uint64_t *)usbback_req->req.u.ctrl;
|
||||
TR_REQ(xendev, "ctrl parameter: %lx, buflen: %x\n", packet->parameter,
|
||||
TR_REQ(xendev, "ctrl parameter: %"PRIx64", buflen: %x\n",
|
||||
packet->parameter,
|
||||
usbback_req->req.buffer_length);
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user