PERFORCE change 89259 for review

Warner Losh imp at FreeBSD.org
Fri Jan 6 00:25:23 PST 2006


http://perforce.freebsd.org/chv.cgi?CH=89259

Change 89259 by imp at imp_harmony on 2006/01/06 08:24:20

	IFC @89258

Affected files ...

.. //depot/projects/arm/src/sys/amd64/amd64/bpf_jit_machdep.c#2 integrate
.. //depot/projects/arm/src/sys/conf/NOTES#11 integrate
.. //depot/projects/arm/src/sys/conf/files#12 integrate
.. //depot/projects/arm/src/sys/conf/options#11 integrate
.. //depot/projects/arm/src/sys/dev/acpica/acpi_pci_link.c#5 integrate
.. //depot/projects/arm/src/sys/dev/ata/ata-all.c#4 integrate
.. //depot/projects/arm/src/sys/dev/ata/ata-all.h#6 integrate
.. //depot/projects/arm/src/sys/dev/ata/ata-card.c#3 integrate
.. //depot/projects/arm/src/sys/dev/ata/ata-cbus.c#3 integrate
.. //depot/projects/arm/src/sys/dev/ata/ata-chipset.c#8 integrate
.. //depot/projects/arm/src/sys/dev/ata/ata-disk.c#4 integrate
.. //depot/projects/arm/src/sys/dev/ata/ata-disk.h#3 integrate
.. //depot/projects/arm/src/sys/dev/ata/ata-dma.c#4 integrate
.. //depot/projects/arm/src/sys/dev/ata/ata-isa.c#3 integrate
.. //depot/projects/arm/src/sys/dev/ata/ata-lowlevel.c#7 integrate
.. //depot/projects/arm/src/sys/dev/ata/ata-pci.c#4 integrate
.. //depot/projects/arm/src/sys/dev/ata/ata-pci.h#6 integrate
.. //depot/projects/arm/src/sys/dev/ata/ata-queue.c#5 integrate
.. //depot/projects/arm/src/sys/dev/ata/ata-raid.c#7 integrate
.. //depot/projects/arm/src/sys/dev/ata/ata-raid.h#6 integrate
.. //depot/projects/arm/src/sys/dev/ata/ata_if.m#2 integrate
.. //depot/projects/arm/src/sys/dev/ata/atapi-cd.c#3 integrate
.. //depot/projects/arm/src/sys/dev/ata/atapi-cd.h#3 integrate
.. //depot/projects/arm/src/sys/dev/ata/atapi-fd.c#3 integrate
.. //depot/projects/arm/src/sys/dev/ata/atapi-fd.h#3 integrate
.. //depot/projects/arm/src/sys/dev/ata/atapi-tape.c#4 integrate
.. //depot/projects/arm/src/sys/dev/ata/atapi-tape.h#3 integrate
.. //depot/projects/arm/src/sys/dev/atkbdc/psm.c#3 integrate
.. //depot/projects/arm/src/sys/dev/cardbus/cardbus_cis.c#5 integrate
.. //depot/projects/arm/src/sys/dev/dcons/dcons_os.c#4 integrate
.. //depot/projects/arm/src/sys/dev/fxp/if_fxp.c#7 integrate
.. //depot/projects/arm/src/sys/dev/ichsmb/ichsmb.c#4 integrate
.. //depot/projects/arm/src/sys/dev/ips/ips_ioctl.h#2 integrate
.. //depot/projects/arm/src/sys/dev/ips/ipsreg.h#2 integrate
.. //depot/projects/arm/src/sys/dev/nmdm/nmdm.c#3 integrate
.. //depot/projects/arm/src/sys/dev/sound/pci/solo.c#3 integrate
.. //depot/projects/arm/src/sys/dev/ti/if_ti.c#4 integrate
.. //depot/projects/arm/src/sys/dev/ti/if_tireg.h#4 integrate
.. //depot/projects/arm/src/sys/fs/devfs/devfs_rule.c#4 integrate
.. //depot/projects/arm/src/sys/fs/ntfs/ntfs_subr.c#4 integrate
.. //depot/projects/arm/src/sys/gnu/fs/reiserfs/reiserfs_inode.c#2 integrate
.. //depot/projects/arm/src/sys/i386/i386/bpf_jit_machdep.c#2 integrate
.. //depot/projects/arm/src/sys/i386/i386/identcpu.c#7 integrate
.. //depot/projects/arm/src/sys/i386/ibcs2/ibcs2_sysvec.c#2 integrate
.. //depot/projects/arm/src/sys/i386/isa/pcvt/pcvt_drv.c#2 integrate
.. //depot/projects/arm/src/sys/i386/xbox/xboxfb.c#2 integrate
.. //depot/projects/arm/src/sys/ia64/ia64/ssc.c#3 integrate
.. //depot/projects/arm/src/sys/kern/kern_conf.c#5 integrate
.. //depot/projects/arm/src/sys/kern/sys_generic.c#3 integrate
.. //depot/projects/arm/src/sys/kern/tty.c#5 integrate
.. //depot/projects/arm/src/sys/kern/tty_pty.c#4 integrate
.. //depot/projects/arm/src/sys/kern/vfs_syscalls.c#5 integrate
.. //depot/projects/arm/src/sys/net/bpf_filter.c#3 integrate
.. //depot/projects/arm/src/sys/net/if_bridge.c#6 integrate
.. //depot/projects/arm/src/sys/net/if_bridgevar.h#3 integrate
.. //depot/projects/arm/src/sys/net/if_mib.c#3 integrate
.. //depot/projects/arm/src/sys/net/if_mib.h#2 integrate
.. //depot/projects/arm/src/sys/net80211/ieee80211_node.c#6 integrate
.. //depot/projects/arm/src/sys/net80211/ieee80211_output.c#4 integrate
.. //depot/projects/arm/src/sys/net80211/ieee80211_proto.c#5 integrate
.. //depot/projects/arm/src/sys/net80211/ieee80211_proto.h#4 integrate
.. //depot/projects/arm/src/sys/net80211/ieee80211_var.h#6 integrate
.. //depot/projects/arm/src/sys/sparc64/conf/NOTES#5 integrate
.. //depot/projects/arm/src/sys/sys/tty.h#3 integrate
.. //depot/projects/arm/src/sys/ufs/ffs/ffs_snapshot.c#6 integrate
.. //depot/projects/arm/src/sys/vm/vm_pageq.c#4 integrate

