Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sandpoint/pci Recognize QNAP V200 board, used in th...



details:   https://anonhg.NetBSD.org/src/rev/51d4ef537ac1
branches:  trunk
changeset: 763589:51d4ef537ac1
user:      phx <phx%NetBSD.org@localhost>
date:      Sat Mar 26 22:20:04 2011 +0000

description:
Recognize QNAP V200 board, used in the TS-201 and newer TS-101 models.

diffstat:

 sys/arch/sandpoint/pci/pci_machdep.c |  15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diffs (50 lines):

diff -r 32fb8c5416f9 -r 51d4ef537ac1 sys/arch/sandpoint/pci/pci_machdep.c
--- a/sys/arch/sandpoint/pci/pci_machdep.c      Sat Mar 26 22:18:06 2011 +0000
+++ b/sys/arch/sandpoint/pci/pci_machdep.c      Sat Mar 26 22:20:04 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci_machdep.c,v 1.24 2011/03/19 19:54:02 phx Exp $     */
+/*     $NetBSD: pci_machdep.c,v 1.25 2011/03/26 22:20:04 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.24 2011/03/19 19:54:02 phx Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.25 2011/03/26 22:20:04 phx Exp $");
 
 #include "opt_pci.h"
 
@@ -92,7 +92,7 @@
 #define BRD_SANDPOINTX3                3
 #define BRD_ENCOREPP1          10
 #define BRD_KUROBOX            100
-#define BRD_QNAPTS101          101
+#define BRD_QNAPTS             101
 #define BRD_SYNOLOGY           102
 #define BRD_STORCENTER         103
 #define BRD_DLINKDSM           104
@@ -135,9 +135,10 @@
        }
        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) {
-               /* Intel GbE at dev 15 */
-               brdtype = BRD_QNAPTS101;
+       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) {
@@ -342,7 +343,7 @@
                /* map line 11,12,13,14 to EPIC IRQ0,1,4,3 */
                *ihp = (line == 13) ? 4 : line - 11;
                break;
-       case BRD_QNAPTS101:
+       case BRD_QNAPTS:
                /* map line 13-16 to EPIC IRQ0-3 */
                *ihp = line - 13;
                break;



Home | Main Index | Thread Index | Old Index