]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
bnxt_en: Zero pad firmware messages to 128 bytes.
authorMichael Chan <mchan@broadcom.com>
Fri, 8 Jan 2016 00:56:57 +0000 (19:56 -0500)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 7 Jul 2016 00:36:47 +0000 (17:36 -0700)
Orabug: 23221795

For future compatibility, zero pad all messages that the driver sends
to the firmware to 128 bytes.  If these messages are extended in the
future with new byte enables, zero padding these messages now will
guarantee future compatibility.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit d79979a103f7820d3107cdc04096e87b37f90008)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/broadcom/bnxt/bnxt.c

index 6559af844d8282b5574a9519a8e725efb975a22c..07eaebc5e63f3bd0fd5a552079d4fe490071baad 100644 (file)
@@ -2617,6 +2617,9 @@ int _hwrm_send_message(struct bnxt *bp, void *msg, u32 msg_len, int timeout)
        /* Write request msg to hwrm channel */
        __iowrite32_copy(bp->bar0, data, msg_len / 4);
 
+       for (i = msg_len; i < HWRM_MAX_REQ_LEN; i += 4)
+               writel(0, bp->bar0 + i);
+
        /* currently supports only one outstanding message */
        if (intr_process)
                bp->hwrm_intr_seq_id = le32_to_cpu(req->target_id_seq_id) &