summaryrefslogtreecommitdiffstats
path: root/sys/dev/buslogic/bt.c
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>1998-09-20 05:08:15 +0000
committergibbs <gibbs@FreeBSD.org>1998-09-20 05:08:15 +0000
commit8a6199b6a6e98d46b32e69d78c569b6c377ec2d7 (patch)
tree26cd056ebe1905c344a47ec17d998d4928f66efe /sys/dev/buslogic/bt.c
parent6856f62971980b3293bbdc420317e235a4916f64 (diff)
downloadFreeBSD-src-8a6199b6a6e98d46b32e69d78c569b6c377ec2d7.zip
FreeBSD-src-8a6199b6a6e98d46b32e69d78c569b6c377ec2d7.tar.gz
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.
Diffstat (limited to 'sys/dev/buslogic/bt.c')
-rw-r--r--sys/dev/buslogic/bt.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/sys/dev/buslogic/bt.c b/sys/dev/buslogic/bt.c
index e07b03e..7756488 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) {
OpenPOWER on IntegriCloud