]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Feb 2016 00:12:51 +0000 (19:12 -0500)
commit74ac3c843e628e83d8bc2b3884d5833035682ddf
treed60189acd5cb20688c21462d08fb774f6c56ebed
parente6eebf3aa5a5e84e59aa072f981a7dd53a6c73a9
bnxt_en: Fix zero padding of tx push data.

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>
drivers/net/ethernet/broadcom/bnxt/bnxt.c