• S
    libata: Keep shadow last_ctl up to date during resets · e3e4385f
    Stuart MENEFY 提交于
    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: NStuart Menefy <stuart.menefy@st.com>
    Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
    e3e4385f
libata-sff.c 74.7 KB