summaryrefslogtreecommitdiffstats
path: root/sys/cam/cam_periph.c
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>1999-04-19 21:26:08 +0000
committergibbs <gibbs@FreeBSD.org>1999-04-19 21:26:08 +0000
commit752ab9a8587b6cc446cde857f5bb2361eed5c846 (patch)
treea534a3da6fa8385d145943dcd7c44a6cd687af4d /sys/cam/cam_periph.c
parent1626101dd4984de63fb4928fa8e59fb6fa5651ff (diff)
downloadFreeBSD-src-752ab9a8587b6cc446cde857f5bb2361eed5c846.zip
FreeBSD-src-752ab9a8587b6cc446cde857f5bb2361eed5c846.tar.gz
cam_periph.c:
Move handling of CAM_AUTOSENSE_FAIL into block dealing with all other scsi status errors. cam_queue.c: cam_queue.h: Fix 'off by one' heap bug in a more efficient manner. Since heap algorithms like to deal with indexes started from 1, offset our heap array pointer at allocation time to make this so for a C environment. This makes the implementation of the algorithm a bit more efficient. cam_xpt.c: Use macros for accessing the head of the heap so that code is isolated from implementation details of the heap.
Diffstat (limited to 'sys/cam/cam_periph.c')
-rw-r--r--sys/cam/cam_periph.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c
index 4ba2630..02c8785 100644
--- a/sys/cam/cam_periph.c
+++ b/sys/cam/cam_periph.c
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: cam_periph.c,v 1.10 1999/01/21 08:29:02 dillon Exp $
+ * $Id: cam_periph.c,v 1.11 1999/04/06 03:05:36 peter Exp $
*/
#include <sys/param.h>
@@ -1047,6 +1047,7 @@ cam_periph_error(union ccb *ccb, cam_flags camflags,
ccb->ccb_h.retry_count--;
error = 0;
break;
+ case CAM_AUTOSENSE_FAIL:
case CAM_SCSI_STATUS_ERROR:
switch (ccb->csio.scsi_status) {
@@ -1354,7 +1355,8 @@ cam_periph_error(union ccb *ccb, cam_flags camflags,
err_action);
}
} else if (ccb->csio.scsi_status ==
- SCSI_STATUS_CHECK_COND) {
+ SCSI_STATUS_CHECK_COND
+ && status != CAM_AUTOSENSE_FAIL) {
/* no point in decrementing the retry count */
panic("cam_periph_error: scsi status of "
"CHECK COND returned but no sense "
@@ -1459,7 +1461,6 @@ cam_periph_error(union ccb *ccb, cam_flags camflags,
}
break;
case CAM_REQ_CMP_ERR:
- case CAM_AUTOSENSE_FAIL:
case CAM_CMD_TIMEOUT:
case CAM_UNEXP_BUSFREE:
case CAM_UNCOR_PARITY:
OpenPOWER on IntegriCloud