diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2006-03-27 19:46:37 +0200 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-03-30 02:30:27 +0200 |
commit | e35a9e01f2a504871e70576a9e11dbe4d8dee456 (patch) | |
tree | 4761c2d8b9d827d95cc531376e5c02666734ecf6 | |
parent | [PATCH] libata: BMDMA handling updates (diff) | |
download | linux-e35a9e01f2a504871e70576a9e11dbe4d8dee456.tar.xz linux-e35a9e01f2a504871e70576a9e11dbe4d8dee456.zip |
[PATCH] libata: Add ->set_mode hook for odd drivers
Some hardware doesn't want the usual mode setup logic running. This
allows the hardware driver to replace it for special cases in the least
invasive way possible.
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r-- | drivers/scsi/libata-core.c | 6 | ||||
-rw-r--r-- | include/linux/libata.h | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 86310562da8b..10933cb722e6 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -1409,7 +1409,11 @@ static int ata_bus_probe(struct ata_port *ap) if (!found) goto err_out_disable; - ata_set_mode(ap); + if (ap->ops->set_mode) + ap->ops->set_mode(ap); + else + ata_set_mode(ap); + if (ap->flags & ATA_FLAG_PORT_DISABLED) goto err_out_disable; diff --git a/include/linux/libata.h b/include/linux/libata.h index a5c213ce97c9..6a9316cbb70b 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -433,6 +433,7 @@ struct ata_port_operations { void (*dev_select)(struct ata_port *ap, unsigned int device); void (*phy_reset) (struct ata_port *ap); /* obsolete */ + void (*set_mode) (struct ata_port *ap); int (*probe_reset) (struct ata_port *ap, unsigned int *classes); void (*post_set_mode) (struct ata_port *ap); |