aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_legacy.c
diff options
context:
space:
mode:
authorShaohui Xie <Shaohui.Xie@freescale.com>2012-09-10 22:48:53 -0400
committerJeff Garzik <jgarzik@redhat.com>2012-09-13 01:09:19 -0400
commit100f586bd0959fe0e52b8a0b8cb49a3df1c6b044 (patch)
tree8017ee731f9940ddb081883fb45e6fd9ee874aa2 /drivers/ata/pata_legacy.c
parent65fe1f0f66a57380229a4ced844188103135f37b (diff)
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>
Diffstat (limited to 'drivers/ata/pata_legacy.c')
0 files changed, 0 insertions, 0 deletions