Differences ...

==== //depot/projects/arm/src/sys/amd64/amd64/bpf_jit_machdep.c#2 (text+ko) ====

@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/bpf_jit_machdep.c,v 1.3 2005/12/06 07:22:00 jkim Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/bpf_jit_machdep.c,v 1.4 2006/01/03 20:26:02 jkim Exp $");
 
 #include "opt_bpf.h"
 
@@ -103,6 +103,10 @@
 	 */
 	emit_func emitm;
 
+	/* Do not compile an empty filter. */
+	if (nins == 0)
+		return NULL;
+
 	/* Allocate the reference table for the jumps */
 	stream.refs = (u_int *)malloc((nins + 1) * sizeof(u_int),
 	    M_BPFJIT, M_NOWAIT);

==== //depot/projects/arm/src/sys/conf/NOTES#11 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/NOTES,v 1.1341 2005/12/31 14:39:19 netchild Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1343 2006/01/04 17:19:28 joel Exp $
 #
 # NOTES -- Lines that can be cut/pasted into kernel and hints configs.
 #
@@ -1922,9 +1922,9 @@
 #		    zero if don't know what to put in (and you don't,
 #		    since this is unsupported at the moment...).
 #
+# snd_ad1816:		Analog Devices AD1816 ISA PnP/non-PnP.
 # snd_als4000:		Avance Logic ALS4000 PCI.
 # snd_atiixp:		ATI IXP 200/300/400 PCI.
