summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2014-01-17 23:23:58 +0000
committerdlg <dlg@openbsd.org>2014-01-17 23:23:58 +0000
commit09f149055699b7c370e277c6594248e8bdd3400f (patch)
tree5749c8e8e40c3fe00042b5c08694605ca464237f
parentValidate file size before loading content into memory. (diff)
downloadwireguard-openbsd-09f149055699b7c370e277c6594248e8bdd3400f.tar.xz
wireguard-openbsd-09f149055699b7c370e277c6594248e8bdd3400f.zip
if the hardware is too busy or its queues are too full, return XS_BUSY,
not XS_NO_CCB. discussed with krw@ who agrees
-rw-r--r--sys/dev/ic/aic79xx_openbsd.c10
-rw-r--r--sys/dev/ic/aic7xxx_openbsd.c8
2 files changed, 5 insertions, 13 deletions
diff --git a/sys/dev/ic/aic79xx_openbsd.c b/sys/dev/ic/aic79xx_openbsd.c
index 760fae2a9a5..0197819951a 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.40 2013/05/30 16:15:02 deraadt Exp $ */
+/* $OpenBSD: aic79xx_openbsd.c,v 1.41 2014/01/17 23:23:58 dlg Exp $ */
/*
* Copyright (c) 2004 Milos Urbanek, Kenneth R. Westerback & Marco Peereboom
@@ -185,8 +185,6 @@ ahd_done(struct ahd_softc *ahd, struct scb *scb)
case CAM_REQ_CMP:
switch (xs->status) {
case SCSI_TASKSET_FULL:
- xs->error = XS_NO_CCB;
- break;
case SCSI_BUSY:
xs->error = XS_BUSY;
break;
@@ -204,6 +202,7 @@ ahd_done(struct ahd_softc *ahd, struct scb *scb)
}
break;
case CAM_BUSY:
+ case CAM_REQUEUE_REQ:
xs->error = XS_BUSY;
break;
case CAM_CMD_TIMEOUT:
@@ -213,9 +212,6 @@ ahd_done(struct ahd_softc *ahd, struct scb *scb)
case CAM_SCSI_BUS_RESET:
xs->error = XS_RESET;
break;
- case CAM_REQUEUE_REQ:
- xs->error = XS_NO_CCB;
- break;
case CAM_SEL_TIMEOUT:
xs->error = XS_SELTIMEOUT;
break;
@@ -548,7 +544,7 @@ ahd_setup_data(struct ahd_softc *ahd, struct scsi_xfer *xs,
#endif
ahd_lock(ahd, &s);
ahd_free_scb(ahd, scb);
- xs->error = XS_NO_CCB;
+ xs->error = XS_DRIVER_STUFFUP;
scsi_done(xs);
ahd_unlock(ahd, &s);
return;
diff --git a/sys/dev/ic/aic7xxx_openbsd.c b/sys/dev/ic/aic7xxx_openbsd.c
index 4c34513eaf6..bf81bc036f9 100644
--- a/sys/dev/ic/aic7xxx_openbsd.c
+++ b/sys/dev/ic/aic7xxx_openbsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic7xxx_openbsd.c,v 1.51 2011/07/17 22:46:48 matthew Exp $ */
+/* $OpenBSD: aic7xxx_openbsd.c,v 1.52 2014/01/17 23:25:07 dlg Exp $ */
/* $NetBSD: aic7xxx_osm.c,v 1.14 2003/11/02 11:07:44 wiz Exp $ */
/*
@@ -199,8 +199,6 @@ ahc_done(struct ahc_softc *ahc, struct scb *scb)
case CAM_REQ_CMP:
switch (xs->status) {
case SCSI_TASKSET_FULL:
- xs->error = XS_NO_CCB;
- break;
case SCSI_BUSY:
xs->error = XS_BUSY;
break;
@@ -217,6 +215,7 @@ ahc_done(struct ahc_softc *ahc, struct scb *scb)
break;
}
break;
+ case CAM_REQUEUE_REQ:
case CAM_BUSY:
xs->error = XS_BUSY;
break;
@@ -227,9 +226,6 @@ ahc_done(struct ahc_softc *ahc, struct scb *scb)
case CAM_SCSI_BUS_RESET:
xs->error = XS_RESET;
break;
- case CAM_REQUEUE_REQ:
- xs->error = XS_NO_CCB;
- break;
case CAM_SEL_TIMEOUT:
xs->error = XS_SELTIMEOUT;
break;