}
/* 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;
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;