Received: by 10.213.65.68 with SMTP id h4csp1867337imn; Mon, 19 Mar 2018 15:45:02 -0700 (PDT) X-Google-Smtp-Source: AG47ELvD8Q5pWN66qtMfa6dPMZa1TKjYpt2Hx+hibZ1ggplIegJ2DMClZtrnDr859/JXH47tLwDd X-Received: by 10.98.157.199 with SMTP id a68mr11507980pfk.237.1521499502290; Mon, 19 Mar 2018 15:45:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521499502; cv=none; d=google.com; s=arc-20160816; b=QMcRd7uDrQ6Z+1zkedIdUnNv1SoLQcAaroElJQqJYxrJLkek2ZIVpWMWIHazt4gmvi cRNmXfhNBH9iKckjhNOqQnM+d0/fKNHpKu9wvQ/FlEb1AO2WxSkxElem0WwqU1rv4H4F xp+Xea93apmWeWeuuVm+/tkuFQ6C5qAmmbPC2OcERx9aIRfg0II5FzjIreU6YBNmUeq0 PJG1iBWoe845ocDl6f3n4jA+HIjxUyfRuRMTZVR+n8+X6jPkh8nrG5yk7J/bZu+5t6Ah hsG1QMx1G7sFwUfi9Y648tICGUGnZ2gvP+TmpbAMHYOtro7ab1NGimqPmYwfgE36Zqps jhbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:message-id:date:thread-index:thread-topic:subject :cc:to:from:dkim-signature:arc-authentication-results; bh=V80PdxAEzsa9TQGt27yzlcDq/jy6dSYH/HbvyBS4ADI=; b=sBsoyV9gflMRBinaab1vnhrfGz9yLQBmqL/NhSE33Ekywt20wHN0qVUe0iUwnheqS4 W5m+OuOXrXhEOHM2oejwKCMc8JMQRJxkOBGqzLVLwWVMws7dJnoo8IYhA6T44v1PbCLz cGLINQQ6Xl0vrmV+ERv8SnBTZGxX56tnAq6qUl7P30hp6/MAc8tow3uysj09c8+9e7Ui X+GHs2OXrDefFnagxKl26GoFMoTPb5mJNwYrJ/VlDj3q/XRj22vnTI02UNSSt0s3CMPW dJOhryncJP+EdG3MVS6M4DURb0UGsmxbaZyWaz7y59cX7NebH4xGaPI0jHiGIqjcGSrn HYeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=S399YsPc; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o5si198185pfb.204.2018.03.19.15.44.47; Mon, 19 Mar 2018 15:45:02 -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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=S399YsPc; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755956AbeCSPrB (ORCPT + 99 others); Mon, 19 Mar 2018 11:47:01 -0400 Received: from mail-by2nam01on0104.outbound.protection.outlook.com ([104.47.34.104]:37074 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755455AbeCSPq5 (ORCPT ); Mon, 19 Mar 2018 11:46:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=V80PdxAEzsa9TQGt27yzlcDq/jy6dSYH/HbvyBS4ADI=; b=S399YsPcCYbZRPQo8bG21JN/CR+IufeWekCp8HOm0JN1z4I8rSX5Q3IQ19BBWCnhR41cmF5A697qnahIxTcQlHsyT3zN5+dpsvLa0csbkxX8ZkXsYEBlMZHKK9xk6jkshmeGS/w7A25wRpiGbDnxI+9xHfaTn2gE4XkQF6TWrMk= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1013.namprd21.prod.outlook.com (52.132.133.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.631.0; Mon, 19 Mar 2018 15:46:55 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62%5]) with mapi id 15.20.0631.004; Mon, 19 Mar 2018 15:46:55 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Shiraz Saleem , Jason Gunthorpe , Sasha Levin Subject: [PATCH AUTOSEL for 4.15 001/124] i40iw: Fix sequence number for the first partial FPDU Thread-Topic: [PATCH AUTOSEL for 4.15 001/124] i40iw: Fix sequence number for the first partial FPDU Thread-Index: AQHTv5mB6l4QKRsU6EWu8dMwqV3Yvw== Date: Mon, 19 Mar 2018 15:46:55 +0000 Message-ID: <20180319154645.11350-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB1013;7:G24DkAOcbnL0K0r2wWjATpo8v+sSojHP6TzsaFW7eo3Wfgzity83+sxVvOYgS+/VQfMJVdRmXoGtIFoIYo8/ZEaBMjPv0R5yToveHZFjCa3n6d8u1yc7Wf+2yIQVDSjn5bGzgdX77W3AAtUq0TUdcQJ7krYKEJWnEiCHlCJFBEcLbmn4qgpFlf5/8wnLfQq+klnjP8Pdd4RaGvWpyxhqz4I1qlBz/oXSCqR152kn+vvm9MgBNgrj4Oez4ircRoz/;20:cpTtyMUrys3Yd/1jQ2H2pcaboZc2BrXd5IUKq4fxNLp2LpeUMcK3kaLmJo1ZBAfg7lKHuN9l7c14OGtULzF/my4RerQEGw3IA2y7GBVu3UOTzDcI0zSSVzgmH09YgMTC6+l2wHFKHAkzoVV4wtZW6ZYC9Qthgv3hf8jH31N3nL0= x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: c040d90a-b52b-4f84-0fbd-08d58db0a468 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB1013; x-ms-traffictypediagnostic: DM5PR2101MB1013: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3231221)(944501300)(52105095)(3002001)(6055026)(61426038)(61427038)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(6072148)(201708071742011);SRVR:DM5PR2101MB1013;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1013; x-forefront-prvs: 06167FAD59 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(396003)(39860400002)(346002)(376002)(39380400002)(189003)(199004)(86612001)(316002)(26005)(72206003)(4326008)(25786009)(110136005)(10290500003)(86362001)(575784001)(59450400001)(54906003)(53936002)(36756003)(107886003)(3280700002)(14454004)(22452003)(6506007)(5660300001)(68736007)(99286004)(186003)(478600001)(10090500001)(102836004)(6116002)(5250100002)(2501003)(97736004)(3660700001)(106356001)(81156014)(81166006)(8676002)(8936002)(7736002)(305945005)(2900100001)(105586002)(3846002)(1076002)(66066001)(6436002)(2906002)(6512007)(6486002)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1013;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: dY/b3XIrWzSJkSOKvG2FnakII0r00j/mFWNJuNNm4A/zFaSSKMaN2u2wz5r2h7n4TrPVq8FL1In0fMyhMweYdMoZwSo/T1uWKXRo4jiqKfYHyfGi2qLh10on0dzAYzP3uw8p15yDULRKev5IJV0d84qy2IxRqCyhPEKYuY8XdMhwXSLYvklqJqanBI3XCe3sqvBhI6WdKObYvSvub0y+727SQv+iL5QlWonC8Z3rcwdnLyhq9S6QVLnWX2COf81NKT5Hz31lFXmQipSCkliEy7yLfg8KB4N1MiLWK2CIWZrjTW1QbEyvRl/y5quzaM+U+qfLNeNIvxa9RnPBBeIyXg== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: c040d90a-b52b-4f84-0fbd-08d58db0a468 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2018 15:46:55.3245 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1013 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/infiniband/hw/i40iw/i40iw_d.h | 1 + drivers/infiniband/hw/i40iw/i40iw_puda.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/i40iw/i40iw_d.h b/drivers/infiniband/hw/= i40iw/i40iw_d.h index 029083cb81d5..4b65e4140bd7 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_d.h +++ b/drivers/infiniband/hw/i40iw/i40iw_d.h @@ -97,6 +97,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 =20 #define I40IW_TERM_SENT 0x01 diff --git a/drivers/infiniband/hw/i40iw/i40iw_puda.c b/drivers/infiniband/= hw/i40iw/i40iw_puda.c index 796a815b53fd..f64b6700f43f 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_puda.c +++ b/drivers/infiniband/hw/i40iw/i40iw_puda.c @@ -1378,7 +1378,7 @@ static void i40iw_ieq_handle_exception(struct i40iw_p= uda_rsrc *ieq, u32 *hw_host_ctx =3D (u32 *)qp->hw_host_ctx; u32 rcv_wnd =3D hw_host_ctx[23]; /* first partial seq # in q2 */ - u32 fps =3D qp->q2_buf[16]; + u32 fps =3D *(u32 *)(qp->q2_buf + Q2_FPSN_OFFSET); struct list_head *rxlist =3D &pfpdu->rxlist; struct list_head *plist; =20 --=20 2.14.1