Module Name: src Committed By: riz Date: Thu Mar 8 17:32:50 UTC 2012
Modified Files: src/sys/dev/pci [netbsd-6]: agp_amd64.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #95): sys/dev/pci/agp_amd64.c: revision 1.7 - make agp_amd64_attach() also checks AMD64 Family 10h CPU's misc configuration devices - print proper error message if no misc configuration device is found Fixes kernel crash right after starting Xserver with radeondrm on ASRock AM2NF3-VSTA (AM2 + nForce3 250 AGP) with Athlon II X2 CPU. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.6.14.1 src/sys/dev/pci/agp_amd64.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/agp_amd64.c diff -u src/sys/dev/pci/agp_amd64.c:1.6 src/sys/dev/pci/agp_amd64.c:1.6.14.1 --- src/sys/dev/pci/agp_amd64.c:1.6 Sat Nov 13 13:52:04 2010 +++ src/sys/dev/pci/agp_amd64.c Thu Mar 8 17:32:50 2012 @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: agp_amd64.c,v 1.6 2010/11/13 13:52:04 uebayasi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: agp_amd64.c,v 1.6.14.1 2012/03/08 17:32:50 riz Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -224,13 +224,16 @@ agp_amd64_attach(device_t parent, device tag = pci_make_tag(pa->pa_pc, 0, i, 3); id = pci_conf_read(pa->pa_pc, tag, PCI_ID_REG); if (PCI_VENDOR(id) == PCI_VENDOR_AMD && - PCI_PRODUCT(id) == PCI_PRODUCT_AMD_AMD64_MISC) { + (PCI_PRODUCT(id) == PCI_PRODUCT_AMD_AMD64_MISC || + PCI_PRODUCT(id) == PCI_PRODUCT_AMD_AMD64_F10_MISC)) { asc->mctrl_tag[n] = tag; n++; } } - if (n == 0) + if (n == 0) { + aprint_error(": No Miscellaneous Control unit found.\n"); return ENXIO; + } asc->n_mctrl = n; aprint_normal(": %d Miscellaneous Control unit(s) found.\n",