aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-03-24 01:25:31 -0500
committerJeff Garzik <jeff@garzik.org>2006-03-24 09:39:57 -0500
commit0b8efb0a16a1915c507db5a9b9fb5ede082a68a2 (patch)
tree93cc3621d7c69ec55448e18d985369d327712e57 /drivers/scsi
parent1f7dd3e9d62b25c7b79f913f37c2242a61295de4 (diff)
[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 <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/libata-core.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 9cd9053e78fe..d1530b9fd8e7 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)
394 return "<n/a>"; 394 return "<n/a>";
395} 395}
396 396
397static void ata_dev_disable(struct ata_port *ap, struct ata_device *dev)
398{
399 if (ata_dev_present(dev)) {
400 printk(KERN_WARNING "ata%u: dev %u disabled\n",
401 ap->id, dev->devno);
402 dev->class++;
403 }
404}
405
397/** 406/**
398 * ata_pio_devchk - PATA device presence detection 407 * ata_pio_devchk - PATA device presence detection
399 * @ap: ATA channel to examine 408 * @ap: ATA channel to examine