diff options
author | thompsa <thompsa@FreeBSD.org> | 2009-04-05 18:20:49 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2009-04-05 18:20:49 +0000 |
commit | d21a622bba09d8841faedb2b868bfbaf8df99c0c (patch) | |
tree | 3cf2863804b1271652221a79f7ee4b84733266b8 /sys/dev/usb/usb_device.c | |
parent | f498dc2227c7edc88b3ba4fdfbbe30ec4205369a (diff) | |
download | FreeBSD-src-d21a622bba09d8841faedb2b868bfbaf8df99c0c.zip FreeBSD-src-d21a622bba09d8841faedb2b868bfbaf8df99c0c.tar.gz |
MFp4 //depot/projects/usb@159922
Refactor how we interface with the root HUB. This cuts around 1200 lines of
code totally and saves one thread per USB bus.
Submitted by: Hans Petter Selasky
Diffstat (limited to 'sys/dev/usb/usb_device.c')
-rw-r--r-- | sys/dev/usb/usb_device.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/usb/usb_device.c b/sys/dev/usb/usb_device.c index f497b12..8d4e573 100644 --- a/sys/dev/usb/usb_device.c +++ b/sys/dev/usb/usb_device.c @@ -305,16 +305,16 @@ usb2_init_pipe(struct usb2_device *udev, uint8_t iface_index, (methods->pipe_init) (udev, edesc, pipe); - /* check for invalid pipe */ - if (pipe->methods == NULL) - return; - /* initialise USB pipe structure */ pipe->edesc = edesc; pipe->iface_index = iface_index; TAILQ_INIT(&pipe->pipe_q.head); pipe->pipe_q.command = &usb2_pipe_start; + /* the pipe is not supported by the hardware */ + if (pipe->methods == NULL) + return; + /* clear stall, if any */ if (methods->clear_stall != NULL) { USB_BUS_LOCK(udev->bus); |