linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Albert Lee <albertcc@tw.ibm.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
	Doug Maxey <dwm@maxeymade.com>,
	IDE Linux <linux-ide@vger.kernel.org>
Subject: [PATCH 2/2] libata: Remove 'case ATA_PROT_ATAPI' in ata_host_intr()
Date: Thu, 23 Jun 2005 17:13:08 +0800	[thread overview]
Message-ID: <42BA7D24.2070203@tw.ibm.com> (raw)
In-Reply-To: <42BA775B.1050601@tw.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 773 bytes --]

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=111822488916620&w=2 )

  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>

[-- Attachment #2: patch2.diff --]
[-- Type: text/plain, Size: 382 bytes --]

--- 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);

  parent reply	other threads:[~2005-06-23  9:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-23  8:48 [PATCH 0/2] libata: PIO race condition fixes Albert Lee
2005-06-23  9:09 ` Albert Lee
2005-06-23  9:13 ` Albert Lee [this message]
2005-06-24  3:47 ` [PATCH 1/2] libata: Fix race condition in ata_pio_task() Albert Lee
2005-06-27  9:40   ` Albert Lee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42BA7D24.2070203@tw.ibm.com \
    --to=albertcc@tw.ibm.com \
    --cc=bzolnier@gmail.com \
    --cc=dwm@maxeymade.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).