aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2008-01-23 10:05:14 -0500
committerJeff Garzik <jgarzik@redhat.com>2008-04-17 15:44:16 -0400
commitb558edddb1c42c70a30cfe494984d4be409f7b2b (patch)
treeb03275d15675a519de7d4edde709892f885a5fa0 /include/linux/libata.h
parent8cebf274dd1c955a6e03385a85fd6569ce445946 (diff)
libata: kill ata_ehi_schedule_probe()
ata_ehi_schedule_probe() was created to hide details of link-resuming reset magic. Now that all the softreset workarounds are gone, scheduling probe is very simple - set probe_mask and request RESET. Kill ata_ehi_schedule_probe() and open code it. This also increases consistency as ata_ehi_schedule_probe() couldn't cover individual device probings so they were open-coded even when the helper existed. While at it, define ATA_ALL_DEVICES as mask of all possible devices on a link and always use it when requesting probe on link level for simplicity and consistency. Setting extra bits in the probe_mask doesn't hurt anybody. Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r--include/linux/libata.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 6eec11957e54..bc60132c7d33 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -122,6 +122,8 @@ enum {
122 122
123 ATAPI_MAX_DRAIN = 16 << 10, 123 ATAPI_MAX_DRAIN = 16 << 10,
124 124
125 ATA_ALL_DEVICES = (1 << ATA_MAX_DEVICES) - 1,
126
125 ATA_SHT_EMULATED = 1, 127 ATA_SHT_EMULATED = 1,
126 ATA_SHT_CMD_PER_LUN = 1, 128 ATA_SHT_CMD_PER_LUN = 1,
127 ATA_SHT_THIS_ID = -1, 129 ATA_SHT_THIS_ID = -1,
@@ -1089,17 +1091,11 @@ extern void ata_ehi_push_desc(struct ata_eh_info *ehi, const char *fmt, ...)
1089 __attribute__ ((format (printf, 2, 3))); 1091 __attribute__ ((format (printf, 2, 3)));
1090extern void ata_ehi_clear_desc(struct ata_eh_info *ehi); 1092extern void ata_ehi_clear_desc(struct ata_eh_info *ehi);
1091 1093
1092static inline void ata_ehi_schedule_probe(struct ata_eh_info *ehi)
1093{
1094 ehi->action |= ATA_EH_RESET;
1095 ehi->probe_mask |= (1 << ATA_MAX_DEVICES) - 1;
1096}
1097
1098static inline void ata_ehi_hotplugged(struct ata_eh_info *ehi) 1094static inline void ata_ehi_hotplugged(struct ata_eh_info *ehi)
1099{ 1095{
1100 ata_ehi_schedule_probe(ehi); 1096 ehi->probe_mask |= (1 << ATA_MAX_DEVICES) - 1;
1101 ehi->flags |= ATA_EHI_HOTPLUGGED; 1097 ehi->flags |= ATA_EHI_HOTPLUGGED;
1102 ehi->action |= ATA_EH_ENABLE_LINK; 1098 ehi->action |= ATA_EH_RESET | ATA_EH_ENABLE_LINK;
1103 ehi->err_mask |= AC_ERR_ATA_BUS; 1099 ehi->err_mask |= AC_ERR_ATA_BUS;
1104} 1100}
1105 1101