diff options
author | Tejun Heo <tj@kernel.org> | 2008-11-03 06:04:37 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-12-28 22:43:21 -0500 |
commit | ece180d1cfe5fa751eaa85bf796cf28b2150af15 (patch) | |
tree | aca9d485036858ed3f1859e679473cebd3476845 /include/linux/libata.h | |
parent | ad74e4c18d0962397314460d0da312e72c8bd02d (diff) |
libata: perform port detach in EH
ata_port_detach() first made sure EH saw ATA_PFLAG_UNLOADING and then
assumed EH context belongs to it and performed detach operation
itself. However, UNLOADING doesn't disable all of EH and this could
lead to problems including triggering WARN_ON()'s in EH path.
This patch makes port detach behave more like other EH actions such
that ata_port_detach() requests EH to detach and waits for completion.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r-- | include/linux/libata.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 3b2a0c6444ee..3449de597eff 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -213,10 +213,11 @@ enum { | |||
213 | ATA_PFLAG_FROZEN = (1 << 2), /* port is frozen */ | 213 | ATA_PFLAG_FROZEN = (1 << 2), /* port is frozen */ |
214 | ATA_PFLAG_RECOVERED = (1 << 3), /* recovery action performed */ | 214 | ATA_PFLAG_RECOVERED = (1 << 3), /* recovery action performed */ |
215 | ATA_PFLAG_LOADING = (1 << 4), /* boot/loading probe */ | 215 | ATA_PFLAG_LOADING = (1 << 4), /* boot/loading probe */ |
216 | ATA_PFLAG_UNLOADING = (1 << 5), /* module is unloading */ | ||
217 | ATA_PFLAG_SCSI_HOTPLUG = (1 << 6), /* SCSI hotplug scheduled */ | 216 | ATA_PFLAG_SCSI_HOTPLUG = (1 << 6), /* SCSI hotplug scheduled */ |
218 | ATA_PFLAG_INITIALIZING = (1 << 7), /* being initialized, don't touch */ | 217 | ATA_PFLAG_INITIALIZING = (1 << 7), /* being initialized, don't touch */ |
219 | ATA_PFLAG_RESETTING = (1 << 8), /* reset in progress */ | 218 | ATA_PFLAG_RESETTING = (1 << 8), /* reset in progress */ |
219 | ATA_PFLAG_UNLOADING = (1 << 9), /* driver is being unloaded */ | ||
220 | ATA_PFLAG_UNLOADED = (1 << 10), /* driver is unloaded */ | ||
220 | 221 | ||
221 | ATA_PFLAG_SUSPENDED = (1 << 17), /* port is suspended (power) */ | 222 | ATA_PFLAG_SUSPENDED = (1 << 17), /* port is suspended (power) */ |
222 | ATA_PFLAG_PM_PENDING = (1 << 18), /* PM operation pending */ | 223 | ATA_PFLAG_PM_PENDING = (1 << 18), /* PM operation pending */ |