Module Name: src
Committed By: phx
Date: Sat Apr 30 11:12:59 UTC 2011
Modified Files:
src/sys/arch/sandpoint/pci: pci_machdep.c
Log Message:
Detect QNAP board last, because a Realtek chip at pci device 15 is used
on several boards.
To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/sandpoint/pci/pci_machdep.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/arch/sandpoint/pci/pci_machdep.c
diff -u src/sys/arch/sandpoint/pci/pci_machdep.c:1.26 src/sys/arch/sandpoint/pci/pci_machdep.c:1.27
--- src/sys/arch/sandpoint/pci/pci_machdep.c:1.26 Mon Apr 4 20:37:53 2011
+++ src/sys/arch/sandpoint/pci/pci_machdep.c Sat Apr 30 11:12:58 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep.c,v 1.26 2011/04/04 20:37:53 dyoung Exp $ */
+/* $NetBSD: pci_machdep.c,v 1.27 2011/04/30 11:12:58 phx Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.26 2011/04/04 20:37:53 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.27 2011/04/30 11:12:58 phx Exp $");
#include "opt_pci.h"
@@ -135,12 +135,6 @@
}
tag = pci_make_tag(pba->pba_pc, pba->pba_bus, 15, 0);
dev15 = pci_conf_read(pba->pba_pc, tag, PCI_ID_REG);
- if (PCI_VENDOR(dev15) == PCI_VENDOR_INTEL
- || PCI_VENDOR(dev15) == PCI_VENDOR_REALTEK) {
- /* Intel or Realtek GbE at dev 15 */
- brdtype = BRD_QNAPTS;
- return;
- }
if (PCI_VENDOR(dev15) == PCI_VENDOR_MARVELL) {
/* Marvell GbE at dev 15 */
brdtype = BRD_SYNOLOGY;
@@ -165,6 +159,12 @@
brdtype = BRD_NH230NAS;
return;
}
+ if (PCI_VENDOR(dev15) == PCI_VENDOR_INTEL
+ || PCI_VENDOR(dev15) == PCI_VENDOR_REALTEK) {
+ /* Intel or Realtek GbE at dev 15 */
+ brdtype = BRD_QNAPTS;
+ return;
+ }
brdtype = BRD_UNKNOWN;
}