aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2012-06-05 10:08:22 +0000
committerAlexander Motin <mav@FreeBSD.org>2012-06-05 10:08:22 +0000
commit62275a906f011f27f39c2cb1d2f41e3ffc3ee790 (patch)
tree7517bc5d46782529f9334660824bff6601c62c93 /sys
parentfddde2b8ef37446cf89d43ddb9c653b9497b7d18 (diff)
downloadsrc-62275a906f011f27f39c2cb1d2f41e3ffc3ee790.tar.gz
src-62275a906f011f27f39c2cb1d2f41e3ffc3ee790.zip
Do not reinvent a wheel and let default error handler do its job.
Notes
Notes: svn path=/head/; revision=236604
Diffstat (limited to 'sys')
-rw-r--r--sys/cam/scsi/scsi_da.c29
1 files changed, 4 insertions, 25 deletions
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c
index 9b8fce01f969..3a02ea841428 100644
--- a/sys/cam/scsi/scsi_da.c
+++ b/sys/cam/scsi/scsi_da.c
@@ -1016,30 +1016,9 @@ daclose(struct disk *dp)
SSD_FULL_SIZE,
5 * 60 * 1000);
- cam_periph_runccb(ccb, /*error_routine*/NULL, /*cam_flags*/0,
- /*sense_flags*/SF_RETRY_UA,
+ cam_periph_runccb(ccb, daerror, /*cam_flags*/0,
+ /*sense_flags*/SF_RETRY_UA | SF_QUIET_IR,
softc->disk->d_devstat);
-
- if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
- if ((ccb->ccb_h.status & CAM_STATUS_MASK) ==
- CAM_SCSI_STATUS_ERROR) {
- int asc, ascq;
- int sense_key, error_code;
-
- scsi_extract_sense_len(&ccb->csio.sense_data,
- ccb->csio.sense_len - ccb->csio.sense_resid,
- &error_code, &sense_key, &asc, &ascq,
- /*show_errors*/ 1);
- if (sense_key != SSD_KEY_ILLEGAL_REQUEST)
- scsi_sense_print(&ccb->csio);
- } else {
- xpt_print(periph->path, "Synchronize cache "
- "failed, status == 0x%x, scsi status == "
- "0x%x\n", ccb->csio.ccb_h.status,
- ccb->csio.scsi_status);
- }
- }
-
xpt_release_ccb(ccb);
}
@@ -2541,8 +2520,8 @@ daprevent(struct cam_periph *periph, int action)
SSD_FULL_SIZE,
5000);
- error = cam_periph_runccb(ccb, /*error_routine*/NULL, CAM_RETRY_SELTO,
- SF_RETRY_UA, softc->disk->d_devstat);
+ error = cam_periph_runccb(ccb, daerror, CAM_RETRY_SELTO,
+ SF_RETRY_UA | SF_QUIET_IR, softc->disk->d_devstat);
if (error == 0) {
if (action == PR_ALLOW)