diff options
-rw-r--r-- | drivers/ata/libata-eh.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index ecbb8e90cb8..d94359a24d4 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -2137,9 +2137,14 @@ int ata_eh_reset(struct ata_link *link, int classify, if (hardreset) { reset = hardreset; ehc->i.action = ATA_EH_HARDRESET; - } else { + } else if (softreset) { reset = softreset; ehc->i.action = ATA_EH_SOFTRESET; + } else { + ata_link_printk(link, KERN_ERR, "BUG: no reset method, " + "please report to linux-ide@vger.kernel.org\n"); + dump_stack(); + return -EINVAL; } if (prereset) { |