lkml.org 
[lkml]   [2016]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.7 031/184] bnxt_en: Fix TX push operation on ARM64.
    Date
    4.7-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Michael Chan <michael.chan@broadcom.com>


    [ Upstream commit 9d13744bb75078175ab49408f2abb980e4dbccc9 ]

    There is a code path where we are calling __iowrite64_copy() on
    an address that is not 64-bit aligned. This causes an exception on
    some architectures such as arm64. Fix that code path by using
    __iowrite32_copy().

    Reported-by: JD Zheng <jiandong.zheng@broadcom.com>
    Signed-off-by: Michael Chan <michael.chan@broadcom.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
    +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
    @@ -293,8 +293,8 @@ static netdev_tx_t bnxt_start_xmit(struc
    push_len = (length + sizeof(*tx_push) + 7) / 8;
    if (push_len > 16) {
    __iowrite64_copy(txr->tx_doorbell, tx_push_buf, 16);
    - __iowrite64_copy(txr->tx_doorbell + 4, tx_push_buf + 1,
    - push_len - 16);
    + __iowrite32_copy(txr->tx_doorbell + 4, tx_push_buf + 1,
    + (push_len - 16) << 1);
    } else {
    __iowrite64_copy(txr->tx_doorbell, tx_push_buf,
    push_len);

    \
     
     \ /
      Last update: 2016-09-23 00:04    [W:4.160 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site