| From: |
| Albert Lee <albertcc@tw.ibm.com> |
| To: |
| Jeff Garzik <jgarzik@pobox.com> |
| Subject: |
| [PATCH 2/2] libata: Remove 'case ATA_PROT_ATAPI' in ata_host_intr() |
| Date: |
| Thu, 23 Jun 2005 17:13:08 +0800 |
| Cc: |
| Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
Doug Maxey <dwm@maxeymade.com>,
IDE Linux <linux-ide@vger.kernel.org> |
Hi Jeff,
This is patch 2/2.
Problem:
Given ATA_PROT_ATAPI is handled with interrupt off.
=> If any interrupt occurs with protocol ATA_PROT_ATAPI, it is not our interrupt and should be
ignored.
(This problem is previously indicated by Bart as in:
http://marc.theaimsgroup.com/?l=linux-ide&m=111822488... )
In ata_pio_complete(), we have the following code:
ata_irq_on(ap);
// interrupt here might cause double completion of the command.
ata_qc_complete(qc, drv_stat);
So, there might be race condition between ata_pio_complete() and interrupt handler.
Changes:
- Remove 'case ATA_PROT_ATAPI' in ata_host_intr().
Attached please find the patch against the linux-2.6.git tree for your review. Thanks.
Albert
Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
--- linux/drivers/scsi/libata-core.c 2005-06-23 15:57:16.000000000 +0800
+++ linux-intr/drivers/scsi/libata-core.c 2005-06-23 16:06:48.000000000 +0800
@@ -3506,7 +3506,6 @@
case ATA_PROT_DMA:
case ATA_PROT_ATAPI_DMA:
- case ATA_PROT_ATAPI:
/* check status of DMA engine */
host_stat = ap->ops->bmdma_status(ap);
VPRINTK("ata%u: host_stat 0x%X\n", ap->id, host_stat);