]> git.baikalelectronics.ru Git - kernel.git/commit
sata_inic162x: update TF read handling
authorTejun Heo <htejun@gmail.com>
Thu, 1 May 2008 14:55:58 +0000 (23:55 +0900)
committerJeff Garzik <jgarzik@redhat.com>
Tue, 6 May 2008 15:40:53 +0000 (11:40 -0400)
commita7d8c8287ccdf4896c7fbd5f625c56dfc135cc03
tree7812a44cd9213a53b69f1e6de74579c270a0b0fc
parent02e515125136991fbae5134decf6791d8c358249
sata_inic162x: update TF read handling

inic162x can't reliably read back TF or at least we don't know how to
do it yet.  The only values which seem reliable are status and error.
This patch updates access to TF.

* implement inic_tf_read() which reads the TF area in mmio area

* implement custom inic_qc_fill_rtf() which only returns true if
  status indicates device error.  it'll be returning bogus addresses
  for device errors but it'll be able to report why it failed at
  least.

* implement custom inic_check_ready() and use ata_wait_after_reset()
  instead of the SFF version.

* use inic_tf_read() for classification.

This is not perfect but it fixes hotplug detection failure and at
least makes the driver report 0's instead of random garbages while
reporting valid status and error for device errors.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/sata_inic162x.c