xhci: drop unused wlength
PATCH 2/2 usb-host: allow emulated (non-async) control requests without USBPacket
In reply to Gerd Hoffmannxhci needs this for USB_REQ_SET_ADDRESS due to the way usb addressing is handled by the xhci hardware.
Signed-off-by Gerd Hoffmann <[email protected]>
--- hw/usb/host-linux.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
hw/usb/host-linux.c +1 -1
@@ -1045,7 +1045,6 @@ static int usb_host_handle_control(USBDevice *dev, USBPacket *p,/* Note request is (bRequestType << 8) | bRequest */ trace_usb_host_req_control (s->bus_num, s->addr, p, request, value, index); -assert (p->result ==0 );switch (request) {case DeviceOutRequest |USB_REQ_SET_ADDRESS :
@@ -1074,6 +1073,7 @@ static int usb_host_handle_control(USBDevice *dev, USBPacket *p, }/* The rest are asynchronous */ +assert (p && p->result ==0 );if (length >sizeof (dev->data_buf)) { fprintf(stderr, "husb: ctrl buffer too small (%d > %zu)\n",
Signature · 1 line
1.7.1
PATCH 1/2 xhci: drop unused wlength
Signed-off-by Gerd Hoffmann <[email protected]>
--- hw/usb/hcd-xhci.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
hw/usb/hcd-xhci.c +0 -2
@@ -1505,7 +1505,6 @@ static int xhci_fire_ctl_transfer(XHCIState *xhci, XHCITransfer *xfer) {XHCITRB *trb_setup, *trb_status;uint8_t bmRequestType; -uint16_t wLength;int ret; trb_setup = &xfer->trbs[0 ];
@@ -1540,7 +1539,6 @@ static int xhci_fire_ctl_transfer(XHCIState *xhci, XHCITransfer *xfer) } bmRequestType = trb_setup->parameter; - wLength = trb_setup->parameter >>48 ; xfer->in_xfer = bmRequestType &USB_DIR_IN ; xfer->iso_xfer = false;
Signature · 1 line
1.7.1