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 Some Synology network devic...



details:   https://anonhg.NetBSD.org/src/rev/6342ab017331
branches:  trunk
changeset: 825873:6342ab017331
user:      phx <phx%NetBSD.org@localhost>
date:      Thu Aug 03 19:22:15 2017 +0000

description:
Some Synology network devices show vendor 0x1148 (Schneider & Koch) instead
of 0x11ab (Marvell). Detect both.
Improve spinning up of both disk drives on Synology DS20x by adding some
more delays (directly at the start and after powering up the second drive).

diffstat:

 sys/arch/sandpoint/stand/altboot/brdsetup.c |   8 ++++++--
 sys/arch/sandpoint/stand/altboot/siisata.c  |  11 ++++++++++-
 sys/arch/sandpoint/stand/altboot/version    |   2 ++
 3 files changed, 18 insertions(+), 3 deletions(-)

diffs (65 lines):

diff -r 46a12995a5ea -r 6342ab017331 sys/arch/sandpoint/stand/altboot/brdsetup.c
--- a/sys/arch/sandpoint/stand/altboot/brdsetup.c       Thu Aug 03 14:39:31 2017 +0000
+++ b/sys/arch/sandpoint/stand/altboot/brdsetup.c       Thu Aug 03 19:22:15 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: brdsetup.c,v 1.38 2017/08/03 09:42:34 phx Exp $ */
+/* $NetBSD: brdsetup.c,v 1.39 2017/08/03 19:22:15 phx Exp $ */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -269,7 +269,8 @@
                                brdtype = BRD_KUROBOXT4;
                }
        }
-       else if (PCI_VENDOR(pcicfgread(dev15, PCI_ID_REG)) == 0x11ab) {
+       else if (PCI_VENDOR(pcicfgread(dev15, PCI_ID_REG)) == 0x1148
+           || PCI_VENDOR(pcicfgread(dev15, PCI_ID_REG)) == 0x11ab) {
                /* SKnet/Marvell (sk) at dev 15 */
                brdtype = BRD_SYNOLOGY;
        }
@@ -873,8 +874,11 @@
                 * with several seconds delay, but no CPLD register to
                 * monitor the power state. So all we can do is to
                 * wait some more seconds during SATA-init.
+                * Also wait some seconds now, to make sure the first
+                * disk is ready after a cold start.
                 */
                sata_delay[1] = SYNO_DISK_DELAY;
+               delay(10 * 1024 * 1024);
        }
 
   cpld_done:
diff -r 46a12995a5ea -r 6342ab017331 sys/arch/sandpoint/stand/altboot/siisata.c
--- a/sys/arch/sandpoint/stand/altboot/siisata.c        Thu Aug 03 14:39:31 2017 +0000
+++ b/sys/arch/sandpoint/stand/altboot/siisata.c        Thu Aug 03 19:22:15 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: siisata.c,v 1.6 2015/09/30 14:14:32 phx Exp $ */
+/* $NetBSD: siisata.c,v 1.7 2017/08/03 19:22:15 phx Exp $ */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -125,6 +125,15 @@
                        if (l->presense[n] == 0) {
                                DPRINTF(("port %d not present\n", n));
                                continue;
+                       } else {
+                               /*
+                                * XXX perform_atareset() does not work
+                                * when the drive is not completely spun up?
+                                * So insert another delay here.
+                                */
+                               printf("Waiting 15 seconds for port %d "
+                                   "to spin up.\n", n);
+                               delay(15 * 1000 * 1000);
                        }
                }
                if (atachkpwr(l, n) != ATA_PWR_ACTIVE) {
diff -r 46a12995a5ea -r 6342ab017331 sys/arch/sandpoint/stand/altboot/version
--- a/sys/arch/sandpoint/stand/altboot/version  Thu Aug 03 14:39:31 2017 +0000
+++ b/sys/arch/sandpoint/stand/altboot/version  Thu Aug 03 19:22:15 2017 +0000
@@ -18,3 +18,5 @@
        NIC.
 1.11:  Pass precise model information and flags with bootinfo.
        Synology DS207/209 LED and 2nd disk power-up support.
+1.12:  Some more Synology DS20x fixes, to make sure both drives have been
+       spun up. Also detect PCI-vendor 0x1148 (S&K) as Synology.



Home | Main Index | Thread Index | Old Index