Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/arch/alpha/alpha Pull up revision 1.32 (requested b...
details: https://anonhg.NetBSD.org/src/rev/196858111259
branches: netbsd-1-4
changeset: 470285:196858111259
user: he <he%NetBSD.org@localhost>
date: Sun Feb 06 17:22:29 2000 +0000
description:
Pull up revision 1.32 (requested by veego):
Fix detection of booted device for IDE drives, such that automatic
booting from a slave drive or a drive on the second channel works.
diffstat:
sys/arch/alpha/alpha/dec_eb164.c | 55 ++++++++++++++++++++-------------------
1 files changed, 28 insertions(+), 27 deletions(-)
diffs (137 lines):
diff -r 3baf63de8189 -r 196858111259 sys/arch/alpha/alpha/dec_eb164.c
--- a/sys/arch/alpha/alpha/dec_eb164.c Sun Feb 06 17:16:28 2000 +0000
+++ b/sys/arch/alpha/alpha/dec_eb164.c Sun Feb 06 17:22:29 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_eb164.c,v 1.28.2.1 1999/04/16 23:15:32 thorpej Exp $ */
+/* $NetBSD: dec_eb164.c,v 1.28.2.2 2000/02/06 17:22:29 he Exp $ */
/*
* Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: dec_eb164.c,v 1.28.2.1 1999/04/16 23:15:32 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dec_eb164.c,v 1.28.2.2 2000/02/06 17:22:29 he Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -59,6 +59,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"
@@ -67,6 +68,8 @@
#endif
static int comcnrate = CONSPEED;
+#define DR_VERBOSE(f) while (0)
+
void dec_eb164_init __P((void));
static void dec_eb164_cons_init __P((void));
static void dec_eb164_device_register __P((struct device *, void *));
@@ -170,11 +173,9 @@
* older SRM firmware use the protocol identifier SCSI.
*/
ideboot = (strcmp(b->protocol, "IDE") == 0);
-#if 0
- printf("scsiboot = %d, ideboot = %d, netboot = %d\n", scsiboot,
- ideboot, netboot);
-#endif
- initted =1;
+ DR_VERBOSE(printf("scsiboot = %d, ideboot = %d, netboot = %d\n",
+ scsiboot, ideboot, netboot));
+ initted = 1;
}
if (pcidev == NULL) {
@@ -187,14 +188,13 @@
return;
pcidev = dev;
-#if 0
- printf("\npcidev = %s\n", pcidev->dv_xname);
-#endif
+ 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 {
@@ -206,9 +206,8 @@
/* XXX function? */
scsipidev = dev;
-#if 0
- printf("\nscsipidev = %s\n", scsipidev->dv_xname);
-#endif
+ DR_VERBOSE(printf("\nscsipidev = %s\n",
+ scsipidev->dv_xname));
return;
}
}
@@ -243,31 +242,34 @@
/* we've found it! */
booted_device = dev;
-#if 0
- printf("\nbooted_device = %s\n", booted_device->dv_xname);
-#endif
+ DR_VERBOSE(printf("\nbooted_device = %s\n",
+ booted_device->dv_xname));
found = 1;
}
/*
* Support to boot from IDE drives.
- * Should work with all SRM firmware versions, but is at the
- * moment limited to hard disks. (No support for booting from an
- * IDE cdrom).
*/
- if ( (ideboot || scsiboot) && !strcmp(cd->cd_name, "wd")) {
+ 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;
-#if 0
- printf("\nbooted_device = %s\n", booted_device->dv_xname);
-#endif
+ DR_VERBOSE(printf("booted_device = %s\n",
+ booted_device->dv_xname));
found = 1;
}
@@ -283,9 +285,8 @@
/* XXX function? */
booted_device = dev;
-#if 0
- printf("\nbooted_device = %s\n", booted_device->dv_xname);
-#endif
+ DR_VERBOSE(printf("\nbooted_device = %s\n",
+ booted_device->dv_xname));
found = 1;
return;
}
Home |
Main Index |
Thread Index |
Old Index