* PATCH: Add ->set_mode hook for odd drivers
@ 2006-03-27 17:46 Alan Cox
2006-03-30 0:31 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Alan Cox @ 2006-03-27 17:46 UTC (permalink / raw)
To: linux-kernel, jgarzik
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> (and the previous diff)
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 1cb9813..18d5239 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -1409,7 +1415,11 @@ static int ata_bus_probe(struct ata_port
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 9fcc061..26e0351 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -429,6 +438,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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: PATCH: Add ->set_mode hook for odd drivers
2006-03-27 17:46 PATCH: Add ->set_mode hook for odd drivers Alan Cox
@ 2006-03-30 0:31 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2006-03-30 0:31 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-kernel
Alan Cox wrote:
> 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> (and the previous diff)
applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-03-30 0:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-27 17:46 PATCH: Add ->set_mode hook for odd drivers Alan Cox
2006-03-30 0:31 ` Jeff Garzik
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.