From: Tejun Heo <htejun@gmail.com>
To: David Greaves <david@dgreaves.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
xfs@oss.sgi.com,
"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
netdev@oss.sgi.com, linux-pm <linux-pm@lists.osdl.org>,
Neil Brown <neilb@suse.de>,
mikpe@it.uu.se
Subject: [PATCH] sata_promise: use TF interface for polling NODATA commands
Date: Wed, 6 Jun 2007 19:18:37 +0900 [thread overview]
Message-ID: <20070606101837.GC29122@htj.dyndns.org> (raw)
In-Reply-To: <46667160.80905@gmail.com>
sata_promise uses two different command modes - packet and TF. Packet
mode is intelligent low-overhead mode while TF is the same old
taskfile interface. As with other advanced interface (ahci/sil24),
ATA_TFLAG_POLLING has no effect in packet mode. However, PIO commands
are issued using TF interface in polling mode, so pdc_interrupt()
considers interrupts spurious if ATA_TFLAG_POLLING is set.
This is broken for polling NODATA commands because command is issued
using packet mode but the interrupt handler ignores it due to
ATA_TFLAG_POLLING. Fix pdc_qc_issue_prot() such that ATA/ATAPI NODATA
commands are issued using TF interface if ATA_TFLAG_POLLING is set.
This patch fixes detection failure introduced by polling SETXFERMODE.
Signed-off-by: Tejun Heo <htejun@gmail.com>
---
David, please verify this patch. Mikael, does this look okay? Please
push this upstream after David and Mikael's ack.
Thanks.
drivers/ata/sata_promise.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/ata/sata_promise.c b/drivers/ata/sata_promise.c
index 2b924a6..6dc0b01 100644
--- a/drivers/ata/sata_promise.c
+++ b/drivers/ata/sata_promise.c
@@ -784,9 +784,12 @@ static unsigned int pdc_qc_issue_prot(struct ata_queued_cmd *qc)
if (qc->dev->flags & ATA_DFLAG_CDB_INTR)
break;
/*FALLTHROUGH*/
+ case ATA_PROT_NODATA:
+ if (qc->tf.flags & ATA_TFLAG_POLLING)
+ break;
+ /*FALLTHROUGH*/
case ATA_PROT_ATAPI_DMA:
case ATA_PROT_DMA:
- case ATA_PROT_NODATA:
pdc_packet_start(qc);
return 0;
@@ -800,7 +803,7 @@ static unsigned int pdc_qc_issue_prot(struct ata_queued_cmd *qc)
static void pdc_tf_load_mmio(struct ata_port *ap, const struct ata_taskfile *tf)
{
WARN_ON (tf->protocol == ATA_PROT_DMA ||
- tf->protocol == ATA_PROT_NODATA);
+ tf->protocol == ATA_PROT_ATAPI_DMA);
ata_tf_load(ap, tf);
}
@@ -808,7 +811,7 @@ static void pdc_tf_load_mmio(struct ata_port *ap, const struct ata_taskfile *tf)
static void pdc_exec_command_mmio(struct ata_port *ap, const struct ata_taskfile *tf)
{
WARN_ON (tf->protocol == ATA_PROT_DMA ||
- tf->protocol == ATA_PROT_NODATA);
+ tf->protocol == ATA_PROT_ATAPI_DMA);
ata_exec_command(ap, tf);
}
next prev parent reply other threads:[~2007-06-06 10:18 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <46608E3F.4060201@dgreaves.com>
2007-06-01 21:42 ` 2.6.22-rc3 hibernate(?) disables skge wol Rafael J. Wysocki
2007-06-01 22:37 ` 2.6.22-rc3 hibernate(?) fails totally - regression David Greaves
2007-06-01 23:22 ` Rafael J. Wysocki
2007-06-02 22:31 ` David Greaves
2007-06-02 22:46 ` Linus Torvalds
2007-06-03 15:03 ` David Greaves
2007-06-06 8:33 ` Tejun Heo
2007-06-06 10:18 ` Tejun Heo [this message]
2007-06-06 10:19 ` [PATCH] sata_promise: use TF interface for polling NODATA commands Tejun Heo
2007-06-06 10:39 ` 2.6.22-rc3 hibernate(?) fails totally - regression (xfs on raid6) David Greaves
2007-06-07 5:53 ` Tejun Heo
2007-06-07 10:30 ` David Greaves
2007-06-07 11:07 ` David Chinner
2007-06-07 13:59 ` David Greaves
2007-06-07 22:28 ` David Chinner
2007-06-08 19:09 ` David Greaves
2007-06-12 18:43 ` Linus Torvalds
2007-06-13 11:16 ` David Greaves
2007-06-13 21:04 ` Linus Torvalds
2007-06-13 21:22 ` Jeff Garzik
2007-06-13 22:02 ` David Greaves
2007-06-13 22:12 ` Linus Torvalds
2007-06-13 23:15 ` Rafael J. Wysocki
2007-06-14 14:21 ` Tejun Heo
2007-06-14 15:10 ` Tejun Heo
2007-06-15 9:42 ` [PATCH] block: always requeue !fs requests at the front Tejun Heo
2007-06-15 11:05 ` Jens Axboe
2007-06-15 11:17 ` Tejun Heo
2007-06-15 11:21 ` Jens Axboe
2007-06-15 15:08 ` Jeff Garzik
2007-06-16 19:54 ` Christoph Hellwig
2007-06-17 7:29 ` Jens Axboe
2007-06-17 8:03 ` Tejun Heo
2007-06-15 13:58 ` David Greaves
2007-06-14 15:19 ` 2.6.22-rc3 hibernate(?) fails totally - regression (xfs on raid6) David Greaves
2007-06-14 0:28 ` David Chinner
2007-06-12 12:31 ` David Greaves
2007-06-10 18:43 ` Pavel Machek
2007-06-12 18:00 ` David Greaves
2007-06-12 21:31 ` Pavel Machek
2007-06-07 13:45 ` Duane Griffin
2007-06-07 14:00 ` David Greaves
2007-06-07 14:05 ` Tejun Heo
2007-06-07 14:36 ` Mark Lord
2007-06-07 15:20 ` David Greaves
2007-06-07 16:58 ` Rafael J. Wysocki
2007-06-07 20:12 ` Pavel Machek
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=20070606101837.GC29122@htj.dyndns.org \
--to=htejun@gmail.com \
--cc=david@dgreaves.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.osdl.org \
--cc=mikpe@it.uu.se \
--cc=neilb@suse.de \
--cc=netdev@oss.sgi.com \
--cc=rjw@sisk.pl \
--cc=torvalds@linux-foundation.org \
--cc=xfs@oss.sgi.com \
/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