Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Sep 2003 15:42:45 -0700 (PDT)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 37402 for review
Message-ID:  <200309022242.h82Mgje3013180@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=37402

Change 37402 by marcel@marcel_nfs on 2003/09/02 15:42:00

	IFC @37400

Affected files ...

.. //depot/projects/uart/dev/advansys/adv_pci.c#5 integrate
.. //depot/projects/uart/dev/advansys/adw_pci.c#5 integrate
.. //depot/projects/uart/dev/aic7xxx/ahc_pci.c#4 integrate
.. //depot/projects/uart/dev/aic7xxx/ahd_pci.c#4 integrate
.. //depot/projects/uart/dev/aic7xxx/aic79xx.h#2 integrate
.. //depot/projects/uart/dev/aic7xxx/aic7xxx_pci.c#3 integrate
.. //depot/projects/uart/dev/amr/amr_pci.c#5 integrate
.. //depot/projects/uart/dev/an/if_an_pci.c#6 integrate
.. //depot/projects/uart/dev/asr/asr.c#4 integrate
.. //depot/projects/uart/dev/ata/ata-chipset.c#6 integrate
.. //depot/projects/uart/dev/ata/ata-pci.h#5 integrate
.. //depot/projects/uart/dev/ata/ata-raid.c#3 integrate
.. //depot/projects/uart/dev/ata/atapi-cd.c#4 integrate
.. //depot/projects/uart/dev/bktr/bktr_os.c#5 integrate
.. //depot/projects/uart/dev/buslogic/bt_pci.c#5 integrate
.. //depot/projects/uart/dev/cardbus/cardbus_cis.c#3 integrate
.. //depot/projects/uart/dev/dpt/dpt_pci.c#5 integrate
.. //depot/projects/uart/dev/ed/if_ed_pci.c#4 integrate
.. //depot/projects/uart/dev/fxp/if_fxp.c#10 integrate
.. //depot/projects/uart/dev/gem/if_gem_pci.c#4 integrate
.. //depot/projects/uart/dev/hatm/if_hatm.c#8 integrate
.. //depot/projects/uart/dev/hea/hea_pci.c#3 integrate
.. //depot/projects/uart/dev/hifn/hifn7751.c#6 integrate
.. //depot/projects/uart/dev/hifn/hifn7751reg.h#2 integrate
.. //depot/projects/uart/dev/hme/if_hme_pci.c#6 integrate
.. //depot/projects/uart/dev/hme/if_hme_sbus.c#5 integrate
.. //depot/projects/uart/dev/ida/ida_pci.c#5 integrate
.. //depot/projects/uart/dev/iir/iir_pci.c#5 integrate
.. //depot/projects/uart/dev/ips/ips_pci.c#5 integrate
.. //depot/projects/uart/dev/isp/isp_sbus.c#5 integrate
.. //depot/projects/uart/dev/lnc/if_lnc_pci.c#5 integrate
.. //depot/projects/uart/dev/mlx/mlx.c#4 integrate
.. //depot/projects/uart/dev/mlx/mlxvar.h#2 integrate
.. //depot/projects/uart/dev/mly/mly.c#5 integrate
.. //depot/projects/uart/dev/mpt/mpt_pci.c#5 integrate
.. //depot/projects/uart/dev/musycc/musycc.c#4 integrate
.. //depot/projects/uart/dev/pci/pci.c#8 integrate
.. //depot/projects/uart/dev/pci/pcireg.h#4 integrate
.. //depot/projects/uart/dev/sbni/if_sbni_pci.c#4 integrate
.. //depot/projects/uart/dev/sbsh/if_sbsh.c#4 integrate
.. //depot/projects/uart/dev/sound/pci/als4000.c#4 integrate
.. //depot/projects/uart/dev/sound/pci/au88x0.c#4 integrate
.. //depot/projects/uart/dev/sound/pci/aureal.c#4 integrate
.. //depot/projects/uart/dev/sound/pci/cmi.c#4 integrate
.. //depot/projects/uart/dev/sound/pci/cs4281.c#4 integrate
.. //depot/projects/uart/dev/sound/pci/csa.c#4 integrate
.. //depot/projects/uart/dev/sound/pci/csamidi.c#3 integrate
.. //depot/projects/uart/dev/sound/pci/csapcm.c#4 integrate
.. //depot/projects/uart/dev/sound/pci/ds1.c#5 integrate
.. //depot/projects/uart/dev/sound/pci/emu10k1.c#4 integrate
.. //depot/projects/uart/dev/sound/pci/es137x.c#5 integrate
.. //depot/projects/uart/dev/sound/pci/fm801.c#4 integrate
.. //depot/projects/uart/dev/sound/pci/maestro.c#4 integrate
.. //depot/projects/uart/dev/sound/pci/maestro3.c#4 integrate
.. //depot/projects/uart/dev/sound/pci/neomagic.c#3 integrate
.. //depot/projects/uart/dev/sound/pci/solo.c#4 integrate
.. //depot/projects/uart/dev/sound/pci/t4dwave.c#4 integrate
.. //depot/projects/uart/dev/sound/pci/via8233.c#4 integrate
.. //depot/projects/uart/dev/sound/pci/via82c686.c#4 integrate
.. //depot/projects/uart/dev/stg/tmc18c30_pci.c#4 integrate
.. //depot/projects/uart/dev/sym/sym_hipd.c#5 integrate
.. //depot/projects/uart/dev/tdfx/tdfx_pci.c#4 integrate
.. //depot/projects/uart/dev/trm/trm.c#7 integrate
.. //depot/projects/uart/dev/tx/if_txreg.h#2 integrate
.. //depot/projects/uart/dev/vx/if_vx_pci.c#4 integrate
.. //depot/projects/uart/i4b/layer1/ifpi/i4b_ifpi_pci.c#3 integrate
.. //depot/projects/uart/i4b/layer1/ifpi2/i4b_ifpi2_pci.c#3 integrate
.. //depot/projects/uart/i4b/layer1/isic/i4b_elsa_qs1p.c#3 integrate
.. //depot/projects/uart/i4b/layer1/itjc/i4b_itjc_pci.c#4 integrate
.. //depot/projects/uart/i4b/layer1/iwic/i4b_iwic_pci.c#3 integrate
.. //depot/projects/uart/kern/uipc_domain.c#3 integrate
.. //depot/projects/uart/nfsclient/nfs_vnops.c#3 integrate
.. //depot/projects/uart/pci/if_dc.c#12 integrate
.. //depot/projects/uart/pci/if_mn.c#3 integrate
.. //depot/projects/uart/pci/if_rl.c#11 integrate
.. //depot/projects/uart/pci/xrpu.c#3 integrate
.. //depot/projects/uart/sparc64/include/ofw_machdep.h#2 integrate
.. //depot/projects/uart/sparc64/sparc64/machdep.c#5 integrate
.. //depot/projects/uart/sparc64/sparc64/mp_machdep.c#3 integrate
.. //depot/projects/uart/sparc64/sparc64/ofw_machdep.c#6 integrate
.. //depot/projects/uart/sparc64/sparc64/vm_machdep.c#6 integrate
.. //depot/projects/uart/vm/swap_pager.c#10 integrate

