Module Name: src Committed By: skrll Date: Sun Sep 25 07:23:08 UTC 2022
Modified Files: src/sys/dev/usb: xhci.c Log Message: Remove the bus_space_barrier I added with the commit revision 1.103 date: 2019-01-11 15:43:51 +0000; author: skrll; state: Exp; lines: +12 -2; commitid: RYSytjLNOZrFCn7B; Add a bs_barrier to make ThunderX xhci work. Not sure why this is needed, but I'll work it out later. Turns out bus_dma.c needed fixing which I did with revision 1.115 date: 2019-06-14 10:09:12 +0100; author: skrll; state: Exp; lines: +39 -34; commitid: GKW2p7ijoslyu8rB; Simplify the _ARM32_NEED_BUS_DMA_BOUNCE #ifdefs and rely on compiler optimisation of the bouncing = false case. Drain the write buf (aka DSB) in more cases Catch all CPUs that support speculation. (thunderx isn't CPU_CORTEX) To generate a diff of this commit: cvs rdiff -u -r1.171 -r1.172 src/sys/dev/usb/xhci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/usb/xhci.c diff -u src/sys/dev/usb/xhci.c:1.171 src/sys/dev/usb/xhci.c:1.172 --- src/sys/dev/usb/xhci.c:1.171 Tue Sep 13 10:33:37 2022 +++ src/sys/dev/usb/xhci.c Sun Sep 25 07:23:07 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: xhci.c,v 1.171 2022/09/13 10:33:37 riastradh Exp $ */ +/* $NetBSD: xhci.c,v 1.172 2022/09/25 07:23:07 skrll Exp $ */ /* * Copyright (c) 2013 Jonathan A. Kollasch @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.171 2022/09/13 10:33:37 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.172 2022/09/25 07:23:07 skrll Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -318,12 +318,6 @@ xhci_write_4(const struct xhci_softc * c } #endif /* unused */ -static inline void -xhci_barrier(const struct xhci_softc * const sc, int flags) -{ - bus_space_barrier(sc->sc_iot, sc->sc_ioh, 0, sc->sc_ios, flags); -} - static inline uint32_t xhci_cap_read_4(const struct xhci_softc * const sc, bus_size_t offset) { @@ -1644,8 +1638,6 @@ xhci_init(struct xhci_softc *sc) xhci_op_write_8(sc, XHCI_CRCR, xhci_ring_trbp(sc->sc_cr, 0) | sc->sc_cr->xr_cs); - xhci_barrier(sc, BUS_SPACE_BARRIER_WRITE); - HEXDUMP("eventst", KERNADDR(&sc->sc_eventst_dma, 0), XHCI_ERSTE_SIZE * XHCI_EVENT_RING_SEGMENTS);