diff options
author | Tejun Heo <htejun@gmail.com> | 2006-05-15 20:57:37 +0900 |
---|---|---|
committer | Tejun Heo <htejun@gmail.com> | 2006-05-15 20:57:37 +0900 |
commit | 3adcebb2b59d590d572844815c906ca30477b14a (patch) | |
tree | e3103126556b5363ae7a30fc967d1ea4645de5a6 /drivers/scsi | |
parent | fe635c7e91036282e4fd0cc5b4eebc712e43270d (diff) |
[PATCH] libata: move ->set_mode() handling into ata_set_mode()
Move ->set_mode() handlng into ata_set_mode().
Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/libata-core.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index af55861a96e2..1efe8a1ba81d 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -1426,20 +1426,7 @@ static int ata_bus_probe(struct ata_port *ap) } /* configure transfer mode */ - if (ap->ops->set_mode) { - /* FIXME: make ->set_mode handle no device case and - * return error code and failing device on failure as - * ata_set_mode() does. - */ - for (i = 0; i < ATA_MAX_DEVICES; i++) - if (ata_dev_enabled(&ap->device[i])) { - ap->ops->set_mode(ap); - break; - } - rc = 0; - } else - rc = ata_set_mode(ap, &dev); - + rc = ata_set_mode(ap, &dev); if (rc) { down_xfermask = 1; goto fail; @@ -1997,6 +1984,20 @@ int ata_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev) struct ata_device *dev; int i, rc = 0, used_dma = 0, found = 0; + /* has private set_mode? */ + if (ap->ops->set_mode) { + /* FIXME: make ->set_mode handle no device case and + * return error code and failing device on failure. + */ + for (i = 0; i < ATA_MAX_DEVICES; i++) { + if (ata_dev_enabled(&ap->device[i])) { + ap->ops->set_mode(ap); + break; + } + } + return 0; + } + /* step 1: calculate xfer_mask */ for (i = 0; i < ATA_MAX_DEVICES; i++) { unsigned int pio_mask, dma_mask; |