summaryrefslogtreecommitdiffstats
path: root/sys/dev/aha
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>1998-12-15 02:51:54 +0000
committerimp <imp@FreeBSD.org>1998-12-15 02:51:54 +0000
commitc1b89abf0d8f9150b4af01124233c1ed129813b9 (patch)
treebc61900df12a62d8ceee9a5540aebf5bec2adc8c /sys/dev/aha
parentb00bd5cb8c82aba5279685c8ba2f57c9e1550dbd (diff)
downloadFreeBSD-src-c1b89abf0d8f9150b4af01124233c1ed129813b9.zip
FreeBSD-src-c1b89abf0d8f9150b4af01124233c1ed129813b9.tar.gz
o Convert length of hccb to integer from the array. Eivind Eklund
pointed this out, but I've not seen a manifestation of this. o Check against 0x00 as well as 0xff for geometry register, as some clone cards don't return 0xff. Vadim Mikhailov pointed this out in PR 8743 for his Dell SCSI Array controller working in AHA-1540 emulation mode. Note that this test is likely to go away in the future in favor of a better one Justin has recommended.
Diffstat (limited to 'sys/dev/aha')
-rw-r--r--sys/dev/aha/aha.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/dev/aha/aha.c b/sys/dev/aha/aha.c
index 82845c2..4d9df2f 100644
--- a/sys/dev/aha/aha.c
+++ b/sys/dev/aha/aha.c
@@ -55,7 +55,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: aha.c,v 1.14 1998/12/04 22:54:44 archie Exp $
+ * $Id: aha.c,v 1.15 1998/12/13 00:05:04 gibbs Exp $
*/
#include <sys/param.h>
@@ -358,13 +358,18 @@ aha_probe(struct aha_softc* aha)
* errs on the side of conservatism. Besides, no one will
* notice a 10mS delay here, even the 1542B card users :-)
*
+ * Some compatible cards return 0 here.
+ *
* XXX I'm not sure how this will impact other cloned cards
+ *
+ * This really should be replaced with the esetup command, since
+ * that appears to be more reliable.
*/
if (aha->boardid <= 0x42) {
/* Wait 10ms before reading */
DELAY(10000);
status = aha_inb(aha, GEOMETRY_REG);
- if (status != 0xff) {
+ if (status != 0xff && status != 0x00) {
PRVERB(("%s: Geometry Register test failed\n",
aha_name(aha)));
return (ENXIO);
@@ -1357,7 +1362,7 @@ ahadone(struct aha_softc *aha, struct aha_ccb *accb, aha_mbi_comp_code_t comp_co
/* An error occured */
switch(accb->hccb.ahastat) {
case AHASTAT_DATARUN_ERROR:
- if (accb->hccb.data_len <= 0) {
+ if (aha_a24tou(accb->hccb.data_len) <= 0) {
csio->ccb_h.status = CAM_DATA_RUN_ERR;
break;
}
OpenPOWER on IntegriCloud