From patchwork Fri Feb 24 13:10:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 9590227 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 98FF160578 for ; Fri, 24 Feb 2017 13:11:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 624542857C for ; Fri, 24 Feb 2017 13:11:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 570192875B; Fri, 24 Feb 2017 13:11:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C45AA286E0 for ; Fri, 24 Feb 2017 13:11:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751758AbdBXNKw (ORCPT ); Fri, 24 Feb 2017 08:10:52 -0500 Received: from mail-lf0-f66.google.com ([209.85.215.66]:33989 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751734AbdBXNKp (ORCPT ); Fri, 24 Feb 2017 08:10:45 -0500 Received: by mail-lf0-f66.google.com with SMTP id x142so568386lfd.1 for ; Fri, 24 Feb 2017 05:10:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=rcjVwVco/E3IF6r4+XJtAQVEVCnbFdxNTZgZMASZ2bI=; b=Myib+u7869riJS7oOTCOY6kMQ2+7rDVnlc0EBTv6cYj5RVxKOtPfgRTGP1p3kcBUiq BMfyjrbaCYsX/Ol4z9LzqUBqrNYP/QGl64l+2DP2mVrJX9UQ8tBCIET4FWDmtNLNYgey U2H/+RSlP8+KgaeUSy4Tqo7MQiHA61ur/rzD5lRAhO5m0nbAsqB4p0oQd9wv8Tcv/Wuc XiVONGK7z9MNSksySb9W6sGo8PyHxMbtZFeyaxOwdDQCZRDbQ5jbFZS+9eMmI9Kvzn0H 5fR3B7e/nH/jpmScqp93lKnz+pJC2a7uLT8901EjRp+1AA8TxpgE5XCJh1pvrUyWB914 5FYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=rcjVwVco/E3IF6r4+XJtAQVEVCnbFdxNTZgZMASZ2bI=; b=idPy6fTPBraF1yDQ6ucTAoIyHuhEZgpz2kKVQxAhnF2ID9TbtsQnWthmE4veUlyX2+ cp38j1rlvbC1kk9Ly41GLTrgKBDZHrIugbcsjEQRRjR3lSA3tzasCA2s67JYIIdkT868 eMXBLCGfEonzySmIBJ/WNnnFx52P7r4v4XMzJSDZINASedIDf11TtAq+uSe9oh8C13M7 Tplv/1YQDM7/so0svJDHySKZ8KuaKsrPBxlr5x5ZeWh9QWCas7SjI3+RicqPz1K2KS9U vRLZqXEqz3LjIF5NiyCYte+7TElRfbVH02bappDDjDsWGiosnkZn9dqfrdAczhzb62No g+Qg== X-Gm-Message-State: AMke39lJD3lG+am68TAfCHFpQ+fJfnMK6FDiZKBEsEGGNywLSwhTc1bVveeaA9UlDknBjw== X-Received: by 10.25.216.156 with SMTP id r28mr761852lfi.28.1487941843375; Fri, 24 Feb 2017 05:10:43 -0800 (PST) Received: from linux-samsung.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id f133sm1988394lfg.32.2017.02.24.05.10.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Feb 2017 05:10:42 -0800 (PST) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: Kalle Valo Cc: Arend van Spriel , Franky Lin , Hante Meuleman , Pieter-Paul Giesberts , Franky Lin , linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Subject: [PATCH 4.12] brcmfmac: put chip into passive mode (when attaching) just once Date: Fri, 24 Feb 2017 14:10:27 +0100 Message-Id: <20170224131027.29880-1-zajec5@gmail.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Rafał Miłecki It avoids some unnecessary work. Most likely there wasn't much sense in doing this before bus reset anyway, as reset is supposed to put chip into default state. In PCIe code (only bus implementing reset) we e.g. use watchdog to perform a chip "reboot". Signed-off-by: Rafał Miłecki --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c index 05f22ff81d60..670f2f50f9e5 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c @@ -967,16 +967,14 @@ static int brcmf_chip_recognition(struct brcmf_chip_priv *ci) if (ret) return ret; - /* assure chip is passive for core access */ - brcmf_chip_set_passive(&ci->pub); - /* Call bus specific reset function now. Cores have been determined * but further access may require a chip specific reset at this point. */ - if (ci->ops->reset) { + if (ci->ops->reset) ci->ops->reset(ci->ctx, &ci->pub); - brcmf_chip_set_passive(&ci->pub); - } + + /* assure chip is passive for core access */ + brcmf_chip_set_passive(&ci->pub); return brcmf_chip_get_raminfo(ci); }