summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>2001-10-06 20:41:18 +0000
committermjacob <mjacob@FreeBSD.org>2001-10-06 20:41:18 +0000
commitd45f75145fcc859cfaeea928dae298d1af56ed3a (patch)
treeec22d733afad162bf3b4ca586b8a059927bac7bc
parent7187812d5e8d722f8d2553a54cd9737eb03aa0a6 (diff)
downloadFreeBSD-src-d45f75145fcc859cfaeea928dae298d1af56ed3a.zip
FreeBSD-src-d45f75145fcc859cfaeea928dae298d1af56ed3a.tar.gz
Misunderstanding documentation caused me to try and set 1Gbps/2Gps/Auto
connection speed for the 2300 in the wrong offset in the ICB. Oops. Respect some QLogic errat wrt PCI errors on certain shared host/RISC registers.
-rw-r--r--sys/dev/isp/isp.c29
-rw-r--r--sys/dev/isp/ispmbox.h6
2 files changed, 21 insertions, 14 deletions
diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c
index 2d76c4c..66518e2 100644
--- a/sys/dev/isp/isp.c
+++ b/sys/dev/isp/isp.c
@@ -548,15 +548,22 @@ again:
ISP_RESET1(isp);
/*
- * Wait for everything to finish firing up...
+ * Wait for everything to finish firing up.
+ *
+ * Avoid doing this on the 2312 because you can generate a PCI
+ * parity error (chip breakage).
*/
- loops = MBOX_DELAY_COUNT;
- while (ISP_READ(isp, OUTMAILBOX0) == MBOX_BUSY) {
- USEC_DELAY(100);
- if (--loops < 0) {
- isp_prt(isp, ISP_LOGERR,
- "MBOX_BUSY never cleared on reset");
- return;
+ if (IS_2300(isp)) {
+ USEC_DELAY(5);
+ } else {
+ loops = MBOX_DELAY_COUNT;
+ while (ISP_READ(isp, OUTMAILBOX0) == MBOX_BUSY) {
+ USEC_DELAY(100);
+ if (--loops < 0) {
+ isp_prt(isp, ISP_LOGERR,
+ "MBOX_BUSY never cleared on reset");
+ return;
+ }
}
}
@@ -1223,11 +1230,11 @@ isp_fibre_init(struct ispsoftc *isp)
icbp->icb_fwoptions &= ~ICBOPT_FAST_POST;
}
if (isp->isp_confopts & ISP_CFG_ONEGB) {
- icbp->icb_xfwoptions |= ICBXOPT_RATE_ONEGB;
+ icbp->icb_zfwoptions |= ICBZOPT_RATE_ONEGB;
} else if (isp->isp_confopts & ISP_CFG_TWOGB) {
- icbp->icb_xfwoptions |= ICBXOPT_RATE_TWOGB;
+ icbp->icb_zfwoptions |= ICBZOPT_RATE_TWOGB;
} else {
- icbp->icb_xfwoptions |= ICBXOPT_RATE_AUTO;
+ icbp->icb_zfwoptions |= ICBZOPT_RATE_AUTO;
}
}
}
diff --git a/sys/dev/isp/ispmbox.h b/sys/dev/isp/ispmbox.h
index ec724b9..78ef00d 100644
--- a/sys/dev/isp/ispmbox.h
+++ b/sys/dev/isp/ispmbox.h
@@ -662,9 +662,9 @@ typedef struct isp_icb {
#define ICBXOPT_RIO_32BIT_DELAY 4
/* These 3 only apply to the 2300 */
-#define ICBXOPT_RATE_ONEGB (MBGSD_ONEGB << 14)
-#define ICBXOPT_RATE_TWOGB (MBGSD_TWOGB << 14)
-#define ICBXOPT_RATE_AUTO (MBGSD_AUTO << 14)
+#define ICBZOPT_RATE_ONEGB (MBGSD_ONEGB << 14)
+#define ICBZOPT_RATE_TWOGB (MBGSD_TWOGB << 14)
+#define ICBZOPT_RATE_AUTO (MBGSD_AUTO << 14)
#define ICB_MIN_FRMLEN 256
OpenPOWER on IntegriCloud