diff options
author | 2006-03-04 14:20:37 +0000 | |
---|---|---|
committer | 2006-03-04 14:20:37 +0000 | |
commit | 5d417fe588b9ce8aade7d25cd4e24b21d8abc72a (patch) | |
tree | ec562ecb516b1aa3d91ebc33c3ae515a780d19dd /sys/dev/ic/aic79xx_openbsd.c | |
parent | cut down the Locator code into maintainable chunks. (diff) | |
download | wireguard-openbsd-5d417fe588b9ce8aade7d25cd4e24b21d8abc72a.tar.xz wireguard-openbsd-5d417fe588b9ce8aade7d25cd4e24b21d8abc72a.zip |
All CAM_* values stored in xs->error must be 'interpreted' by
ah[cd]_done() into XS_* values understood by the SCSI code before
returning xs to the tender mercies of the SCSI code.
So if we bail out without calling ah[cd]_done(), because the request
cdb length is excessive, don't use ah[cd]_set_transaction() to put
CAM_REQ_INVALID into xs->error, just jam in XS_DRIVER_STUFFUP as
ah[cd]_done() would have. If CAM_REQ_INVALID escapes it will be
interpreted as XS_SHORT_SENSE as far as I can tell.
This code path should never be trod so the net effect should be
minimal.
Diffstat (limited to 'sys/dev/ic/aic79xx_openbsd.c')
-rw-r--r-- | sys/dev/ic/aic79xx_openbsd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ic/aic79xx_openbsd.c b/sys/dev/ic/aic79xx_openbsd.c index d973286d26b..c32948cd517 100644 --- a/sys/dev/ic/aic79xx_openbsd.c +++ b/sys/dev/ic/aic79xx_openbsd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aic79xx_openbsd.c,v 1.23 2005/12/28 02:43:54 krw Exp $ */ +/* $OpenBSD: aic79xx_openbsd.c,v 1.24 2006/03/04 14:20:37 krw Exp $ */ /* * Copyright (c) 2004 Milos Urbanek, Kenneth R. Westerback & Marco Peereboom @@ -545,10 +545,10 @@ ahd_setup_data(struct ahd_softc *ahd, struct scsi_xfer *xs, hscb->cdb_len = xs->cmdlen; if (hscb->cdb_len > MAX_CDB_LEN) { - aic_set_transaction_status(scb, CAM_REQ_INVALID); ahd_lock(ahd, &s); ahd_free_scb(ahd, scb); ahd_unlock(ahd, &s); + xs->error = XS_DRIVER_STUFFUP; xs->flags |= ITSDONE; scsi_done(xs); return (COMPLETE); |