diff options
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/libata-core.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index df483adc3f75..425ab1493fd3 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -2943,6 +2943,14 @@ static int ata_dma_blacklisted(const struct ata_device *dev) | |||
2943 | unsigned int nlen, rlen; | 2943 | unsigned int nlen, rlen; |
2944 | int i; | 2944 | int i; |
2945 | 2945 | ||
2946 | /* We don't support polling DMA. | ||
2947 | * DMA blacklist those ATAPI devices with CDB-intr (and use PIO) | ||
2948 | * if the LLDD handles only interrupts in the HSM_ST_LAST state. | ||
2949 | */ | ||
2950 | if ((dev->ap->flags & ATA_FLAG_PIO_POLLING) && | ||
2951 | (dev->flags & ATA_DFLAG_CDB_INTR)) | ||
2952 | return 1; | ||
2953 | |||
2946 | ata_id_string(dev->id, model_num, ATA_ID_PROD_OFS, | 2954 | ata_id_string(dev->id, model_num, ATA_ID_PROD_OFS, |
2947 | sizeof(model_num)); | 2955 | sizeof(model_num)); |
2948 | ata_id_string(dev->id, model_rev, ATA_ID_FW_REV_OFS, | 2956 | ata_id_string(dev->id, model_rev, ATA_ID_FW_REV_OFS, |
@@ -3235,15 +3243,6 @@ int ata_check_atapi_dma(struct ata_queued_cmd *qc) | |||
3235 | if (ap->ops->check_atapi_dma) | 3243 | if (ap->ops->check_atapi_dma) |
3236 | rc = ap->ops->check_atapi_dma(qc); | 3244 | rc = ap->ops->check_atapi_dma(qc); |
3237 | 3245 | ||
3238 | /* We don't support polling DMA. | ||
3239 | * Use PIO if the LLDD handles only interrupts in | ||
3240 | * the HSM_ST_LAST state and the ATAPI device | ||
3241 | * generates CDB interrupts. | ||
3242 | */ | ||
3243 | if ((ap->flags & ATA_FLAG_PIO_POLLING) && | ||
3244 | (qc->dev->flags & ATA_DFLAG_CDB_INTR)) | ||
3245 | rc = 1; | ||
3246 | |||
3247 | return rc; | 3246 | return rc; |
3248 | } | 3247 | } |
3249 | /** | 3248 | /** |
@@ -4551,7 +4550,7 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc) | |||
4551 | break; | 4550 | break; |
4552 | case ATA_PROT_ATAPI_DMA: | 4551 | case ATA_PROT_ATAPI_DMA: |
4553 | if (qc->dev->flags & ATA_DFLAG_CDB_INTR) | 4552 | if (qc->dev->flags & ATA_DFLAG_CDB_INTR) |
4554 | /* see ata_check_atapi_dma() */ | 4553 | /* see ata_dma_blacklisted() */ |
4555 | BUG(); | 4554 | BUG(); |
4556 | break; | 4555 | break; |
4557 | default: | 4556 | default: |