-# snd_ad1816:		Analog Devices AD1816 ISA PnP/non-PnP.
 # snd_audiocs:		Crystal Semiconductor CS4231 SBus/EBus.
 # snd_cmi:		CMedia CMI8338/CMI8738 PCI.
 # snd_cs4281:		Crystal Semiconductor CS4281 PCI.
@@ -1984,7 +1984,6 @@
 device		snd_via8233
 device		snd_via82c686
 device		snd_vibes
-#device		snd_vortex1
 device		snd_uaudio
 
 # For non-pnp sound cards:

==== //depot/projects/arm/src/sys/conf/files#12 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.1080 2005/12/29 01:43:46 imp Exp $
+# $FreeBSD: src/sys/conf/files,v 1.1081 2006/01/04 17:05:18 joel Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -860,7 +860,6 @@
 dev/sound/pci/via8233.c		optional snd_via8233 pci
 dev/sound/pci/via82c686.c	optional snd_via82c686 pci
 dev/sound/pci/vibes.c		optional snd_vibes pci
-#dev/sound/pci/vortex1.c	optional snd_vortex1 pci
 dev/sound/pcm/ac97.c		optional sound
 dev/sound/pcm/ac97_if.m		optional sound
 dev/sound/pcm/ac97_patch.c	optional sound

==== //depot/projects/arm/src/sys/conf/options#11 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options,v 1.522 2005/12/31 14:39:19 netchild Exp $
+# $FreeBSD: src/sys/conf/options,v 1.523 2006/01/06 04:44:09 imp Exp $
 #
 #        On the handling of kernel options
 #

==== //depot/projects/arm/src/sys/dev/acpica/acpi_pci_link.c#5 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci_link.c,v 1.51 2005/12/05 19:50:00 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci_link.c,v 1.52 2006/01/03 20:19:34 jhb Exp $");
 
 #include "opt_acpi.h"
 #include <sys/param.h>
@@ -449,8 +449,10 @@
 		}
 	}
 	sc->pl_num_links = creq.count;
-	if (creq.count == 0)
+	if (creq.count == 0) {
+		ACPI_SERIAL_END(pci_link);
 		return (0);
+	}
 	sc->pl_links = malloc(sizeof(struct link) * sc->pl_num_links,
 	    M_PCI_LINK, M_WAITOK | M_ZERO);
 

==== //depot/projects/arm/src/sys/dev/ata/ata-all.c#4 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 1998 - 2005 Søren Schmidt <sos at FreeBSD.org>
+ * Copyright (c) 1998 - 2006 Søren Schmidt <sos at FreeBSD.org>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -11,8 +11,6 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -27,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.260 2005/11/25 09:00:56 sos Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.261 2006/01/05 21:27:18 sos Exp $");
 
 #include "opt_ata.h"
 #include <sys/param.h>

==== //depot/projects/arm/src/sys/dev/ata/ata-all.h#6 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 1998 - 2005 Søren Schmidt <sos at FreeBSD.org>
+ * Copyright (c) 1998 - 2006 Søren Schmidt <sos at FreeBSD.org>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -11,8 +11,6 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -25,7 +23,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-all.h,v 1.109 2005/12/27 16:49:33 sos Exp $
+ * $FreeBSD: src/sys/dev/ata/ata-all.h,v 1.110 2006/01/05 21:27:19 sos Exp $
  */
 
 /* ATA register defines */

==== //depot/projects/arm/src/sys/dev/ata/ata-card.c#3 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 1998 - 2005 Søren Schmidt <sos at FreeBSD.org>
+ * Copyright (c) 1998 - 2006 Søren Schmidt <sos at FreeBSD.org>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -11,8 +11,6 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -27,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-card.c,v 1.38 2005/09/22 18:46:29 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-card.c,v 1.39 2006/01/05 21:27:19 sos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>

