diff options
| -rw-r--r-- | drivers/ata/libata-sff.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index 4b4739486327..9033d164c4ec 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c | |||
| @@ -1227,10 +1227,19 @@ fsm_start: | |||
| 1227 | /* ATA PIO protocol */ | 1227 | /* ATA PIO protocol */ |
| 1228 | if (unlikely((status & ATA_DRQ) == 0)) { | 1228 | if (unlikely((status & ATA_DRQ) == 0)) { |
| 1229 | /* handle BSY=0, DRQ=0 as error */ | 1229 | /* handle BSY=0, DRQ=0 as error */ |
| 1230 | if (likely(status & (ATA_ERR | ATA_DF))) | 1230 | if (likely(status & (ATA_ERR | ATA_DF))) { |
| 1231 | /* device stops HSM for abort/error */ | 1231 | /* device stops HSM for abort/error */ |
| 1232 | qc->err_mask |= AC_ERR_DEV; | 1232 | qc->err_mask |= AC_ERR_DEV; |
| 1233 | else { | 1233 | |
| 1234 | /* If diagnostic failed and this is | ||
| 1235 | * IDENTIFY, it's likely a phantom | ||
| 1236 | * device. Mark hint. | ||
| 1237 | */ | ||
| 1238 | if (qc->dev->horkage & | ||
| 1239 | ATA_HORKAGE_DIAGNOSTIC) | ||
| 1240 | qc->err_mask |= | ||
| 1241 | AC_ERR_NODEV_HINT; | ||
| 1242 | } else { | ||
| 1234 | /* HSM violation. Let EH handle this. | 1243 | /* HSM violation. Let EH handle this. |
| 1235 | * Phantom devices also trigger this | 1244 | * Phantom devices also trigger this |
| 1236 | * condition. Mark hint. | 1245 | * condition. Mark hint. |
