Prefer passing a USB "pipe" structure over a USB endp encoding.
authorKevin O'Connor <kevin@koconnor.net>
Fri, 26 Feb 2010 13:57:13 +0000 (08:57 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Sun, 28 Feb 2010 22:26:25 +0000 (17:26 -0500)
commit357bdfa26a681d614f04e842f85850fe5848f6fe
tree3b992d2b421d990cf3fe41ed5401826e3015bdf1
parent7fb8ba866e112491feb64b2cf82b762fd9071f89
Prefer passing a USB "pipe" structure over a USB endp encoding.

Instead of passing the "u32 endp" encoding of the usb endpoint,
allocate a "struct usb_pipe" for each end point and pass that.
Allocate a control pipe for every device found.  Support freeing the
pipes after they are done.

Implement pipe allocation and freeing for both UHCI and OHCI
controllers.

Also, don't define every UHCI qh to include a pipe - create a separate
structure "struct uhci_pipe".  Also, be sure to clear the
USBControllers on reset.  Also, convert usb_hub_init to return 0 on
success.  Also, cleanup some of the USB debug messages to make them
more consistent.
13 files changed:
src/ps2port.c
src/usb-hid.c
src/usb-hid.h
src/usb-hub.c
src/usb-hub.h
src/usb-msc.c
src/usb-msc.h
src/usb-ohci.c
src/usb-ohci.h
src/usb-uhci.c
src/usb-uhci.h
src/usb.c
src/usb.h