• Edwin Peer's avatar
    bnxt_en: update all firmware calls to use the new APIs · bbf33d1d
    Edwin Peer authored
    The conversion follows this general pattern for most of the calls:
    
    1. The input message is changed from a stack variable initialized
    using bnxt_hwrm_cmd_hdr_init() to a pointer allocated and intialized
    using hwrm_req_init().
    
    2. If we don't need to read the firmware response, the hwrm_send_message()
    call is replaced with hwrm_req_send().
    
    3. If we need to read the firmware response, the mutex lock is replaced
    by hwrm_req_hold() to hold the response.  When the response is read, the
    mutex unlock is replaced by hwrm_req_drop().
    
    If additional DMA buffers are needed for firmware response data, the
    hwrm_req_dma_slice() is used instead of calling dma_alloc_coherent().
    
    Some minor refactoring is also done while doing these conversions.
    
    v2: Fix unintialized variable warnings in __bnxt_hwrm_get_tx_rings()
    and bnxt_approve_mac()
    Signed-off-by: default avatarEdwin Peer <edwin.peer@broadcom.com>
    Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    bbf33d1d
bnxt_ethtool.c 115 KB