Subject: Re: current 1.6ZH: GENERIC_LAPTOP stops booting with Cardbus Card "Apaptec
To: =?ISO-8859-2?Q?Hilmar_B=F6hm?= <h.boehm@ndh.net>
From: Jaromir Dolecek <jdolecek@NetBSD.org>
List: current-users
Date: 01/19/2004 00:40:10
Hilmar B=F6hm wrote:
> Is this card supported?
> At least it seems to be supported, when I look into the GENERIC_LAPTOP
> config file.
> But when I insert this card, the kernel stop at this point:

Seems the cardbus attachment was not updated when the ahc
driver was last updated.

This might fix the panic.


Index: ahc_cardbus.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/src/sys/dev/cardbus/ahc_cardbus.c,v
retrieving revision 1.12
diff -u -p -r1.12 ahc_cardbus.c
--- ahc_cardbus.c	20 Apr 2003 16:52:40 -0000	1.12
+++ ahc_cardbus.c	18 Jan 2004 23:35:18 -0000
@@ -214,6 +214,11 @@ ahc_cardbus_attach(parent, self, aux)
 	}
 	printf("%s: interrupting at %d\n", ahc_name(ahc), ca->ca_intrline);
=20
+	ahc->seep_config =3D malloc(sizeof(*ahc->seep_config),
+				  M_DEVBUF, M_NOWAIT);
+	if (ahc->seep_config =3D=3D NULL)
+		return;
+
 	ahc_check_extport(ahc, &sxfrctl1);
 	/*
 	 * Take the LED out of diagnostic mode.

Jaromir
=20
> ----------------------------------------------------
> Boot kernel messages - netbsd 1.6ZH - GENERIC_LAPTOP
> -with Cardbus Card "Adaptec ADP-1480 SCSI loaded
> - - - - - - - - - - - - - - - - - - - - - - - - - -
> ....
> cardbus_read_exrom: bad header signature in ROM image 0: 0x0000
> cardbus_attach_card: failed to read CIS
> ahc0 at cardbus0 dev 0 function 0: Adaptec ADP-1480 SCSI
> ahc0: interrupting at 11
> uvm_fault)0xc05c5f00, 0, 0, 2) -> 0xe
> kernel: page fault trap, code=3D0
> stopped in pid 6.1 (cardslot0) at      netbsd:free+0x62:        movl
> $0,0(%esi)
> db>
>=20
> db> tr
> ------
>=20
> free(0,c057a800,2,ffffffff,0) at netbsd:free+0x62
> ahc_check_extport(c2bcf000,cd1f24b4,b,0,10) at
> netbsd:ahc_check_extport+0x1a9
> ahc_cardbus_attach(c2be1f80,c2bcf000,cd1f2594,c2bcf38c,1) at
> netbsd:ahc_cardbus_attach+0x207
> config_attach(c2be1f80,c0571a44,cd1f2594,c040abe0,0) at
> netbsd:config_attach+0x23c
> cardbus_attach_card(c2be1f80,0,0,cd1de294,cd1d57f8) at
> netbsd:cardbus_attach_card+0x441
> cardslot_event_thread(c2781b80,66b000,674000,0,c010030c) at
> cardslot_event_thread+_x1d_
> db>
> --------------------------------------------------------
>=20
> (My system is a DELL notebook Inspiron 5150 / CPU-3.06GHz / Mem-2GB)
> ------------------
>=20
> If I boot the same kernel without the card, the system comes up with no
> problem.
> "dmesg" output see below.
>=20
> The kernel was built with the unmodified GENERIC_LAPTOP config file.
>=20
> Is there a chance to get this working?
>=20
> Regards. / Hilmar.
>=20
> Btw: A NetBSD-1.6.2_RC3 GENERIC_LAPTOP kernel boots with the 1480B insert=
ed,
> but there is no SCSI dev configured.
> -----
> from dmesg:
> ahc0 at cardbus0 dev 0 function 0: Adaptec ADP-1480 SCSI
> ahc0: interrupting at 10
> ahc0: CardBus device requires an SEEPROM
> -----
>=20
>=20
> ---------------------------------
> dmesg of the GENERIC_LAPTOP kernel boot and "1480B" not inserted:
> - - - - - - - - - - - - - - - - - - - - - - - - - -
>=20
> NetBSD 1.6ZH (LT) #0: Tue Jan 20 08:03:34 GMT 2004
> 	root@don097:/usr/src/sys/arch/i386/compile/LT
> total memory =3D 2047 MB
> avail memory =3D 1998 MB
> BIOS32 rev. 0 found at 0xffe90
> PCI BIOS rev. 2.1 found at 0xfcf1e
> pcibios: config mechanism [1][x], special cycles [x][x], last bus 2
> PCI IRQ Routing Table rev. 1.0 found at 0xfcb30, size 176 bytes (9 entrie=
s)
> PCI Interrupt Router at 000:31:0 (Intel 82371MX Mobile PCI I/O IDE
> Xcelerator (MPIIX))
> ------------------------------------------
>   device vendor product pin PIRQ IRQ stage
> ------------------------------------------
> 000:29:0 0x8086 0x24c2   A  0x00  11  0    already assigned
> 000:29:1 0x8086 0x24c4   B  0x03  11  0    already assigned
> 000:29:2 0x8086 0x24c7   C  0x02  11  0    already assigned
> 000:31:1 0x8086 0x24ca   A  0x02  11  0    fixed up
> 000:31:5 0x8086 0x24c5   B  0x01  11  0    already assigned
> 000:31:6 0x8086 0x24c6   B  0x01  11  0    already assigned
> 002:01:0 0x14e4 0x4401   A  0x01  11  0    already assigned
> 002:02:0 0x14e4 0x4320   A  0x02  11  0    already assigned
> 002:04:0 0x104c 0xac44   A  0x00  11  0    already assigned
> 002:04:1 0x104c 0x8029   A  0x00  11  0    already assigned
> ------------------------------------------
> PCI fixup examining 8086:3580
> PCI fixup examining 8086:3584
> PCI fixup examining 8086:3585
> PCI fixup examining 8086:3581
> PCI fixup examining 10de:324
> PCI bridge 0: primary 0, secondary 1, subordinate 1
> PCI fixup examining 8086:24c2
> PCI fixup examining 8086:24c4
> PCI fixup examining 8086:24c7
> PCI fixup examining 8086:24cd
> PCI fixup examining 8086:2448
> PCI fixup examining 14e4:4401
> PCI fixup examining 14e4:4320
> PCI fixup examining 104c:ac44
> PCI bridge 2: primary 2, secondary 3, subordinate 3
> PCI fixup examining 104c:8029
> PCI bridge 1: primary 0, secondary 2, subordinate 3
> PCI fixup examining 8086:24cc
> PCI fixup examining 8086:24ca
> PCI fixup examining 8086:24c5
> PCI fixup examining 8086:24c6
> PCI bus #3 is the last bus
> [System BIOS Setting]-----------------------
>   device vendor product
>   register space address    size
> --------------------------------------------
> 000:00:0 0x8086 0x3580
> 	10h mem  0xe0000000 0x08000000
> 		[OK]
> 000:00:1 0x8086 0x3584
> 		[OK]
> 000:00:3 0x8086 0x3585
> 		[OK]
> 000:01:0 0x8086 0x3581
> 		[OK]
> 000:29:0 0x8086 0x24c2
> 	20h port 0x0000bf80 0x00000020
> 		[OK]
> 000:29:1 0x8086 0x24c4
> 	20h port 0x0000bf40 0x00000020
> 		[OK]
> 000:29:2 0x8086 0x24c7
> 	20h port 0x0000bf20 0x00000020
> 		[OK]
> 000:29:7 0x8086 0x24cd
> 	10h mem  0xf4fffc00 0x00000400
> 		[OK]
> 000:30:0 0x8086 0x2448
> 		[OK]
> 000:31:0 0x8086 0x24cc
> 		[OK]
> 000:31:1 0x8086 0x24ca
> 	10h port 0x000001f0 0x00000008
> 	14h port 0x000003f4 0x00000004
> 	18h port 0x00000170 0x00000008
> 	1ch port 0x00000374 0x00000004
> 	20h port 0x0000bfa0 0x00000010
> 	24h mem  0x00000000 0x00000400
> 		[NG]
> 000:31:5 0x8086 0x24c5
> 	10h port 0x0000b800 0x00000100
> 	14h port 0x0000bc40 0x00000040
> 	18h mem  0xf4fff800 0x00000200
> 	1ch mem  0xf4fff400 0x00000100
> 		[OK]
> 000:31:6 0x8086 0x24c6
> 	10h port 0x0000b400 0x00000100
> 	14h port 0x0000b080 0x00000080
> 		[OK]
> 001:00:0 0x10de 0x0324
> 	10h mem  0xfc000000 0x01000000
> 	14h mem  0xd0000000 0x10000000
> 		[OK]
> 002:01:0 0x14e4 0x4401
> 	10h mem  0xfaffe000 0x00002000
> 		[OK]
> 002:02:0 0x14e4 0x4320
> 	10h mem  0xfaffc000 0x00002000
> 		[OK]
> 002:04:0 0x104c 0xac44
> 	10h mem  0x00000000 0x00001000
> 		[NG]
> 002:04:1 0x104c 0x8029
> 	10h mem  0xfaffb800 0x00000800
> 	14h mem  0xfaff4000 0x00004000
> 		[OK]
> --------------------------[  2 devices bogus]
>  Physical memory end: 0x7ffcb000
>  PCI memory mapped I/O space start: 0x80000000
> [PCIBIOS fixup stage]-----------------------
>   device vendor product
>   register space address    size
> --------------------------------------------
> 000:00:0 0x8086 0x3580
> 	10h mem  0xe0000000 0x08000000
> 		[OK]
> 000:00:1 0x8086 0x3584
> 		[OK]
> 000:00:3 0x8086 0x3585
> 		[OK]
> 000:01:0 0x8086 0x3581
> 		[OK]
> 000:29:0 0x8086 0x24c2
> 	20h port 0x0000bf80 0x00000020
> 		[OK]
> 000:29:1 0x8086 0x24c4
> 	20h port 0x0000bf40 0x00000020
> 		[OK]
> 000:29:2 0x8086 0x24c7
> 	20h port 0x0000bf20 0x00000020
> 		[OK]
> 000:29:7 0x8086 0x24cd
> 	10h mem  0xf4fffc00 0x00000400
> 		[OK]
> 000:30:0 0x8086 0x2448
> 		[OK]
> 000:31:0 0x8086 0x24cc
> 		[OK]
> 000:31:1 0x8086 0x24ca
> 	10h port 0x000001f0 0x00000008
> 	14h port 0x000003f4 0x00000004
> 	18h port 0x00000170 0x00000008
> 	1ch port 0x00000374 0x00000004
> 	20h port 0x0000bfa0 0x00000010
> 	24h mem  0x80000000 0x00000400
> 		[OK]
> 000:31:5 0x8086 0x24c5
> 	10h port 0x0000b800 0x00000100
> 	14h port 0x0000bc40 0x00000040
> 	18h mem  0xf4fff800 0x00000200
> 	1ch mem  0xf4fff400 0x00000100
> 		[OK]
> 000:31:6 0x8086 0x24c6
> 	10h port 0x0000b400 0x00000100
> 	14h port 0x0000b080 0x00000080
> 		[OK]
> 001:00:0 0x10de 0x0324
> 	10h mem  0xfc000000 0x01000000
> 	14h mem  0xd0000000 0x10000000
> 		[OK]
> 002:01:0 0x14e4 0x4401
> 	10h mem  0xfaffe000 0x00002000
> 		[OK]
> 002:02:0 0x14e4 0x4320
> 	10h mem  0xfaffc000 0x00002000
> 		[OK]
> 002:04:0 0x104c 0xac44
> 	10h mem  0x80001000 0x00001000
> 		[OK]
> 002:04:1 0x104c 0x8029
> 	10h mem  0xfaffb800 0x00000800
> 	14h mem  0xfaff4000 0x00004000
> 		[OK]
> --------------------------[  0 devices bogus]
> mainbus0 (root)
> cpu0 at mainbus0: (uniprocessor)
> cpu0: Intel Pentium 4 (686-class), 3056.58 MHz, id 0xf29
> cpu0: features bfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
> cpu0: features bfebfbff<PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX>
> cpu0: features bfebfbff<FXSR,SSE,SSE2,SS,HTT,TM,SBF>
> cpu0: I-cache 12K uOp cache 8-way, D-cache 8 KB 64b/line 4-way
> cpu0: L2 cache 512 KB 64b/line 8-way
> cpu0: ITLB 4K/4M: 128 entries
> cpu0: DTLB 4K/4M: 64 entries
> cpu0: 16 page colors
> pci0 at mainbus0 bus 0: configuration mode 1
> pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
> pchb0 at pci0 dev 0 function 0
> pchb0: Intel 82855GM Host-to-Hub Controller (rev. 0x02)
> agp0 at pchb0: can't find internal VGA device config space
> Intel 82855GM GMCH Memory Controller (miscellaneous system, revision 0x02)
> at pci0 dev 0 function 1 not configured
> Intel 82855GM GMCH Configuration Process (miscellaneous system, revision
> 0x02) at pci0 dev 0 function 3 not configured
> ppb0 at pci0 dev 1 function 0: Intel product 0x3581 (rev. 0x02)
> pci1 at ppb0 bus 1
> pci1: i/o space, memory space enabled
> vga1 at pci1 dev 0 function 0: Nvidia Corporation product 0x0324 (rev. 0x=
a1)
> wsdisplay0 at vga1 kbdmux 1: console (80x25, vt100 emulation)
> wsmux1: connecting to wsdisplay0
> uhci0 at pci0 dev 29 function 0: Intel 82801DB/DBM USB UHCI Controller #1
> (rev. 0x01)
> uhci0: interrupting at irq 11
> usb0 at uhci0: USB revision 1.0
> uhub0 at usb0
> uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
> uhub0: 2 ports with 2 removable, self powered
> uhci1 at pci0 dev 29 function 1: Intel 82801DB/DBM USB UHCI Controller #2
> (rev. 0x01)
> uhci1: interrupting at irq 11
> usb1 at uhci1: USB revision 1.0
> uhub1 at usb1
> uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
> uhub1: 2 ports with 2 removable, self powered
> uhci2 at pci0 dev 29 function 2: Intel 82801DB/DBM USB UHCI Controller #3
> (rev. 0x01)
> uhci2: interrupting at irq 11
> usb2 at uhci2: USB revision 1.0
> uhub2 at usb2
> uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
> uhub2: 2 ports with 2 removable, self powered
> Intel 82801DB/DBM USB EHCI Controller (USB serial bus, interface 0x20,
> revision 0x01) at pci0 dev 29 function 7 not configured
> ppb1 at pci0 dev 30 function 0: Intel 82801BAM Hub-to-PCI Bridge (rev. 0x=
81)
> pci2 at ppb1 bus 2
> pci2: i/o space, memory space enabled
> bce0 at pci2 dev 1 function 0: Broadcom BCM4401 10/100 Ethernet
> bce0: interrupting at irq 11
> ukphy0 at bce0 phy 1: Generic IEEE 802.3u media interface
> ukphy0: OUI 0x000818, model 0x0036, rev. 0
> ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
> bce0: Ethernet address 00:0d:56:33:17:c2
> Broadcom Corporation product 0x4320 (miscellaneous network, revision 0x02)
> at pci2 dev 2 function 0 not configured
> cbb0 at pci2 dev 4 function 0: Texas Instruments PCI4510 PCI-CardBus Brid=
ge
> w/ OHCI IEEE 1394 Controller (rev. 0x02)
> Texas Instruments PCI4510 OHCI IEEE 1394 HOST Controller w/ PCI-CardBus
> Bridge (Firewire serial bus, interface 0x10) at pci2 dev 4 function 1 not
> configured
> cbb0: interrupting at irq 11
> cardslot0 at cbb0 slot 0 flags 0
> cardbus0 at cardslot0: bus 3 device 0
> pcmcia0 at cardslot0
> pcib0 at pci0 dev 31 function 0
> pcib0: Intel 82801DB ISA Bridge (rev. 0x01)
> piixide0 at pci0 dev 31 function 1
> piixide0: Intel 82801DBM IDE Controller (ICH4-M) (rev. 0x01)
> piixide0: bus-master DMA support present
> piixide0: primary channel wired to compatibility mode
> piixide0: primary channel interrupting at irq 14
> atabus0 at piixide0 channel 0
> piixide0: secondary channel wired to compatibility mode
> piixide0: secondary channel interrupting at irq 15
> atabus1 at piixide0 channel 1
> auich0 at pci0 dev 31 function 5: i82801DB/DBM (ICH4/ICH4M) AC-97 Audio
> auich0: interrupting at irq 11
> auich0: ac97: SigmaTel STAC9750/51 codec; headphone, 20 bit DAC, 20 bit A=
DC,
> SigmaTel 3D
> auich0: ac97: ext id 601<AC97_22,AMAP,VRA>
> Intel 82801DB/DBM AC97 Modem Controller (modem communications, revision
> 0x01) at pci0 dev 31 function 6 not configured
> isa0 at pcib0
> pckbc0 at isa0 port 0x60-0x64
> pckbd0 at pckbc0 (kbd slot)
> pckbc0: using irq 1 for kbd slot
> wskbd0 at pckbd0: console keyboard, using wsdisplay0
> pms0 at pckbc0 (aux slot)
> pckbc0: using irq 12 for aux slot
> wsmouse0 at pms0 mux 0
> pcppi0 at isa0 port 0x61
> midi0 at pcppi0: PC speaker
> sysbeep0 at pcppi0
> isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
> npx0 at isa0 port 0xf0-0xff: using exception 16
> isapnp0: no ISA Plug 'n Play devices found
> auich0: measured ac97 link rate at 35106 Hz, will use 48000 Hz
> audio0 at auich0: full duplex, mmap, independent
> Kernelized RAIDframe activated
> atapibus0 at atabus0: 2 targets
> cd0 at atapibus0 drive 0: <PHILIPS DVD+RW SDVD6004, , 1.03> cdrom removab=
le
> cd0: 32-bit data port
> cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
> cd0(piixide0:0:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using D=
MA
> data transfers)
> uhidev0 at uhub1 port 1 configuration 1 interface 0
> uhidev0: vendor 0x1241 product 0x1155, rev 1.10/1.20, addr 2, iclass 3/1
> ums0 at uhidev0: 5 buttons and Z dir.
> wsmouse1 at ums0 mux 0
> wd0 at atabus1 drive 0: <IC25N060ATMR04-0>
> wd0: drive supports 16-sector PIO transfers, LBA48 addressing
> wd0: 57231 MB, 116280 cyl, 16 head, 63 sec, 512 bytes/sect x 117210240
> sectors
> wd0: 32-bit data port
> wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
> wd0(piixide0:1:0): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using =
DMA
> data transfers)
> boot device: wd0
> root on wd0a dumps on wd0b
> WARNING: possible botched superblock upgrade detected
> on filesystem previously mounted on /
> fs_bsize =3D=3D fs_maxbsize (0x00002000) but FS_FLAGS_UPDATED is not set
> Test your filesystem by running fsck_ffs -n -f on it.
> If it reports:
> ``VALUES IN SUPER BLOCK DISAGREE WITH THOSE IN FIRST ALTERNATE''
> you should be able to recover with fsck_ffs -b 32 -c 4
> See the file src/UPDATING or
> http://mail-index.netbsd.org/current-users/2004/01/11/0022.html
> for more details
> root file system type: ffs
> wsdisplay0: screen 1 added (80x25, vt100 emulation)
> wsdisplay0: screen 2 added (80x25, vt100 emulation)
> wsdisplay0: screen 3 added (80x25, vt100 emulation)
> wsdisplay0: screen 4 added (80x25, vt100 emulation)
> -------------------------------------------------------------------------=
---
> --
>=20

--=20
Jaromir Dolecek <jdolecek@NetBSD.org>            http://www.NetBSD.cz/
-=3D- We should be mindful of the potential goal, but as the Buddhist -=3D-
-=3D- masters say, ``You may notice during meditation that you        -=3D-
-=3D- sometimes levitate or glow.   Do not let this distract you.''   -=3D-