Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/scsi/scsi_da.c
Show First 20 Lines • Show All 1,670 Lines • ▼ Show 20 Lines | scsi_read_write(&csio, | ||||
length / secsize, | length / secsize, | ||||
/*data_ptr*/(u_int8_t *) virtual, | /*data_ptr*/(u_int8_t *) virtual, | ||||
/*dxfer_len*/length, | /*dxfer_len*/length, | ||||
/*sense_len*/SSD_FULL_SIZE, | /*sense_len*/SSD_FULL_SIZE, | ||||
da_default_timeout * 1000); | da_default_timeout * 1000); | ||||
xpt_polled_action((union ccb *)&csio); | xpt_polled_action((union ccb *)&csio); | ||||
error = cam_periph_error((union ccb *)&csio, | error = cam_periph_error((union ccb *)&csio, | ||||
0, SF_NO_RECOVERY | SF_NO_RETRY, NULL); | 0, SF_NO_RECOVERY | SF_NO_RETRY); | ||||
if ((csio.ccb_h.status & CAM_DEV_QFRZN) != 0) | if ((csio.ccb_h.status & CAM_DEV_QFRZN) != 0) | ||||
cam_release_devq(csio.ccb_h.path, /*relsim_flags*/0, | cam_release_devq(csio.ccb_h.path, /*relsim_flags*/0, | ||||
/*reduction*/0, /*timeout*/0, /*getcount_only*/0); | /*reduction*/0, /*timeout*/0, /*getcount_only*/0); | ||||
if (error != 0) | if (error != 0) | ||||
printf("Aborting dump due to I/O error.\n"); | printf("Aborting dump due to I/O error.\n"); | ||||
cam_periph_unlock(periph); | cam_periph_unlock(periph); | ||||
return (error); | return (error); | ||||
} | } | ||||
Show All 11 Lines | scsi_synchronize_cache(&csio, | ||||
MSG_SIMPLE_Q_TAG, | MSG_SIMPLE_Q_TAG, | ||||
/*begin_lba*/0,/* Cover the whole disk */ | /*begin_lba*/0,/* Cover the whole disk */ | ||||
/*lb_count*/0, | /*lb_count*/0, | ||||
SSD_FULL_SIZE, | SSD_FULL_SIZE, | ||||
5 * 1000); | 5 * 1000); | ||||
xpt_polled_action((union ccb *)&csio); | xpt_polled_action((union ccb *)&csio); | ||||
error = cam_periph_error((union ccb *)&csio, | error = cam_periph_error((union ccb *)&csio, | ||||
0, SF_NO_RECOVERY | SF_NO_RETRY | SF_QUIET_IR, NULL); | 0, SF_NO_RECOVERY | SF_NO_RETRY | SF_QUIET_IR); | ||||
if ((csio.ccb_h.status & CAM_DEV_QFRZN) != 0) | if ((csio.ccb_h.status & CAM_DEV_QFRZN) != 0) | ||||
cam_release_devq(csio.ccb_h.path, /*relsim_flags*/0, | cam_release_devq(csio.ccb_h.path, /*relsim_flags*/0, | ||||
/*reduction*/0, /*timeout*/0, /*getcount_only*/0); | /*reduction*/0, /*timeout*/0, /*getcount_only*/0); | ||||
if (error != 0) | if (error != 0) | ||||
xpt_print(periph->path, "Synchronize cache failed\n"); | xpt_print(periph->path, "Synchronize cache failed\n"); | ||||
} | } | ||||
cam_periph_unlock(periph); | cam_periph_unlock(periph); | ||||
return (error); | return (error); | ||||
▲ Show 20 Lines • Show All 3,729 Lines • ▼ Show 20 Lines | #endif | ||||
* XXX | * XXX | ||||
* Until we have a better way of doing pack validation, | * Until we have a better way of doing pack validation, | ||||
* don't treat UAs as errors. | * don't treat UAs as errors. | ||||
*/ | */ | ||||
sense_flags |= SF_RETRY_UA; | sense_flags |= SF_RETRY_UA; | ||||
if (softc->quirks & DA_Q_RETRY_BUSY) | if (softc->quirks & DA_Q_RETRY_BUSY) | ||||
sense_flags |= SF_RETRY_BUSY; | sense_flags |= SF_RETRY_BUSY; | ||||
return(cam_periph_error(ccb, cam_flags, sense_flags, | return(cam_periph_error(ccb, cam_flags, sense_flags)); | ||||
&softc->saved_ccb)); | |||||
} | } | ||||
static void | static void | ||||
damediapoll(void *arg) | damediapoll(void *arg) | ||||
{ | { | ||||
struct cam_periph *periph = arg; | struct cam_periph *periph = arg; | ||||
struct da_softc *softc = periph->softc; | struct da_softc *softc = periph->softc; | ||||
▲ Show 20 Lines • Show All 608 Lines • Show Last 20 Lines |