aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-05-31 05:27:29 -0400
committerTejun Heo <htejun@gmail.com>2006-05-31 05:27:29 -0400
commitabdda7331d469fa965167365f011d05e226008fb (patch)
treece2c66d01eba2b6a383080d6d3812884c6418e6a /include/linux
parentc6cf9e99d1de5ca6a08fb639bb73031ffe50d802 (diff)
[PATCH] libata-hp-prep: add flags and eh_info/context fields for hotplug
Add hotplug related flags and eh_info/context fields. Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/libata.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 2eb5828839e4..d4a668cf143b 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -131,6 +131,9 @@ enum {
131 131
132 ATA_DFLAG_PIO = (1 << 8), /* device currently in PIO mode */ 132 ATA_DFLAG_PIO = (1 << 8), /* device currently in PIO mode */
133 133
134 ATA_DFLAG_DETACH = (1 << 16),
135 ATA_DFLAG_DETACHED = (1 << 17),
136
134 ATA_DEV_UNKNOWN = 0, /* unknown device */ 137 ATA_DEV_UNKNOWN = 0, /* unknown device */
135 ATA_DEV_ATA = 1, /* ATA device */ 138 ATA_DEV_ATA = 1, /* ATA device */
136 ATA_DEV_ATA_UNSUP = 2, /* ATA device (unsupported) */ 139 ATA_DEV_ATA_UNSUP = 2, /* ATA device (unsupported) */
@@ -152,6 +155,9 @@ enum {
152 ATA_FLAG_PIO_POLLING = (1 << 9), /* use polling PIO if LLD 155 ATA_FLAG_PIO_POLLING = (1 << 9), /* use polling PIO if LLD
153 * doesn't handle PIO interrupts */ 156 * doesn't handle PIO interrupts */
154 ATA_FLAG_NCQ = (1 << 10), /* host supports NCQ */ 157 ATA_FLAG_NCQ = (1 << 10), /* host supports NCQ */
158 ATA_FLAG_HRST_TO_RESUME = (1 << 11), /* hardreset to resume phy */
159 ATA_FLAG_SKIP_D2H_BSY = (1 << 12), /* can't wait for the first D2H
160 * Register FIS clearing BSY */
155 161
156 ATA_FLAG_DEBUGMSG = (1 << 13), 162 ATA_FLAG_DEBUGMSG = (1 << 13),
157 ATA_FLAG_FLUSH_PORT_TASK = (1 << 14), /* flush port task */ 163 ATA_FLAG_FLUSH_PORT_TASK = (1 << 14), /* flush port task */
@@ -160,6 +166,9 @@ enum {
160 ATA_FLAG_EH_IN_PROGRESS = (1 << 16), /* EH in progress */ 166 ATA_FLAG_EH_IN_PROGRESS = (1 << 16), /* EH in progress */
161 ATA_FLAG_FROZEN = (1 << 17), /* port is frozen */ 167 ATA_FLAG_FROZEN = (1 << 17), /* port is frozen */
162 ATA_FLAG_RECOVERED = (1 << 18), /* recovery action performed */ 168 ATA_FLAG_RECOVERED = (1 << 18), /* recovery action performed */
169 ATA_FLAG_LOADING = (1 << 19), /* boot/loading probe */
170 ATA_FLAG_UNLOADING = (1 << 20), /* module is unloading */
171 ATA_FLAG_SCSI_HOTPLUG = (1 << 21), /* SCSI hotplug scheduled */
163 172
164 ATA_FLAG_DISABLED = (1 << 22), /* port is disabled, ignore it */ 173 ATA_FLAG_DISABLED = (1 << 22), /* port is disabled, ignore it */
165 ATA_FLAG_SUSPENDED = (1 << 23), /* port is suspended (power) */ 174 ATA_FLAG_SUSPENDED = (1 << 23), /* port is suspended (power) */
@@ -241,7 +250,9 @@ enum {
241 ATA_EH_RESET_MASK = ATA_EH_SOFTRESET | ATA_EH_HARDRESET, 250 ATA_EH_RESET_MASK = ATA_EH_SOFTRESET | ATA_EH_HARDRESET,
242 251
243 /* ata_eh_info->flags */ 252 /* ata_eh_info->flags */
244 ATA_EHI_DID_RESET = (1 << 0), /* already reset this port */ 253 ATA_EHI_HOTPLUGGED = (1 << 0), /* could have been hotplugged */
254
255 ATA_EHI_DID_RESET = (1 << 16), /* already reset this port */
245 256
246 /* max repeat if error condition is still set after ->error_handler */ 257 /* max repeat if error condition is still set after ->error_handler */
247 ATA_EH_MAX_REPEAT = 5, 258 ATA_EH_MAX_REPEAT = 5,
@@ -434,6 +445,10 @@ struct ata_eh_info {
434 unsigned int err_mask; /* port-wide err_mask */ 445 unsigned int err_mask; /* port-wide err_mask */
435 unsigned int action; /* ATA_EH_* action mask */ 446 unsigned int action; /* ATA_EH_* action mask */
436 unsigned int flags; /* ATA_EHI_* flags */ 447 unsigned int flags; /* ATA_EHI_* flags */
448
449 unsigned long hotplug_timestamp;
450 unsigned int probe_mask;
451
437 char desc[ATA_EH_DESC_LEN]; 452 char desc[ATA_EH_DESC_LEN];
438 int desc_len; 453 int desc_len;
439}; 454};
@@ -441,6 +456,8 @@ struct ata_eh_info {
441struct ata_eh_context { 456struct ata_eh_context {
442 struct ata_eh_info i; 457 struct ata_eh_info i;
443 int tries[ATA_MAX_DEVICES]; 458 int tries[ATA_MAX_DEVICES];
459 unsigned int classes[ATA_MAX_DEVICES];
460 unsigned int did_probe_mask;
444}; 461};
445 462
446struct ata_port { 463struct ata_port {