|
@@ -867,6 +867,17 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes)
|
|
|
/* for passthrough error may be set */
|
|
|
error = BLK_STS_OK;
|
|
|
}
|
|
|
+ /*
|
|
|
+ * Another corner case: the SCSI status byte is non-zero but 'good'.
|
|
|
+ * Example: PRE-FETCH command returns SAM_STAT_CONDITION_MET when
|
|
|
+ * it is able to fit nominated LBs in its cache (and SAM_STAT_GOOD
|
|
|
+ * if it can't fit). Treat SAM_STAT_CONDITION_MET and the related
|
|
|
+ * intermediate statuses (both obsolete in SAM-4) as good.
|
|
|
+ */
|
|
|
+ if (status_byte(result) && scsi_status_is_good(result)) {
|
|
|
+ result = 0;
|
|
|
+ error = BLK_STS_OK;
|
|
|
+ }
|
|
|
|
|
|
/*
|
|
|
* special case: failed zero length commands always need to
|