From patchwork Wed Nov 1 12:12:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitkumar Karwar X-Patchwork-Id: 10036297 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 DE4DB603B5 for ; Wed, 1 Nov 2017 12:19:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB64228541 for ; Wed, 1 Nov 2017 12:19:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C02BF28B0D; Wed, 1 Nov 2017 12:19:42 +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 315C728541 for ; Wed, 1 Nov 2017 12:19:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932128AbdKAMTk (ORCPT ); Wed, 1 Nov 2017 08:19:40 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:50015 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752066AbdKAMTj (ORCPT ); Wed, 1 Nov 2017 08:19:39 -0400 Received: by mail-pf0-f194.google.com with SMTP id i5so1834881pfe.6 for ; Wed, 01 Nov 2017 05:19:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=7WA/IXQ00EqJVgRJaJlm+fCZoQPOxV1PjSj/RKo7L5M=; b=Nrro5H1g5VnVbzDsGbhJjs8P4pZVkenFqHr9py31WdIJ0lGbe3DYF543XHWQqP9u/s b24A71p1Xm+htTbDeReMgX4T8LzmqkDQEb09N4uaA4exKNfFl73TAgxbmpV2kBdGIitx CsRti+a5VzWuJYnhg2lVRoYeTBKKyIHNAMnb7QZ3xtXt/CKg6wOK4EuKLDf/waHNpb2R hbvVDJadSHCdBEKDXQNsAIlNMWToQohwyeQcT12C0iDsxTcXgcbt2V+toSfhMONaLVuU xex1yMh9rNNGZs1zRG4ooUcvNRgKVqVDvTdaM/QNO2US2sRJ866/+Zm8lRTK3e+APZOV FWsg== 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; bh=7WA/IXQ00EqJVgRJaJlm+fCZoQPOxV1PjSj/RKo7L5M=; b=aJ6Qb0MNO/RcaEoVTxx98yzebcR8f6ACPK3XKUepDShRTk78YaBCoYA0xU4k+apLQb P4kH//GcDnAXf8c8FmO0Ildi4LvCjaNzWZNnaZQKFD9SYJAwXhxDh6NTCQCYwYwsgt1a Kewiv97ouqZBM9J8R24jly0AKunbcCjEw72c/mizX+w22j2hDvDlwGs7m5k3NqvD4KpM 8nTpPCmIkLtl6KcMYcrz9CE5MjGeBnjM0Bk5ybRz8dmn0EgS0swVqWnl7MJHL373+oUc J8G2wnoakRLq2y+YtDWk03VHRELrOyeHAbmijoHhH7U74xfsVjGD/qywbW5j3Cjiyd5c WLmQ== X-Gm-Message-State: AMCzsaXkWc+CFodOOoItOVOtuX3KiOSC0dZWRzJYQMLY4xW3qynIxCll 8QpP+zDWhuxeMpiXoYLMmV0= X-Google-Smtp-Source: ABhQp+RcgLigIINzOg7DnbcVICpGMfsSn6NeNW3WVBFT/zyNr4kdDj0UFLrZ/+UMIJlXu7UNa6O+gg== X-Received: by 10.101.65.69 with SMTP id x5mr5144311pgp.102.1509538778899; Wed, 01 Nov 2017 05:19:38 -0700 (PDT) Received: from cpu185.redpinesignals.com ([203.196.161.90]) by smtp.gmail.com with ESMTPSA id s9sm1340997pgc.18.2017.11.01.05.19.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Nov 2017 05:19:38 -0700 (PDT) From: Amitkumar Karwar To: Kalle Valo Cc: linux-wireless@vger.kernel.org, Amitkumar Karwar , Prameela Rani Garnepudi Subject: [PATCH 1/2] rsi: move rsi_sdio_reinit_device() out of CONFIG_PM Date: Wed, 1 Nov 2017 17:42:44 +0530 Message-Id: <1509538365-31532-1-git-send-email-amitkarwar@gmail.com> X-Mailer: git-send-email 2.7.4 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: Amitkumar Karwar This function is generic. It doesn't contain wowlan specific code. It should not be under CONFIG_PM. This patch resolves compilation errors observed when CONFIG_PM flag is disabled. Reported-by: kbuild test robot Fixes: ef71ed0608c ("rsi: sdio: Add WOWLAN support for S5 shutdown state") Fixes: a24e35fcee0 ("rsi: sdio: Add WOWLAN support for S4 hibernate state") Fixes: e1ced6422a3 ("rsi: sdio: add WOWLAN support for S3 suspend state") Signed-off-by: Amitkumar Karwar --- drivers/net/wireless/rsi/rsi_91x_sdio.c | 52 ++++++++++++++++----------------- drivers/net/wireless/rsi/rsi_sdio.h | 1 - 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio.c b/drivers/net/wireless/rsi/rsi_91x_sdio.c index 3288fb6..b0cf411 100644 --- a/drivers/net/wireless/rsi/rsi_91x_sdio.c +++ b/drivers/net/wireless/rsi/rsi_91x_sdio.c @@ -871,6 +871,32 @@ static int rsi_init_sdio_interface(struct rsi_hw *adapter, return status; } +static int rsi_sdio_reinit_device(struct rsi_hw *adapter) +{ + struct rsi_91x_sdiodev *sdev = adapter->rsi_dev; + struct sdio_func *pfunction = sdev->pfunction; + int ii; + + for (ii = 0; ii < NUM_SOFT_QUEUES; ii++) + skb_queue_purge(&adapter->priv->tx_queue[ii]); + + /* Initialize device again */ + sdio_claim_host(pfunction); + + sdio_release_irq(pfunction); + rsi_reset_card(pfunction); + + sdio_enable_func(pfunction); + rsi_setupcard(adapter); + rsi_init_sdio_slave_regs(adapter); + sdio_claim_irq(pfunction, rsi_handle_interrupt); + rsi_hal_device_init(adapter); + + sdio_release_host(pfunction); + + return 0; +} + static struct rsi_host_intf_ops sdio_host_intf_ops = { .write_pkt = rsi_sdio_host_intf_write_pkt, .read_pkt = rsi_sdio_host_intf_read_pkt, @@ -1281,32 +1307,6 @@ static void rsi_shutdown(struct device *dev) rsi_dbg(INFO_ZONE, "***** RSI module shut down *****\n"); } -int rsi_sdio_reinit_device(struct rsi_hw *adapter) -{ - struct rsi_91x_sdiodev *sdev = adapter->rsi_dev; - struct sdio_func *pfunction = sdev->pfunction; - int ii; - - for (ii = 0; ii < NUM_SOFT_QUEUES; ii++) - skb_queue_purge(&adapter->priv->tx_queue[ii]); - - /* Initialize device again */ - sdio_claim_host(pfunction); - - sdio_release_irq(pfunction); - rsi_reset_card(pfunction); - - sdio_enable_func(pfunction); - rsi_setupcard(adapter); - rsi_init_sdio_slave_regs(adapter); - sdio_claim_irq(pfunction, rsi_handle_interrupt); - rsi_hal_device_init(adapter); - - sdio_release_host(pfunction); - - return 0; -} - static int rsi_restore(struct device *dev) { struct sdio_func *pfunction = dev_to_sdio_func(dev); diff --git a/drivers/net/wireless/rsi/rsi_sdio.h b/drivers/net/wireless/rsi/rsi_sdio.h index 8fbf90e..49c549b 100644 --- a/drivers/net/wireless/rsi/rsi_sdio.h +++ b/drivers/net/wireless/rsi/rsi_sdio.h @@ -131,5 +131,4 @@ int rsi_sdio_master_access_msword(struct rsi_hw *adapter, u16 ms_word); void rsi_sdio_ack_intr(struct rsi_hw *adapter, u8 int_bit); int rsi_sdio_determine_event_timeout(struct rsi_hw *adapter); int rsi_sdio_check_buffer_status(struct rsi_hw *adapter, u8 q_num); -int rsi_sdio_reinit_device(struct rsi_hw *adapter); #endif