[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>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user