]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bnxt_en: Fix zero padding of tx push data.
authorMichael Chan <michael.chan@broadcom.com>
Mon, 22 Feb 2016 07:10:26 +0000 (02:10 -0500)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 7 Jul 2016 00:36:55 +0000 (17:36 -0700)
commit9d30d7e9ee933390ec9d6584cfc40e73523cec31
tree2b9057802d33beac4ee5983a7ddc0a2629b50970
parent93b2ac8f32b823ca90d7fc52f8b6dc6e30e6a06a
bnxt_en: Fix zero padding of tx push data.

Orabug: 23221795

The arithmetic to zero pad the last 64-bit word in the push buffer is not
correct.

1. It should be pdata + length to get to the end.
2. 'pdata' is void pointer and passing it to PTR_ALIGN() will cast the
aligned pointer to void.  Pass 'end' which is u64 pointer to PTR_ALIGN()
instead so that the aligned pointer - 1 is the last 64-bit pointer to data.

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