diff options
| author | skrll <skrll@NetBSD.org> | 2016-06-05 08:10:59 +0000 |
|---|---|---|
| committer | skrll <skrll@NetBSD.org> | 2016-06-05 08:10:59 +0000 |
| commit | e35e61cc01147b4b5cf729649916bb718dd75fcb (patch) | |
| tree | bb18b4908ad5eb43f9a3c5c08ac0db03504dfabe /sys/dev | |
| parent | 5f99343dc1a4fa6ed0acdae8384fa15eaa03811b (diff) | |
Replace num of TRBs with xr->xr_ntrb. From t-hash.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/usb/xhci.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/usb/xhci.c b/sys/dev/usb/xhci.c index 9b0a96e1365..94323d1d3a0 100644 --- a/sys/dev/usb/xhci.c +++ b/sys/dev/usb/xhci.c @@ -1,4 +1,4 @@ -/* $NetBSD: xhci.c,v 1.51 2016/06/05 08:05:27 skrll Exp $ */ +/* $NetBSD: xhci.c,v 1.52 2016/06/05 08:10:59 skrll Exp $ */ /* * Copyright (c) 2013 Jonathan A. Kollasch @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.51 2016/06/05 08:05:27 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.52 2016/06/05 08:10:59 skrll Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -1031,7 +1031,7 @@ xhci_init(struct xhci_softc *sc) struct xhci_erste *erst; erst = KERNADDR(&sc->sc_eventst_dma, 0); erst[0].erste_0 = htole64(xhci_ring_trbp(&sc->sc_er, 0)); - erst[0].erste_2 = htole32(XHCI_EVENT_RING_TRBS); + erst[0].erste_2 = htole32(sc->sc_er.xr_ntrb); erst[0].erste_3 = htole32(0); usb_syncmem(&sc->sc_eventst_dma, 0, XHCI_ERSTE_SIZE * XHCI_EVENT_RING_SEGMENTS, BUS_DMASYNC_PREWRITE); @@ -1857,7 +1857,7 @@ xhci_softintr(void *v) xhci_handle_event(sc, trb); i++; - if (i == XHCI_EVENT_RING_TRBS) { + if (i == er->xr_ntrb) { i = 0; j ^= 1; } |
