]> git.baikalelectronics.ru Git - kernel.git/commit
libata: introduce sff_set_devctl() method
authorSergei Shtylyov <sshtylyov@ru.mvista.com>
Fri, 7 May 2010 18:47:50 +0000 (22:47 +0400)
committerJeff Garzik <jgarzik@redhat.com>
Fri, 14 May 2010 21:35:52 +0000 (17:35 -0400)
commite9f222ee2711756a9886a4821e83cb8857bdec70
treee76f63519031769e848dcc6eba63c9207cf4d84e
parentc8a856356b5a491888a8b0d797f6646c4477997d
libata: introduce sff_set_devctl() method

The set of libata's taskfile access methods is clearly incomplete as
it lacks a method to write to the device control register -- which
forces drivers like 'pata_bf54x' and 'pata_scc' to implement more
"high level" (and more weighty) methods like freeze() and postreset().

So, introduce the optional sff_set_devctl() method which the drivers
only have to implement if the standard iowrite8() can't be used (just
like the existing sff_check_altstatus() method) and make use of it
in the freeze() and postreset() method implementations (I could also
have used it in softreset() method but it also reads other taskfile
registers without using tf_read() making that quite pointless);
this makes freeze() method implementations in the 'pata_bf54x' and
'pata_scc' methods virtually identical to ata_sff_freeze(), so we
can get rid of them completely.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Documentation/DocBook/libata.tmpl
drivers/ata/libata-sff.c
drivers/ata/pata_bf54x.c
drivers/ata/pata_scc.c
include/linux/libata.h