diff options
author | Tejun Heo <htejun@gmail.com> | 2007-03-12 04:24:08 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-03-19 11:55:43 -0400 |
commit | 4aa9ab67fb9c0dfdb1692f4ec413120832a22ddc (patch) | |
tree | 06b726e351b36e07434359a4d41d91de42891bcb /drivers/ata | |
parent | 5851fadce8824d5d4b8fd02c22ae098401f6489e (diff) |
libata: don't whine if ->prereset() returns -ENOENT
->prereset() returns -ENOENT to tell libata that the port is empty and
reset sequencing should be stopped. This is not an error condition.
Update ata_eh_reset() such that it sets device classes to ATA_DEV_NONE
and return success in on -ENOENT. This makes spurious error message
go away.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/libata-eh.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 7349c3dbf774..361953a50203 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
@@ -1625,8 +1625,14 @@ static int ata_eh_reset(struct ata_port *ap, int classify, | |||
1625 | rc = prereset(ap); | 1625 | rc = prereset(ap); |
1626 | if (rc) { | 1626 | if (rc) { |
1627 | if (rc == -ENOENT) { | 1627 | if (rc == -ENOENT) { |
1628 | ata_port_printk(ap, KERN_DEBUG, "port disabled. ignoring.\n"); | 1628 | ata_port_printk(ap, KERN_DEBUG, |
1629 | "port disabled. ignoring.\n"); | ||
1629 | ap->eh_context.i.action &= ~ATA_EH_RESET_MASK; | 1630 | ap->eh_context.i.action &= ~ATA_EH_RESET_MASK; |
1631 | |||
1632 | for (i = 0; i < ATA_MAX_DEVICES; i++) | ||
1633 | classes[i] = ATA_DEV_NONE; | ||
1634 | |||
1635 | rc = 0; | ||
1630 | } else | 1636 | } else |
1631 | ata_port_printk(ap, KERN_ERR, | 1637 | ata_port_printk(ap, KERN_ERR, |
1632 | "prereset failed (errno=%d)\n", rc); | 1638 | "prereset failed (errno=%d)\n", rc); |