[usb] Include setup packet within I/O buffer for message transfers
authorMichael Brown <mcb30@ipxe.org>
Fri, 1 May 2015 15:28:45 +0000 (16:28 +0100)
committerMichael Brown <mcb30@ipxe.org>
Fri, 1 May 2015 15:29:11 +0000 (16:29 +0100)
commit50e703a534e3be4496600562dab5cd4561cd5b71
treed4bbb99952e53866016db632a982fc099612750e
parenta25a16d4adf663abd8f6eaab266b9444157357b6
[usb] Include setup packet within I/O buffer for message transfers

The USB API currently assumes that host controllers will have
immediate data buffer space available in which to store the setup
packet.  This is true for xHCI, partially true for EHCI (which happens
to have 12 bytes of padding in each transfer descriptor due to
alignment requirements), and not true at all for UHCI.

Include the setup packet within the I/O buffer passed to the host
controller's message() method, thereby eliminating the requirement for
host controllers to provide immediate data buffers.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/bus/usb.c
src/drivers/usb/ehci.c
src/drivers/usb/ehci.h
src/drivers/usb/xhci.c
src/include/ipxe/usb.h