From 8726fc121bb237f68fa951adb58b8f859a571bef Mon Sep 17 00:00:00 2001 From: "Justin T. Gibbs" Date: Sun, 20 Sep 1998 05:08:15 +0000 Subject: [PATCH] On wide cards with firmware revisions < 5.06L, we have to infer that wide targets are in fact running wide since the "setup info" command for these revisions does not fill out the wide negotiation bits. --- sys/dev/buslogic/bt.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/sys/dev/buslogic/bt.c b/sys/dev/buslogic/bt.c index e07b03e0315f..7756488de0a6 100644 --- a/sys/dev/buslogic/bt.c +++ b/sys/dev/buslogic/bt.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bt.c,v 1.2 1998/09/16 03:27:11 gibbs Exp $ + * $Id: bt.c,v 1.3 1998/09/17 00:08:27 gibbs Exp $ */ /* @@ -1979,6 +1979,22 @@ btfetchtransinfo(struct bt_softc *bt, struct ccb_trans_settings* cts) if (wide_active) cts->bus_width = MSG_EXT_WDTR_BUS_16_BIT; + } else if ((bt->wide_permitted & targ_mask) != 0) { + struct ccb_getdev cgd; + + /* + * Prior to rev 5.06L, wide status isn't provided, + * so we "guess" that wide transfers are in effect + * if the user settings allow for wide and the inquiry + * data for the device indicates that it can handle + * wide transfers. + */ + xpt_setup_ccb(&cgd.ccb_h, cts->ccb_h.path, /*priority*/1); + cgd.ccb_h.func_code = XPT_GDEV_TYPE; + xpt_action((union ccb *)&cgd); + if ((cgd.ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP + && (cgd.inq_data.flags & SID_WBus16) != 0) + cts->bus_width = MSG_EXT_WDTR_BUS_16_BIT; } if (bt->firmware_ver[0] >= 3) {