Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2648509imj; Mon, 11 Feb 2019 06:26:56 -0800 (PST) X-Google-Smtp-Source: AHgI3IZJtBC8ERoFBt2mD4ByJWDV+tqXiVCUoITsuAE5VE6wxoor4F+FV0RrJ/erydIpn7BN+Nqr X-Received: by 2002:a63:2e06:: with SMTP id u6mr9404934pgu.71.1549895216348; Mon, 11 Feb 2019 06:26:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549895216; cv=none; d=google.com; s=arc-20160816; b=GC0TzOWNR0QSy0V/ko2Y7V0tLHZNf0bNPmGyjuy9mSq6yDe9kKUvwUQ3GC+9KV73mx fEKHEvkiFtVPtQmdi/efAXEvElMiMwmTBTGlt5FySPzDuiGVCm1WwnwgIdGSRYMd1MT0 P5Xu4g9xd5ec0ec8ymh0TeEVJQXYyKC4SdKionjgLGc7FKJqAZ76IH2vLQ+UkS0Jzz7p Lq3NwhKy0c30W0qGHtZROCvy/Qw+s3JEF9q7OjufsMO3EiT9kSSpv4jv90OmBay7wi/V CS+N9iKAUv7m5ACEXjXmIg1cjl2VNDMMgFf0QkQ8fgnjhvev2pWFQ+hxSYWREeoOEuZf TCqA== 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:dkim-signature; bh=G03EBz46KFf0AwNewGkMbW0+Kzq9gbcebp3KWrAEc2A=; b=VscntZ5ALVu/u3J0Q862cBoShpg38tqYDcQhfrokDDCgkpXKPbsLNrRoJAeHG+8nug UhnO3iLEqmj7gZRuVeoykFGeoun6uyEWfRKvheiZ5hnsUko2fwMBYNwRuGNwI9je2MTc i0QtEAS1sAKviChMdbtwGJzYdo60DvVVc24VKL5O2Cxc5lxbg59LZZA0aDuAOiWdWXPr byYI7cU9FXrYy75QFvM12wNVnE+hBEyAQJY91om2UnYIZhDx9o1yAvT6ulViVr3YHl/r BKnbOs8CK4Z+QRnMA25EIGSwXXQ1r4hAi8KUGTpgOnxhl1lBpIJkkSa5RLoGllzfGjhP AW9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bkC65y1d; 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 f17si435716pff.171.2019.02.11.06.26.40; Mon, 11 Feb 2019 06:26:56 -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=bkC65y1d; 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 S1728827AbfBKOWm (ORCPT + 99 others); Mon, 11 Feb 2019 09:22:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:55638 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728818AbfBKOWj (ORCPT ); Mon, 11 Feb 2019 09:22:39 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D139E20838; Mon, 11 Feb 2019 14:22:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549894959; bh=kfx7zmtPJCmPyN/tCf5TJdPo1pBtC/LoCzcRNNT83xI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bkC65y1d8y0f2KVTehqVJ1qjm39TRqMvAMzFU0LbTEbzJvH/c2NZO7KXXrXtIbVLb T8N9Y3RKIDQnSyz7ln7EZ9YGyq+FEkrwUWn90hzrQNgUHoN9eckQ79WtL4Pxm6arFp Hes1SpDtkc7zVGYs1TqwImsH02l0bVudyBSNV+N8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexei Avshalom Lazar , Maya Erez , Kalle Valo , Sasha Levin Subject: [PATCH 4.20 015/352] wil6210: fix reset flow for Talyn-mb Date: Mon, 11 Feb 2019 15:14:02 +0100 Message-Id: <20190211141847.365632431@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore 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.20-stable review patch. If anyone has any objections, please let me know. ------------------ [ 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 398900a1c29e..c54b008996ee 100644 --- a/drivers/net/wireless/ath/wil6210/main.c +++ b/drivers/net/wireless/ath/wil6210/main.c @@ -998,10 +998,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