Received: by 10.223.185.116 with SMTP id b49csp6365438wrg; Wed, 28 Feb 2018 08:13:43 -0800 (PST) X-Google-Smtp-Source: AH8x2273t3uTQNMQBfygrCieJ7bYt3XJ5cRRkW94dT6/lMLEOj9yenygCbKL6htYnHqhcb0apzyy X-Received: by 2002:a17:902:8a94:: with SMTP id p20-v6mr18516047plo.74.1519834423424; Wed, 28 Feb 2018 08:13:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519834423; cv=none; d=google.com; s=arc-20160816; b=pMMLJZKXyN5IyZ1Sa/6y/c3cvDcOW4bCS56MsugZKMTNdPNJEThHuRTmDWUY8kIdeL aLgL6dRNdX9Dm5RhZAZiqrI/g4eyPHru0UkzVTPcETMp1MAtRK+O1xmMaPOB4BBSfE4u hQPPaAvH1s5rm6yRr+hluQhh1DBTslakisi3ZRz2CHJvgOXvhUDsZ3wSTqDEvgVyadQs Pz2gtRM6dr9lg2iNKg6qh68+5eEL5d5ftJsJy8z2jrag9qEVa2KJDmJtDPdB41/Ab9BL GnhXkerePYdNOy0JoyLzEi/LCWqIL5mZGt63fHsmEkg0jPHo135uRy/cqQ7Wi65Xybr/ /j8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=4ACUat9d7eRE2dGNOUu91XLhfC7FRiQsx1lXlAaqd68=; b=CEHszTEUUOHnGyf4JyxuC1eU/V/5q5WjMToifQMonw0xIEE/ls5hncxdeAGhSRwCTW f656slcTxWEvs7DhzYUkCqapPAgm3IYSAiJ+Ay1iPO6YkDwyA5hc7cvvDbyHudSonGg4 F+qS3onlNFHPF9TWBrO1L9Ag58vwhLyHmfj6l2W2JHA+TkzcVGReKRhzl24JjUlEe36f TRa1U6UY3altSvKwBK17kw+NqlGJeYbfH7rkVkV6eNt3cRkF+ng/dtPBpHhJFs1lKKMx c9DnMP3sqYRNgWN9kzLfRJup50qQpkZFrE/rPzJOHyjacN92CpawvPEXVgwiuwXY+Wb1 32qQ== 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 o22si1178150pgv.232.2018.02.28.08.13.28; Wed, 28 Feb 2018 08:13:43 -0800 (PST) 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 S933001AbeB1QKz (ORCPT + 99 others); Wed, 28 Feb 2018 11:10:55 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:34967 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933374AbeB1QIs (ORCPT ); Wed, 28 Feb 2018 11:08:48 -0500 Received: from [2a02:8011:400e:2:6f00:88c8:c921:d332] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1er3Ys-0006Xl-Hj; Wed, 28 Feb 2018 15:22:30 +0000 Received: from ben by deadeye with local (Exim 4.90_1) (envelope-from ) id 1er3Yh-00009I-IN; Wed, 28 Feb 2018 15:22:19 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Steve Wise" , "Jason Gunthorpe" Date: Wed, 28 Feb 2018 15:20:18 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 138/254] iw_cxgb4: Only validate the MSN for successful completions In-Reply-To: X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.55-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Steve Wise commit f55688c45442bc863f40ad678c638785b26cdce6 upstream. If the RECV CQE is in error, ignore the MSN check. This was causing recvs that were flushed into the sw cq to be completed with the wrong status (BAD_MSN instead of FLUSHED). Signed-off-by: Steve Wise Signed-off-by: Jason Gunthorpe [bwh: Backported to 3.16: adjust context] Signed-off-by: Ben Hutchings --- drivers/infiniband/hw/cxgb4/cq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/drivers/infiniband/hw/cxgb4/cq.c +++ b/drivers/infiniband/hw/cxgb4/cq.c @@ -574,10 +574,10 @@ static int poll_cq(struct t4_wq *wq, str ret = -EAGAIN; goto skip_cqe; } - if (unlikely((CQE_WRID_MSN(hw_cqe) != (wq->rq.msn)))) { + if (unlikely(!CQE_STATUS(hw_cqe) && + CQE_WRID_MSN(hw_cqe) != wq->rq.msn)) { t4_set_wq_in_error(wq); - hw_cqe->header |= htonl(V_CQE_STATUS(T4_ERR_MSN)); - goto proc_cqe; + hw_cqe->header |= cpu_to_be32(V_CQE_STATUS(T4_ERR_MSN)); } goto proc_cqe; }