Source-Changes-HG archive

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

[src/netbsd-1-6]: src/sys/arch/sparc64/sparc64 Pull up revision 1.68 (request...



details:   https://anonhg.NetBSD.org/src/rev/d25bfefd8488
branches:  netbsd-1-6
changeset: 529346:d25bfefd8488
user:      lukem <lukem%NetBSD.org@localhost>
date:      Fri Nov 15 00:37:43 2002 +0000

description:
Pull up revision 1.68 (requested by mrg in ticket #959):
redo the previous:  it seems that the 2nd prom address value is ignored/useless
(it seems to be always zero), and that the channel & drive are encoded into the
first value as "channel * 2 + drive", so, look for this.

diffstat:

 sys/arch/sparc64/sparc64/autoconf.c |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (25 lines):

diff -r a9c17d071ee8 -r d25bfefd8488 sys/arch/sparc64/sparc64/autoconf.c
--- a/sys/arch/sparc64/sparc64/autoconf.c       Fri Nov 15 00:32:33 2002 +0000
+++ b/sys/arch/sparc64/sparc64/autoconf.c       Fri Nov 15 00:37:43 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.c,v 1.57.4.2 2002/11/15 00:32:33 lukem Exp $ */
+/*     $NetBSD: autoconf.c,v 1.57.4.3 2002/11/15 00:37:43 lukem Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -1339,8 +1339,13 @@
                /* IDE disks. */
                struct ata_device *adev = aux;
 
-               if (adev->adev_channel == bp->val[1] &&
-                   adev->adev_drv_data->drive == bp->val[0]) {
+               /*
+                * The PROM gives you names like "disk@1,0", where the first value
+                * appears to be both the drive & channel combined (channel * 2 +
+                * drive), and the second value we don't use (what is it anyway?)
+                */
+               if ((adev->adev_channel * 2) + adev->adev_drv_data->drive ==
+                   bp->val[0]) {
                        nail_bootdev(dev, bp);
                        DPRINTF(ACDB_BOOTDEV, ("\t-- found wd disk %s\n",
                            dev->dv_xname));



Home | Main Index | Thread Index | Old Index