From 4ba86147879810918713dd38e68671475b552005 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Fri, 31 Dec 2010 19:26:01 +0000 Subject: 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@ --- sys/dev/ic/isp.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'sys') 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 @@ -4058,6 +4058,18 @@ isp_start(XS_T *xs) return (CMD_COMPLETE); } + /* + * 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. -- cgit v1.2.3