• Andrew Jeffery's avatar
    ipmi: kcs: Poll OBF briefly to reduce OBE latency · f90bc0f9
    Andrew Jeffery authored
    The ASPEED KCS devices don't provide a BMC-side interrupt for the host
    reading the output data register (ODR). The act of the host reading ODR
    clears the output buffer full (OBF) flag in the status register (STR),
    informing the BMC it can transmit a subsequent byte.
    
    On the BMC side the KCS client must enable the OBE event *and* perform a
    subsequent read of STR anyway to avoid races - the polling provides a
    window for the host to read ODR if data was freshly written while
    minimising BMC-side latency.
    
    Fixes: 28651e6c ("ipmi: kcs_bmc: Allow clients to control KCS IRQ state")
    Signed-off-by: default avatarAndrew Jeffery <andrew@aj.id.au>
    Reviewed-by: default avatarJoel Stanley <joel@jms.id.au>
    Message-Id: <20220812144741.240315-1-andrew@aj.id.au>
    Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
    f90bc0f9
kcs_bmc_aspeed.c 18.1 KB