Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2511433imm; Mon, 24 Sep 2018 05:42:39 -0700 (PDT) X-Google-Smtp-Source: ACcGV61wJs+kQoaDYZLSbloi8BVquEk2cJtMdCB189mVCSO5mX5EcP9tfPzh1UzkaQHh00AlOFQT X-Received: by 2002:a63:3e06:: with SMTP id l6-v6mr2049212pga.96.1537792959315; Mon, 24 Sep 2018 05:42:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537792959; cv=none; d=google.com; s=arc-20160816; b=Q7hLsOZ2PWQHLq8M9QLvLGIcUxdFGaTdQb+rOhv90ID6CbzLPJ65LT1KbUmY08dzkp k6vmQVr56vbRvC9pzmj4IjMTb6emyENJJR2Ws+uy15MC5Pydd7PALYW2phGIxVxgKToQ 7S6MX30+8+C6LjxE2VkaSPYF1QwMRdgDwH3W51XlqHHGXeHbD3aADYYyoPuA2S8i+BnW YGBA/dbfY1zgPYYQZJA4IovB30TzQxU+UzyjsHDBPZ2jdzFBfBZgT2UBpqaWAtQUBnHi IsMJsAYaSkuV9dGCITFcz7XDBxtiEGzWlH46ujtEjF6b3uIHqIvu9qcsq2aTe5NikWNM mWRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=YODZqcnun2q2vRT5rPxyAo5Pam1gTtnp7n8ebUhkGJs=; b=jMmi9uF0v41nLiA9YJ0WHZeaBQcbKvBjTf/qiRr1jz6mteJMoH9fKDm9Titj35KRpz IPVpXumGGXv/OdCIBuwRw0KSqRVYZ2RIFo46ftmrYwLpNl3vJUNS+Ri1TFuCml2yR2es 3ADXAGLLB6QWYXRl8wri7BKRjuwS56AGmOIaGu5+sRFwx1A1fkcOcO4JXkjYkrqJkxND iu/2nvg/6Nwn7xe1NXrxD3ZxFaWHMYYWA/4o0/KagynyzpBvFRAOguiyDOUQ3Ta7VSGB ZLd06rcU3NDiS5XdzmXWRLgfASqb0Qu9hu3I2v03eWBprnFIBhHGUckS8qJ6WAzn4vT2 MJPQ== 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 k6-v6si34639127pla.473.2018.09.24.05.42.23; Mon, 24 Sep 2018 05:42:39 -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 S2388762AbeIXSnU (ORCPT + 99 others); Mon, 24 Sep 2018 14:43:20 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:59122 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730507AbeIXSnU (ORCPT ); Mon, 24 Sep 2018 14:43:20 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 5F1FD109A; Mon, 24 Sep 2018 12:41:21 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rick Farrington , Felix Manlunas , "David S. Miller" , Sasha Levin Subject: [PATCH 4.18 174/235] liquidio: fix hang when re-binding VF host drv after running DPDK VF driver Date: Mon, 24 Sep 2018 13:52:40 +0200 Message-Id: <20180924113122.235241184@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180924113103.999624566@linuxfoundation.org> References: <20180924113103.999624566@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Rick Farrington [ Upstream commit ac13d6d8eaded15c67265eafc32f439ea3a0ac4a ] When configuring SLI_PKTn_OUTPUT_CONTROL, VF driver was assuming that IPTR mode was disabled by reset, which was not true. Since DPDK driver had set IPTR mode previously, the VF driver (which uses buf-ptr-only mode) was not properly handling DROQ packets (i.e. it saw zero-length packets). This represented an invalid hardware configuration which the driver could not handle. Signed-off-by: Rick Farrington Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c | 3 +++ drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c | 3 +++ 2 files changed, 6 insertions(+) --- a/drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c +++ b/drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c @@ -493,6 +493,9 @@ static void cn23xx_pf_setup_global_outpu for (q_no = srn; q_no < ern; q_no++) { reg_val = octeon_read_csr(oct, CN23XX_SLI_OQ_PKT_CONTROL(q_no)); + /* clear IPTR */ + reg_val &= ~CN23XX_PKT_OUTPUT_CTL_IPTR; + /* set DPTR */ reg_val |= CN23XX_PKT_OUTPUT_CTL_DPTR; --- a/drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c +++ b/drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c @@ -165,6 +165,9 @@ static void cn23xx_vf_setup_global_outpu reg_val = octeon_read_csr(oct, CN23XX_VF_SLI_OQ_PKT_CONTROL(q_no)); + /* clear IPTR */ + reg_val &= ~CN23XX_PKT_OUTPUT_CTL_IPTR; + /* set DPTR */ reg_val |= CN23XX_PKT_OUTPUT_CTL_DPTR;