lkml.org 
[lkml]   [2017]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.9 006/108] ibmvnic: Fix endian error when requesting device capabilities
    Date
    4.9-stable review patch.  If anyone has any objections, please let me know.

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

    From: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>


    [ Upstream commit 28f4d16570dcf440e54a4d72666d5be452f27d0e ]

    When a vNIC client driver requests a faulty device setting, the
    server returns an acceptable value for the client to request.
    This 64 bit value was incorrectly being swapped as a 32 bit value,
    resulting in loss of data. This patch corrects that by using
    the 64 bit swap function.

    Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    drivers/net/ethernet/ibm/ibmvnic.c | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    --- a/drivers/net/ethernet/ibm/ibmvnic.c
    +++ b/drivers/net/ethernet/ibm/ibmvnic.c
    @@ -2400,10 +2400,10 @@ static void handle_request_cap_rsp(union
    case PARTIALSUCCESS:
    dev_info(dev, "req=%lld, rsp=%ld in %s queue, retrying.\n",
    *req_value,
    - (long int)be32_to_cpu(crq->request_capability_rsp.
    + (long int)be64_to_cpu(crq->request_capability_rsp.
    number), name);
    release_sub_crqs_no_irqs(adapter);
    - *req_value = be32_to_cpu(crq->request_capability_rsp.number);
    + *req_value = be64_to_cpu(crq->request_capability_rsp.number);
    init_sub_crqs(adapter, 1);
    return;
    default:

    \
     
     \ /
      Last update: 2017-06-15 20:24    [W:4.021 / U:0.228 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site