Skip to content

Commit

Permalink
[PATCH] libata: implement ata_dev_disable()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Mar 24, 2006
1 parent 1f7dd3e commit 0b8efb0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,15 @@ static const char *ata_mode_string(unsigned int xfer_mask)
return "<n/a>";
}

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
Expand Down

0 comments on commit 0b8efb0

Please sign in to comment.