Skip to content

Commit

Permalink
[PATCH] libata-dev: ata_check_atapi_dma() fix for ATA_FLAG_PIO_POLLIN…
Browse files Browse the repository at this point in the history
…G LLDDs

ata_check_atapi_dma() fix for LLDDs with the ATA_FLAG_PIO_POLLING flag.

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Albert Lee authored and Jeff Garzik committed Mar 29, 2006
1 parent 27cdade commit c2bbc55
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2883,6 +2883,15 @@ int ata_check_atapi_dma(struct ata_queued_cmd *qc)
if (ap->ops->check_atapi_dma)
rc = ap->ops->check_atapi_dma(qc);

/* We don't support polling DMA.
* Use PIO if the LLDD handles only interrupts in
* the HSM_ST_LAST state and the ATAPI device
* generates CDB interrupts.
*/
if ((ap->flags & ATA_FLAG_PIO_POLLING) &&
(qc->dev->flags & ATA_DFLAG_CDB_INTR))
rc = 1;

return rc;
}
/**
Expand Down Expand Up @@ -4038,6 +4047,7 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc)
break;
case ATA_PROT_ATAPI_DMA:
if (qc->dev->flags & ATA_DFLAG_CDB_INTR)
/* see ata_check_atapi_dma() */
BUG();
break;
default:
Expand Down

0 comments on commit c2bbc55

Please sign in to comment.