Date: Sun, 07 Aug 2011 17:32:26 +0000 From: oleksandr@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r224932 - soc2011/oleksandr/oleksandr-head/head/sys/cam Message-ID: <20110807173226.03DB6106566B@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110807173226.03DB6106566B>