Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sandpoint/stand/altboot fix a board type check logi...



details:   https://anonhg.NetBSD.org/src/rev/3c2278c80884
branches:  trunk
changeset: 341045:3c2278c80884
user:      nisimura <nisimura%NetBSD.org@localhost>
date:      Thu Oct 15 12:00:02 2015 +0000

description:
fix a board type check logic error that affected Linkstation and Kurobox (HG).
They were mistakenly recognized kurot4 type and ended up with kernel boot
failure.

diffstat:

 sys/arch/sandpoint/stand/altboot/brdsetup.c |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (27 lines):

diff -r 30f035aae079 -r 3c2278c80884 sys/arch/sandpoint/stand/altboot/brdsetup.c
--- a/sys/arch/sandpoint/stand/altboot/brdsetup.c       Thu Oct 15 11:21:53 2015 +0000
+++ b/sys/arch/sandpoint/stand/altboot/brdsetup.c       Thu Oct 15 12:00:02 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: brdsetup.c,v 1.36 2015/09/30 14:14:32 phx Exp $ */
+/* $NetBSD: brdsetup.c,v 1.37 2015/10/15 12:00:02 nisimura Exp $ */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -260,10 +260,14 @@
        }
        else if (PCI_CLASS(pcicfgread(dev11, PCI_CLASS_REG)) == PCI_CLASS_ETH) {
                /* ADMtek AN985 (tlp) or RealTek 8169S (re) at dev 11 */
-               if (PCI_VENDOR(pcicfgread(dev12, PCI_ID_REG)) != 0x1095)
+               if (PCI_VENDOR(pcicfgread(dev11, PCI_ID_REG)) == 0x1317)
                        brdtype = BRD_KUROBOX;
-               else
-                       brdtype = BRD_KUROBOXT4;
+               else if (PCI_VENDOR(pcicfgread(dev11, PCI_ID_REG)) == 0x10ec) {
+                       if (PCI_PRODUCT(pcicfgread(dev12,PCI_ID_REG)) != 0x3512)
+                               brdtype = BRD_KUROBOX;
+                       else
+                               brdtype = BRD_KUROBOXT4;
+               }
        }
        else if (PCI_VENDOR(pcicfgread(dev15, PCI_ID_REG)) == 0x11ab) {
                /* SKnet/Marvell (sk) at dev 15 */



Home | Main Index | Thread Index | Old Index