diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2014-03-06 23:28:02 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2014-03-06 23:28:02 +0000 |
commit | 2c2a2223932e1b995d9c56d1265be52f99665f6b (patch) | |
tree | 75a04b624fb17bd518ab1b80289a9e6b0ec5bff2 /sys | |
parent | 9cef6b062576306595e4e76dfab0ce49805ab692 (diff) |
Makes the "cleartoggle" function provided by HC drivers optional
because upcoming xhci(4) driver won't use it.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/usb/usbdi.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c index 8104133ee6b..b09f21c7235 100644 --- a/sys/dev/usb/usbdi.c +++ b/sys/dev/usb/usbdi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usbdi.c,v 1.67 2013/11/15 10:17:39 pirofti Exp $ */ +/* $OpenBSD: usbdi.c,v 1.68 2014/03/06 23:28:01 mpi Exp $ */ /* $NetBSD: usbdi.c,v 1.103 2002/09/27 15:37:38 provos Exp $ */ /* $FreeBSD: src/sys/dev/usb/usbdi.c,v 1.28 1999/11/17 22:33:49 n_hibma Exp $ */ @@ -573,7 +573,7 @@ usbd_clear_endpoint_stall(struct usbd_pipe *pipe) * Clearing en endpoint stall resets the endpoint toggle, so * do the same to the HC toggle. */ - pipe->methods->cleartoggle(pipe); + usbd_clear_endpoint_toggle(pipe); req.bmRequestType = UT_WRITE_ENDPOINT; req.bRequest = UR_CLEAR_FEATURE; @@ -592,7 +592,7 @@ usbd_clear_endpoint_stall_async(struct usbd_pipe *pipe) usb_device_request_t req; usbd_status err; - pipe->methods->cleartoggle(pipe); + usbd_clear_endpoint_toggle(pipe); req.bmRequestType = UT_WRITE_ENDPOINT; req.bRequest = UR_CLEAR_FEATURE; @@ -606,7 +606,8 @@ usbd_clear_endpoint_stall_async(struct usbd_pipe *pipe) void usbd_clear_endpoint_toggle(struct usbd_pipe *pipe) { - pipe->methods->cleartoggle(pipe); + if (pipe->methods->cleartoggle != NULL) + pipe->methods->cleartoggle(pipe); } int |