Message ID | 1375609923-15655-1-git-send-email-chiluk@canonical.com |
---|---|
State | New |
Headers | show |
This appears to be the result of some cherry picks (from yours truly) to enable Haswell SATA RTD3. https://bugs.launchpad.net/intel/+bug/1031180 Its worth noting that this issue is _not_ in vanilla stable 3.8.y. Can you reference a comment in the bug report that indicates this commit positively fixes the problem ? The best test result I can find is that 3.8.1 does not have the issue. rtg
The bug description was updated with positive test results: Fix: Fix comes from upstream b7b2ee88b4c8d3326d144a051252d78bded93557. I have built and tested this fix and verified that it resolves the issue. Testcase: In the broken case) $ sudo /usr/lib/nagios/plugins/check_ide_smart -d /dev/sda -i -n CRITICAL - SMART_ENABLE: Input/output error CRITICAL - SMART_CMD_ENABLE After patch) /usr/lib/nagios/plugins/check_ide_smart -n -d /dev/sda OK - Operational (15/15 tests passed) It would seem that check_ide_smart is defunct on my server, giving the following results when run manually: sune@jadis:~$ sudo /usr/lib/nagios/plugins/check_ide_smart -d /dev/sda -i -n CRITICAL - SMART_ENABLE: Input/output error CRITICAL - SMART_CMD_ENABLE rtg
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 318b413..ff44787 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -532,8 +532,8 @@ int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg) struct scsi_sense_hdr sshdr; scsi_normalize_sense(sensebuf, SCSI_SENSE_BUFFERSIZE, &sshdr); - if (sshdr.sense_key == 0 && - sshdr.asc == 0 && sshdr.ascq == 0) + if (sshdr.sense_key == RECOVERED_ERROR && + sshdr.asc == 0 && sshdr.ascq == 0x1d) cmd_result &= ~SAM_STAT_CHECK_CONDITION; } @@ -618,8 +618,8 @@ int ata_task_ioctl(struct scsi_device *scsidev, void __user *arg) struct scsi_sense_hdr sshdr; scsi_normalize_sense(sensebuf, SCSI_SENSE_BUFFERSIZE, &sshdr); - if (sshdr.sense_key == 0 && - sshdr.asc == 0 && sshdr.ascq == 0) + if (sshdr.sense_key == RECOVERED_ERROR && + sshdr.asc == 0 && sshdr.ascq == 0x1d) cmd_result &= ~SAM_STAT_CHECK_CONDITION; }