diff options
author | Tejun Heo <tj@kernel.org> | 2009-01-29 06:31:30 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2009-02-02 23:03:00 -0500 |
commit | 678afac678061ee41bc3007885003c125912a8e2 (patch) | |
tree | 134b4227b0826d14810f0d617090d5b7fe5e4369 /drivers/ata/libata-eh.c | |
parent | d89293abd95bfd7dd9229087d6c30c1464c5ac83 (diff) |
libata: move ata_dev_disable() to libata-eh.c
ata_dev_disable() is about to be more tightly integrated into EH
logic. Move it to libata-eh.c.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r-- | drivers/ata/libata-eh.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index c15572d22a3b..aafe82bf5e2e 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
@@ -1176,6 +1176,27 @@ void ata_eh_qc_retry(struct ata_queued_cmd *qc) | |||
1176 | } | 1176 | } |
1177 | 1177 | ||
1178 | /** | 1178 | /** |
1179 | * ata_dev_disable - disable ATA device | ||
1180 | * @dev: ATA device to disable | ||
1181 | * | ||
1182 | * Disable @dev. | ||
1183 | * | ||
1184 | * Locking: | ||
1185 | * EH context. | ||
1186 | */ | ||
1187 | void ata_dev_disable(struct ata_device *dev) | ||
1188 | { | ||
1189 | if (!ata_dev_enabled(dev)) | ||
1190 | return; | ||
1191 | |||
1192 | if (ata_msg_drv(dev->link->ap)) | ||
1193 | ata_dev_printk(dev, KERN_WARNING, "disabled\n"); | ||
1194 | ata_acpi_on_disable(dev); | ||
1195 | ata_down_xfermask_limit(dev, ATA_DNXFER_FORCE_PIO0 | ATA_DNXFER_QUIET); | ||
1196 | dev->class++; | ||
1197 | } | ||
1198 | |||
1199 | /** | ||
1179 | * ata_eh_detach_dev - detach ATA device | 1200 | * ata_eh_detach_dev - detach ATA device |
1180 | * @dev: ATA device to detach | 1201 | * @dev: ATA device to detach |
1181 | * | 1202 | * |