linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* result_tf handling in sata_fsl and sas_ata
@ 2010-10-14  9:28 Tejun Heo
  0 siblings, 0 replies; only message in thread
From: Tejun Heo @ 2010-10-14  9:28 UTC (permalink / raw)
  To: Ashish Kalra, Darrick J. Wong, Jeff Garzik,
	linux-ide@vger.kernel.org

Hello,

result_tf is used, among other things, to report the command
completion status for ATA passthrough commands.  Many controllers
emulate TF registers by updating them according to command progress
and received FISes allowing the respective drivers to simply read the
area; however, some native SATA controllers don't bother to emulate TF
registers and simply dump received FISes into predefined areas.

ahci was one of such controllers and the driver was reading the
receive area for D2H Reg FIS to acquire the result taskfile register.
Unfortunately, this is incorrect as successful ATA PIO data-in
commands don't use D2H Reg FIS to update result TF but the host is
supposed to update the Status part of TF from the E_Status field of
the preceding Setup PIO FIS.  This hack is to satisfy the timing
specified from PATA days.  Anyways, so, the qc_fill_rtf method needs
to consider the command protocol and success of the previous command
if the controller doesn't maintain TF registers itself.

I just submitted a patch to fix ahci.  sata_sil24, sata_fsl and
sas_ata seemed to have similar problems, but sata_sil24 properly
emulates TF regs in the PRB section in D2H Reg FIS layout, leaving
sata_fsl and sas_ata, about which I don't have much idea.  So, please
check and take care of them.

For further details, please read the following thread.

  http://thread.gmane.org/gmane.linux.ide/47627

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-10-14  9:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-14  9:28 result_tf handling in sata_fsl and sas_ata Tejun Heo

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).