• Michael Chan's avatar
    bnxt_en: Improve valid bit checking in firmware response message. · 845adfe4
    Michael Chan authored
    When firmware sends a DMA response to the driver, the last byte of the
    message will be set to 1 to indicate that the whole response is valid.
    The driver waits for the message to be valid before reading the message.
    
    The firmware spec allows these response messages to increase in
    length by adding new fields to the end of these messages.  The
    older spec's valid location may become a new field in a newer
    spec.  To guarantee compatibility, the driver should zero the valid
    byte before interpreting the entire message so that any new fields not
    implemented by the older spec will be read as zero.
    
    For messages that are forwarded to VFs, we need to set the length
    and re-instate the valid bit so the VF will see the valid response.
    Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    845adfe4
bnxt_sriov.c 30.7 KB