]> git.baikalelectronics.ru Git - kernel.git/commit
libata: Keep shadow last_ctl up to date during resets
authorStuart MENEFY <stuart.menefy@st.com>
Tue, 10 Mar 2009 11:38:13 +0000 (11:38 +0000)
committerJeff Garzik <jgarzik@redhat.com>
Fri, 13 Mar 2009 18:55:58 +0000 (14:55 -0400)
commitf0db2d948e530bbb22ff09d99d9227c779bc41b6
treeb5195b312ca7acebe99d0125e60fcc4eebb7e458
parent181900a12a8754e57967ff43e34de446255841f4
libata: Keep shadow last_ctl up to date during resets

libata keeps a shadow copy of the ATA CTL register (which is write only),
and only writes to the hardware when the required value doesn't match
the shadow. However this copy wasn't being maintained when performing
reset functions. This could cause problems for the first operation after
a reset when the correct value might not be written to the CTL register.

This problem was observed when hotplugging a drive: the identify command
was being issued with interrupts enabled, when they should have been
disabled.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/libata-sff.c