aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAlbert Lee <albertcc@tw.ibm.com>2006-05-18 23:43:04 -0400
committerJeff Garzik <jeff@garzik.org>2006-05-20 00:37:01 -0400
commit3655d1d323386e001c786af10f0a3f39f438f03b (patch)
tree16fd30cc6d255e5aaad4a5372cb8ec140c5b9736 /include
parent3d71b3b0b634b1a5ba8632fd9ec998e0e4aedfdb (diff)
[PATCH] libata: Fix the HSM error_mask mapping (was: Re: libata-tj and SMART)
Fix the HSM error_mask mapping. Changes: - Better mapping in ac_err_mask() - In HSM_ST_FIRST ans HSM_ST state, check ATA_ERR|ATA_DF and map it to AC_ERR_DEV instead of AC_ERR_HSM. - In HSM_ST_FIRST and HSM_ST state, map DRQ=1 ERR=1 to AC_ERR_HSM. - For PIO data in and DRQ=1 ERR=1, add check after the junk data block is read. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/libata.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 2803ab8e9243..c51502c047a4 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -1062,7 +1062,7 @@ static inline int ata_try_flush_cache(const struct ata_device *dev)
1062 1062
1063static inline unsigned int ac_err_mask(u8 status) 1063static inline unsigned int ac_err_mask(u8 status)
1064{ 1064{
1065 if (status & ATA_BUSY) 1065 if (status & (ATA_BUSY | ATA_DRQ))
1066 return AC_ERR_HSM; 1066 return AC_ERR_HSM;
1067 if (status & (ATA_ERR | ATA_DF)) 1067 if (status & (ATA_ERR | ATA_DF))
1068 return AC_ERR_DEV; 1068 return AC_ERR_DEV;