cam_periph_runccb() changed several years ago to overwrite the ccb callback
pointer. It's now unhelpful and misleading for callers to continue to set it, so bring all callers into conformance. There's no real functional change, but it makes reading the code a lot less confusing. Sponsored by: Netflix
This commit is contained in:
parent
f8715f82c1
commit
2452912a61
@ -957,7 +957,7 @@ adaclose(struct disk *dp)
|
||||
ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
|
||||
cam_fill_ataio(&ccb->ataio,
|
||||
1,
|
||||
adadone,
|
||||
NULL,
|
||||
CAM_DIR_NONE,
|
||||
0,
|
||||
NULL,
|
||||
@ -1075,7 +1075,7 @@ adadump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size_t len
|
||||
ataio.ccb_h.ccb_state = ADA_CCB_DUMP;
|
||||
cam_fill_ataio(&ataio,
|
||||
0,
|
||||
adadone,
|
||||
NULL,
|
||||
CAM_DIR_OUT,
|
||||
0,
|
||||
(u_int8_t *) virtual,
|
||||
@ -1109,7 +1109,7 @@ adadump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size_t len
|
||||
ataio.ccb_h.ccb_state = ADA_CCB_DUMP;
|
||||
cam_fill_ataio(&ataio,
|
||||
0,
|
||||
adadone,
|
||||
NULL,
|
||||
CAM_DIR_NONE,
|
||||
0,
|
||||
NULL,
|
||||
@ -3439,7 +3439,7 @@ adaflush(void)
|
||||
ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
|
||||
cam_fill_ataio(&ccb->ataio,
|
||||
0,
|
||||
adadone,
|
||||
NULL,
|
||||
CAM_DIR_NONE,
|
||||
0,
|
||||
NULL,
|
||||
@ -3491,7 +3491,7 @@ adaspindown(uint8_t cmd, int flags)
|
||||
|
||||
cam_fill_ataio(&local_ccb,
|
||||
0,
|
||||
adadone,
|
||||
NULL,
|
||||
CAM_DIR_NONE | flags,
|
||||
0,
|
||||
NULL,
|
||||
|
@ -2178,7 +2178,7 @@ cdprevent(struct cam_periph *periph, int action)
|
||||
|
||||
scsi_prevent(&ccb->csio,
|
||||
/*retries*/ cd_retry_count,
|
||||
cddone,
|
||||
/*cbfcnp*/NULL,
|
||||
MSG_SIMPLE_Q_TAG,
|
||||
action,
|
||||
SSD_FULL_SIZE,
|
||||
@ -2364,7 +2364,7 @@ cdsize(struct cam_periph *periph, u_int32_t *size)
|
||||
|
||||
scsi_read_capacity(&ccb->csio,
|
||||
/*retries*/ cd_retry_count,
|
||||
cddone,
|
||||
/*cbfcnp*/NULL,
|
||||
MSG_SIMPLE_Q_TAG,
|
||||
rcap_buf,
|
||||
SSD_FULL_SIZE,
|
||||
@ -2635,7 +2635,7 @@ cdreadtoc(struct cam_periph *periph, u_int32_t mode, u_int32_t start,
|
||||
|
||||
cam_fill_csio(csio,
|
||||
/* retries */ cd_retry_count,
|
||||
/* cbfcnp */ cddone,
|
||||
/* cbfcnp */ NULL,
|
||||
/* flags */ CAM_DIR_IN,
|
||||
/* tag_action */ MSG_SIMPLE_Q_TAG,
|
||||
/* data_ptr */ data,
|
||||
@ -2682,7 +2682,7 @@ cdreadsubchannel(struct cam_periph *periph, u_int32_t mode,
|
||||
|
||||
cam_fill_csio(csio,
|
||||
/* retries */ cd_retry_count,
|
||||
/* cbfcnp */ cddone,
|
||||
/* cbfcnp */ NULL,
|
||||
/* flags */ CAM_DIR_IN,
|
||||
/* tag_action */ MSG_SIMPLE_Q_TAG,
|
||||
/* data_ptr */ (u_int8_t *)data,
|
||||
@ -2743,7 +2743,7 @@ cdgetmode(struct cam_periph *periph, struct cd_mode_params *data,
|
||||
|
||||
scsi_mode_sense_len(csio,
|
||||
/* retries */ cd_retry_count,
|
||||
/* cbfcnp */ cddone,
|
||||
/* cbfcnp */ NULL,
|
||||
/* tag_action */ MSG_SIMPLE_Q_TAG,
|
||||
/* dbd */ 0,
|
||||
/* page_code */ SMS_PAGE_CTRL_CURRENT,
|
||||
@ -2886,7 +2886,7 @@ cdsetmode(struct cam_periph *periph, struct cd_mode_params *data)
|
||||
|
||||
scsi_mode_select_len(csio,
|
||||
/* retries */ cd_retry_count,
|
||||
/* cbfcnp */ cddone,
|
||||
/* cbfcnp */ NULL,
|
||||
/* tag_action */ MSG_SIMPLE_Q_TAG,
|
||||
/* scsi_page_fmt */ 1,
|
||||
/* save_pages */ 0,
|
||||
@ -2948,7 +2948,7 @@ cdplay(struct cam_periph *periph, u_int32_t blk, u_int32_t len)
|
||||
}
|
||||
cam_fill_csio(csio,
|
||||
/*retries*/ cd_retry_count,
|
||||
cddone,
|
||||
/*cbfcnp*/NULL,
|
||||
/*flags*/CAM_DIR_NONE,
|
||||
MSG_SIMPLE_Q_TAG,
|
||||
/*dataptr*/NULL,
|
||||
@ -2982,7 +2982,7 @@ cdplaymsf(struct cam_periph *periph, u_int32_t startm, u_int32_t starts,
|
||||
|
||||
cam_fill_csio(csio,
|
||||
/* retries */ cd_retry_count,
|
||||
/* cbfcnp */ cddone,
|
||||
/* cbfcnp */ NULL,
|
||||
/* flags */ CAM_DIR_NONE,
|
||||
/* tag_action */ MSG_SIMPLE_Q_TAG,
|
||||
/* data_ptr */ NULL,
|
||||
@ -3028,7 +3028,7 @@ cdplaytracks(struct cam_periph *periph, u_int32_t strack, u_int32_t sindex,
|
||||
|
||||
cam_fill_csio(csio,
|
||||
/* retries */ cd_retry_count,
|
||||
/* cbfcnp */ cddone,
|
||||
/* cbfcnp */ NULL,
|
||||
/* flags */ CAM_DIR_NONE,
|
||||
/* tag_action */ MSG_SIMPLE_Q_TAG,
|
||||
/* data_ptr */ NULL,
|
||||
@ -3070,7 +3070,7 @@ cdpause(struct cam_periph *periph, u_int32_t go)
|
||||
|
||||
cam_fill_csio(csio,
|
||||
/* retries */ cd_retry_count,
|
||||
/* cbfcnp */ cddone,
|
||||
/* cbfcnp */ NULL,
|
||||
/* flags */ CAM_DIR_NONE,
|
||||
/* tag_action */ MSG_SIMPLE_Q_TAG,
|
||||
/* data_ptr */ NULL,
|
||||
@ -3105,7 +3105,7 @@ cdstartunit(struct cam_periph *periph, int load)
|
||||
|
||||
scsi_start_stop(&ccb->csio,
|
||||
/* retries */ cd_retry_count,
|
||||
/* cbfcnp */ cddone,
|
||||
/* cbfcnp */ NULL,
|
||||
/* tag_action */ MSG_SIMPLE_Q_TAG,
|
||||
/* start */ TRUE,
|
||||
/* load_eject */ load,
|
||||
@ -3133,7 +3133,7 @@ cdstopunit(struct cam_periph *periph, u_int32_t eject)
|
||||
|
||||
scsi_start_stop(&ccb->csio,
|
||||
/* retries */ cd_retry_count,
|
||||
/* cbfcnp */ cddone,
|
||||
/* cbfcnp */ NULL,
|
||||
/* tag_action */ MSG_SIMPLE_Q_TAG,
|
||||
/* start */ FALSE,
|
||||
/* load_eject */ eject,
|
||||
@ -3169,7 +3169,7 @@ cdsetspeed(struct cam_periph *periph, u_int32_t rdspeed, u_int32_t wrspeed)
|
||||
|
||||
cam_fill_csio(csio,
|
||||
/* retries */ cd_retry_count,
|
||||
/* cbfcnp */ cddone,
|
||||
/* cbfcnp */ NULL,
|
||||
/* flags */ CAM_DIR_NONE,
|
||||
/* tag_action */ MSG_SIMPLE_Q_TAG,
|
||||
/* data_ptr */ NULL,
|
||||
@ -3244,7 +3244,7 @@ cdreportkey(struct cam_periph *periph, struct dvd_authinfo *authinfo)
|
||||
|
||||
scsi_report_key(&ccb->csio,
|
||||
/* retries */ cd_retry_count,
|
||||
/* cbfcnp */ cddone,
|
||||
/* cbfcnp */ NULL,
|
||||
/* tag_action */ MSG_SIMPLE_Q_TAG,
|
||||
/* lba */ lba,
|
||||
/* agid */ authinfo->agid,
|
||||
@ -3422,7 +3422,7 @@ cdsendkey(struct cam_periph *periph, struct dvd_authinfo *authinfo)
|
||||
|
||||
scsi_send_key(&ccb->csio,
|
||||
/* retries */ cd_retry_count,
|
||||
/* cbfcnp */ cddone,
|
||||
/* cbfcnp */ NULL,
|
||||
/* tag_action */ MSG_SIMPLE_Q_TAG,
|
||||
/* agid */ authinfo->agid,
|
||||
/* key_format */ authinfo->format,
|
||||
@ -3526,7 +3526,7 @@ cdreaddvdstructure(struct cam_periph *periph, struct dvd_struct *dvdstruct)
|
||||
|
||||
scsi_read_dvd_structure(&ccb->csio,
|
||||
/* retries */ cd_retry_count,
|
||||
/* cbfcnp */ cddone,
|
||||
/* cbfcnp */ NULL,
|
||||
/* tag_action */ MSG_SIMPLE_Q_TAG,
|
||||
/* lba */ address,
|
||||
/* layer_number */ dvdstruct->layer_num,
|
||||
|
@ -1694,7 +1694,7 @@ daclose(struct disk *dp)
|
||||
(softc->flags & DA_FLAG_PACK_INVALID) == 0) {
|
||||
ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
|
||||
scsi_synchronize_cache(&ccb->csio, /*retries*/1,
|
||||
/*cbfcnp*/dadone, MSG_SIMPLE_Q_TAG,
|
||||
/*cbfcnp*/NULL, MSG_SIMPLE_Q_TAG,
|
||||
/*begin_lba*/0, /*lb_count*/0, SSD_FULL_SIZE,
|
||||
5 * 60 * 1000);
|
||||
cam_periph_runccb(ccb, daerror, /*cam_flags*/0,
|
||||
@ -1812,7 +1812,7 @@ dadump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size_t leng
|
||||
csio.ccb_h.ccb_state = DA_CCB_DUMP;
|
||||
scsi_read_write(&csio,
|
||||
/*retries*/0,
|
||||
dadone,
|
||||
/*cbfcnp*/NULL,
|
||||
MSG_ORDERED_Q_TAG,
|
||||
/*read*/SCSI_RW_WRITE,
|
||||
/*byte2*/0,
|
||||
@ -1839,7 +1839,7 @@ dadump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size_t leng
|
||||
csio.ccb_h.ccb_state = DA_CCB_DUMP;
|
||||
scsi_synchronize_cache(&csio,
|
||||
/*retries*/0,
|
||||
/*cbfcnp*/dadone,
|
||||
/*cbfcnp*/NULL,
|
||||
MSG_SIMPLE_Q_TAG,
|
||||
/*begin_lba*/0,/* Cover the whole disk */
|
||||
/*lb_count*/0,
|
||||
@ -5738,7 +5738,7 @@ daprevent(struct cam_periph *periph, int action)
|
||||
|
||||
scsi_prevent(&ccb->csio,
|
||||
/*retries*/1,
|
||||
/*cbcfp*/dadone,
|
||||
/*cbcfp*/NULL,
|
||||
MSG_SIMPLE_Q_TAG,
|
||||
action,
|
||||
SSD_FULL_SIZE,
|
||||
@ -5935,7 +5935,7 @@ dashutdown(void * arg, int howto)
|
||||
ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
|
||||
scsi_synchronize_cache(&ccb->csio,
|
||||
/*retries*/0,
|
||||
/*cbfcnp*/dadone,
|
||||
/*cbfcnp*/NULL,
|
||||
MSG_SIMPLE_Q_TAG,
|
||||
/*begin_lba*/0, /* whole disk */
|
||||
/*lb_count*/0,
|
||||
|
@ -2220,10 +2220,6 @@ passsendccb(struct cam_periph *periph, union ccb *ccb, union ccb *inccb)
|
||||
ccb->csio.cdb_io.cdb_ptr = cmd;
|
||||
}
|
||||
|
||||
/*
|
||||
*/
|
||||
ccb->ccb_h.cbfcnp = passdone;
|
||||
|
||||
/*
|
||||
* Let cam_periph_mapmem do a sanity check on the data pointer format.
|
||||
* Even if no data transfer is needed, it's a cheap check and it
|
||||
|
@ -2895,13 +2895,13 @@ samount(struct cam_periph *periph, int oflags, struct cdev *dev)
|
||||
|
||||
if (softc->flags & SA_FLAG_TAPE_MOUNTED) {
|
||||
ccb = cam_periph_getccb(periph, 1);
|
||||
scsi_test_unit_ready(&ccb->csio, 0, sadone,
|
||||
scsi_test_unit_ready(&ccb->csio, 0, NULL,
|
||||
MSG_SIMPLE_Q_TAG, SSD_FULL_SIZE, IO_TIMEOUT);
|
||||
error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT,
|
||||
softc->device_stats);
|
||||
if (error == ENXIO) {
|
||||
softc->flags &= ~SA_FLAG_TAPE_MOUNTED;
|
||||
scsi_test_unit_ready(&ccb->csio, 0, sadone,
|
||||
scsi_test_unit_ready(&ccb->csio, 0, NULL,
|
||||
MSG_SIMPLE_Q_TAG, SSD_FULL_SIZE, IO_TIMEOUT);
|
||||
error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT,
|
||||
softc->device_stats);
|
||||
@ -2922,7 +2922,7 @@ samount(struct cam_periph *periph, int oflags, struct cdev *dev)
|
||||
return (error);
|
||||
}
|
||||
ccb = cam_periph_getccb(periph, 1);
|
||||
scsi_test_unit_ready(&ccb->csio, 0, sadone,
|
||||
scsi_test_unit_ready(&ccb->csio, 0, NULL,
|
||||
MSG_SIMPLE_Q_TAG, SSD_FULL_SIZE, IO_TIMEOUT);
|
||||
error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT,
|
||||
softc->device_stats);
|
||||
@ -2943,7 +2943,7 @@ samount(struct cam_periph *periph, int oflags, struct cdev *dev)
|
||||
/*
|
||||
* *Very* first off, make sure we're loaded to BOT.
|
||||
*/
|
||||
scsi_load_unload(&ccb->csio, 2, sadone, MSG_SIMPLE_Q_TAG, FALSE,
|
||||
scsi_load_unload(&ccb->csio, 2, NULL, MSG_SIMPLE_Q_TAG, FALSE,
|
||||
FALSE, FALSE, 1, SSD_FULL_SIZE, REWIND_TIMEOUT);
|
||||
error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT,
|
||||
softc->device_stats);
|
||||
@ -2952,7 +2952,7 @@ samount(struct cam_periph *periph, int oflags, struct cdev *dev)
|
||||
* In case this doesn't work, do a REWIND instead
|
||||
*/
|
||||
if (error) {
|
||||
scsi_rewind(&ccb->csio, 2, sadone, MSG_SIMPLE_Q_TAG,
|
||||
scsi_rewind(&ccb->csio, 2, NULL, MSG_SIMPLE_Q_TAG,
|
||||
FALSE, SSD_FULL_SIZE, REWIND_TIMEOUT);
|
||||
error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT,
|
||||
softc->device_stats);
|
||||
@ -2979,13 +2979,13 @@ samount(struct cam_periph *periph, int oflags, struct cdev *dev)
|
||||
}
|
||||
|
||||
if ((softc->quirks & SA_QUIRK_NODREAD) == 0) {
|
||||
scsi_sa_read_write(&ccb->csio, 0, sadone,
|
||||
scsi_sa_read_write(&ccb->csio, 0, NULL,
|
||||
MSG_SIMPLE_Q_TAG, 1, FALSE, 0, 8192,
|
||||
(void *) rblim, 8192, SSD_FULL_SIZE,
|
||||
IO_TIMEOUT);
|
||||
(void) cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT,
|
||||
softc->device_stats);
|
||||
scsi_rewind(&ccb->csio, 1, sadone, MSG_SIMPLE_Q_TAG,
|
||||
scsi_rewind(&ccb->csio, 1, NULL, MSG_SIMPLE_Q_TAG,
|
||||
FALSE, SSD_FULL_SIZE, REWIND_TIMEOUT);
|
||||
error = cam_periph_runccb(ccb, saerror, CAM_RETRY_SELTO,
|
||||
SF_NO_PRINT | SF_RETRY_UA,
|
||||
@ -3001,7 +3001,7 @@ samount(struct cam_periph *periph, int oflags, struct cdev *dev)
|
||||
/*
|
||||
* Next off, determine block limits.
|
||||
*/
|
||||
scsi_read_block_limits(&ccb->csio, 5, sadone, MSG_SIMPLE_Q_TAG,
|
||||
scsi_read_block_limits(&ccb->csio, 5, NULL, MSG_SIMPLE_Q_TAG,
|
||||
rblim, SSD_FULL_SIZE, SCSIOP_TIMEOUT);
|
||||
|
||||
error = cam_periph_runccb(ccb, saerror, CAM_RETRY_SELTO,
|
||||
@ -3616,7 +3616,7 @@ retry:
|
||||
mode_blk = (struct scsi_mode_blk_desc *)&mode_hdr[1];
|
||||
|
||||
/* it is safe to retry this */
|
||||
scsi_mode_sense(&ccb->csio, 5, sadone, MSG_SIMPLE_Q_TAG, FALSE,
|
||||
scsi_mode_sense(&ccb->csio, 5, NULL, MSG_SIMPLE_Q_TAG, FALSE,
|
||||
SMS_PAGE_CTRL_CURRENT, (params_to_get & SA_PARAM_COMPRESSION) ?
|
||||
cpage : SMS_VENDOR_SPECIFIC_PAGE, mode_buffer, mode_buffer_len,
|
||||
SSD_FULL_SIZE, SCSIOP_TIMEOUT);
|
||||
@ -3679,7 +3679,7 @@ retry:
|
||||
* for the block descriptor, etc.
|
||||
*/
|
||||
|
||||
scsi_mode_sense(&ccb->csio, 2, sadone, MSG_SIMPLE_Q_TAG, FALSE,
|
||||
scsi_mode_sense(&ccb->csio, 2, NULL, MSG_SIMPLE_Q_TAG, FALSE,
|
||||
SMS_PAGE_CTRL_CURRENT, SMS_VENDOR_SPECIFIC_PAGE,
|
||||
mode_buffer, mode_buffer_len, SSD_FULL_SIZE,
|
||||
SCSIOP_TIMEOUT);
|
||||
@ -3741,7 +3741,7 @@ retry:
|
||||
for (i = 0; i < SA_DENSITY_TYPES; i++) {
|
||||
scsi_report_density_support(&ccb->csio,
|
||||
/*retries*/ 1,
|
||||
/*cbfcnp*/ sadone,
|
||||
/*cbfcnp*/ NULL,
|
||||
/*tag_action*/ MSG_SIMPLE_Q_TAG,
|
||||
/*media*/ softc->density_type_bits[i] & SRDS_MEDIA,
|
||||
/*medium_type*/ softc->density_type_bits[i] &
|
||||
@ -3800,7 +3800,7 @@ retry:
|
||||
|
||||
scsi_mode_sense_len(&ccb->csio,
|
||||
/*retries*/ 5,
|
||||
/*cbfcnp*/ sadone,
|
||||
/*cbfcnp*/ NULL,
|
||||
/*tag_action*/ MSG_SIMPLE_Q_TAG,
|
||||
/*dbd*/ TRUE,
|
||||
/*page_code*/ (prot_changeable == 0) ?
|
||||
@ -4031,7 +4031,7 @@ retry_length:
|
||||
|
||||
scsi_mode_select_len(&ccb->csio,
|
||||
/*retries*/ 5,
|
||||
/*cbfcnp*/ sadone,
|
||||
/*cbfcnp*/ NULL,
|
||||
/*tag_action*/ MSG_SIMPLE_Q_TAG,
|
||||
/*scsi_page_fmt*/ TRUE,
|
||||
/*save_pages*/ FALSE,
|
||||
@ -4307,7 +4307,7 @@ retry:
|
||||
}
|
||||
|
||||
/* It is safe to retry this operation */
|
||||
scsi_mode_select(&ccb->csio, 5, sadone, MSG_SIMPLE_Q_TAG,
|
||||
scsi_mode_select(&ccb->csio, 5, NULL, MSG_SIMPLE_Q_TAG,
|
||||
(params_to_set & SA_PARAM_COMPRESSION)? TRUE : FALSE,
|
||||
FALSE, mode_buffer, mode_buffer_len, SSD_FULL_SIZE, SCSIOP_TIMEOUT);
|
||||
|
||||
@ -4625,7 +4625,7 @@ saprevent(struct cam_periph *periph, int action)
|
||||
ccb = cam_periph_getccb(periph, 1);
|
||||
|
||||
/* It is safe to retry this operation */
|
||||
scsi_prevent(&ccb->csio, 5, sadone, MSG_SIMPLE_Q_TAG, action,
|
||||
scsi_prevent(&ccb->csio, 5, NULL, MSG_SIMPLE_Q_TAG, action,
|
||||
SSD_FULL_SIZE, SCSIOP_TIMEOUT);
|
||||
|
||||
error = cam_periph_runccb(ccb, saerror, 0, sf, softc->device_stats);
|
||||
@ -4651,7 +4651,7 @@ sarewind(struct cam_periph *periph)
|
||||
ccb = cam_periph_getccb(periph, 1);
|
||||
|
||||
/* It is safe to retry this operation */
|
||||
scsi_rewind(&ccb->csio, 2, sadone, MSG_SIMPLE_Q_TAG, FALSE,
|
||||
scsi_rewind(&ccb->csio, 2, NULL, MSG_SIMPLE_Q_TAG, FALSE,
|
||||
SSD_FULL_SIZE, REWIND_TIMEOUT);
|
||||
|
||||
softc->dsreg = MTIO_DSREG_REW;
|
||||
@ -4683,7 +4683,7 @@ saspace(struct cam_periph *periph, int count, scsi_space_code code)
|
||||
|
||||
/* This cannot be retried */
|
||||
|
||||
scsi_space(&ccb->csio, 0, sadone, MSG_SIMPLE_Q_TAG, code, count,
|
||||
scsi_space(&ccb->csio, 0, NULL, MSG_SIMPLE_Q_TAG, code, count,
|
||||
SSD_FULL_SIZE, SPACE_TIMEOUT);
|
||||
|
||||
/*
|
||||
@ -4764,7 +4764,7 @@ sawritefilemarks(struct cam_periph *periph, int nmarks, int setmarks, int immed)
|
||||
|
||||
softc->dsreg = MTIO_DSREG_FMK;
|
||||
/* this *must* not be retried */
|
||||
scsi_write_filemarks(&ccb->csio, 0, sadone, MSG_SIMPLE_Q_TAG,
|
||||
scsi_write_filemarks(&ccb->csio, 0, NULL, MSG_SIMPLE_Q_TAG,
|
||||
immed, setmarks, nmarks, SSD_FULL_SIZE, IO_TIMEOUT);
|
||||
softc->dsreg = MTIO_DSREG_REST;
|
||||
|
||||
@ -4827,7 +4827,7 @@ sagetpos(struct cam_periph *periph)
|
||||
ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
|
||||
scsi_read_position_10(&ccb->csio,
|
||||
/*retries*/ 1,
|
||||
/*cbfcnp*/ sadone,
|
||||
/*cbfcnp*/ NULL,
|
||||
/*tag_action*/ MSG_SIMPLE_Q_TAG,
|
||||
/*service_action*/ SA_RPOS_LONG_FORM,
|
||||
/*data_ptr*/ (uint8_t *)&long_pos,
|
||||
@ -4928,7 +4928,7 @@ sardpos(struct cam_periph *periph, int hard, u_int32_t *blkptr)
|
||||
}
|
||||
|
||||
ccb = cam_periph_getccb(periph, 1);
|
||||
scsi_read_position(&ccb->csio, 1, sadone, MSG_SIMPLE_Q_TAG,
|
||||
scsi_read_position(&ccb->csio, 1, NULL, MSG_SIMPLE_Q_TAG,
|
||||
hard, &loc, SSD_FULL_SIZE, SCSIOP_TIMEOUT);
|
||||
softc->dsreg = MTIO_DSREG_RBSY;
|
||||
error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats);
|
||||
@ -4988,7 +4988,7 @@ sasetpos(struct cam_periph *periph, int hard, struct mtlocate *locate_info)
|
||||
if (locate16 != 0) {
|
||||
scsi_locate_16(&ccb->csio,
|
||||
/*retries*/ 1,
|
||||
/*cbfcnp*/ sadone,
|
||||
/*cbfcnp*/ NULL,
|
||||
/*tag_action*/ MSG_SIMPLE_Q_TAG,
|
||||
/*immed*/ immed,
|
||||
/*cp*/ cp,
|
||||
@ -5001,7 +5001,7 @@ sasetpos(struct cam_periph *periph, int hard, struct mtlocate *locate_info)
|
||||
} else {
|
||||
scsi_locate_10(&ccb->csio,
|
||||
/*retries*/ 1,
|
||||
/*cbfcnp*/ sadone,
|
||||
/*cbfcnp*/ NULL,
|
||||
/*tag_action*/ MSG_SIMPLE_Q_TAG,
|
||||
/*immed*/ immed,
|
||||
/*cp*/ cp,
|
||||
@ -5071,7 +5071,7 @@ saretension(struct cam_periph *periph)
|
||||
ccb = cam_periph_getccb(periph, 1);
|
||||
|
||||
/* It is safe to retry this operation */
|
||||
scsi_load_unload(&ccb->csio, 5, sadone, MSG_SIMPLE_Q_TAG, FALSE,
|
||||
scsi_load_unload(&ccb->csio, 5, NULL, MSG_SIMPLE_Q_TAG, FALSE,
|
||||
FALSE, TRUE, TRUE, SSD_FULL_SIZE, ERASE_TIMEOUT);
|
||||
|
||||
softc->dsreg = MTIO_DSREG_TEN;
|
||||
@ -5098,7 +5098,7 @@ sareservereleaseunit(struct cam_periph *periph, int reserve)
|
||||
ccb = cam_periph_getccb(periph, 1);
|
||||
|
||||
/* It is safe to retry this operation */
|
||||
scsi_reserve_release_unit(&ccb->csio, 2, sadone, MSG_SIMPLE_Q_TAG,
|
||||
scsi_reserve_release_unit(&ccb->csio, 2, NULL, MSG_SIMPLE_Q_TAG,
|
||||
FALSE, 0, SSD_FULL_SIZE, SCSIOP_TIMEOUT, reserve);
|
||||
softc->dsreg = MTIO_DSREG_RBSY;
|
||||
error = cam_periph_runccb(ccb, saerror, 0,
|
||||
@ -5129,7 +5129,7 @@ saloadunload(struct cam_periph *periph, int load)
|
||||
ccb = cam_periph_getccb(periph, 1);
|
||||
|
||||
/* It is safe to retry this operation */
|
||||
scsi_load_unload(&ccb->csio, 5, sadone, MSG_SIMPLE_Q_TAG, FALSE,
|
||||
scsi_load_unload(&ccb->csio, 5, NULL, MSG_SIMPLE_Q_TAG, FALSE,
|
||||
FALSE, FALSE, load, SSD_FULL_SIZE, REWIND_TIMEOUT);
|
||||
|
||||
softc->dsreg = (load)? MTIO_DSREG_LD : MTIO_DSREG_UNL;
|
||||
@ -5161,7 +5161,7 @@ saerase(struct cam_periph *periph, int longerase)
|
||||
|
||||
ccb = cam_periph_getccb(periph, 1);
|
||||
|
||||
scsi_erase(&ccb->csio, 1, sadone, MSG_SIMPLE_Q_TAG, FALSE, longerase,
|
||||
scsi_erase(&ccb->csio, 1, NULL, MSG_SIMPLE_Q_TAG, FALSE, longerase,
|
||||
SSD_FULL_SIZE, ERASE_TIMEOUT);
|
||||
|
||||
softc->dsreg = MTIO_DSREG_ZER;
|
||||
|
@ -580,7 +580,7 @@ sgioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *td)
|
||||
|
||||
cam_fill_csio(csio,
|
||||
/*retries*/1,
|
||||
sgdone,
|
||||
/*cbfcnp*/NULL,
|
||||
dir|CAM_DEV_QFRZDIS,
|
||||
MSG_SIMPLE_Q_TAG,
|
||||
req->dxferp,
|
||||
|
Loading…
x
Reference in New Issue
Block a user