Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/alpha/alpha Sync the ide support with dec_eb164.c r...



details:   https://anonhg.NetBSD.org/src/rev/f18194cb3bd2
branches:  trunk
changeset: 481784:f18194cb3bd2
user:      veego <veego%NetBSD.org@localhost>
date:      Sat Feb 05 22:19:19 2000 +0000

description:
Sync the ide support with dec_eb164.c rev 1.32:
Add the support to boot an ide slave drive and to boot from the secondary
ide channel.
Michael Hitch gave me the final hint how to do that and Havard Eidnes
tested it with his slave drive.
This should fix pr#8808 on the DS10.
Also remove one ideboot check which wasn't removed when I removed it from
dec_eb164.c.

diffstat:

 sys/arch/alpha/alpha/dec_6600.c |  26 ++++++++++++++++----------
 1 files changed, 16 insertions(+), 10 deletions(-)

diffs (82 lines):

diff -r 6e220a0c1a1d -r f18194cb3bd2 sys/arch/alpha/alpha/dec_6600.c
--- a/sys/arch/alpha/alpha/dec_6600.c   Sat Feb 05 22:14:42 2000 +0000
+++ b/sys/arch/alpha/alpha/dec_6600.c   Sat Feb 05 22:19:19 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_6600.c,v 1.2 1999/12/03 22:48:22 thorpej Exp $ */
+/* $NetBSD: dec_6600.c,v 1.3 2000/02/05 22:19:19 veego Exp $ */
 
 /*
  * Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University.
@@ -29,7 +29,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: dec_6600.c,v 1.2 1999/12/03 22:48:22 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dec_6600.c,v 1.3 2000/02/05 22:19:19 veego Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -57,6 +57,7 @@
 #include <dev/scsipi/scsi_all.h>
 #include <dev/scsipi/scsipi_all.h>
 #include <dev/scsipi/scsiconf.h>
+#include <dev/ata/atavar.h>
 
 #include "pckbd.h"
 
@@ -208,11 +209,12 @@
                                return;
        
                        pcidev = dev;
-                       DR_VERBOSE(printf("\npcidev = %s\n", pcidev->dv_xname));
+                       DR_VERBOSE(printf("\npcidev = %s\n",
+                           pcidev->dv_xname));
                        return;
                }
        }
-       if ((ideboot || scsiboot) && scsipidev == NULL) {
+       if ((ideboot || scsiboot) && (scsipidev == NULL)) {
                if (parent != pcidev)
                        return;
                else {
@@ -229,7 +231,7 @@
                        return;
                }
        }
-       if ((scsiboot || ideboot) &&
+       if (scsiboot &&
            (!strcmp(cd->cd_name, "sd") ||
             !strcmp(cd->cd_name, "st") ||
             !strcmp(cd->cd_name, "cd"))) {
@@ -266,22 +268,26 @@
 
        /*
         * Support to boot from IDE drives.
-        * Should work with all SRM firmware versions, but is at the
-        * moment limited to hard disks. Support for IDE CD ROM is
-        * included above, under the theory that it will always be
-        * via the pci ide controller.
         */
        if ((ideboot || scsiboot) && !strcmp(cd->cd_name, "wd")) {
+               struct ata_atapi_attach *aa_link = aux;
                if ((strncmp("pciide", parent->dv_xname, 6) != 0)) {
                        return;
                } else {
                        if (parent != scsipidev)
                                return;
                }
+               DR_VERBOSE(printf("\nAtapi info: drive: %d, channel %d\n",
+                   aa_link->aa_drv_data->drive, aa_link->aa_channel));
+               DR_VERBOSE(printf("Bootdev info: unit: %d, channel: %d\n",
+                   b->unit, b->channel));
+               if (b->unit != aa_link->aa_drv_data->drive ||
+                   b->channel != aa_link->aa_channel)
+                       return;
 
                /* we've found it! */
                booted_device = dev;
-               DR_VERBOSE(printf("\nbooted_device = %s\n",
+               DR_VERBOSE(printf("booted_device = %s\n",
                    booted_device->dv_xname));
                found = 1;
        }



Home | Main Index | Thread Index | Old Index