From 03322f862556f492a302cba82babb041e2890c27 Mon Sep 17 00:00:00 2001 From: Matt Jacob Date: Sat, 30 Oct 1999 19:32:44 +0000 Subject: Use pointer to f/w in md structure as to whether f/w exists or not. If firmware length isn't specified, extract from the 4th short into the firmware. --- sys/dev/isp/isp.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'sys/dev/isp/isp.c') diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c index 5390a3adc7612..a6a71617e0dcf 100644 --- a/sys/dev/isp/isp.c +++ b/sys/dev/isp/isp.c @@ -99,7 +99,7 @@ static void isp_rdnvram_word __P((struct ispsoftc *, int, u_int16_t *)); /* * Reset Hardware. * - * Hit the chip over the head, download new f/w and set it running. + * Hit the chip over the head, download new f/w if available and set it running. * * Locking done elsewhere. */ @@ -167,16 +167,6 @@ isp_reset(isp) break; case ISP_HA_FC_2200: revname[1] = '2'; - /* - * Resident firmware for the 2200 appears - * to have SCCLUN enabled. - */ -#ifndef ISP2100_SCCLUN - if (isp->isp_mdvec->dv_fwlen == 0) { - PRINTF("%s: WARNING- using resident f/w without" - " SCCLUN support defined\n", isp->isp_name); - } -#endif break; default: break; @@ -494,13 +484,16 @@ again: * whether we have f/w at all and whether a config flag * has disabled our download. */ - if ((isp->isp_mdvec->dv_fwlen == 0) || + if ((isp->isp_mdvec->dv_ispfw != NULL) || (isp->isp_confopts & ISP_CFG_NORELOAD)) { dodnld = 0; } - if (dodnld && isp->isp_mdvec->dv_fwlen) { - for (i = 0; i < isp->isp_mdvec->dv_fwlen; i++) { + if (dodnld && isp->isp_mdvec->dv_ispfw) { + u_int16_t fwlen = isp->isp_mdvec->dv_fwlen; + if (fwlen == 0) + fwlen = isp->isp_mdvec->dv_ispfw[3]; /* usually here */ + for (i = 0; i < fwlen; i++) { mbs.param[0] = MBOX_WRITE_RAM_WORD; mbs.param[1] = isp->isp_mdvec->dv_codeorg + i; mbs.param[2] = isp->isp_mdvec->dv_ispfw[i]; -- cgit v1.3