summaryrefslogtreecommitdiff
path: root/sys/dev/ic/isp.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2010-12-31 19:26:01 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2010-12-31 19:26:01 +0000
commit4ba86147879810918713dd38e68671475b552005 (patch)
tree30d14abfbd164d8ad6619c463be99d7ca0ec6049 /sys/dev/ic/isp.c
parentf3ec25ab51631c35b4d3cb3a28ffe410fbedb3a1 (diff)
The firmware we use for the 1020/1020A (SBUS) cards doesn't seem to implement
the commands necessary to do "big" SCSI commands (e.g. READ_CAPACITY_16). Bail out early on those cards instead of attempting to execute the unimplemented firmware command and failing to recover from it. ok krw@, deraadt@
Diffstat (limited to 'sys/dev/ic/isp.c')
-rw-r--r--sys/dev/ic/isp.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/dev/ic/isp.c b/sys/dev/ic/isp.c
index 0c2f9209cb7..46cd862ef64 100644
--- a/sys/dev/ic/isp.c
+++ b/sys/dev/ic/isp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isp.c,v 1.50 2010/11/20 05:12:38 deraadt Exp $ */
+/* $OpenBSD: isp.c,v 1.51 2010/12/31 19:26:00 kettenis Exp $ */
/* $FreeBSD: src/sys/dev/isp/isp.c,v 1.150 2008/12/15 21:42:38 marius Exp $*/
/*-
* Copyright (c) 1997-2007 by Matthew Jacob
@@ -4059,6 +4059,18 @@ isp_start(XS_T *xs)
}
/*
+ * The firmware on the 1020/1020A doesn't seem to implement
+ * extended commands. Bail out early since we don't seem to
+ * be able to recover from issuing a command that isn't
+ * implemented.
+ */
+
+ if (XS_CDBLEN(xs) > 12 && isp->isp_type < ISP_HA_SCSI_1040) {
+ XS_SETERR(xs, HBA_BOTCH);
+ return (CMD_COMPLETE);
+ }
+
+ /*
* Translate the target to device handle as appropriate, checking
* for correct device state as well.
*/