summaryrefslogtreecommitdiffstats
path: root/sys/dev/advansys
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>1999-04-19 21:27:36 +0000
committergibbs <gibbs@FreeBSD.org>1999-04-19 21:27:36 +0000
commitdeb3dc05945881a83f9063301d8bfa56720eb332 (patch)
treea635308509921893b7f28455c0116ed97c9fce69 /sys/dev/advansys
parent7e60d5189b854d454246cf3ca43f4eaae595acf0 (diff)
downloadFreeBSD-src-deb3dc05945881a83f9063301d8bfa56720eb332.zip
FreeBSD-src-deb3dc05945881a83f9063301d8bfa56720eb332.tar.gz
Handle the case when auto sense retrieval fails.
Give automatic request sense operations a 5 second timeout.
Diffstat (limited to 'sys/dev/advansys')
-rw-r--r--sys/dev/advansys/advansys.c6
-rw-r--r--sys/dev/advansys/advlib.c10
2 files changed, 13 insertions, 3 deletions
diff --git a/sys/dev/advansys/advansys.c b/sys/dev/advansys/advansys.c
index 83c8613..0071950 100644
--- a/sys/dev/advansys/advansys.c
+++ b/sys/dev/advansys/advansys.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: advansys.c,v 1.7 1998/12/22 18:12:09 gibbs Exp $
+ * $Id: advansys.c,v 1.8 1999/04/07 22:59:12 gibbs Exp $
*/
/*
* Ported from:
@@ -1127,12 +1127,14 @@ adv_done(struct adv_softc *adv, union ccb *ccb, u_int done_stat,
ccb->ccb_h.status = CAM_SEQUENCE_FAIL;
adv_reset_bus(adv);
break;
+ case QHSTA_M_AUTO_REQ_SENSE_FAIL:
+ ccb->ccb_h.status = CAM_AUTOSENSE_FAIL;
+ break;
case QHSTA_D_QDONE_SG_LIST_CORRUPTED:
case QHSTA_D_ASC_DVC_ERROR_CODE_SET:
case QHSTA_D_HOST_ABORT_FAILED:
case QHSTA_D_EXE_SCSI_Q_FAILED:
case QHSTA_D_ASPI_NO_BUF_POOL:
- case QHSTA_M_AUTO_REQ_SENSE_FAIL:
case QHSTA_M_BAD_TAG_CODE:
case QHSTA_D_LRAM_CMP_ERROR:
case QHSTA_M_MICRO_CODE_ERROR_HALT:
diff --git a/sys/dev/advansys/advlib.c b/sys/dev/advansys/advlib.c
index 8af5c1a..66640c8 100644
--- a/sys/dev/advansys/advlib.c
+++ b/sys/dev/advansys/advlib.c
@@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: advlib.c,v 1.10 1998/12/07 21:58:15 archie Exp $
+ * $Id: advlib.c,v 1.11 1999/04/11 02:55:50 eivind Exp $
*/
/*
* Ported from:
@@ -44,6 +44,7 @@
*/
#include <sys/param.h>
+#include <sys/kernel.h>
#include <sys/systm.h>
#include <machine/bus_pio.h>
@@ -1004,6 +1005,13 @@ adv_isr_chip_halted(struct adv_softc *adv)
scsi_busy = adv_read_lram_8(adv, ADVV_SCSIBUSY_B);
scsi_busy &= ~target_mask;
adv_write_lram_8(adv, ADVV_SCSIBUSY_B, scsi_busy);
+ /*
+ * Ensure we have enough time to actually
+ * retrieve the sense.
+ */
+ untimeout(adv_timeout, (caddr_t)ccb, ccb->ccb_h.timeout_ch);
+ ccb->ccb_h.timeout_ch =
+ timeout(adv_timeout, (caddr_t)ccb, 5 * hz);
} else if (int_halt_code == ADV_HALT_SDTR_REJECTED) {
struct ext_msg out_msg;
OpenPOWER on IntegriCloud