lkml.org 
[lkml]   [2018]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.16 122/272] net: hns3: fix for the wrong shift problem in hns3_set_txbd_baseinfo
    Date
    4.16-stable review patch.  If anyone has any objections, please let me know.

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

    From: Fuyun Liang <liangfuyun1@huawei.com>

    [ Upstream commit 3c8f5c0339515202e8662b6e3ae36a7b16610caf ]

    Third parameter of hnae_set_field is shift, But a mask is given. This
    patch fixes it by replacing HNS3_TXD_BDTYPE_M with HNS3_TXD_BDTYPE_S.

    Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com>
    Signed-off-by: Peng Li <lipeng321@huawei.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
    +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
    @@ -747,7 +747,7 @@ static void hns3_set_txbd_baseinfo(u16 *
    {
    /* Config bd buffer end */
    hnae_set_field(*bdtp_fe_sc_vld_ra_ri, HNS3_TXD_BDTYPE_M,
    - HNS3_TXD_BDTYPE_M, 0);
    + HNS3_TXD_BDTYPE_S, 0);
    hnae_set_bit(*bdtp_fe_sc_vld_ra_ri, HNS3_TXD_FE_B, !!frag_end);
    hnae_set_bit(*bdtp_fe_sc_vld_ra_ri, HNS3_TXD_VLD_B, 1);
    hnae_set_field(*bdtp_fe_sc_vld_ra_ri, HNS3_TXD_SC_M, HNS3_TXD_SC_S, 0);

    \
     
     \ /
      Last update: 2018-05-28 13:53    [W:4.019 / U:0.136 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site