summaryrefslogtreecommitdiffstats
path: root/sys/dev/aha
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2005-01-11 01:17:07 +0000
committerimp <imp@FreeBSD.org>2005-01-11 01:17:07 +0000
commit3fba2d8bb33bb85c7359fa9087c8cae7ae40ce99 (patch)
treed9c503660176819f41671dc63d86053c8feaa5f1 /sys/dev/aha
parent66b769150f0ef4785bd03079a94eccdadd165fcb (diff)
downloadFreeBSD-src-3fba2d8bb33bb85c7359fa9087c8cae7ae40ce99.zip
FreeBSD-src-3fba2d8bb33bb85c7359fa9087c8cae7ae40ce99.tar.gz
Final attempt to make aha 1542A working. If not, oh well, I don't
have the card and no way to reproduce problems. We do this by applying the workaround to firmware revsion 0. PR: 14334
Diffstat (limited to 'sys/dev/aha')
-rw-r--r--sys/dev/aha/aha.c11
-rw-r--r--sys/dev/aha/aha_isa.c12
2 files changed, 16 insertions, 7 deletions
diff --git a/sys/dev/aha/aha.c b/sys/dev/aha/aha.c
index 9a22328..c869e95 100644
--- a/sys/dev/aha/aha.c
+++ b/sys/dev/aha/aha.c
@@ -1,10 +1,11 @@
-/*-
+/*
* Generic register and struct definitions for the Adaptech 154x/164x
* SCSI host adapters. Product specific probe and attach routines can
* be found in:
- * aha 1542B/1542C/1542CF/1542CP aha_isa.c
+ * aha 1542A/1542B/1542C/1542CF/1542CP aha_isa.c
* aha 1640 aha_mca.c
- *
+ */
+/*-
* Copyright (c) 1998 M. Warner Losh.
* All Rights Reserved.
*
@@ -1286,9 +1287,7 @@ ahadone(struct aha_softc *aha, struct aha_ccb *accb, aha_mbi_comp_code_t comp_co
aha_name(aha), accb->hccb.opcode,
&accb->hccb);
device_printf(aha->dev,
- "AHA-1540A detected, maybe compensating\n");
- aha->ccb_sg_opcode = INITIATOR_SG_CCB;
- aha->ccb_ccb_opcode = INITIATOR_CCB;
+ "AHA-1540A compensation failed\n");
xpt_freeze_devq(ccb->ccb_h.path, /*count*/1);
csio->ccb_h.status = CAM_REQUEUE_REQ;
break;
diff --git a/sys/dev/aha/aha_isa.c b/sys/dev/aha/aha_isa.c
index ba27bc5..a9a36ca 100644
--- a/sys/dev/aha/aha_isa.c
+++ b/sys/dev/aha/aha_isa.c
@@ -265,8 +265,18 @@ aha_isa_attach(device_t dev)
bus_release_resource(dev, SYS_RES_DRQ, aha->drqrid, aha->drq);
aha_free(aha);
return (ENOMEM);
+ }
+ /*
+ * The 1542A and B look the same. So we guess based on
+ * the firmware revision. It appears that only rev 0 is on
+ * the A cards.
+ */
+ if (aha->boardid <= BOARD_1542 && aha->fw_major == 0) {
+ device_printf(dev, "154xA may not work\n");
+ aha->ccb_sg_opcode = INITIATOR_SG_CCB;
+ aha->ccb_ccb_opcode = INITIATOR_CCB;
}
-
+
error = aha_attach(aha);
if (error) {
device_printf(dev, "attach failed\n");
OpenPOWER on IntegriCloud