summaryrefslogtreecommitdiffstats
path: root/sys/cam/scsi/scsi_ch.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/cam/scsi/scsi_ch.c')
-rw-r--r--sys/cam/scsi/scsi_ch.c55
1 files changed, 27 insertions, 28 deletions
diff --git a/sys/cam/scsi/scsi_ch.c b/sys/cam/scsi/scsi_ch.c
index 4c8afdb..9ec85c8 100644
--- a/sys/cam/scsi/scsi_ch.c
+++ b/sys/cam/scsi/scsi_ch.c
@@ -617,8 +617,8 @@ chdone(struct cam_periph *periph, union ccb *done_ccb)
} else {
int error;
- error = cherror(done_ccb, 0, SF_RETRY_UA |
- SF_NO_PRINT | SF_RETRY_SELTO);
+ error = cherror(done_ccb, CAM_RETRY_SELTO,
+ SF_RETRY_UA | SF_NO_PRINT);
/*
* Retry any UNIT ATTENTION type errors. They
* are expected at boot.
@@ -868,8 +868,8 @@ chmove(struct cam_periph *periph, struct changer_move *cm)
/* sense_len */ SSD_FULL_SIZE,
/* timeout */ CH_TIMEOUT_MOVE_MEDIUM);
- error = cam_periph_runccb(ccb, cherror, /*cam_flags*/0,
- /*sense_flags*/ SF_RETRY_UA | SF_RETRY_SELTO,
+ error = cam_periph_runccb(ccb, cherror, /*cam_flags*/CAM_RETRY_SELTO,
+ /*sense_flags*/ SF_RETRY_UA,
&softc->device_stats);
xpt_release_ccb(ccb);
@@ -931,8 +931,8 @@ chexchange(struct cam_periph *periph, struct changer_exchange *ce)
/* sense_len */ SSD_FULL_SIZE,
/* timeout */ CH_TIMEOUT_EXCHANGE_MEDIUM);
- error = cam_periph_runccb(ccb, cherror, /*cam_flags*/0,
- /*sense_flags*/ SF_RETRY_UA | SF_RETRY_SELTO,
+ error = cam_periph_runccb(ccb, cherror, /*cam_flags*/CAM_RETRY_SELTO,
+ /*sense_flags*/ SF_RETRY_UA,
&softc->device_stats);
xpt_release_ccb(ccb);
@@ -977,8 +977,8 @@ chposition(struct cam_periph *periph, struct changer_position *cp)
/* sense_len */ SSD_FULL_SIZE,
/* timeout */ CH_TIMEOUT_POSITION_TO_ELEMENT);
- error = cam_periph_runccb(ccb, cherror, /*cam_flags*/ 0,
- /*sense_flags*/ SF_RETRY_UA | SF_RETRY_SELTO,
+ error = cam_periph_runccb(ccb, cherror, /*cam_flags*/ CAM_RETRY_SELTO,
+ /*sense_flags*/ SF_RETRY_UA,
&softc->device_stats);
xpt_release_ccb(ccb);
@@ -1133,8 +1133,8 @@ chgetelemstatus(struct cam_periph *periph,
/* sense_len */ SSD_FULL_SIZE,
/* timeout */ CH_TIMEOUT_READ_ELEMENT_STATUS);
- error = cam_periph_runccb(ccb, cherror, /*cam_flags*/ 0,
- /*sense_flags*/ SF_RETRY_UA | SF_RETRY_SELTO,
+ error = cam_periph_runccb(ccb, cherror, /*cam_flags*/ CAM_RETRY_SELTO,
+ /*sense_flags*/ SF_RETRY_UA,
&softc->device_stats);
if (error)
@@ -1169,8 +1169,8 @@ chgetelemstatus(struct cam_periph *periph,
/* sense_len */ SSD_FULL_SIZE,
/* timeout */ CH_TIMEOUT_READ_ELEMENT_STATUS);
- error = cam_periph_runccb(ccb, cherror, /*cam_flags*/ 0,
- /*sense_flags*/ SF_RETRY_UA | SF_RETRY_SELTO,
+ error = cam_periph_runccb(ccb, cherror, /*cam_flags*/ CAM_RETRY_SELTO,
+ /*sense_flags*/ SF_RETRY_UA,
&softc->device_stats);
if (error)
@@ -1248,8 +1248,8 @@ chielem(struct cam_periph *periph,
/* sense_len */ SSD_FULL_SIZE,
/* timeout */ timeout);
- error = cam_periph_runccb(ccb, cherror, /*cam_flags*/ 0,
- /*sense_flags*/ SF_RETRY_UA | SF_RETRY_SELTO,
+ error = cam_periph_runccb(ccb, cherror, /*cam_flags*/ CAM_RETRY_SELTO,
+ /*sense_flags*/ SF_RETRY_UA,
&softc->device_stats);
xpt_release_ccb(ccb);
@@ -1335,8 +1335,8 @@ chsetvoltag(struct cam_periph *periph,
/* sense_len */ SSD_FULL_SIZE,
/* timeout */ CH_TIMEOUT_SEND_VOLTAG);
- error = cam_periph_runccb(ccb, cherror, /*cam_flags*/ 0,
- /*sense_flags*/ SF_RETRY_UA | SF_RETRY_SELTO,
+ error = cam_periph_runccb(ccb, cherror, /*cam_flags*/ CAM_RETRY_SELTO,
+ /*sense_flags*/ SF_RETRY_UA,
&softc->device_stats);
xpt_release_ccb(ccb);
@@ -1399,9 +1399,8 @@ chgetparams(struct cam_periph *periph)
/* sense_len */ SSD_FULL_SIZE,
/* timeout */ CH_TIMEOUT_MODE_SENSE);
- error = cam_periph_runccb(ccb, cherror, /*cam_flags*/ 0,
- /* sense_flags */ SF_RETRY_UA |
- SF_NO_PRINT | SF_RETRY_SELTO,
+ error = cam_periph_runccb(ccb, cherror, /*cam_flags*/ CAM_RETRY_SELTO,
+ /* sense_flags */ SF_RETRY_UA|SF_NO_PRINT,
&softc->device_stats);
if (error) {
@@ -1412,9 +1411,9 @@ chgetparams(struct cam_periph *periph)
ccb->csio.cdb_io.cdb_bytes;
sms->byte2 &= ~SMS_DBD;
- error = cam_periph_runccb(ccb, cherror, /*cam_flags*/ 0,
- /*sense_flags*/ SF_RETRY_UA |
- SF_RETRY_SELTO,
+ error = cam_periph_runccb(ccb, cherror,
+ /*cam_flags*/ CAM_RETRY_SELTO,
+ /*sense_flags*/ SF_RETRY_UA,
&softc->device_stats);
} else {
/*
@@ -1463,9 +1462,9 @@ chgetparams(struct cam_periph *periph)
/* sense_len */ SSD_FULL_SIZE,
/* timeout */ CH_TIMEOUT_MODE_SENSE);
- error = cam_periph_runccb(ccb, cherror, /*cam_flags*/ 0,
- /* sense_flags */ SF_RETRY_UA | SF_NO_PRINT |
- SF_RETRY_SELTO, &softc->device_stats);
+ error = cam_periph_runccb(ccb, cherror, /*cam_flags*/ CAM_RETRY_SELTO,
+ /* sense_flags */ SF_RETRY_UA | SF_NO_PRINT,
+ &softc->device_stats);
if (error) {
if (dbd) {
@@ -1475,9 +1474,9 @@ chgetparams(struct cam_periph *periph)
ccb->csio.cdb_io.cdb_bytes;
sms->byte2 &= ~SMS_DBD;
- error = cam_periph_runccb(ccb, cherror, /*cam_flags*/ 0,
- /*sense_flags*/ SF_RETRY_UA |
- SF_RETRY_SELTO,
+ error = cam_periph_runccb(ccb, cherror,
+ /*cam_flags*/ CAM_RETRY_SELTO,
+ /*sense_flags*/ SF_RETRY_UA,
&softc->device_stats);
} else {
/*
OpenPOWER on IntegriCloud