pata-bf54x: Set ATAPI HSM to control IDE device terminate sequence.
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> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
This commit is contained in:
parent
860da5e578
commit
b6e7b44797
|
@ -911,6 +911,9 @@ static void bfin_bmdma_start(struct ata_queued_cmd *qc)
|
||||||
/* Reset all transfer count */
|
/* Reset all transfer count */
|
||||||
ATAPI_SET_CONTROL(base, ATAPI_GET_CONTROL(base) | TFRCNT_RST);
|
ATAPI_SET_CONTROL(base, ATAPI_GET_CONTROL(base) | TFRCNT_RST);
|
||||||
|
|
||||||
|
/* 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 */
|
/* Set transfer length to buffer len */
|
||||||
for_each_sg(qc->sg, sg, qc->n_elem, si) {
|
for_each_sg(qc->sg, sg, qc->n_elem, si) {
|
||||||
ATAPI_SET_XFER_LEN(base, (sg_dma_len(sg) >> 1));
|
ATAPI_SET_XFER_LEN(base, (sg_dma_len(sg) >> 1));
|
||||||
|
|
Loading…
Reference in New Issue