diff options
Diffstat (limited to 'sys/dev/usb/controller/at91dci.c')
-rw-r--r-- | sys/dev/usb/controller/at91dci.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/dev/usb/controller/at91dci.c b/sys/dev/usb/controller/at91dci.c index e7d5e6e..d8fdc63 100644 --- a/sys/dev/usb/controller/at91dci.c +++ b/sys/dev/usb/controller/at91dci.c @@ -1226,7 +1226,14 @@ at91dci_device_done(struct usb_xfer *xfer, usb_error_t error) } static void -at91dci_set_stall(struct usb_device *udev, struct usb_xfer *xfer, +at91dci_xfer_stall(struct usb_xfer *xfer) +{ + USB_BUS_LOCK_ASSERT(udev->bus, MA_OWNED); + at91dci_device_done(xfer, USB_ERR_STALLED); +} + +static void +at91dci_set_stall(struct usb_device *udev, struct usb_endpoint *ep, uint8_t *did_stall) { struct at91dci_softc *sc; @@ -1237,10 +1244,6 @@ at91dci_set_stall(struct usb_device *udev, struct usb_xfer *xfer, DPRINTFN(5, "endpoint=%p\n", ep); - if (xfer) { - /* cancel any ongoing transfers */ - at91dci_device_done(xfer, USB_ERR_STALLED); - } /* set FORCESTALL */ sc = AT9100_DCI_BUS2SC(udev->bus); csr_reg = (ep->edesc->bEndpointAddress & UE_ADDR); @@ -2332,6 +2335,7 @@ struct usb_bus_methods at91dci_bus_methods = .xfer_unsetup = &at91dci_xfer_unsetup, .get_hw_ep_profile = &at91dci_get_hw_ep_profile, .set_stall = &at91dci_set_stall, + .xfer_stall = &at91dci_xfer_stall, .clear_stall = &at91dci_clear_stall, .roothub_exec = &at91dci_roothub_exec, .xfer_poll = &at91dci_do_poll, |