Lines Matching +full:timeout +full:- +full:enable
1 /*-
122 { "enable", ATA_SF_EPC_ENABLE },
130 union ccb *ccb, int retry_count, int timeout);
134 union ccb *ccb, int retry_count, int timeout,
138 int retry_count, int timeout, int action,
139 int power_cond, int timer, int enable, int save,
154 if ((desc->flags & epc_flags[i].value) == 0)
171 (double)(le32dec(desc->default_timer) / 10));
173 (double)(le32dec(desc->saved_timer) / 10));
175 (double)(le32dec(desc->current_timer) / 10));
177 (double)(le32dec(desc->nom_time_to_active) / 10));
179 (double)(le32dec(desc->min_timer) / 10));
181 (double)(le32dec(desc->max_timer) / 10));
183 le32dec(desc->num_transitions_to_pc));
185 le32dec(desc->hours_in_pc));
190 int retry_count, int timeout)
222 /*timeout*/ timeout ? timeout : 60000,
233 ccb->ccb_h.flags |= CAM_PASS_ERR_RECOVER;
242 if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
255 epc_print_pcl_desc(&idle_log->idle_a_desc, " ");
257 epc_print_pcl_desc(&idle_log->idle_b_desc, " ");
259 epc_print_pcl_desc(&idle_log->idle_c_desc, " ");
262 epc_print_pcl_desc(&standby_log->standby_y_desc, " ");
264 epc_print_pcl_desc(&standby_log->standby_z_desc, " ");
271 union ccb *ccb, int retry_count, int timeout, int power_only)
293 retval = ata_do_identify(device, retry_count, timeout, ccb, &ident);
332 /*timeout*/ timeout ? timeout : 60000,
343 ccb->ccb_h.flags |= CAM_PASS_ERR_RECOVER;
352 if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
358 if (ccb->ccb_h.func_code == XPT_SCSI_IO) {
359 avail_bytes = ccb->csio.dxfer_len - ccb->csio.resid;
361 avail_bytes = ccb->ataio.dxfer_len - ccb->ataio.resid;
377 (ident->support.command2 & ATA_SUPPORT_APM) ? "" : "NOT ",
378 (ident->enabled.command2 & ATA_SUPPORT_APM) ? "" : "NOT ");
380 (ident->support2 & ATA_SUPPORT_EPC) ? "" : "NOT ",
381 (ident->enabled2 & ATA_ENABLED_EPC) ? "" : "NOT ");
409 /*timeout*/ timeout ? timeout : 60000,
420 ccb->ccb_h.flags |= CAM_PASS_ERR_RECOVER;
431 * is an SCSI ATA PASS-THROUGH command.
433 if (((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_SCSI_STATUS_ERROR)
434 && (ccb->csio.scsi_status == SCSI_STATUS_CHECK_COND)) {
452 if (((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)
472 || (ident->enabled2 & ATA_ENABLED_EPC)) {
521 union ccb *ccb, int retry_count, int timeout, int action,
522 int power_cond, int timer, int enable, int save,
539 lba |= (enable ? ATA_SF_EPC_TIMER_EN : 0) |
578 /*timeout*/ timeout ? timeout : 60000,
589 ccb->ccb_h.flags |= CAM_PASS_ERR_RECOVER;
598 if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
610 int retry_count, int timeout, int verbosemode __unused)
615 int action = -1;
617 double timer_val = -1;
618 int timer_tenths = 0, power_cond = -1;
620 int enable = -1, save = 0;
621 int restore_src = -1;
622 int power_src = -1;
633 while ((c = getopt(argc, argv, combinedopt)) != -1) {
655 enable = 0;
661 enable = 1;
752 if (action == -1) {
758 error = get_device_type(device, retry_count, timeout,
777 if (timer_val == -1) {
778 warnx("Must specify a timer value (-T time)");
783 if (enable == -1) {
784 warnx("Must specify enable (-e) or disable (-d)");
789 if (power_cond == -1) {
790 warnx("Must specify a power condition with -p");
797 if (power_src == -1) {
798 warnx("Must specify a power source (-S battery or "
799 "-S notbattery) value");
805 if (restore_src == -1) {
807 "-r default or -r saved");
822 error = epc_getmode(device, devtype, ccb, retry_count, timeout,
826 error = epc_list(device, devtype, ccb, retry_count, timeout);
836 timeout, action, power_cond, timer_tenths, enable, save,