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.
This commit is contained in:
parent
b92d490f3e
commit
541c31000e
|
@ -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.
|
* Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University.
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
#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/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
|
@ -57,6 +57,7 @@ __KERNEL_RCSID(0, "$NetBSD: dec_6600.c,v 1.2 1999/12/03 22:48:22 thorpej Exp $")
|
||||||
#include <dev/scsipi/scsi_all.h>
|
#include <dev/scsipi/scsi_all.h>
|
||||||
#include <dev/scsipi/scsipi_all.h>
|
#include <dev/scsipi/scsipi_all.h>
|
||||||
#include <dev/scsipi/scsiconf.h>
|
#include <dev/scsipi/scsiconf.h>
|
||||||
|
#include <dev/ata/atavar.h>
|
||||||
|
|
||||||
#include "pckbd.h"
|
#include "pckbd.h"
|
||||||
|
|
||||||
|
@ -208,11 +209,12 @@ dec_6600_device_register(dev, aux)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
pcidev = dev;
|
pcidev = dev;
|
||||||
DR_VERBOSE(printf("\npcidev = %s\n", pcidev->dv_xname));
|
DR_VERBOSE(printf("\npcidev = %s\n",
|
||||||
|
pcidev->dv_xname));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((ideboot || scsiboot) && scsipidev == NULL) {
|
if ((ideboot || scsiboot) && (scsipidev == NULL)) {
|
||||||
if (parent != pcidev)
|
if (parent != pcidev)
|
||||||
return;
|
return;
|
||||||
else {
|
else {
|
||||||
|
@ -229,7 +231,7 @@ dec_6600_device_register(dev, aux)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((scsiboot || ideboot) &&
|
if (scsiboot &&
|
||||||
(!strcmp(cd->cd_name, "sd") ||
|
(!strcmp(cd->cd_name, "sd") ||
|
||||||
!strcmp(cd->cd_name, "st") ||
|
!strcmp(cd->cd_name, "st") ||
|
||||||
!strcmp(cd->cd_name, "cd"))) {
|
!strcmp(cd->cd_name, "cd"))) {
|
||||||
|
@ -266,22 +268,26 @@ dec_6600_device_register(dev, aux)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Support to boot from IDE drives.
|
* 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")) {
|
if ((ideboot || scsiboot) && !strcmp(cd->cd_name, "wd")) {
|
||||||
|
struct ata_atapi_attach *aa_link = aux;
|
||||||
if ((strncmp("pciide", parent->dv_xname, 6) != 0)) {
|
if ((strncmp("pciide", parent->dv_xname, 6) != 0)) {
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
if (parent != scsipidev)
|
if (parent != scsipidev)
|
||||||
return;
|
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! */
|
/* we've found it! */
|
||||||
booted_device = dev;
|
booted_device = dev;
|
||||||
DR_VERBOSE(printf("\nbooted_device = %s\n",
|
DR_VERBOSE(printf("booted_device = %s\n",
|
||||||
booted_device->dv_xname));
|
booted_device->dv_xname));
|
||||||
found = 1;
|
found = 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue