]> git.karo-electronics.de Git - linux-beck.git/commit
[PATCH] libata: implement new SCR handling and port on/offline functions
authorTejun Heo <htejun@gmail.com>
Mon, 15 May 2006 11:57:46 +0000 (20:57 +0900)
committerTejun Heo <htejun@gmail.com>
Mon, 15 May 2006 11:57:46 +0000 (20:57 +0900)
commit34bf21704c848fe00c516d1c8f163db08b70b137
tree8482de3ddf6ff1b02ff9ddfd027d2478c7ecd7ac
parent838df6284c54447efae956fb9c243d8ba4ab0f47
[PATCH] libata: implement new SCR handling and port on/offline functions

Implement ata_scr_{valid|read|write|write_flush}() and
ata_port_{online|offline}().  These functions replace
scr_{read|write}() and sata_dev_present().

Major difference between between the new SCR functions and the old
ones is that the new ones have a way to signal error to the caller.
This makes handling SCR-available and SCR-unavailable cases in the
same path easier.  Also, it eases later PM implementation where SCR
access can fail due to various reasons.

ata_port_{online|offline}() functions return 1 only when they are
affirmitive of the condition.  e.g.  if SCR is unaccessible or
presence cannot be determined for other reasons, these functions
return 0.  So, ata_port_online() != !ata_port_offline().  This
distinction is useful in many exception handling cases.

Signed-off-by: Tejun Heo <htejun@gmail.com>
drivers/scsi/libata-core.c
include/linux/libata.h