1. The key SSD_KEY_RECOVERED_ERROR is not an error at all and should
not be retried. It is an indication that there was an error that was corrected during the execution of the command. This is per ANSI SCSI2 spec. It's possible that these should also be noted to the console (as indicative, perhaps, of growing media defect lists in drives), but the default of printing errors out if bootverbose in this case is probably enough. Also, there'd been a missing ERESTART for that clause anyway. 2. If you have an ABORTED COMMAND, it's almost invariably a SCSI parity error. You should never be silent about these since users should do something about this if it occurs (moving that power cord *away* from the SCSI cable is always a good first start). This should print irrespective of bootverbose because it's an actual real error even if we retry a transmission. Reviewed by: audit@freebsd.org, gibbs@freebsd.org
This commit is contained in:
parent
f434cd45ed
commit
216a89d6a4
@ -2177,16 +2177,16 @@ scsi_interpret_sense(struct cam_device *device, union ccb *ccb,
|
||||
/* These should be filtered by the peripheral drivers */
|
||||
/* FALLTHROUGH */
|
||||
case SSD_KEY_MISCOMPARE:
|
||||
print_sense = FALSE;
|
||||
/* FALLTHROUGH */
|
||||
case SSD_KEY_RECOVERED_ERROR:
|
||||
|
||||
/* decrement the number of retries */
|
||||
retry = ccb->ccb_h.retry_count > 0;
|
||||
if (retry)
|
||||
if (retry) {
|
||||
error = ERESTART;
|
||||
ccb->ccb_h.retry_count--;
|
||||
|
||||
error = 0;
|
||||
} else {
|
||||
error = EIO;
|
||||
}
|
||||
case SSD_KEY_RECOVERED_ERROR:
|
||||
error = 0; /* not an error */
|
||||
break;
|
||||
case SSD_KEY_ILLEGAL_REQUEST:
|
||||
if (((sense_flags & SF_QUIET_IR) != 0)
|
||||
@ -2241,6 +2241,7 @@ scsi_interpret_sense(struct cam_device *device, union ccb *ccb,
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SSD_KEY_ABORTED_COMMAND:
|
||||
default:
|
||||
/* decrement the number of retries */
|
||||
retry = ccb->ccb_h.retry_count > 0;
|
||||
@ -2255,6 +2256,13 @@ scsi_interpret_sense(struct cam_device *device, union ccb *ccb,
|
||||
|
||||
error = error_action & SS_ERRMASK;
|
||||
}
|
||||
/*
|
||||
* Make sure ABORTED COMMAND errors get
|
||||
* printed as they're indicative of marginal
|
||||
* SCSI busses that people should address.
|
||||
*/
|
||||
if (sense_key == SSD_KEY_ABORTED_COMMAND)
|
||||
print_sense = TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user