Tue Jul 12 02:12:26 2022 UTC ()
Remove unneeded bus_space_barrier() calls.


(thorpej)
diff -r1.29 -r1.30 src/sys/dev/eisa/mlx_eisa.c

cvs diff -r1.29 -r1.30 src/sys/dev/eisa/mlx_eisa.c (expand / switch to unified diff)

--- src/sys/dev/eisa/mlx_eisa.c 2021/07/24 19:06:25 1.29
+++ src/sys/dev/eisa/mlx_eisa.c 2022/07/12 02:12:26 1.30
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: mlx_eisa.c,v 1.29 2021/07/24 19:06:25 thorpej Exp $ */ 1/* $NetBSD: mlx_eisa.c,v 1.30 2022/07/12 02:12:26 thorpej Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2001 The NetBSD Foundation, Inc. 4 * Copyright (c) 2001 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Andrew Doran. 8 * by Andrew Doran.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -24,27 +24,27 @@ @@ -24,27 +24,27 @@
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32/* 32/*
33 * EISA front-end for mlx(4) driver. 33 * EISA front-end for mlx(4) driver.
34 */ 34 */
35 35
36#include <sys/cdefs.h> 36#include <sys/cdefs.h>
37__KERNEL_RCSID(0, "$NetBSD: mlx_eisa.c,v 1.29 2021/07/24 19:06:25 thorpej Exp $"); 37__KERNEL_RCSID(0, "$NetBSD: mlx_eisa.c,v 1.30 2022/07/12 02:12:26 thorpej Exp $");
38 38
39#include <sys/param.h> 39#include <sys/param.h>
40#include <sys/systm.h> 40#include <sys/systm.h>
41#include <sys/device.h> 41#include <sys/device.h>
42#include <sys/module.h> 42#include <sys/module.h>
43#include <sys/bus.h> 43#include <sys/bus.h>
44#include <sys/intr.h> 44#include <sys/intr.h>
45 45
46#include <dev/eisa/eisavar.h> 46#include <dev/eisa/eisavar.h>
47#include <dev/eisa/eisadevs.h> 47#include <dev/eisa/eisadevs.h>
48 48
49#include <dev/ic/mlxreg.h> 49#include <dev/ic/mlxreg.h>
50#include <dev/ic/mlxio.h> 50#include <dev/ic/mlxio.h>
@@ -211,29 +211,26 @@ mlx_eisa_rescan(device_t self, const cha @@ -211,29 +211,26 @@ mlx_eisa_rescan(device_t self, const cha
211 * failure (the controller is not ready to take a command). 211 * failure (the controller is not ready to take a command).
212 * 212 *
213 * Must be called at splbio or in a fashion that prevents reentry. 213 * Must be called at splbio or in a fashion that prevents reentry.
214 */ 214 */
215static int 215static int
216mlx_v1_submit(struct mlx_softc *mlx, struct mlx_ccb *mc) 216mlx_v1_submit(struct mlx_softc *mlx, struct mlx_ccb *mc)
217{ 217{
218 218
219 /* Ready for our command? */ 219 /* Ready for our command? */
220 if ((mlx_inb(mlx, MLX_V1REG_IDB) & MLX_V1_IDB_FULL) == 0) { 220 if ((mlx_inb(mlx, MLX_V1REG_IDB) & MLX_V1_IDB_FULL) == 0) {
221 /* Copy mailbox data to window. */ 221 /* Copy mailbox data to window. */
222 bus_space_write_region_1(mlx->mlx_iot, mlx->mlx_ioh, 222 bus_space_write_region_1(mlx->mlx_iot, mlx->mlx_ioh,
223 MLX_V1REG_MAILBOX, mc->mc_mbox, 13); 223 MLX_V1REG_MAILBOX, mc->mc_mbox, 13);
224 bus_space_barrier(mlx->mlx_iot, mlx->mlx_ioh, 
225 MLX_V1REG_MAILBOX, 13, 
226 BUS_SPACE_BARRIER_WRITE); 
227 224
228 /* Post command. */ 225 /* Post command. */
229 mlx_outb(mlx, MLX_V1REG_IDB, MLX_V1_IDB_FULL); 226 mlx_outb(mlx, MLX_V1REG_IDB, MLX_V1_IDB_FULL);
230 return (1); 227 return (1);
231 } 228 }
232 229
233 return (0); 230 return (0);
234} 231}
235 232
236/* 233/*
237 * See if a command has been completed, if so acknowledge its completion and 234 * See if a command has been completed, if so acknowledge its completion and
238 * recover the slot number and status code. 235 * recover the slot number and status code.
239 * 236 *