• Subbaraya Sundeep's avatar
    octeontx2: Detect the mbox up or down message via register · a88e0f93
    Subbaraya Sundeep authored
    A single line of interrupt is used to receive up notifications
    and down reply messages from AF to PF (similarly from PF to its VF).
    PF acts as bridge and forwards VF messages to AF and sends respsones
    back from AF to VF. When an async event like link event is received
    by up message when PF is in middle of forwarding VF message then
    mailbox errors occur because PF state machine is corrupted.
    Since VF is a separate driver or VF driver can be in a VM it is
    not possible to serialize from the start of communication at VF.
    Hence to differentiate between type of messages at PF this patch makes
    sender to set mbox data register with distinct values for up and down
    messages. Sender also checks whether previous interrupt is received
    before triggering current interrupt by waiting for mailbox data register
    to become zero.
    
    Fixes: 5a6d7c9d ("octeontx2-pf: Mailbox communication with AF")
    Signed-off-by: default avatarSubbaraya Sundeep <sbhatta@marvell.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    a88e0f93
otx2_common.h 30.6 KB