From f9e908dcf291dc749ab49fb466ccbe26f2084096 Mon Sep 17 00:00:00 2001 From: Matt Jacob Date: Mon, 20 Dec 1999 01:35:04 +0000 Subject: [PATCH] Clean up lun width determination based upon f/w revisions for the parallel SCSI cards (4.55..4.65 :: 8.55..8.65). --- sys/dev/isp/isp_freebsd.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/dev/isp/isp_freebsd.c b/sys/dev/isp/isp_freebsd.c index f147ec3f63c6..ba45c9e50985 100644 --- a/sys/dev/isp/isp_freebsd.c +++ b/sys/dev/isp/isp_freebsd.c @@ -157,14 +157,17 @@ isp_cam_async(void *cbarg, u_int32_t code, struct cam_path *path, void *arg) if (IS_SCSI(isp)) { u_int16_t oflags, nflags; sdparam *sdp = isp->isp_param; - int s, tgt = xpt_path_target_id(path); + int s, rvf, tgt; + tgt = xpt_path_target_id(path); + rvf = ISP_FW_REVX(isp->isp_fwrev); s = splcam(); sdp += cam_sim_bus(sim); isp->isp_update |= (1 << cam_sim_bus(sim)); nflags = DPARM_SAFE_DFLT; - if (ISP_FW_REVX(isp->isp_fwrev) >= - ISP_FW_REV(7, 55, 0)) { + if (rvf >= ISP_FW_REV(7, 55, 0) || + (ISP_FW_REV(4, 55, 0) <= rvf && + (rvf < ISP_FW_REV(5, 0, 0)))) { nflags |= DPARM_NARROW | DPARM_ASYNC; } oflags = sdp->isp_devparam[tgt].dev_flags;