* [PATCH 1/1] [libata] pata-bf54x: Set ATAPI host state machine to control IDE device terminate sequence.
@ 2008-05-12 4:12 Bryan Wu
2008-05-12 9:50 ` Alan Cox
2008-05-19 21:42 ` Jeff Garzik
0 siblings, 2 replies; 3+ messages in thread
From: Bryan Wu @ 2008-05-12 4:12 UTC (permalink / raw)
To: jgarzik; +Cc: linux-ide, linux-kernel, Sonic Zhang, Bryan Wu
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] [libata] pata-bf54x: Set ATAPI host state machine to control IDE device terminate sequence.
2008-05-12 4:12 [PATCH 1/1] [libata] pata-bf54x: Set ATAPI host state machine to control IDE device terminate sequence Bryan Wu
@ 2008-05-12 9:50 ` Alan Cox
2008-05-19 21:42 ` Jeff Garzik
1 sibling, 0 replies; 3+ messages in thread
From: Alan Cox @ 2008-05-12 9:50 UTC (permalink / raw)
Cc: jgarzik, linux-ide, Sonic Zhang, Bryan Wu
On Mon, 12 May 2008 12:12:16 +0800
Bryan Wu <cooloney@kernel.org> wrote:
> 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>
Acked-by: Alan Cox <alan@redhat.com>
(but when submitting fix typo "contorl" )
> ---
> 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));
> }
--
--
"Alan, I'm getting a bit worried about you."
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] [libata] pata-bf54x: Set ATAPI host state machine to control IDE device terminate sequence.
2008-05-12 4:12 [PATCH 1/1] [libata] pata-bf54x: Set ATAPI host state machine to control IDE device terminate sequence Bryan Wu
2008-05-12 9:50 ` Alan Cox
@ 2008-05-19 21:42 ` Jeff Garzik
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2008-05-19 21:42 UTC (permalink / raw)
To: Bryan Wu; +Cc: linux-ide, linux-kernel, Sonic Zhang
Bryan Wu wrote:
> 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) {
applied
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-05-19 21:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-12 4:12 [PATCH 1/1] [libata] pata-bf54x: Set ATAPI host state machine to control IDE device terminate sequence Bryan Wu
2008-05-12 9:50 ` Alan Cox
2008-05-19 21:42 ` Jeff Garzik
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).