diff options
-rw-r--r-- | drivers/ata/libata-core.c | 5 | ||||
-rw-r--r-- | include/linux/libata.h | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index ac3d1204ea35..eb59f167d666 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -2556,12 +2556,11 @@ int ata_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev) | |||
2556 | * host channels are not permitted to do so. | 2556 | * host channels are not permitted to do so. |
2557 | */ | 2557 | */ |
2558 | if (used_dma && (ap->host->flags & ATA_HOST_SIMPLEX)) | 2558 | if (used_dma && (ap->host->flags & ATA_HOST_SIMPLEX)) |
2559 | ap->host->simplex_claimed = 1; | 2559 | ap->host->simplex_claimed = ap; |
2560 | 2560 | ||
2561 | /* step5: chip specific finalisation */ | 2561 | /* step5: chip specific finalisation */ |
2562 | if (ap->ops->post_set_mode) | 2562 | if (ap->ops->post_set_mode) |
2563 | ap->ops->post_set_mode(ap); | 2563 | ap->ops->post_set_mode(ap); |
2564 | |||
2565 | out: | 2564 | out: |
2566 | if (rc) | 2565 | if (rc) |
2567 | *r_failed_dev = dev; | 2566 | *r_failed_dev = dev; |
@@ -3444,7 +3443,7 @@ static void ata_dev_xfermask(struct ata_device *dev) | |||
3444 | "device is on DMA blacklist, disabling DMA\n"); | 3443 | "device is on DMA blacklist, disabling DMA\n"); |
3445 | } | 3444 | } |
3446 | 3445 | ||
3447 | if ((host->flags & ATA_HOST_SIMPLEX) && host->simplex_claimed) { | 3446 | if ((host->flags & ATA_HOST_SIMPLEX) && host->simplex_claimed != ap) { |
3448 | xfer_mask &= ~(ATA_MASK_MWDMA | ATA_MASK_UDMA); | 3447 | xfer_mask &= ~(ATA_MASK_MWDMA | ATA_MASK_UDMA); |
3449 | ata_dev_printk(dev, KERN_WARNING, "simplex DMA is claimed by " | 3448 | ata_dev_printk(dev, KERN_WARNING, "simplex DMA is claimed by " |
3450 | "other device, disabling DMA\n"); | 3449 | "other device, disabling DMA\n"); |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 045fb3a72d59..3f89d13c2e9a 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -403,8 +403,7 @@ struct ata_host { | |||
403 | void *private_data; | 403 | void *private_data; |
404 | const struct ata_port_operations *ops; | 404 | const struct ata_port_operations *ops; |
405 | unsigned long flags; | 405 | unsigned long flags; |
406 | int simplex_claimed; /* Keep seperate in case we | 406 | struct ata_port *simplex_claimed; /* channel owning the DMA */ |
407 | ever need to do this locked */ | ||
408 | struct ata_port *ports[0]; | 407 | struct ata_port *ports[0]; |
409 | }; | 408 | }; |
410 | 409 | ||