aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-eh.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2008-03-05 23:09:34 -0500
committerJeff Garzik <jeff@garzik.org>2008-03-10 20:50:34 -0400
commiteec59f76e9010e22d5736cf1907af4a92067522e (patch)
treed7b4aeae7ee26618f33001c0bbb1a68f28bdc26f /drivers/ata/libata-eh.c
parent7f5e4e8d94b6013f93716bc42a1296f95d1059dc (diff)
libata: allow LLDs w/o any reset method
Some old SFF controllers don't have any way to reset the channel. Currently, this isn't supported and libata EH causes an oops. Allow LLDs w/o any reset method and just assume ATA class in such cases. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r--drivers/ata/libata-eh.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 698ce2cea52c..681252fd8143 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2150,6 +2150,15 @@ int ata_eh_reset(struct ata_link *link, int classify,
2150 ap->ops->set_piomode(ap, dev); 2150 ap->ops->set_piomode(ap, dev);
2151 } 2151 }
2152 2152
2153 if (!softreset && !hardreset) {
2154 if (verbose)
2155 ata_link_printk(link, KERN_INFO, "no reset method "
2156 "available, skipping reset\n");
2157 if (!(lflags & ATA_LFLAG_ASSUME_CLASS))
2158 lflags |= ATA_LFLAG_ASSUME_ATA;
2159 goto done;
2160 }
2161
2153 /* Determine which reset to use and record in ehc->i.action. 2162 /* Determine which reset to use and record in ehc->i.action.
2154 * prereset() may examine and modify it. 2163 * prereset() may examine and modify it.
2155 */ 2164 */
@@ -2254,6 +2263,7 @@ int ata_eh_reset(struct ata_link *link, int classify,
2254 lflags |= ATA_LFLAG_ASSUME_ATA; 2263 lflags |= ATA_LFLAG_ASSUME_ATA;
2255 } 2264 }
2256 2265
2266 done:
2257 ata_link_for_each_dev(dev, link) { 2267 ata_link_for_each_dev(dev, link) {
2258 /* After the reset, the device state is PIO 0 and the 2268 /* After the reset, the device state is PIO 0 and the
2259 * controller state is undefined. Reset also wakes up 2269 * controller state is undefined. Reset also wakes up