From: Bryan Wu <cooloney@kernel.org>
To: jgarzik@pobox.com
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
Sonic Zhang <sonic.zhang@analog.com>,
Bryan Wu <cooloney@kernel.org>
Subject: [PATCH 1/1] [libata] pata-bf54x: Set ATAPI host state machine to control IDE device terminate sequence.
Date: Mon, 12 May 2008 12:12:16 +0800 [thread overview]
Message-ID: <1210565536-4026-1-git-send-email-cooloney@kernel.org> (raw)
From: Sonic Zhang <sonic.zhang@analog.com>
Set ATAPI host state machine to control IDE device terminate sequence.
Some IDE harddisk may assert terminate sequence in the middle of a
formal DMA transaction and resume later. Bit DETECT_TERM in ATAPI_CTRL
register determines whether the ATAPI host state machine or the kernel
driver should take care of this case.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
---
drivers/ata/pata_bf54x.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/ata/pata_bf54x.c b/drivers/ata/pata_bf54x.c
index 9ab8973..5551610 100644
--- a/drivers/ata/pata_bf54x.c
+++ b/drivers/ata/pata_bf54x.c
@@ -911,7 +911,10 @@ static void bfin_bmdma_start(struct ata_queued_cmd *qc)
/* Reset all transfer count */
ATAPI_SET_CONTROL(base, ATAPI_GET_CONTROL(base) | TFRCNT_RST);
- /* Set transfer length to buffer len */
+ /* Set ATAPI state machine contorl in terminate sequence */
+ ATAPI_SET_CONTROL(base, ATAPI_GET_CONTROL(base) | END_ON_TERM);
+
+ /* Set transfer length to buffer len */
for_each_sg(qc->sg, sg, qc->n_elem, si) {
ATAPI_SET_XFER_LEN(base, (sg_dma_len(sg) >> 1));
}
--
1.5.5
next reply other threads:[~2008-05-12 4:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-12 4:12 Bryan Wu [this message]
2008-05-12 9:50 ` [PATCH 1/1] [libata] pata-bf54x: Set ATAPI host state machine to control IDE device terminate sequence Alan Cox
2008-05-19 21:42 ` Jeff Garzik
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=1210565536-4026-1-git-send-email-cooloney@kernel.org \
--to=cooloney@kernel.org \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sonic.zhang@analog.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;
as well as URLs for NNTP newsgroup(s).