Detect QNAP board last, because a Realtek chip at pci device 15 is used
on several boards.
This commit is contained in:
parent
4f729153dd
commit
a5da0088ea
|
@ -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.
|
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#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"
|
#include "opt_pci.h"
|
||||||
|
|
||||||
|
@ -135,12 +135,6 @@ pci_attach_hook(struct device *parent, struct device *self,
|
||||||
}
|
}
|
||||||
tag = pci_make_tag(pba->pba_pc, pba->pba_bus, 15, 0);
|
tag = pci_make_tag(pba->pba_pc, pba->pba_bus, 15, 0);
|
||||||
dev15 = pci_conf_read(pba->pba_pc, tag, PCI_ID_REG);
|
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) {
|
if (PCI_VENDOR(dev15) == PCI_VENDOR_MARVELL) {
|
||||||
/* Marvell GbE at dev 15 */
|
/* Marvell GbE at dev 15 */
|
||||||
brdtype = BRD_SYNOLOGY;
|
brdtype = BRD_SYNOLOGY;
|
||||||
|
@ -165,6 +159,12 @@ pci_attach_hook(struct device *parent, struct device *self,
|
||||||
brdtype = BRD_NH230NAS;
|
brdtype = BRD_NH230NAS;
|
||||||
return;
|
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;
|
brdtype = BRD_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue