libata-eh.c (036db8bd96374c66424f270f3370ddaf0adf7506) | libata-eh.c (79487259a4c90acf020f6ce1c63bb1db9ad3fc4d) |
---|---|
1/* 2 * libata-eh.c - libata error handling 3 * 4 * Maintained by: Tejun Heo <tj@kernel.org> 5 * Please ALWAYS copy linux-ide@vger.kernel.org 6 * on emails. 7 * 8 * Copyright 2006 Tejun Heo <htejun@gmail.com> --- 161 unchanged lines hidden (view full) --- 170#else /* CONFIG_PM */ 171static void ata_eh_handle_port_suspend(struct ata_port *ap) 172{ } 173 174static void ata_eh_handle_port_resume(struct ata_port *ap) 175{ } 176#endif /* CONFIG_PM */ 177 | 1/* 2 * libata-eh.c - libata error handling 3 * 4 * Maintained by: Tejun Heo <tj@kernel.org> 5 * Please ALWAYS copy linux-ide@vger.kernel.org 6 * on emails. 7 * 8 * Copyright 2006 Tejun Heo <htejun@gmail.com> --- 161 unchanged lines hidden (view full) --- 170#else /* CONFIG_PM */ 171static void ata_eh_handle_port_suspend(struct ata_port *ap) 172{ } 173 174static void ata_eh_handle_port_resume(struct ata_port *ap) 175{ } 176#endif /* CONFIG_PM */ 177 |
178static __printf(2, 0) void __ata_ehi_pushv_desc(struct ata_eh_info *ehi, 179 const char *fmt, va_list args) | 178static void __ata_ehi_pushv_desc(struct ata_eh_info *ehi, const char *fmt, 179 va_list args) |
180{ 181 ehi->desc_len += vscnprintf(ehi->desc + ehi->desc_len, 182 ATA_EH_DESC_LEN - ehi->desc_len, 183 fmt, args); 184} 185 186/** 187 * __ata_ehi_push_desc - push error description without adding separator --- 1673 unchanged lines hidden (view full) --- 1861 else 1862 qc->err_mask |= tmp; 1863 } 1864 } 1865 1866 if (qc->flags & ATA_QCFLAG_SENSE_VALID) { 1867 int ret = scsi_check_sense(qc->scsicmd); 1868 /* | 180{ 181 ehi->desc_len += vscnprintf(ehi->desc + ehi->desc_len, 182 ATA_EH_DESC_LEN - ehi->desc_len, 183 fmt, args); 184} 185 186/** 187 * __ata_ehi_push_desc - push error description without adding separator --- 1673 unchanged lines hidden (view full) --- 1861 else 1862 qc->err_mask |= tmp; 1863 } 1864 } 1865 1866 if (qc->flags & ATA_QCFLAG_SENSE_VALID) { 1867 int ret = scsi_check_sense(qc->scsicmd); 1868 /* |
1869 * SUCCESS here means that the sense code could | 1869 * SUCCESS here means that the sense code could be |
1870 * evaluated and should be passed to the upper layers 1871 * for correct evaluation. | 1870 * evaluated and should be passed to the upper layers 1871 * for correct evaluation. |
1872 * FAILED means the sense code could not interpreted | 1872 * FAILED means the sense code could not be interpreted |
1873 * and the device would need to be reset. 1874 * NEEDS_RETRY and ADD_TO_MLQUEUE means that the 1875 * command would need to be retried. 1876 */ 1877 if (ret == NEEDS_RETRY || ret == ADD_TO_MLQUEUE) { 1878 qc->flags |= ATA_QCFLAG_RETRY; 1879 qc->err_mask |= AC_ERR_OTHER; 1880 } else if (ret != SUCCESS) { --- 2335 unchanged lines hidden --- | 1873 * and the device would need to be reset. 1874 * NEEDS_RETRY and ADD_TO_MLQUEUE means that the 1875 * command would need to be retried. 1876 */ 1877 if (ret == NEEDS_RETRY || ret == ADD_TO_MLQUEUE) { 1878 qc->flags |= ATA_QCFLAG_RETRY; 1879 qc->err_mask |= AC_ERR_OTHER; 1880 } else if (ret != SUCCESS) { --- 2335 unchanged lines hidden --- |