]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
bnxt_en: Ring free response from close path should use completion ring
authorPrashant Sreedharan <prashant@broadcom.com>
Thu, 28 Jan 2016 08:11:20 +0000 (03:11 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sat, 30 Jan 2016 01:28:39 +0000 (17:28 -0800)
Use completion ring for ring free response from firmware.  The response
will be the last entry in the ring and we can free the ring after getting
the response.  This will guarantee no spurious DMA to freed memory.

Signed-off-by: Prashant Sreedharan <prashant@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c

index df835f5e46d85f374cb1e0d9adf1fd8e16cb40f3..17dcacd3ad437098f999f22e7ce986432f77fd2a 100644 (file)
@@ -3406,7 +3406,7 @@ static int hwrm_ring_free_send_msg(struct bnxt *bp,
        struct hwrm_ring_free_output *resp = bp->hwrm_cmd_resp_addr;
        u16 error_code;
 
-       bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_RING_FREE, -1, -1);
+       bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_RING_FREE, cmpl_ring_id, -1);
        req.ring_type = ring_type;
        req.ring_id = cpu_to_le16(ring->fw_ring_id);