diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2010-09-19 22:10:08 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2010-09-25 11:34:39 -0400 |
commit | 2f96800197c2302ba72bf4dc4748234b835aa2b1 (patch) | |
tree | c0467b5b5ce9ad2934b6c81e39ff8a8561e30492 | |
parent | e826465720f73b82e632ad2058dc1f57dcd8bf4e (diff) | |
download | seabios-2f96800197c2302ba72bf4dc4748234b835aa2b1.tar.gz |
Warn that ohci bulk is not supported.
Print a meaningful warning message when trying to use OHCI bulk.
-rw-r--r-- | src/usb-ohci.c | 15 | ||||
-rw-r--r-- | src/usb-ohci.h | 2 | ||||
-rw-r--r-- | src/usb.c | 4 |
3 files changed, 19 insertions, 2 deletions
diff --git a/src/usb-ohci.c b/src/usb-ohci.c index 7b975d9..7e91b9f 100644 --- a/src/usb-ohci.c +++ b/src/usb-ohci.c @@ -412,6 +412,21 @@ ohci_control(struct usb_pipe *p, int dir, const void *cmd, int cmdsize } struct usb_pipe * +ohci_alloc_bulk_pipe(struct usb_pipe *dummy) +{ + if (! CONFIG_USB_OHCI) + return NULL; + dprintf(1, "OHCI Bulk transfers not supported.\n"); + return NULL; +} + +int +ohci_send_bulk(struct usb_pipe *p, int dir, void *data, int datasize) +{ + return -1; +} + +struct usb_pipe * ohci_alloc_intr_pipe(struct usb_pipe *dummy, int frameexp) { if (! CONFIG_USB_OHCI) diff --git a/src/usb-ohci.h b/src/usb-ohci.h index 0cadbd6..7dd2f09 100644 --- a/src/usb-ohci.h +++ b/src/usb-ohci.h @@ -8,6 +8,8 @@ void ohci_free_pipe(struct usb_pipe *p); struct usb_pipe *ohci_alloc_control_pipe(struct usb_pipe *dummy); int ohci_control(struct usb_pipe *p, int dir, const void *cmd, int cmdsize , void *data, int datasize); +struct usb_pipe *ohci_alloc_bulk_pipe(struct usb_pipe *dummy); +int ohci_send_bulk(struct usb_pipe *p, int dir, void *data, int datasize); struct usb_pipe *ohci_alloc_intr_pipe(struct usb_pipe *dummy, int frameexp); int ohci_poll_intr(struct usb_pipe *p, void *data); @@ -94,7 +94,7 @@ alloc_bulk_pipe(struct usb_pipe *pipe, struct usb_endpoint_descriptor *epdesc) case USB_TYPE_UHCI: return uhci_alloc_bulk_pipe(&dummy); case USB_TYPE_OHCI: - return NULL; + return ohci_alloc_bulk_pipe(&dummy); case USB_TYPE_EHCI: return ehci_alloc_bulk_pipe(&dummy); } @@ -108,7 +108,7 @@ usb_send_bulk(struct usb_pipe *pipe_fl, int dir, void *data, int datasize) case USB_TYPE_UHCI: return uhci_send_bulk(pipe_fl, dir, data, datasize); case USB_TYPE_OHCI: - return -1; + return ohci_send_bulk(pipe_fl, dir, data, datasize); case USB_TYPE_EHCI: return ehci_send_bulk(pipe_fl, dir, data, datasize); } |