• Wesley Sheng's avatar
    switchtec: Fix unintended mask of MRPC event · 083c1b5e
    Wesley Sheng authored
    When running application tool switchtec-user's `firmware update` and `event
    wait` commands concurrently, sometimes the firmware update speed reduced
    significantly.
    
    It is because when the MRPC event happened after MRPC event occurrence
    check but before the event mask loop reaches its header register in event
    ISR, the MRPC event would be masked unintentionally.  Since there's no
    chance to enable it again except for a module reload, all the following
    MRPC execution completion checks time out.
    
    Fix this bug by skipping the mask operation for MRPC event in event ISR,
    same as what we already do for LINK event.
    
    Fixes: 52eabba5 ("switchtec: Add IOCTLs to the Switchtec driver")
    Signed-off-by: default avatarWesley Sheng <wesley.sheng@microchip.com>
    Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
    Reviewed-by: default avatarLogan Gunthorpe <logang@deltatee.com>
    083c1b5e
switchtec.c 38.6 KB