diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2014-12-31 17:41:14 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2015-01-07 10:13:46 -0500 |
commit | 2891a8323d4397a912123c066165ef9297b51607 (patch) | |
tree | abf9dfba3fb232cb62bd5f46cd2a381e7a0f5ae0 /src/hw/usb.c | |
parent | 65034a41325937681ea5c5db510b3193c129b62b (diff) | |
download | seabios-2891a8323d4397a912123c066165ef9297b51607.tar.gz |
usb: Control transfers always have an 8 byte command size
There is no need to pass 'cmdsize' to the usb drivers as the cmdsize
is always 8 bytes.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/hw/usb.c')
-rw-r--r-- | src/hw/usb.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/hw/usb.c b/src/hw/usb.c index 773057eb..46e17df7 100644 --- a/src/hw/usb.c +++ b/src/hw/usb.c @@ -46,23 +46,23 @@ usb_realloc_pipe(struct usbdevice_s *usbdev, struct usb_pipe *pipe // Send a message on a control pipe using the default control descriptor. static int -usb_send_pipe(struct usb_pipe *pipe_fl, int dir, const void *cmd, int cmdsize +usb_send_pipe(struct usb_pipe *pipe_fl, int dir, const void *cmd , void *data, int datasize) { switch (GET_LOWFLAT(pipe_fl->type)) { default: case USB_TYPE_UHCI: - return uhci_send_pipe(pipe_fl, dir, cmd, cmdsize, data, datasize); + return uhci_send_pipe(pipe_fl, dir, cmd, data, datasize); case USB_TYPE_OHCI: if (MODESEGMENT) return -1; - return ohci_send_pipe(pipe_fl, dir, cmd, cmdsize, data, datasize); + return ohci_send_pipe(pipe_fl, dir, cmd, data, datasize); case USB_TYPE_EHCI: - return ehci_send_pipe(pipe_fl, dir, cmd, cmdsize, data, datasize); + return ehci_send_pipe(pipe_fl, dir, cmd, data, datasize); case USB_TYPE_XHCI: if (MODESEGMENT) return -1; - return xhci_send_pipe(pipe_fl, dir, cmd, cmdsize, data, datasize); + return xhci_send_pipe(pipe_fl, dir, cmd, data, datasize); } } @@ -118,15 +118,15 @@ int usb_send_default_control(struct usb_pipe *pipe, const struct usb_ctrlrequest *req , void *data) { - return usb_send_pipe(pipe, req->bRequestType & USB_DIR_IN - , req, sizeof(*req), data, req->wLength); + return usb_send_pipe(pipe, req->bRequestType & USB_DIR_IN, req + , data, req->wLength); } // Send a message to a bulk endpoint int usb_send_bulk(struct usb_pipe *pipe_fl, int dir, void *data, int datasize) { - return usb_send_pipe(pipe_fl, dir, NULL, 0, data, datasize); + return usb_send_pipe(pipe_fl, dir, NULL, data, datasize); } // Check if a pipe for a given controller is on the freelist |