Received: by 10.192.165.156 with SMTP id m28csp53444imm; Tue, 10 Apr 2018 16:14:10 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/bBy+YnY4PVJHXIXVYY9ssskTHY7yKHcwzSVXT2Qx6y6gpz+LrnRxJsrwsWAcL19bcNQsx X-Received: by 10.98.155.137 with SMTP id e9mr1934181pfk.109.1523402050102; Tue, 10 Apr 2018 16:14:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523402050; cv=none; d=google.com; s=arc-20160816; b=MGQguPUxiPRoYRnDE81UxqHqGa9zPG5I2PVraELnQLrxswaZMUH1k+M83+j+2zbnXM R2uHSmiT1OcA/tdoay7ltzW+QZwvU5txdYE/4aQrR+mu04jgyA4hGd2w61Uw0BXOt7J9 X/t1o2sPUSArYNBNufU2USZDiGsh0Qyn/vJ7UJf79vBzyZgOfjpgjRj/CHGd7hNdJQTz pQ5Eau/4y1ddHWi+XXuCFuqSFrCNx2YD5pD3N3QDISQz9USUwVpSIFGvd4sJ+b7pMDaw UVVw9X5+UC9aK6ZprW8gPq++/Ro/GY+3+Tn1cQvjejGkaMujsyRznaj+YQMmasxhFmMO yujA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=6RmVIAweZhH9uPgsknS6DH4T6HxtW1DSZ/S8JDTSmDY=; b=ft1XZtPQsoeh/yiFgGjngG7WJAYGKxTJArTatQCVO9SR2mfA2BiEhoW0NzL65tpocT XFwQwWR0nA6CZs/UNfyT31ibfuVN65HKa9XqmRoOM8nTF5NGSTpMfK/XlnvOkTmub5LZ DHiSbqBk/WJlaGkwW6mcBgrRhwSleM5XG6IiO4WAIHVjePEvXMe2Stb/PsGDwsiA6SzC mCgSA/xfjEPj0gFAijPTnp9dFZhKWe+2d+AVeHi8iVnXXUsmuj5KD9YuK0Td4qvGXy5m yNC+DP161hTmuPa8TJThnYiCfJuHFUNp2IUT1rizp+I5xZ8agMZKZ4iTbp9gwkYzCZNf 0PoA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f130si2398773pgc.304.2018.04.10.16.13.33; Tue, 10 Apr 2018 16:14:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755327AbeDJWdz (ORCPT + 99 others); Tue, 10 Apr 2018 18:33:55 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:41520 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755299AbeDJWdw (ORCPT ); Tue, 10 Apr 2018 18:33:52 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id CAB35CE9; Tue, 10 Apr 2018 22:33:51 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shiraz Saleem , Jason Gunthorpe , Sasha Levin Subject: [PATCH 4.14 001/138] i40iw: Fix sequence number for the first partial FPDU Date: Wed, 11 Apr 2018 00:23:11 +0200 Message-Id: <20180410212902.284736406@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180410212902.121524696@linuxfoundation.org> References: <20180410212902.121524696@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Shiraz Saleem [ Upstream commit df8b13a1b23356d01dfc4647a5629cdb0f4ce566 ] Partial FPDU processing is broken as the sequence number for the first partial FPDU is wrong due to incorrect Q2 buffer offset. The offset should be 64 rather than 16. Fixes: 786c6adb3a94 ("i40iw: add puda code") Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/infiniband/hw/i40iw/i40iw_d.h | 1 + drivers/infiniband/hw/i40iw/i40iw_puda.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) --- a/drivers/infiniband/hw/i40iw/i40iw_d.h +++ b/drivers/infiniband/hw/i40iw/i40iw_d.h @@ -93,6 +93,7 @@ #define RDMA_OPCODE_MASK 0x0f #define RDMA_READ_REQ_OPCODE 1 #define Q2_BAD_FRAME_OFFSET 72 +#define Q2_FPSN_OFFSET 64 #define CQE_MAJOR_DRV 0x8000 #define I40IW_TERM_SENT 0x01 --- a/drivers/infiniband/hw/i40iw/i40iw_puda.c +++ b/drivers/infiniband/hw/i40iw/i40iw_puda.c @@ -1376,7 +1376,7 @@ static void i40iw_ieq_handle_exception(s u32 *hw_host_ctx = (u32 *)qp->hw_host_ctx; u32 rcv_wnd = hw_host_ctx[23]; /* first partial seq # in q2 */ - u32 fps = qp->q2_buf[16]; + u32 fps = *(u32 *)(qp->q2_buf + Q2_FPSN_OFFSET); struct list_head *rxlist = &pfpdu->rxlist; struct list_head *plist;