Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29287
b: refs/heads/master
c: 3adcebb
h: refs/heads/master
i:
  29285: 27fbd00
  29283: dfd4040
  29279: b8b5e90
v: v3
  • Loading branch information
Tejun Heo committed May 15, 2006
1 parent 0719d38 commit 939d093
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fe635c7e91036282e4fd0cc5b4eebc712e43270d
refs/heads/master: 3adcebb2b59d590d572844815c906ca30477b14a
29 changes: 15 additions & 14 deletions trunk/drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 939d093

Please sign in to comment.