latest -HEAD kernel cannot be built

Rumko rumcic at gmail.com
Mon Mar 24 06:29:03 PDT 2008


After the changes to sys/dev/disk/nata the kernel cannot be built. The error
is:
cc -c -O -pipe  -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -std=c99 -g -nostdinc -I. -Iinclude -I/usr/src/sys -I/usr/src/sys/../include -I/usr/obj/usr/src/sys/MYPRECIOUS -I"/usr/src/sys/dev/acpica5" -I"/usr/src/sys/contrib/dev/acpica-unix-20061109/include" -I/usr/src/sys/contrib/ipfilter  -D_KERNEL -include
opt_global.h  -finline-limit=8000 --param inline-unit-growth=100 --param
large-function-growth=1000 -fno-common -ffreestanding -mpreferred-stack-boundary=2 -fno-stack-protector -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3  /usr/src/sys/dev/disk/nata/ata-chipset.c
/usr/src/sys/dev/disk/nata/ata-chipset.c: In function 'ata_ahci_ident':
/usr/src/sys/dev/disk/nata/ata-chipset.c:465:
error: 'PCIP_STORAGE_SATA_AHCI_1_0' undeclared (first use in this function)
/usr/src/sys/dev/disk/nata/ata-chipset.c:465: error: (Each undeclared
identifier is reported only once
/usr/src/sys/dev/disk/nata/ata-chipset.c:465: error: for each function it
appears in.)
/usr/src/sys/dev/disk/nata/ata-chipset.c: In function 'ata_ati_chipinit':
/usr/src/sys/dev/disk/nata/ata-chipset.c:1398:
error: 'PCIP_STORAGE_SATA_AHCI_1_0' undeclared (first use in this function)

I cannot find 'PCIP_STORAGE_SATA_AHCI_1_0' defined anywhere in the source tree
(only used in ata-chipset.c), but PCIP_STORAGE_SATA_AHCI is defined in
sys/bus/pci/pcireg.h. With the following patch the kernel does compile, but
I'm not sure if using 'PCIP_STORAGE_SATA_AHCI_1_0' was intentional (maybe it
should have a different value than PCIP_STORAGE_SATA_AHCI) or not.
-- 
Regards,
Rumko
--- sys/dev/disk/nata/ata-chipset.c.orig	2008-03-24 13:46:10 +0100
+++ sys/dev/disk/nata/ata-chipset.c	2008-03-24 13:46:24 +0100
@@ -462,7 +462,7 @@
     static struct ata_chip_id id = {0, 0, 0, 0x00, ATA_SA300, "AHCI"};
     char buffer[64];
 
-    if (pci_read_config(dev, PCIR_PROGIF, 1) != PCIP_STORAGE_SATA_AHCI_1_0)
+    if (pci_read_config(dev, PCIR_PROGIF, 1) != PCIP_STORAGE_SATA_AHCI)
 	return ENXIO;
 
     if (bootverbose)
@@ -1395,7 +1395,7 @@
     if (ctlr->chip->cfg1 & ATIAHCI) {
 	/* Check if the chip is configured as an AHCI part. */
 	if ((pci_get_subclass(dev) == PCIS_STORAGE_SATA) &&
-	    (pci_read_config(dev, PCIR_PROGIF, 1) == PCIP_STORAGE_SATA_AHCI_1_0)) {
+	    (pci_read_config(dev, PCIR_PROGIF, 1) == PCIP_STORAGE_SATA_AHCI)) {
 	    /* Check if the chip has PCI BAR 5 as memory resource. */
 	    ctlr->r_type2 = SYS_RES_MEMORY;
 	    ctlr->r_rid2 = PCIR_BAR(5);	/* 0x24 */





More information about the Bugs mailing list