==== //depot/projects/arm/src/sys/dev/ata/ata-cbus.c#3 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2002 - 2005 Søren Schmidt <sos at FreeBSD.org>
+ * Copyright (c) 2002 - 2006 Søren Schmidt <sos at FreeBSD.org>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -11,8 +11,6 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -27,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-cbus.c,v 1.22 2005/04/30 16:22:06 sos Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-cbus.c,v 1.23 2006/01/05 21:27:19 sos Exp $");
 
 #include "opt_ata.h"
 #include <sys/param.h>

==== //depot/projects/arm/src/sys/dev/ata/ata-chipset.c#8 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 1998 - 2005 Søren Schmidt <sos at FreeBSD.org>
+ * Copyright (c) 1998 - 2006 Søren Schmidt <sos at FreeBSD.org>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -11,8 +11,6 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -27,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.146 2005/12/30 23:15:02 sos Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.149 2006/01/05 21:27:19 sos Exp $");
 
 #include "opt_ata.h"
 #include <sys/param.h>
@@ -2920,7 +2918,8 @@
 	devid == ATA_I960RM) 
 	return ENXIO;
 
-    strcpy(buffer, idx->text);
+    strcpy(buffer, "Promise ");
+    strcat(buffer, idx->text);
 
     /* if we are on a FastTrak TX4, adjust the interrupt resource */
     if ((idx->cfg2 & PRTX4) && pci_get_class(GRANDPARENT(dev))==PCIC_BRIDGE &&
@@ -2942,8 +2941,7 @@
 	    start = end = 0;
 	}
     }
-    sprintf(buffer, "Promise %s %s controller",
-	    buffer, ata_mode2str(idx->max_dma));
+    sprintf(buffer, "%s %s controller", buffer, ata_mode2str(idx->max_dma));
     device_set_desc_copy(dev, buffer);
     ctlr->chip = idx;
     ctlr->chipinit = ata_promise_chipinit;
@@ -2995,8 +2993,6 @@
 	break;
 
     case PRMIO:
