From owner-svn-soc-all@FreeBSD.ORG Sun Aug 7 17:32:28 2011 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from socsvn.FreeBSD.org (unknown [IPv6:2001:4f8:fff6::2f]) by hub.freebsd.org (Postfix) with SMTP id 03DB6106566B for ; Sun, 7 Aug 2011 17:32:26 +0000 (UTC) (envelope-from oleksandr@FreeBSD.org) Received: by socsvn.FreeBSD.org (sSMTP sendmail emulation); Sun, 07 Aug 2011 17:32:26 +0000 Date: Sun, 07 Aug 2011 17:32:26 +0000 From: oleksandr@FreeBSD.org To: svn-soc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <20110807173226.03DB6106566B@hub.freebsd.org> Cc: Subject: socsvn commit: r224932 - soc2011/oleksandr/oleksandr-head/head/sys/cam X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Aug 2011 17:32:28 -0000 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