• Stuart MENEFY's avatar
    libata: Keep shadow last_ctl up to date during resets · e3e4385f
    Stuart MENEFY authored
    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: default avatarStuart Menefy <stuart.menefy@st.com>
    Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
    e3e4385f
libata-sff.c 74.7 KB