]> www.infradead.org Git - users/jedix/linux-maple.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)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 7 Jul 2016 00:36:49 +0000 (17:36 -0700)
Orabug: 23221795

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>
(cherry picked from commit 74608fc98d2856fa7201a498b61c9dd9455b504a)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/broadcom/bnxt/bnxt.c

index ee817f38b8080cdf8524d73827a1b469adced981..1f40fbbfc651804f72ee5ebb4d9e5aad2e02975a 100644 (file)
@@ -3423,7 +3423,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);