summaryrefslogtreecommitdiff
path: root/sys/arch/sparc
diff options
context:
space:
mode:
authormjacob <mjacob@cvs.openbsd.org>2000-01-09 22:43:19 +0000
committermjacob <mjacob@cvs.openbsd.org>2000-01-09 22:43:19 +0000
commit7d308b72ce2e263b239b0a33e2c4d3061007a725 (patch)
tree15aaf25fd553f32d40f7350c8684d12ae2d27849 /sys/arch/sparc
parentea0a9c84da2ca449abf6721768acc2c92bc64700 (diff)
Do the bootpath_store dance so we can boot off of a disk attached
to an isp controller. This involves rewriting the matched bootpath component for the HBA with the generic 'isp' name so that matching can be done correctly elsewhere. Also use nulling the pointer to f/w to indicate not to load the current f/w set (for older PTI cards) instead of f/w length.
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r--sys/arch/sparc/dev/isp_sbus.c35
1 files changed, 32 insertions, 3 deletions
diff --git a/sys/arch/sparc/dev/isp_sbus.c b/sys/arch/sparc/dev/isp_sbus.c
index 20f4cd843cc..e78e40272a4 100644
--- a/sys/arch/sparc/dev/isp_sbus.c
+++ b/sys/arch/sparc/dev/isp_sbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isp_sbus.c,v 1.9 1999/11/22 12:53:23 mjacob Exp $ */
+/* $OpenBSD: isp_sbus.c,v 1.10 2000/01/09 22:43:18 mjacob Exp $ */
/* release_03_25_99 */
/*
* SBus specific probe and attach routines for Qlogic ISP SCSI adapters.
@@ -137,8 +137,9 @@ isp_sbus_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- int freq;
+ int freq, storebp = 0;
struct confargs *ca = aux;
+ struct bootpath *bp;
struct isp_sbussoftc *sbc = (struct isp_sbussoftc *) self;
struct ispsoftc *isp = &sbc->sbus_isp;
ISP_LOCKVAL_DECL;
@@ -173,6 +174,18 @@ isp_sbus_attach(parent, self, aux)
}
sbc->sbus_mdvec.dv_clock = freq;
+ if ((bp = ca->ca_ra.ra_bp) != NULL) {
+ if (bp->val[0] == ca->ca_slot &&
+ bp->val[1] == ca->ca_offset) {
+ if (strcmp("isp", bp->name) == 0 ||
+ strcmp("QLGC,isp", bp->name) == 0 ||
+ strcmp("PTI,isp", bp->name) == 0 ||
+ strcmp("ptisp", bp->name) == 0) {
+ storebp = 1;
+ }
+ }
+ }
+
/*
* XXX: Now figure out what the proper burst sizes, etc., to use.
*/
@@ -185,7 +198,7 @@ isp_sbus_attach(parent, self, aux)
*/
if (strcmp("PTI,ptisp", ca->ca_ra.ra_name) == 0 ||
strcmp("ptisp", ca->ca_ra.ra_name) == 0) {
- sbc->sbus_mdvec.dv_fwlen = 0;
+ sbc->sbus_mdvec.dv_ispfw = NULL;
}
isp->isp_mdvec = &sbc->sbus_mdvec;
@@ -220,10 +233,26 @@ isp_sbus_attach(parent, self, aux)
/*
* do generic attach.
*/
+ if (storebp) {
+ /*
+ * We're the booting HBA.
+ *
+ * Override the bootpath name with our driver name
+ * so we will do the correct matching and and store
+ * the next component's boot path entry, also so a
+ * successful match will occur.
+ */
+ bcopy("isp", bp->name, 4);
+ bp++;
+ bootpath_store(1, bp);
+ }
isp_attach(isp);
if (isp->isp_state != ISP_RUNSTATE) {
isp_uninit(isp);
}
+ if (storebp) {
+ bootpath_store(1, NULL);
+ }
ISP_UNLOCK(isp);
}