Differences ...

==== //depot/projects/uart/dev/advansys/adv_pci.c#5 (text+ko) ====

@@ -59,7 +59,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/advansys/adv_pci.c,v 1.21 2003/08/24 17:48:01 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/advansys/adv_pci.c,v 1.22 2003/09/02 17:30:33 jhb Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -78,8 +78,8 @@
 
 #include <dev/advansys/advansys.h>
 
-#define PCI_BASEADR0	PCIR_MAPS		/* I/O Address */
-#define PCI_BASEADR1	PCIR_MAPS + 4		/* Mem I/O Address */
+#define PCI_BASEADR0	PCIR_BAR(0)		/* I/O Address */
+#define PCI_BASEADR1	PCIR_BAR(1)		/* Mem I/O Address */
 
 #define	PCI_DEVICE_ID_ADVANSYS_1200A	0x110010CD
 #define	PCI_DEVICE_ID_ADVANSYS_1200B	0x120010CD

==== //depot/projects/uart/dev/advansys/adw_pci.c#5 (text+ko) ====

@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/advansys/adw_pci.c,v 1.18 2003/08/24 17:48:02 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/advansys/adw_pci.c,v 1.19 2003/09/02 17:30:33 jhb Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -60,8 +60,8 @@
 #include <dev/advansys/adwlib.h>
 #include <dev/advansys/adwmcode.h>
 
-#define ADW_PCI_IOBASE	PCIR_MAPS		/* I/O Address */
-#define ADW_PCI_MEMBASE	PCIR_MAPS + 4		/* Mem I/O Address */
+#define ADW_PCI_IOBASE	PCIR_BAR(0)		/* I/O Address */
+#define ADW_PCI_MEMBASE	PCIR_BAR(1)		/* Mem I/O Address */
 
 #define	PCI_ID_ADVANSYS_3550		0x230010CD00000000ull
 #define	PCI_ID_ADVANSYS_38C0800_REV1	0x250010CD00000000ull

==== //depot/projects/uart/dev/aic7xxx/ahc_pci.c#4 (text+ko) ====

@@ -32,12 +32,12 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/ahc_pci.c,v 1.55 2003/08/24 17:48:02 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/ahc_pci.c,v 1.56 2003/09/02 17:30:34 jhb Exp $");
 
 #include <dev/aic7xxx/aic7xxx_osm.h>
 
-#define	AHC_PCI_IOADDR  PCIR_MAPS	/* I/O Address */
-#define	AHC_PCI_MEMADDR (PCIR_MAPS + 4) /* Mem I/O Address */
+#define	AHC_PCI_IOADDR  PCIR_BAR(0)	/* I/O Address */
+#define	AHC_PCI_MEMADDR PCIR_BAR(1)	/* Mem I/O Address */
 
 static int ahc_pci_probe(device_t dev);
 static int ahc_pci_attach(device_t dev);

==== //depot/projects/uart/dev/aic7xxx/ahd_pci.c#4 (text+ko) ====

@@ -32,13 +32,13 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/ahd_pci.c,v 1.10 2003/08/24 17:48:02 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/ahd_pci.c,v 1.11 2003/09/02 17:30:34 jhb Exp $");
 
 #include <dev/aic7xxx/aic79xx_osm.h>
 
-#define	AHD_PCI_IOADDR0 PCIR_MAPS	/* Primary I/O BAR */
-#define	AHD_PCI_MEMADDR (PCIR_MAPS + 4) /* Mem I/O Address */
-#define	AHD_PCI_IOADDR1 (PCIR_MAPS + 12)/* Secondary I/O BAR */
+#define	AHD_PCI_IOADDR0 PCIR_BAR(0)	/* Primary I/O BAR */
+#define	AHD_PCI_MEMADDR PCIR_BAR(1)	/* Mem I/O Address */
+#define	AHD_PCI_IOADDR1 PCIR_BAR(3)	/* Secondary I/O BAR */
 
 static int ahd_pci_probe(device_t dev);
 static int ahd_pci_attach(device_t dev);

==== //depot/projects/uart/dev/aic7xxx/aic79xx.h#2 (text+ko) ====

@@ -39,7 +39,7 @@
  *
  * $Id: //depot/aic7xxx/aic7xxx/aic79xx.h#94 $
  *
- * $FreeBSD: src/sys/dev/aic7xxx/aic79xx.h,v 1.15 2003/06/28 04:45:25 gibbs Exp $
+ * $FreeBSD: src/sys/dev/aic7xxx/aic79xx.h,v 1.16 2003/09/02 17:30:34 jhb Exp $
  */
 
 #ifndef _AIC79XX_H_
@@ -1298,9 +1298,9 @@
 };
 
 /****************************** PCI Structures ********************************/
-#define AHD_PCI_IOADDR0	PCIR_MAPS	/* I/O BAR*/
-#define AHD_PCI_MEMADDR	(PCIR_MAPS + 4)	/* Memory BAR */
-#define AHD_PCI_IOADDR1	(PCIR_MAPS + 12)/* Second I/O BAR */
+#define AHD_PCI_IOADDR0	PCIR_BAR(0)	/* I/O BAR*/
+#define AHD_PCI_MEMADDR	PCIR_BAR(1)	/* Memory BAR */
+#define AHD_PCI_IOADDR1	PCIR_BAR(3)	/* Second I/O BAR */
 
 typedef int (ahd_device_setup_t)(struct ahd_softc *);
 

==== //depot/projects/uart/dev/aic7xxx/aic7xxx_pci.c#3 (text+ko) ====

@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/aic7xxx_pci.c,v 1.29 2003/08/24 17:48:03 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/aic7xxx_pci.c,v 1.30 2003/09/02 17:30:34 jhb Exp $");
 
 #ifdef __linux__
 #include "aic7xxx_osm.h"
@@ -55,8 +55,8 @@
 #include <dev/aic7xxx/aic7xxx_93cx6.h>
 #endif
 
-#define AHC_PCI_IOADDR	PCIR_MAPS	/* I/O Address */
-#define AHC_PCI_MEMADDR	(PCIR_MAPS + 4)	/* Mem I/O Address */
+#define AHC_PCI_IOADDR	PCIR_BAR(0)	/* I/O Address */
+#define AHC_PCI_MEMADDR	PCIR_BAR(1)	/* Mem I/O Address */
 
 static __inline uint64_t
 ahc_compose_id(u_int device, u_int vendor, u_int subdevice, u_int subvendor)

==== //depot/projects/uart/dev/amr/amr_pci.c#5 (text+ko) ====

@@ -55,7 +55,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/amr/amr_pci.c,v 1.19 2003/08/24 17:48:03 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/amr/amr_pci.c,v 1.20 2003/09/02 17:30:34 jhb Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -210,7 +210,7 @@
     /*
      * Allocate the PCI register window.
      */
