Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4aa9ab67 authored by Tejun Heo's avatar Tejun Heo Committed by Jeff Garzik
Browse files

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: default avatarTejun Heo <htejun@gmail.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 5851fadc
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -1625,8 +1625,14 @@ static int ata_eh_reset(struct ata_port *ap, int classify,
		rc = prereset(ap);
		rc = prereset(ap);
		if (rc) {
		if (rc) {
			if (rc == -ENOENT) {
			if (rc == -ENOENT) {
				ata_port_printk(ap, KERN_DEBUG, "port disabled. ignoring.\n");
				ata_port_printk(ap, KERN_DEBUG,
						"port disabled. ignoring.\n");
				ap->eh_context.i.action &= ~ATA_EH_RESET_MASK;
				ap->eh_context.i.action &= ~ATA_EH_RESET_MASK;

				for (i = 0; i < ATA_MAX_DEVICES; i++)
					classes[i] = ATA_DEV_NONE;

				rc = 0;
			} else
			} else
				ata_port_printk(ap, KERN_ERR,
				ata_port_printk(ap, KERN_ERR,
					"prereset failed (errno=%d)\n", rc);
					"prereset failed (errno=%d)\n", rc);