]> git.baikalelectronics.ru Git - kernel.git/commit
sata_fsl: add workaround for data length mismatch on freescale V2 controller
authorShaohui Xie <Shaohui.Xie@freescale.com>
Tue, 11 Sep 2012 02:48:53 +0000 (10:48 +0800)
committerJeff Garzik <jgarzik@redhat.com>
Thu, 13 Sep 2012 05:09:19 +0000 (01:09 -0400)
commit9ad86ebc20182e8a7f885d703e01b009e5eb507a
tree8017ee731f9940ddb081883fb45e6fd9ee874aa2
parent2eedf630a0e5597b1674ec81c2eddf82d2c616b9
sata_fsl: add workaround for data length mismatch on freescale V2 controller

The freescale V2 SATA controller checks if the received data length matches
the programmed length 'ttl', if not, it assumes that this is an error.
In ATAPI, the 'ttl' is based on max allocation length and not the actual
data transfer length, controller will raise 'DLM' (Data length Mismatch)
error bit in Hstatus register. Along with 'DLM', DE (Device error) and
FE (fatal Error) bits are also set in Hstatus register, 'E' (Internal Error)
bit is set in Serror register and CE (Command Error) and DE (Device error)
registers have the corresponding bit set. In this condition, we need to
clear errors in following way: in the service routine, based on 'DLM' flag,
HCONTROL[27] operation clears Hstatus, CE and DE registers, clear Serror
register.

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Signed-off-by: Anju Bhartiya <Anju.Bhartiya@freescale.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/sata_fsl.c