-    rid = PCIR_MAPS;
+    rid = PCIR_BAR(0);
     rtype = AMR_IS_QUARTZ(sc) ? SYS_RES_MEMORY : SYS_RES_IOPORT;
     sc->amr_reg = bus_alloc_resource(dev, rtype, &rid, 0, ~0, 1, RF_ACTIVE);
     if (sc->amr_reg == NULL) {
@@ -468,7 +468,7 @@
     if (sc->amr_reg != NULL)
 	bus_release_resource(sc->amr_dev,
 			     AMR_IS_QUARTZ(sc) ? SYS_RES_MEMORY : SYS_RES_IOPORT,
-			     PCIR_MAPS, sc->amr_reg);
+			     PCIR_BAR(0), sc->amr_reg);
 }
 
 /********************************************************************************

==== //depot/projects/uart/dev/an/if_an_pci.c#6 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/an/if_an_pci.c,v 1.24 2003/08/24 17:48:04 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/an/if_an_pci.c,v 1.25 2003/09/02 17:30:34 jhb Exp $");
 
 /*
  * This is a PCI shim for the Aironet PC4500/4800 wireless network
@@ -156,7 +156,7 @@
 	if (pci_get_vendor(dev) == AIRONET_VENDORID &&
 	    pci_get_device(dev) == AIRONET_DEVICEID_MPI350) {
 		sc->mpi350 = 1;
-		sc->port_rid = PCIR_MAPS;
+		sc->port_rid = PCIR_BAR(0);
 	} else {
 		/*
 		 * Map control/status registers.
@@ -186,7 +186,7 @@
 	/* Allocate memory for MPI350 */
 	if (sc->mpi350) {
 		/* Allocate memory */
-		sc->mem_rid = PCIR_MAPS + 4;
+		sc->mem_rid = PCIR_BAR(1);
 		error = an_alloc_memory(dev, sc->mem_rid, 1);
 		if (error) {
 			printf("an%d: couldn't map memory\n", unit);
@@ -196,7 +196,7 @@
 		sc->an_mem_bhandle = rman_get_bushandle(sc->mem_res);
 
 		/* Allocate aux. memory */
-		sc->mem_aux_rid = PCIR_MAPS + 8;
+		sc->mem_aux_rid = PCIR_BAR(2);
 		error = an_alloc_aux_memory(dev, sc->mem_aux_rid, 
 		    AN_AUX_MEM_SIZE);
 		if (error) {

==== //depot/projects/uart/dev/asr/asr.c#4 (text+ko) ====

@@ -105,7 +105,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/asr/asr.c,v 1.36 2003/08/24 17:48:04 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/asr/asr.c,v 1.37 2003/09/02 17:30:34 jhb Exp $");
 
 #define	ASR_VERSION	1
 #define	ASR_REVISION	'0'
@@ -2549,10 +2549,8 @@
 	/*
 	 * I2O specification says we must find first *memory* mapped BAR
 	 */
-	for (rid = PCIR_MAPS;
-	  rid < (PCIR_MAPS + 4 * sizeof(u_int32_t));
-	  rid += sizeof(u_int32_t)) {
-		p = pci_read_config(tag, rid, sizeof(p));
+	for (rid = 0; rid < 4; rid++) {
+		p = pci_read_config(tag, PCIR_BAR(rid), sizeof(p));
 		if ((p & 1) == 0) {
 			break;
 		}
@@ -2560,9 +2558,10 @@
 	/*
 	 *	Give up?
 	 */
-	if (rid >= (PCIR_MAPS + 4 * sizeof(u_int32_t))) {
-		rid = PCIR_MAPS;
+	if (rid >= 4) {
+		rid = 0;
 	}
+	rid = PCIR_BAR(rid);
 	p = pci_read_config(tag, rid, sizeof(p));
 	pci_write_config(tag, rid, -1, sizeof(p));
 	l = 0 - (pci_read_config(tag, rid, sizeof(l)) & ~15);
@@ -2599,8 +2598,7 @@
 	}
 	sc->ha_Virt = (i2oRegs_t *) rman_get_virtual(sc->ha_mem_res);
 	if (s == 0xA5111044) { /* Split BAR Raptor Daptor */
-		if ((rid += sizeof(u_int32_t))
-		  >= (PCIR_MAPS + 4 * sizeof(u_int32_t))) {
+		if ((rid += sizeof(u_int32_t)) >= PCIR_BAR(4)) {
 			return (0);
 		}
 		p = pci_read_config(tag, rid, sizeof(p));

==== //depot/projects/uart/dev/ata/ata-chipset.c#6 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.37 2003/08/25 11:13:04 sos Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.38 2003/09/02 21:02:46 obrien Exp $");
 
 #include "opt_ata.h"
 #include <sys/param.h>
@@ -996,6 +996,7 @@
     static struct ata_chip_id ids[] =
     {{ ATA_NFORCE1, 0, AMDNVIDIA, NVIDIA|AMDBUG, ATA_UDMA5, "nVidia nForce" },
      { ATA_NFORCE2, 0, AMDNVIDIA, NVIDIA|AMDBUG, ATA_UDMA6, "nVidia nForce2" },
+     { ATA_NFORCE3, 0, AMDNVIDIA, NVIDIA|AMDBUG, ATA_UDMA6, "nVidia nForce3" },
      { 0, 0, 0, 0, 0, 0}};
     char buffer[64];
 

==== //depot/projects/uart/dev/ata/ata-pci.h#5 (text+ko) ====

@@ -25,7 +25,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/ata/ata-pci.h,v 1.14 2003/08/25 11:13:04 sos Exp $
+ * $FreeBSD: src/sys/dev/ata/ata-pci.h,v 1.15 2003/09/02 21:02:46 obrien Exp $
  */
 
 /* structure holding chipset config info */
@@ -121,6 +121,7 @@
 #define ATA_NVIDIA_ID		0x10de
 #define ATA_NFORCE1		0x01bc10de
 #define ATA_NFORCE2		0x006510de
+#define ATA_NFORCE3		0x00d510de
 
 #define ATA_PROMISE_ID		0x105a
 #define ATA_PDC20246		0x4d33105a

==== //depot/projects/uart/dev/ata/ata-raid.c#3 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-raid.c,v 1.67 2003/08/24 17:48:05 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-raid.c,v 1.68 2003/09/02 13:26:02 sos Exp $");
 
 #include "opt_ata.h"
 #include <sys/param.h>
@@ -180,7 +180,7 @@
     rdp->disk.d_mediasize = (off_t)rdp->total_sectors * DEV_BSIZE;
     rdp->disk.d_fwsectors = rdp->sectors;
     rdp->disk.d_fwheads = rdp->heads;
-    rdp->disk.d_maxsize = 256 * DEV_BSIZE;
+    rdp->disk.d_maxsize = 128 * DEV_BSIZE;
     rdp->disk.d_drv1 = rdp;
     disk_create(rdp->lun, &rdp->disk, 0, NULL, NULL);
 

==== //depot/projects/uart/dev/ata/atapi-cd.c#4 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/atapi-cd.c,v 1.140 2003/08/25 09:01:49 sos Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/atapi-cd.c,v 1.141 2003/09/02 15:53:01 sos Exp $");
 
 #include "opt_ata.h"
 #include <sys/param.h>
@@ -773,7 +773,7 @@
 		break;
 	    }
 
-	    format=args->data_format;
+	    format = args->data_format;
 	    if ((format != CD_CURRENT_POSITION) &&
 		(format != CD_MEDIA_CATALOG) && (format != CD_TRACK_INFO)) {
 		error = EINVAL;
@@ -782,7 +782,7 @@
 
 	    ccb[1] = args->address_format & CD_MSF_FORMAT;
 
-	    if ((error = ata_atapicmd(cdp->device,ccb,(caddr_t)&cdp->subchan,
+	    if ((error = ata_atapicmd(cdp->device, ccb, (caddr_t)&cdp->subchan,
 				      sizeof(cdp->subchan), ATA_R_READ, 10)))
 		break;
 

==== //depot/projects/uart/dev/bktr/bktr_os.c#5 (text+ko) ====

@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/bktr/bktr_os.c,v 1.38 2003/08/24 17:46:02 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/bktr/bktr_os.c,v 1.39 2003/09/02 17:30:34 jhb Exp $");
 
 /*
  * This is part of the Driver for Video Capture Cards (Frame grabbers)
@@ -343,7 +343,7 @@
 	/*
 	 * Map control/status registers.
 	 */
-	bktr->mem_rid = PCIR_MAPS;
+	bktr->mem_rid = PCIR_BAR(0);
 	bktr->res_mem = bus_alloc_resource(dev, SYS_RES_MEMORY, &bktr->mem_rid,
 					0, ~0, 1, RF_ACTIVE);
 

==== //depot/projects/uart/dev/buslogic/bt_pci.c#5 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/buslogic/bt_pci.c,v 1.16 2003/08/24 17:46:02 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/buslogic/bt_pci.c,v 1.17 2003/09/02 17:30:35 jhb Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -48,8 +48,8 @@
 
 #include <dev/buslogic/btreg.h>
 
-#define BT_PCI_IOADDR	PCIR_MAPS
-#define BT_PCI_MEMADDR	PCIR_MAPS + 4
+#define BT_PCI_IOADDR	PCIR_BAR(0)
+#define BT_PCI_MEMADDR	PCIR_BAR(1)
 
 #define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER	0x1040104Bul
 #define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER_NC	0x0140104Bul

==== //depot/projects/uart/dev/cardbus/cardbus_cis.c#3 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/cardbus/cardbus_cis.c,v 1.39 2003/08/24 17:46:02 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/cardbus/cardbus_cis.c,v 1.40 2003/09/02 17:30:35 jhb Exp $");
 
 /*
  * CIS Handling for the Cardbus Bus
@@ -1044,7 +1044,7 @@
 	 * XXX: should we do this or use quirks?
 	 */
 	for (reg = 0; reg < dinfo->pci.cfg.nummaps; reg++) {
-		cardbus_add_map(cbdev, child, PCIR_MAPS + reg * 4);
+		cardbus_add_map(cbdev, child, PCIR_BAR(reg));
 	}
 
 	for (q = &cardbus_quirks[0]; q->devid; q++) {

==== //depot/projects/uart/dev/dpt/dpt_pci.c#5 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/dpt/dpt_pci.c,v 1.28 2003/08/24 17:46:04 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/dpt/dpt_pci.c,v 1.29 2003/09/02 17:30:35 jhb Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -54,8 +54,8 @@
 #define	DPT_VENDOR_ID		0x1044
 #define	DPT_DEVICE_ID		0xa400
 
-#define	DPT_PCI_IOADDR		PCIR_MAPS		/* I/O Address */
-#define	DPT_PCI_MEMADDR		(PCIR_MAPS + 4)		/* Mem I/O Address */
+#define	DPT_PCI_IOADDR		PCIR_BAR(0)		/* I/O Address */
+#define	DPT_PCI_MEMADDR		PCIR_BAR(1)		/* Mem I/O Address */
 
 #define	ISA_PRIMARY_WD_ADDRESS	0x1f8
 

==== //depot/projects/uart/dev/ed/if_ed_pci.c#4 (text+ko) ====

@@ -18,7 +18,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ed/if_ed_pci.c,v 1.32 2003/08/24 17:46:04 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ed/if_ed_pci.c,v 1.33 2003/09/02 17:30:35 jhb Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -84,7 +84,7 @@
         int	flags = 0;
         int	error;
 
-        error = ed_probe_Novell(dev, PCIR_MAPS, flags);
+        error = ed_probe_Novell(dev, PCIR_BAR(0), flags);
         if (error)
                 return (error);
 

==== //depot/projects/uart/dev/fxp/if_fxp.c#10 (text+ko) ====

@@ -28,14 +28,14 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.192 2003/08/24 17:46:07 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.193 2003/09/02 17:30:35 jhb Exp $");
 
 /*
  * Intel EtherExpress Pro/100B PCI Fast Ethernet driver
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.192 2003/08/24 17:46:07 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.193 2003/09/02 17:30:35 jhb Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -994,7 +994,7 @@
 	fxp_stop(sc);
 	
 	for (i = 0; i < 5; i++)
-		sc->saved_maps[i] = pci_read_config(dev, PCIR_MAPS + i * 4, 4);
+		sc->saved_maps[i] = pci_read_config(dev, PCIR_BAR(i), 4);
 	sc->saved_biosaddr = pci_read_config(dev, PCIR_BIOS, 4);
 	sc->saved_intline = pci_read_config(dev, PCIR_INTLINE, 1);
 	sc->saved_cachelnsz = pci_read_config(dev, PCIR_CACHELNSZ, 1);
@@ -1027,7 +1027,7 @@
 #endif
 	/* better way to do this? */
 	for (i = 0; i < 5; i++)
-		pci_write_config(dev, PCIR_MAPS + i * 4, sc->saved_maps[i], 4);
+		pci_write_config(dev, PCIR_BAR(i), sc->saved_maps[i], 4);
 	pci_write_config(dev, PCIR_BIOS, sc->saved_biosaddr, 4);
 	pci_write_config(dev, PCIR_INTLINE, sc->saved_intline, 1);
 	pci_write_config(dev, PCIR_CACHELNSZ, sc->saved_cachelnsz, 1);

==== //depot/projects/uart/dev/gem/if_gem_pci.c#4 (text+ko) ====

@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/gem/if_gem_pci.c,v 1.11 2003/08/24 17:46:07 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/gem/if_gem_pci.c,v 1.12 2003/09/02 20:24:42 marcel Exp $");
 
 /*
  * PCI bindings for Sun GEM ethernet controllers.
@@ -53,6 +53,7 @@
 
 #include <machine/bus.h>
 #include <machine/resource.h>
+#include <dev/ofw/openfirm.h>
 #include <machine/ofw_machdep.h>
 
 #include <sys/rman.h>

==== //depot/projects/uart/dev/hatm/if_hatm.c#8 (text+ko) ====

@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/hatm/if_hatm.c,v 1.9 2003/08/22 06:00:26 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/hatm/if_hatm.c,v 1.10 2003/09/02 17:30:35 jhb Exp $");
 
 #include "opt_inet.h"
 #include "opt_natm.h"
@@ -1693,7 +1693,7 @@
 		error = ENXIO;
 		goto failed;
 	}
-	sc->memid = PCIR_MAPS;
+	sc->memid = PCIR_BAR(0);
 	sc->memres = bus_alloc_resource(dev, SYS_RES_MEMORY, &sc->memid,
 	    0, ~0, 1, RF_ACTIVE);
 	if (sc->memres == NULL) {

==== //depot/projects/uart/dev/hea/hea_pci.c#3 (text+ko) ====

@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/hea/hea_pci.c,v 1.6 2003/08/24 17:46:08 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/hea/hea_pci.c,v 1.7 2003/09/02 17:30:35 jhb Exp $");
 
 /*
  *
@@ -157,7 +157,7 @@
 
 	pci_enable_busmaster(dev);
 
-	sc->mem_rid = PCIR_MAPS;
+	sc->mem_rid = PCIR_BAR(0);
 	sc->mem_type = SYS_RES_MEMORY;
 	sc->irq_rid = 0;
 

==== //depot/projects/uart/dev/hifn/hifn7751.c#6 (text+ko) ====

@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/hifn/hifn7751.c,v 1.21 2003/08/24 17:46:09 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/hifn/hifn7751.c,v 1.22 2003/09/02 17:30:36 jhb Exp $");
 
 /*
  * Driver for the Hifn 7751 encryption processor.
@@ -588,7 +588,7 @@
 
 	hifn_stop(sc);
 	for (i = 0; i < 5; i++)
-		sc->saved_maps[i] = pci_read_config(dev, PCIR_MAPS + i * 4, 4);
+		sc->saved_maps[i] = pci_read_config(dev, PCIR_BAR(i), 4);
 	sc->saved_biosaddr = pci_read_config(dev, PCIR_BIOS, 4);
 	sc->saved_intline = pci_read_config(dev, PCIR_INTLINE, 1);
 	sc->saved_cachelnsz = pci_read_config(dev, PCIR_CACHELNSZ, 1);
@@ -613,7 +613,7 @@
 
 	/* better way to do this? */
 	for (i = 0; i < 5; i++)
-		pci_write_config(dev, PCIR_MAPS + i * 4, sc->saved_maps[i], 4);
+		pci_write_config(dev, PCIR_BAR(i), sc->saved_maps[i], 4);
 	pci_write_config(dev, PCIR_BIOS, sc->saved_biosaddr, 4);
 	pci_write_config(dev, PCIR_INTLINE, sc->saved_intline, 1);
 	pci_write_config(dev, PCIR_CACHELNSZ, sc->saved_cachelnsz, 1);

==== //depot/projects/uart/dev/hifn/hifn7751reg.h#2 (text+ko) ====

@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/dev/hifn/hifn7751reg.h,v 1.1 2002/10/04 20:32:37 sam Exp $ */
+/* $FreeBSD: src/sys/dev/hifn/hifn7751reg.h,v 1.2 2003/09/02 17:30:36 jhb Exp $ */
 /*	$OpenBSD: hifn7751reg.h,v 1.35 2002/04/08 17:49:42 jason Exp $	*/
 
 /*
@@ -49,8 +49,8 @@
  * Some PCI configuration space offset defines.  The names were made
  * identical to the names used by the Linux kernel.
  */
-#define	HIFN_BAR0		(PCIR_MAPS+0x0)	/* PUC register map */
-#define	HIFN_BAR1		(PCIR_MAPS+0x4)	/* DMA register map */
+#define	HIFN_BAR0		PCIR_BAR(0)	/* PUC register map */
+#define	HIFN_BAR1		PCIR_BAR(1)	/* DMA register map */
 #define	HIFN_TRDY_TIMEOUT	0x40
 #define	HIFN_RETRY_TIMEOUT	0x41
 

==== //depot/projects/uart/dev/hme/if_hme_pci.c#6 (text+ko) ====

@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/hme/if_hme_pci.c,v 1.10 2003/08/24 17:46:09 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/hme/if_hme_pci.c,v 1.11 2003/09/02 20:24:42 marcel Exp $");
 
 /*
  * PCI front-end device driver for the HME ethernet device.
@@ -43,6 +43,7 @@
 #include <sys/socket.h>
 
 #include <machine/bus.h>
+#include <dev/ofw/openfirm.h>
 #include <machine/ofw_machdep.h>
 #include <machine/resource.h>
 

==== //depot/projects/uart/dev/hme/if_hme_sbus.c#5 (text+ko) ====

@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/hme/if_hme_sbus.c,v 1.7 2003/08/24 17:46:09 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/hme/if_hme_sbus.c,v 1.8 2003/09/02 20:24:42 marcel Exp $");
 
 /*
  * SBus front-end device driver for the HME ethernet device.
@@ -51,6 +51,7 @@
 #include <sys/socket.h>
 
 #include <machine/bus.h>
+#include <dev/ofw/openfirm.h>
 #include <machine/ofw_machdep.h>
 #include <machine/resource.h>
 

==== //depot/projects/uart/dev/ida/ida_pci.c#5 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ida/ida_pci.c,v 1.25 2003/08/24 17:49:12 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ida/ida_pci.c,v 1.26 2003/09/02 17:30:36 jhb Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -52,7 +52,7 @@
 #define IDA_PCI_MAX_DMA_ADDR	0xFFFFFFFF
 #define IDA_PCI_MAX_DMA_COUNT	0xFFFFFFFF
 
-#define IDA_PCI_MEMADDR		(PCIR_MAPS + 4)		/* Mem I/O Address */
+#define IDA_PCI_MEMADDR		PCIR_BAR(1)		/* Mem I/O Address */
 
 #define IDA_DEVICEID_SMART		0xAE100E11
 #define IDA_DEVICEID_DEC_SMART		0x00461011
@@ -254,7 +254,7 @@
 	ida->regs_res_type = SYS_RES_MEMORY;
 	ida->regs_res_id = IDA_PCI_MEMADDR;
 	if (id == IDA_DEVICEID_DEC_SMART)
-		ida->regs_res_id = PCIR_MAPS;
+		ida->regs_res_id = PCIR_BAR(0);
 
 	ida->regs = bus_alloc_resource(dev, ida->regs_res_type,
 	    &ida->regs_res_id, 0, ~0, 1, RF_ACTIVE);

==== //depot/projects/uart/dev/iir/iir_pci.c#5 (text+ko) ====

@@ -29,7 +29,7 @@
 
 #ident "$Id: iir_pci.c 1.1 2001/05/22 20:14:12 achim Exp $"
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/iir/iir_pci.c,v 1.10 2003/08/24 17:49:13 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/iir/iir_pci.c,v 1.11 2003/09/02 17:30:36 jhb Exp $");
 
 /*
  *  iir_pci.c:  PCI Bus Attachment for Intel Integrated RAID Controller driver
@@ -66,7 +66,7 @@
 #include <dev/iir/iir.h>
 
 /* Mapping registers for various areas */
-#define PCI_DPMEM       PCIR_MAPS
+#define PCI_DPMEM       PCIR_BAR(0)
 
 /* Product numbers for Fibre-Channel are greater than or equal to 0x200 */
 #define GDT_PCI_PRODUCT_FC      0x200

==== //depot/projects/uart/dev/ips/ips_pci.c#5 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ips/ips_pci.c,v 1.5 2003/08/24 17:49:14 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ips/ips_pci.c,v 1.6 2003/09/02 17:30:36 jhb Exp $");
 
 #include <dev/ips/ips.h>
 
@@ -87,15 +87,15 @@
         if(command & PCIM_CMD_MEMEN){
                 PRINTF(10, "trying MEMIO\n");
 		if(pci_get_device(dev) == IPS_MORPHEUS_DEVICE_ID)
-                	sc->rid = PCIR_MAPS;
+                	sc->rid = PCIR_BAR(0);
 		else
-			sc->rid = PCIR_MAPS + 4;
+			sc->rid = PCIR_BAR(1);
                 sc->iotype = SYS_RES_MEMORY;
                 sc->iores = bus_alloc_resource(dev, sc->iotype, &sc->rid, 0, ~0, 1, RF_ACTIVE);
         }
         if(!sc->iores && command & PCIM_CMD_PORTEN){
                 PRINTF(10, "trying PORTIO\n");
-                sc->rid = PCIR_MAPS;
+                sc->rid = PCIR_BAR(0);
                 sc->iotype = SYS_RES_IOPORT;
                 sc->iores = bus_alloc_resource(dev, sc->iotype, &sc->rid, 0, ~0, 1, RF_ACTIVE);
         }

==== //depot/projects/uart/dev/isp/isp_sbus.c#5 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/isp/isp_sbus.c,v 1.10 2003/08/24 17:49:14 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/isp/isp_sbus.c,v 1.11 2003/09/02 19:52:31 marcel Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -35,10 +35,10 @@
 #include <sys/kernel.h>
 #include <sys/resource.h>
 #include <machine/bus.h>
-#include <machine/ofw_machdep.h>
 #include <machine/resource.h>
 #include <sys/rman.h>
 #include <dev/ofw/openfirm.h>
+#include <machine/ofw_machdep.h>
 #include <sparc64/sbus/sbusvar.h>
 
 #include <dev/isp/isp_freebsd.h>

==== //depot/projects/uart/dev/lnc/if_lnc_pci.c#5 (text+ko) ====

@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/lnc/if_lnc_pci.c,v 1.30 2003/08/24 17:49:15 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/lnc/if_lnc_pci.c,v 1.31 2003/09/02 17:30:36 jhb Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -102,7 +102,7 @@
 	command |= PCIM_CMD_PORTEN | PCIM_CMD_BUSMASTEREN;
 	pci_write_config(dev, PCIR_COMMAND, command, 4);
 
-	rid = PCIR_MAPS;
+	rid = PCIR_BAR(0);
 	sc->portres = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0, 1,
 	                                 RF_ACTIVE);
 
@@ -195,7 +195,7 @@
 	lnc_stop(sc);
 	bus_teardown_intr(dev, sc->irqres, sc->intrhand);
 	bus_release_resource(dev, SYS_RES_IRQ, 0, sc->irqres);
-	bus_release_resource(dev, SYS_RES_IOPORT, PCIR_MAPS, sc->portres);
+	bus_release_resource(dev, SYS_RES_IOPORT, PCIR_BAR(0), sc->portres);
 
 	bus_dmamap_unload(sc->dmat, sc->dmamap);
 	bus_dmamem_free(sc->dmat, sc->recv_ring, sc->dmamap);

==== //depot/projects/uart/dev/mlx/mlx.c#4 (text+ko) ====

@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *	$FreeBSD: src/sys/dev/mlx/mlx.c,v 1.40 2003/08/09 23:07:21 scottl Exp $
+ *	$FreeBSD: src/sys/dev/mlx/mlx.c,v 1.41 2003/09/02 08:30:31 scottl Exp $
  */
 
 /*
@@ -108,9 +108,15 @@
 static int			mlx_rebuild(struct mlx_softc *sc, int channel, int target);
 static int			mlx_wait_command(struct mlx_command *mc);
 static int			mlx_poll_command(struct mlx_command *mc);
+void				mlx_startio_cb(void *arg,
+					       bus_dma_segment_t *segs,
+					       int nsegments, int error);
 static void			mlx_startio(struct mlx_softc *sc);
 static void			mlx_completeio(struct mlx_command *mc);
-static int			mlx_user_command(struct mlx_softc *sc, struct mlx_usercommand *mu);
+static int			mlx_user_command(struct mlx_softc *sc,
+						 struct mlx_usercommand *mu);
+void				mlx_user_cb(void *arg, bus_dma_segment_t *segs,
+					    int nsegments, int error);
 
 /*
  * Command buffer allocation.
@@ -123,7 +129,9 @@
  * Command management.
  */
 static int			mlx_getslot(struct mlx_command *mc);
-static void			mlx_mapcmd(struct mlx_command *mc);
+static void			mlx_setup_dmamap(struct mlx_command *mc,
+						 bus_dma_segment_t *segs,
+						 int nsegments, int error);
 static void			mlx_unmapcmd(struct mlx_command *mc);
 static int			mlx_start(struct mlx_command *mc);
 static int			mlx_done(struct mlx_softc *sc);
@@ -271,8 +279,8 @@
 	device_printf(sc->mlx_dev, "can't allocate s/g table\n");
 	return(ENOMEM);
     }
-    bus_dmamap_load(sc->mlx_sg_dmat, sc->mlx_sg_dmamap, sc->mlx_sgtable,
-		    segsize, mlx_dma_map_sg, sc, 0);
+    (void)bus_dmamap_load(sc->mlx_sg_dmat, sc->mlx_sg_dmamap, sc->mlx_sgtable,
+			  segsize, mlx_dma_map_sg, sc, 0);
     return(0);
 }
 
@@ -371,14 +379,14 @@
     /*
      * Create DMA tag for mapping buffers into controller-addressable space.
      */
-    error = bus_dma_tag_create(sc->mlx_parent_dmat, 		/* parent */
-			       1, 0, 				/* alignment, boundary */
-			       BUS_SPACE_MAXADDR,		/* lowaddr */
-			       BUS_SPACE_MAXADDR, 		/* highaddr */
-			       NULL, NULL, 			/* filter, filterarg */
-			       MAXBSIZE, MLX_NSEG,		/* maxsize, nsegments */
-			       BUS_SPACE_MAXSIZE_32BIT,		/* maxsegsize */
-			       0,				/* flags */
+    error = bus_dma_tag_create(sc->mlx_parent_dmat, 	/* parent */
+			       1, 0, 			/* align, boundary */
+			       BUS_SPACE_MAXADDR,	/* lowaddr */
+			       BUS_SPACE_MAXADDR, 	/* highaddr */
+			       NULL, NULL, 		/* filter, filterarg */
+			       MAXBSIZE, MLX_NSEG,	/* maxsize, nsegments */
+			       BUS_SPACE_MAXSIZE_32BIT,	/* maxsegsize */
+			       0,			/* flags */
 			       busdma_lock_mutex,	/* lockfunc */
 			       &Giant,			/* lockarg */
 			       &sc->mlx_buffer_dmat);
@@ -389,7 +397,8 @@
     }
 
     /*
-     * Create some initial scatter/gather mappings so we can run the probe commands.
+     * Create some initial scatter/gather mappings so we can run the probe
+     * commands.
      */
     error = mlx_sglist_map(sc);
     if (error != 0) {
@@ -1175,6 +1184,29 @@
     mlx_releasecmd(mc);
 }
 
+static void
+mlx_eventlog_cb(void *arg, bus_dma_segment_t *segs, int nsegments, int error)
+{
+    struct mlx_command *mc;
+
+    mc = (struct mlx_command *)arg;
+    mlx_setup_dmamap(mc, segs, nsegments, error);
+
+    /* build the command to get one entry */
+    mlx_make_type3(mc, MLX_CMD_LOGOP, MLX_LOGOP_GET, 1,
+		   mc->mc_sc->mlx_lastevent, 0, 0, mc->mc_dataphys, 0);
+    mc->mc_complete = mlx_periodic_eventlog_respond;
+    mc->mc_private = mc;
+
+    /* start the command */
+    if (mlx_start(mc) != 0) {
+	mlx_releasecmd(mc);
+	free(mc->mc_data, M_DEVBUF);
+	mc->mc_data = NULL;
+    }
+    
+}
+
 /********************************************************************************
  * Instigate a poll for one event log message on (sc).
  * We only poll for one message at a time, to keep our command usage down.
@@ -1184,7 +1216,7 @@
 {
     struct mlx_command	*mc;
     void		*result = NULL;
-    int			error;
+    int			error = 0;
 
     debug_called(1);
 
@@ -1192,9 +1224,12 @@
     error = 1;
     if ((mc = mlx_alloccmd(sc)) == NULL)
 	goto out;
+
     /* allocate the response structure */
-    if ((result = malloc(/*sizeof(struct mlx_eventlog_entry)*/1024, M_DEVBUF, M_NOWAIT)) == NULL)
+    if ((result = malloc(/*sizeof(struct mlx_eventlog_entry)*/1024, M_DEVBUF,
+			 M_NOWAIT)) == NULL)
 	goto out;

>>> TRUNCATED FOR MAIL (1000 lines) <<<



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200309022242.h82Mgje3013180>