Module Name:    src
Committed By:   sevan
Date:           Thu Feb 27 23:15:34 UTC 2020

Modified Files:
        src/sys/dev/pci: if_rge.c

Log Message:
Cast to make up for the difference in type between our bus_dma_map(9) and
theirs. Where we expect kvap to be of void **, they expect caddr_t (typedef 
char *).


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/if_rge.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/pci/if_rge.c
diff -u src/sys/dev/pci/if_rge.c:1.7 src/sys/dev/pci/if_rge.c:1.8
--- src/sys/dev/pci/if_rge.c:1.7	Thu Feb 27 22:58:57 2020
+++ src/sys/dev/pci/if_rge.c	Thu Feb 27 23:15:34 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_rge.c,v 1.7 2020/02/27 22:58:57 sevan Exp $	*/
+/*	$NetBSD: if_rge.c,v 1.8 2020/02/27 23:15:34 sevan Exp $	*/
 /*	$OpenBSD: if_rge.c,v 1.2 2020/01/02 09:00:45 kevlo Exp $	*/
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_rge.c,v 1.7 2020/02/27 22:58:57 sevan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_rge.c,v 1.8 2020/02/27 23:15:34 sevan Exp $");
 
 /* #include "vlan.h" Sevan */
 
@@ -968,7 +968,7 @@ rge_allocmem(struct rge_softc *sc)
 	/* Load the map for the TX ring. */
 	error = bus_dmamem_map(sc->sc_dmat, &sc->rge_ldata.rge_tx_listseg,
 	    sc->rge_ldata.rge_tx_listnseg, RGE_TX_LIST_SZ,
-	    &sc->rge_ldata.rge_tx_list,
+	    (void **) &sc->rge_ldata.rge_tx_list,
 	    BUS_DMA_NOWAIT); /* XXX OpenBSD adds BUS_DMA_COHERENT */
 	if (error) {
 		printf("%s: can't map TX dma buffers\n", sc->sc_dev.dv_xname);
@@ -1018,7 +1018,7 @@ rge_allocmem(struct rge_softc *sc)
 	/* Load the map for the RX ring. */
 	error = bus_dmamem_map(sc->sc_dmat, &sc->rge_ldata.rge_rx_listseg,
 	    sc->rge_ldata.rge_rx_listnseg, RGE_RX_LIST_SZ,
-	    &sc->rge_ldata.rge_rx_list,
+	    (void **) &sc->rge_ldata.rge_rx_list,
 	    BUS_DMA_NOWAIT);  /* XXX OpenBSD adds BUS_DMA_COHERENT */
 	if (error) {
 		printf("%s: can't map RX dma buffers\n", sc->sc_dev.dv_xname);

Reply via email to