socsvn commit: r224932 -
soc2011/oleksandr/oleksandr-head/head/sys/cam
oleksandr at FreeBSD.org
oleksandr at FreeBSD.org
Sun Aug 7 17:32:28 UTC 2011
Author: oleksandr
Date: Sun Aug 7 17:32:25 2011
New Revision: 224932
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=224932
Log:
Review selection of errors
Modified:
soc2011/oleksandr/oleksandr-head/head/sys/cam/cam_periph.c
Modified: soc2011/oleksandr/oleksandr-head/head/sys/cam/cam_periph.c
==============================================================================
--- soc2011/oleksandr/oleksandr-head/head/sys/cam/cam_periph.c Sun Aug 7 16:58:30 2011 (r224931)
+++ soc2011/oleksandr/oleksandr-head/head/sys/cam/cam_periph.c Sun Aug 7 17:32:25 2011 (r224932)
@@ -1703,14 +1703,14 @@
struct devstat *device_error = NULL;
devstat_error_flags error_flag_ret = 0, error_flag_type = 0;
/*
- * If the error is not fatal refer it to the type of retry able.
+ * If the error is not critical refer it to the type of retry able.
*/
if (status == CAM_SEL_TIMEOUT || status == CAM_SCSI_BUSY ||
status == CAM_SIM_QUEUED || status == CAM_FUNC_NOTAVAIL ||
status == CAM_REQ_INVALID)
error_flag_ret = DEVSTAT_ERROR_RETRIABLE;
/*
- * If the error is fatal refer it to the type of non retry able.
+ * If the error is critical refer it to the type of non retry able.
*/
if (status == CAM_REQ_CMP_ERR || status == CAM_TID_INVALID ||
status == CAM_SCSI_STATUS_ERROR || status == CAM_AUTOSENSE_FAIL ||
@@ -1719,20 +1719,18 @@
/*
* If the error is write error refer it to the type of write error.
*/
- if (ccb->ccb_h.flags == CAM_DIR_OUT && status != CAM_REQ_CMP &&
- error_flag_ret != 0)
+ if (ccb->ccb_h.flags == CAM_DIR_OUT && error_flag_ret != 0)
error_flag_type = DEVSTAT_ERROR_WRITE_ERROR;
/*
* If the error is read error refer it to the type of read error
*/
- if (ccb->ccb_h.flags == CAM_DIR_IN && status != CAM_REQ_CMP &&
- error_flag_ret != 0)
+ if (ccb->ccb_h.flags == CAM_DIR_IN && error_flag_ret != 0)
error_flag_type = DEVSTAT_ERROR_READ_ERROR;
/*
* If the request is countrol and there is no action with data * refer it to the type of other error.
*/
if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_NONE &&
- status != CAM_REQ_CMP && error_flag_ret != 0)
+ error_flag_ret != 0)
error_flag_type=DEVSTAT_ERROR_OTHER_ERROR;
/*
* If an error is present, search for an appropriate structure
More information about the svn-soc-all
mailing list