[PATCH 1/1] libata: let ATA_FLAG_PIO_POLLING use polling pio for ATA_PROT_NODATA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Signed-off-by: Albert Lee <albertcc@xxxxxxxxxx>
---
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.

--- libata-dev/drivers/ata/libata-core.c	2006-12-07 11:05:23.000000000 +0800
+++ pio_polling/drivers/ata/libata-core.c	2006-12-07 11:10:21.000000000 +0800
@@ -4975,6 +4975,7 @@ unsigned int ata_qc_issue_prot(struct at
 	if (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;


-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux