Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3621954imu; Mon, 28 Jan 2019 08:00:50 -0800 (PST) X-Google-Smtp-Source: ALg8bN4C+vC1k4aA41bFHvOnx5vVb5otZEt5CHoi3MK4UwDTVuHB4fIofpEkkyLTxcY0wn3GVLIa X-Received: by 2002:a63:eb0e:: with SMTP id t14mr20512988pgh.445.1548691250163; Mon, 28 Jan 2019 08:00:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548691250; cv=none; d=google.com; s=arc-20160816; b=DWj+mhylbTPlBERZf8sElaIGa8aNd0Pafz5JxNPsJrgA+300Nasfm08KvhNQ9lKzIw bUzv6pZ5dF/l3WuQISBaMIMdHVpuw5lbmUi6d52wGu7LhZb/mbmq0Q8sbPZJVQvGlunk j6FgqRzlA2Em/bDsXgmXeF9GLks928j9tAbho9cL6m1q3h6yMtNfYoSIBLEpVRlzBv2r gukrGWBDd4kkjiZdLAiXwjtgZVRNb3IWqVR/dGwh+HOdpWmAePEsYF7QDzz6paU3Puat M+aTAslNLtnOQOlxcsFdqaB4aj68meNF3r7q0lxqM9Gqgcd9/XPpH6piYryruzZYvUTD ik+g== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2lN91HbCJW7B//AS57EWLPaJ4NuwiGBZkpMetj+rijI=; b=kj5hSrH2S81Fk1uR5DDuWqsZf3yPFaK+g8mwBJauvOTkVu2u1mXTTEl22i7m8m1SQB +aSCRAsdsTH2PdvgLmZUUjF8qfrKkYgKGaFu1BNaF69K32oEDdm9DxcK5RvPc3QY1wDu O/6bQI672jgnZ2knTAkfnPhNRPv9O1fH4uSwUolEjq9tQ7gWqzoxVRuM7ZsqO6in4eKP tiTU2NOxMy8ZrOvkO3nOd1bsurReo/cM+u8kEGAoHNEWzRmeWfuj1VnD/aYZ2W3hj2S8 XF/pYcNdDLIrF3ZuDMIX7je14k/glYhTG9vDfmmvOWYn6zJ+ObxI1NyZkurRKWNcSN7r AqnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ntx5TCmV; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p22si32482643pgl.340.2019.01.28.08.00.34; Mon, 28 Jan 2019 08:00:50 -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; dkim=pass header.i=@kernel.org header.s=default header.b=Ntx5TCmV; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730672AbfA1QAB (ORCPT + 99 others); Mon, 28 Jan 2019 11:00:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:45260 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727858AbfA1P75 (ORCPT ); Mon, 28 Jan 2019 10:59:57 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 78E262082E; Mon, 28 Jan 2019 15:59:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691197; bh=2g2VR35LW0pOulIVISGAM47+1yF4qarYixNWVpr7YE8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ntx5TCmV1ujkE4d+aeVd/wvQPwafSCHvKbsnSM7w82P462GW2bSJWo/v+32DWQtmQ ug07+fTcbMiAmGdwHuL+A/1ugBuPUOqRP+sIDlNtQ3uBRbxekqfgTgRBfFSxlcszbg iKryg4wyPau6lF7pRfoGSAVTpYn9YzZrW8GTlB7g= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Alexei Avshalom Lazar , Maya Erez , Kalle Valo , Sasha Levin , linux-wireless@vger.kernel.org, wil6210@qti.qualcomm.com, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 011/258] wil6210: fix reset flow for Talyn-mb Date: Mon, 28 Jan 2019 10:55:17 -0500 Message-Id: <20190128155924.51521-11-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexei Avshalom Lazar [ Upstream commit d083b2e2b7db5cca1791643d036e6597af27f49b ] With current reset flow, Talyn sometimes get stuck causing PCIe enumeration to fail. Fix this by removing some reset flow operations that are not relevant for Talyn. Setting bit 15 in RGF_HP_CTRL is WBE specific and is not in use for all wil6210 devices. For Sparrow, BIT_HPAL_PERST_FROM_PAD and BIT_CAR_PERST_RST were set as a WA an HW issue. Signed-off-by: Alexei Avshalom Lazar Signed-off-by: Maya Erez Signed-off-by: Kalle Valo Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/wil6210/main.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c index 7debed6bec06..a0fe8cbad104 100644 --- a/drivers/net/wireless/ath/wil6210/main.c +++ b/drivers/net/wireless/ath/wil6210/main.c @@ -995,10 +995,13 @@ static int wil_target_reset(struct wil6210_priv *wil, int no_flash) wil_dbg_misc(wil, "Resetting \"%s\"...\n", wil->hw_name); - /* Clear MAC link up */ - wil_s(wil, RGF_HP_CTRL, BIT(15)); - wil_s(wil, RGF_USER_CLKS_CTL_SW_RST_MASK_0, BIT_HPAL_PERST_FROM_PAD); - wil_s(wil, RGF_USER_CLKS_CTL_SW_RST_MASK_0, BIT_CAR_PERST_RST); + if (wil->hw_version < HW_VER_TALYN) { + /* Clear MAC link up */ + wil_s(wil, RGF_HP_CTRL, BIT(15)); + wil_s(wil, RGF_USER_CLKS_CTL_SW_RST_MASK_0, + BIT_HPAL_PERST_FROM_PAD); + wil_s(wil, RGF_USER_CLKS_CTL_SW_RST_MASK_0, BIT_CAR_PERST_RST); + } wil_halt_cpu(wil); -- 2.19.1