Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/dwc2 Pass any error from dwc2_device_start ...
details: https://anonhg.NetBSD.org/src/rev/b29d3ddad1fd
branches: trunk
changeset: 790302:b29d3ddad1fd
user: skrll <skrll%NetBSD.org@localhost>
date: Wed Oct 02 22:45:10 2013 +0000
description:
Pass any error from dwc2_device_start upwards.
diffstat:
sys/external/bsd/dwc2/dwc2.c | 26 ++++++++++++++++++--------
1 files changed, 18 insertions(+), 8 deletions(-)
diffs (94 lines):
diff -r ac1fb710b3ed -r b29d3ddad1fd sys/external/bsd/dwc2/dwc2.c
--- a/sys/external/bsd/dwc2/dwc2.c Wed Oct 02 22:07:56 2013 +0000
+++ b/sys/external/bsd/dwc2/dwc2.c Wed Oct 02 22:45:10 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc2.c,v 1.7 2013/09/27 22:03:01 skrll Exp $ */
+/* $NetBSD: dwc2.c,v 1.8 2013/10/02 22:45:10 skrll Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.7 2013/09/27 22:03:01 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.8 2013/10/02 22:45:10 skrll Exp $");
#include "opt_usb.h"
@@ -968,14 +968,18 @@
dwc2_device_ctrl_start(usbd_xfer_handle xfer)
{
struct dwc2_softc *sc = DWC2_XFER2SC(xfer);
+ usbd_status err;
DPRINTF("\n");
mutex_enter(&sc->sc_lock);
xfer->status = USBD_IN_PROGRESS;
- dwc2_device_start(xfer);
+ err = dwc2_device_start(xfer);
mutex_exit(&sc->sc_lock);
+ if (err)
+ return err;
+
if (sc->sc_bus.use_polling)
dwc2_waitintr(sc, xfer);
@@ -1034,14 +1038,15 @@
dwc2_device_bulk_start(usbd_xfer_handle xfer)
{
struct dwc2_softc *sc = DWC2_XFER2SC(xfer);
+ usbd_status err;
DPRINTF("xfer=%p\n", xfer);
mutex_enter(&sc->sc_lock);
xfer->status = USBD_IN_PROGRESS;
- dwc2_device_start(xfer);
+ err = dwc2_device_start(xfer);
mutex_exit(&sc->sc_lock);
- return USBD_IN_PROGRESS;
+ return err;
}
Static void
@@ -1099,12 +1104,16 @@
struct dwc2_pipe *dpipe = (struct dwc2_pipe *)xfer->pipe;
usbd_device_handle dev = dpipe->pipe.device;
struct dwc2_softc *sc = dev->bus->hci_private;
+ usbd_status err;
mutex_enter(&sc->sc_lock);
xfer->status = USBD_IN_PROGRESS;
- dwc2_device_start(xfer);
+ err = dwc2_device_start(xfer);
mutex_exit(&sc->sc_lock);
+ if (err)
+ return err;
+
if (sc->sc_bus.use_polling)
dwc2_waitintr(sc, xfer);
@@ -1177,16 +1186,17 @@
struct dwc2_pipe *dpipe = (struct dwc2_pipe *)xfer->pipe;
usbd_device_handle dev = dpipe->pipe.device;
struct dwc2_softc *sc = dev->bus->hci_private;
+ usbd_status err;
mutex_enter(&sc->sc_lock);
xfer->status = USBD_IN_PROGRESS;
- dwc2_device_start(xfer);
+ err = dwc2_device_start(xfer);
mutex_exit(&sc->sc_lock);
if (sc->sc_bus.use_polling)
dwc2_waitintr(sc, xfer);
- return USBD_IN_PROGRESS;
+ return err;
}
void
Home |
Main Index |
Thread Index |
Old Index