From 0b8efb0a16a1915c507db5a9b9fb5ede082a68a2 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Fri, 24 Mar 2006 15:25:31 +0900 Subject: [PATCH] libata: implement ata_dev_disable() This patch implements ata_dev_disable() which prints a warning message and takes @dev offline. Currently, this is done by explicitly incrementing dev->class with case-by-case warning messages. Giving user clear indication when libata gives up will be more important as libata will be doing more retries. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- drivers/scsi/libata-core.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 9cd9053e78f..d1530b9fd8e 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -394,6 +394,15 @@ static const char *ata_mode_string(unsigned int xfer_mask) return ""; } +static void ata_dev_disable(struct ata_port *ap, struct ata_device *dev) +{ + if (ata_dev_present(dev)) { + printk(KERN_WARNING "ata%u: dev %u disabled\n", + ap->id, dev->devno); + dev->class++; + } +} + /** * ata_pio_devchk - PATA device presence detection * @ap: ATA channel to examine -- cgit v1.2.3