libata: let ATA_FLAG_PIO_POLLING use polling pio for ATA_PROT_NODATA
PATCH 1/1 libata: let ATA_FLAG_PIO_POLLING use polling pio for ATA_PROT_NODATA
Even if ATA_FLAG_PIO_POLLING is set, libata uses irq pio for the ATA_PROT_NODATA protocol. This patch let ATA_FLAG_PIO_POLLING use polling pio for the ATA_PROT_NODATA protocol.
---
Currently even if ATA_FLAG_PIO_POLLING is set, irq driven pio is used for the ATA_PROT_NODATA protocol. This won't cause problem for the current users of ATA_FLAG_PIO_POLLING (sata_mv, pdc_adma.c, etc.) since the older drivers can handle the PIO_NODATA interrupts just like the DMA interrupts.
However, pata_ixp4xx_cf, the new user of ATA_FLAG_PIO_POLLING, might have no interrupt at all. Using irq driven pio for the ATA_PROT_NODATA protocol will cause timeout for pata_ixp4xx_cf.
The patch is against libata-dev (2b25ec4b7b73f57f09c1262d2f2d4a567b18f44f). For your review, thanks.
drivers/ata/libata-core.c +1 -0
@@ -4975,6 +4975,7 @@ unsigned int ata_qc_issue_prot(struct atif (ap->flags &ATA_FLAG_PIO_POLLING ) {switch (qc->tf.protocol) {case ATA_PROT_PIO : +case ATA_PROT_NODATA :case ATA_PROT_ATAPI :case ATA_PROT_ATAPI_NODATA : qc->tf.flags |=ATA_TFLAG_POLLING ;
Jeff Garzik
AppliedQuoted 4 lines · Albert Lee
Even if
ATA_FLAG_PIO_POLLINGis set, libata uses irq pio for theATA_PROT_NODATAprotocol. This patch letATA_FLAG_PIO_POLLINGuse polling pio for theATA_PROT_NODATAprotocol.Signed-off-by Albert Lee <[email protected]>
applied