-//      if (ctlr->r_res1)
-//          bus_release_resource(dev, ctlr->r_type1, ctlr->r_rid1,ctlr->r_res1);
 	ctlr->r_type1 = SYS_RES_MEMORY;
 	ctlr->r_rid1 = PCIR_BAR(4);
 	if (!(ctlr->r_res1 = bus_alloc_resource_any(dev, ctlr->r_type1,
@@ -3694,7 +3690,7 @@
     struct ata_device *atadev = device_get_softc(dev);
     int devno = (ch->unit << 1) + ATA_DEV(atadev->unit);
     int error;
-    u_int32_t timings33[][2] = {
+    u_int32_t timings[][2] = {
     /*    PROLD       PRNEW                mode */
 	{ 0x004ff329, 0x004fff2f },     /* PIO 0 */
 	{ 0x004fec25, 0x004ff82a },     /* PIO 1 */
@@ -3755,7 +3751,7 @@
     if (!error) {
 	if (ctlr->chip->cfg1 < PRTX)
 	    pci_write_config(gparent, 0x60 + (devno << 2),
-			     timings33[ctlr->chip->cfg1][ata_mode2idx(mode)],4);
+			     timings[ata_mode2idx(mode)][ctlr->chip->cfg1], 4);
 	atadev->mode = mode;
     }
     return;

==== //depot/projects/arm/src/sys/dev/ata/ata-disk.c#4 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 1998 - 2005 Søren Schmidt <sos at FreeBSD.org>
+ * Copyright (c) 1998 - 2006 Søren Schmidt <sos at FreeBSD.org>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -11,8 +11,6 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -27,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-disk.c,v 1.191 2005/10/31 15:41:18 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-disk.c,v 1.192 2006/01/05 21:27:19 sos Exp $");
 
 #include "opt_ata.h"
 #include <sys/param.h>

==== //depot/projects/arm/src/sys/dev/ata/ata-disk.h#3 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 1998 - 2005 Søren Schmidt <sos at FreeBSD.org>
+ * Copyright (c) 1998 - 2006 Søren Schmidt <sos at FreeBSD.org>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -11,8 +11,6 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -25,7 +23,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-disk.h,v 1.50 2005/03/30 12:03:37 sos Exp $
+ * $FreeBSD: src/sys/dev/ata/ata-disk.h,v 1.51 2006/01/05 21:27:19 sos Exp $
  */
 
 /* structure describing an ATA disk */

==== //depot/projects/arm/src/sys/dev/ata/ata-dma.c#4 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 1998 - 2005 Søren Schmidt <sos at FreeBSD.org>
+ * Copyright (c) 1998 - 2006 Søren Schmidt <sos at FreeBSD.org>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -11,8 +11,6 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -27,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-dma.c,v 1.140 2005/12/05 22:31:55 sos Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-dma.c,v 1.141 2006/01/05 21:27:19 sos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>

==== //depot/projects/arm/src/sys/dev/ata/ata-isa.c#3 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 1998 - 2005 Søren Schmidt <sos at FreeBSD.org>
+ * Copyright (c) 1998 - 2006 Søren Schmidt <sos at FreeBSD.org>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -11,8 +11,6 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -27,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-isa.c,v 1.29 2005/04/30 16:22:07 sos Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-isa.c,v 1.30 2006/01/05 21:27:19 sos Exp $");
 
 #include "opt_ata.h"
 #include <sys/param.h>

==== //depot/projects/arm/src/sys/dev/ata/ata-lowlevel.c#7 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 1998 - 2005 Søren Schmidt <sos at FreeBSD.org>
+ * Copyright (c) 1998 - 2006 Søren Schmidt <sos at FreeBSD.org>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -11,8 +11,6 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -27,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-lowlevel.c,v 1.74 2005/12/05 22:31:55 sos Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-lowlevel.c,v 1.75 2006/01/05 21:27:19 sos Exp $");
 
 #include "opt_ata.h"
 #include <sys/param.h>

==== //depot/projects/arm/src/sys/dev/ata/ata-pci.c#4 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 1998 - 2005 Søren Schmidt <sos at FreeBSD.org>
+ * Copyright (c) 1998 - 2006 Søren Schmidt <sos at FreeBSD.org>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -11,8 +11,6 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -27,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-pci.c,v 1.109 2005/12/27 18:22:11 sos Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-pci.c,v 1.110 2006/01/05 21:27:19 sos Exp $");
 
 #include "opt_ata.h"
 #include <sys/param.h>

==== //depot/projects/arm/src/sys/dev/ata/ata-pci.h#6 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2003 - 2005 Søren Schmidt <sos at FreeBSD.org>
+ * Copyright (c) 2003 - 2006 Søren Schmidt <sos at FreeBSD.org>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -11,8 +11,6 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -25,7 +23,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.58 2005/12/27 17:09:52 sos Exp $
+ * $FreeBSD: src/sys/dev/ata/ata-pci.h,v 1.59 2006/01/05 21:27:19 sos Exp $
  */
 
 /* structure holding chipset config info */

==== //depot/projects/arm/src/sys/dev/ata/ata-queue.c#5 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 1998 - 2005 Søren Schmidt <sos at FreeBSD.org>
+ * Copyright (c) 1998 - 2006 Søren Schmidt <sos at FreeBSD.org>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -11,8 +11,6 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -27,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-queue.c,v 1.52 2005/12/27 16:49:33 sos Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-queue.c,v 1.53 2006/01/05 21:27:19 sos Exp $");
 
 #include "opt_ata.h"
 #include <sys/param.h>

==== //depot/projects/arm/src/sys/dev/ata/ata-raid.c#7 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2000 - 2005 Søren Schmidt <sos at FreeBSD.org>
+ * Copyright (c) 2000 - 2006 Søren Schmidt <sos at FreeBSD.org>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -11,8 +11,6 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -27,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-raid.c,v 1.114 2005/12/27 16:49:33 sos Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-raid.c,v 1.115 2006/01/05 21:27:19 sos Exp $");
 
 #include "opt_ata.h"
 #include <sys/param.h>

==== //depot/projects/arm/src/sys/dev/ata/ata-raid.h#6 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2000 - 2005 Søren Schmidt <sos at FreeBSD.org>
+ * Copyright (c) 2000 - 2006 Søren Schmidt <sos at FreeBSD.org>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -11,8 +11,6 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -25,7 +23,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-raid.h,v 1.41 2005/12/15 13:30:23 sos Exp $
+ * $FreeBSD: src/sys/dev/ata/ata-raid.h,v 1.42 2006/01/05 21:27:19 sos Exp $
  */
 
 /* misc defines */

==== //depot/projects/arm/src/sys/dev/ata/ata_if.m#2 (text+ko) ====

@@ -1,4 +1,4 @@
-# Copyright (c) 2004, 2005 Søren Schmidt <sos at FreeBSD.org>
+# Copyright (c) 2004 - 2006 Søren Schmidt <sos at FreeBSD.org>
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -10,8 +10,6 @@
 # 2. Redistributions in binary form must reproduce the above copyright
 #    notice, this list of conditions and the following disclaimer in the
 #    documentation and/or other materials provided with the distribution.
-# 3. The name of the author may not be used to endorse or promote products
-#    derived from this software without specific prior written permission.
 #
 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
 # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -24,7 +22,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_if.m,v 1.5 2005/04/30 16:22:07 sos Exp $
+# $FreeBSD: src/sys/dev/ata/ata_if.m,v 1.6 2006/01/05 21:27:19 sos Exp $
 
 #include <sys/bus.h>
 #include <sys/kernel.h>

==== //depot/projects/arm/src/sys/dev/ata/atapi-cd.c#3 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 1998 - 2005 Søren Schmidt <sos at FreeBSD.org>
+ * Copyright (c) 1998 - 2006 Søren Schmidt <sos at FreeBSD.org>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -11,8 +11,6 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -27,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/atapi-cd.c,v 1.184 2005/10/31 15:41:18 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/atapi-cd.c,v 1.186 2006/01/05 21:27:19 sos Exp $");
 
 #include "opt_ata.h"
 #include <sys/param.h>
@@ -1513,7 +1511,7 @@
 
     case DVD_STRUCT_COPYRIGHT:
 	s->cpst = d->data[0];
-	s->rmi = d->data[0];
+	s->rmi = d->data[1];
 	break;
 
     case DVD_STRUCT_DISCKEY:

==== //depot/projects/arm/src/sys/dev/ata/atapi-cd.h#3 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 1998 - 2005 Søren Schmidt <sos at FreeBSD.org>
+ * Copyright (c) 1998 - 2006 Søren Schmidt <sos at FreeBSD.org>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -11,8 +11,6 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -25,7 +23,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/atapi-cd.h,v 1.44 2005/03/30 12:03:38 sos Exp $
+ * $FreeBSD: src/sys/dev/ata/atapi-cd.h,v 1.45 2006/01/05 21:27:19 sos Exp $
  */
 
 /* CDROM Table Of Contents */

==== //depot/projects/arm/src/sys/dev/ata/atapi-fd.c#3 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 1998 - 2005 Søren Schmidt <sos at FreeBSD.org>
+ * Copyright (c) 1998 - 2006 Søren Schmidt <sos at FreeBSD.org>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -11,8 +11,6 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -27,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/atapi-fd.c,v 1.103 2005/10/31 15:41:18 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/atapi-fd.c,v 1.104 2006/01/05 21:27:19 sos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>

==== //depot/projects/arm/src/sys/dev/ata/atapi-fd.h#3 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 1998 - 2005 Søren Schmidt <sos at FreeBSD.org>
+ * Copyright (c) 1998 - 2006 Søren Schmidt <sos at FreeBSD.org>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -11,8 +11,6 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -25,7 +23,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/atapi-fd.h,v 1.24 2005/03/30 12:03:38 sos Exp $
+ * $FreeBSD: src/sys/dev/ata/atapi-fd.h,v 1.25 2006/01/05 21:27:19 sos Exp $
  */
 
 /* ATAPI Rewriteable drive Capabilities and Mechanical Status Page */

==== //depot/projects/arm/src/sys/dev/ata/atapi-tape.c#4 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 1998 - 2005 Søren Schmidt <sos at FreeBSD.org>
+ * Copyright (c) 1998 - 2006 Søren Schmidt <sos at FreeBSD.org>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -11,8 +11,6 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -27,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/atapi-tape.c,v 1.100 2005/10/31 15:41:18 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/atapi-tape.c,v 1.101 2006/01/05 21:27:19 sos Exp $");
 
 #include "opt_ata.h"
 #include <sys/param.h>

==== //depot/projects/arm/src/sys/dev/ata/atapi-tape.h#3 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 1998 - 2005 Søren Schmidt <sos at FreeBSD.org>
+ * Copyright (c) 1998 - 2006 Søren Schmidt <sos at FreeBSD.org>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -11,8 +11,6 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -25,7 +23,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/atapi-tape.h,v 1.23 2005/03/30 12:03:38 sos Exp $
+ * $FreeBSD: src/sys/dev/ata/atapi-tape.h,v 1.24 2006/01/05 21:27:19 sos Exp $
  */
 
 /* ATAPI tape drive Capabilities and Mechanical Status Page */

==== //depot/projects/arm/src/sys/dev/atkbdc/psm.c#3 (text+ko) ====

@@ -59,7 +59,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/atkbdc/psm.c,v 1.87 2005/12/04 02:12:40 ru Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/atkbdc/psm.c,v 1.88 2006/01/05 19:24:01 dumbbell Exp $");
 
 #include "opt_isa.h"
 #include "opt_psm.h"
@@ -2546,7 +2546,7 @@
 	    /* Sanity check for out of sync packets. */
 	    if ((pb->ipacket[0] & 0xc8) != 0x80 ||
 		(pb->ipacket[3] & 0xc8) != 0xc0)
-		continue;
+		goto NEXT;
 
 	    x = y = x0 = y0 = 0;
 
@@ -2818,6 +2818,7 @@
 	}
         pb->inputbytes = 0;
 
+NEXT:
 	if (++sc->pqueue_start >= PSM_PACKETQUEUE)
 		sc->pqueue_start = 0;
     } while (sc->pqueue_start != sc->pqueue_end);

==== //depot/projects/arm/src/sys/dev/cardbus/cardbus_cis.c#5 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/cardbus/cardbus_cis.c,v 1.56 2005/12/31 01:45:40 avatar Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/cardbus/cardbus_cis.c,v 1.58 2006/01/03 03:36:17 imp Exp $");
 
 /*
  * CIS Handling for the Cardbus Bus
@@ -58,6 +58,8 @@
 #define	DPRINTF(a) if (cardbus_cis_debug) printf a
 #define	DEVPRINTF(x) if (cardbus_cis_debug) device_printf x
 
+#define CIS_CONFIG_SPACE	(struct resource *)~0UL
+
 static int decode_tuple_generic(device_t cbdev, device_t child, int id,
     int len, uint8_t *tupledata, uint32_t start, uint32_t *off,
     struct tuple_callbacks *info, void *);
@@ -287,7 +289,7 @@
 	struct cardbus_devinfo *dinfo = device_get_ivars(child);
 	int type;
 	uint8_t reg;
-	uint32_t bar, pci_bar;
+	uint32_t bar;
 
 	if (len != 6) {
 		device_printf(cbdev, "CIS BAR length not 6 (%d)\n", len);
@@ -296,11 +298,10 @@
 
 	reg = *tupledata;
 	len = le32toh(*(uint32_t*)(tupledata + 2));
-	if (reg & TPL_BAR_REG_AS) {
+	if (reg & TPL_BAR_REG_AS)
 		type = SYS_RES_IOPORT;
-	} else {
+	else
 		type = SYS_RES_MEMORY;
-	}
 
 	bar = reg & TPL_BAR_REG_ASI_MASK;
 	if (bar == 0) {
@@ -342,37 +343,6 @@
 #endif
 	}
 
-	/*
-	 * Sanity check the BAR length reported in the CIS with the length
-	 * encoded in the PCI BAR.  The latter seems to be more reliable.
-	 * XXX - This probably belongs elsewhere.
-	 */
-	pci_write_config(child, bar, 0xffffffff, 4);
-	pci_bar = pci_read_config(child, bar, 4);
-	if ((pci_bar != 0x0) && (pci_bar != 0xffffffff)) {
-		if (type == SYS_RES_MEMORY) {
-			pci_bar &= ~0xf;
-		} else {
-			pci_bar &= ~0x3;
-		}
-		len = 1 << (ffs(pci_bar) - 1);
-	}
-
-	DEVPRINTF((cbdev, "Opening BAR: type=%s, bar=%02x, len=%04x%s%s\n",
-	    (type == SYS_RES_MEMORY) ? "MEM" : "IO", bar, len,
-	    (type == SYS_RES_MEMORY &&
-	    dinfo->mprefetchable & (1 << PCI_RID2BAR(bar))) ?
-	    " (Prefetchable)" : "", type == SYS_RES_MEMORY ?
-	    ((dinfo->mbelow1mb & (1 << PCI_RID2BAR(bar))) ?
-	    " (Below 1Mb)" : "") : ""));
-
-	resource_list_add(&dinfo->pci.resources, type, bar, 0UL, ~0UL, len);
-
-	/*
-	 * Mark the appropriate bit in the PCI command register so that
-	 * device drivers will know which type of BARs can be used.
-	 */
-	pci_enable_io(child, type);
 	return (0);
 }
 
@@ -453,21 +423,19 @@
     uint32_t start, uint32_t *off, int *tupleid, int *len,
     uint8_t *tupledata)
 {
-	if (res == (struct resource*)~0UL) {
+	if (res == CIS_CONFIG_SPACE)
 		return (cardbus_read_tuple_conf(cbdev, child, start, off,
 		    tupleid, len, tupledata));
-	} else {
-		return (cardbus_read_tuple_mem(cbdev, res, start, off,
-		    tupleid, len, tupledata));
-	}
+	return (cardbus_read_tuple_mem(cbdev, res, start, off, tupleid, len,
+	    tupledata));
 }
 
 static void
 cardbus_read_tuple_finish(device_t cbdev, device_t child, int rid,
     struct resource *res)
 {
-	if (res != (struct resource*)~0UL) {
-		bus_release_resource(cbdev, SYS_RES_MEMORY, rid, res);
+	if (res != CIS_CONFIG_SPACE) {
+		bus_release_resource(child, SYS_RES_MEMORY, rid, res);
 		if (rid == PCIM_CIS_ASI_ROM)
 			pci_write_config(child, rid, pci_read_config(child,
 			    rid, 4) & ~PCIR_BIOS, 4);
@@ -487,7 +455,7 @@
 		if (cardbus_cis_debug)
 			device_printf(cbdev, "CIS in PCI config space\n");
 		/* CIS in PCI config space need no initialization */
-		return ((struct resource*)~0UL);
+		return (CIS_CONFIG_SPACE);
 	case PCIM_CIS_ASI_BAR0:
 	case PCIM_CIS_ASI_BAR1:
 	case PCIM_CIS_ASI_BAR2:
@@ -510,15 +478,13 @@
 	}
 
 	/* allocate the memory space to read CIS */
-	res = bus_alloc_resource(cbdev, SYS_RES_MEMORY, rid, 0, ~0, 1,
+	res = bus_alloc_resource(child, SYS_RES_MEMORY, rid, 0, ~0, 1,
 	    rman_make_alignment_flags(4096) | RF_ACTIVE);

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


More information about the p4-projects mailing list