Skip to content

Commit

Permalink
adjust KASSERT() for sc_lock to handle polling case.
Browse files Browse the repository at this point in the history
should fix usb kdb in ddb.  reported by martin.
  • Loading branch information
mrgtwentythree committed Mar 22, 2019
1 parent 322ed21 commit d50f102
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sys/dev/usb/ohci.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $NetBSD: ohci.c,v 1.288 2019/02/17 04:17:52 rin Exp $ */
/* $NetBSD: ohci.c,v 1.289 2019/03/22 07:25:15 mrg Exp $ */

/*
* Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc.
Expand Down Expand Up @@ -41,7 +41,7 @@
*/

#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.288 2019/02/17 04:17:52 rin Exp $");
__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.289 2019/03/22 07:25:15 mrg Exp $");

#ifdef _KERNEL_OPT
#include "opt_usb.h"
Expand Down Expand Up @@ -585,7 +585,7 @@ ohci_reset_std_chain(ohci_softc_t *sc, struct usbd_xfer *xfer,
OHCIHIST_FUNC(); OHCIHIST_CALLED();
DPRINTF("start len=%jd", alen, 0, 0, 0);

KASSERT(mutex_owned(&sc->sc_lock));
KASSERT(sc->sc_bus.ub_usepolling || mutex_owned(&sc->sc_lock));

DPRINTFN(8, "addr=%jd endpt=%jd len=%jd speed=%jd",
xfer->ux_pipe->up_dev->ud_addr,
Expand Down

0 comments on commit d50f102

Please sign in to comment.