From patchwork Thu Feb 21 16:21:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 10824327 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E35FC1399 for ; Thu, 21 Feb 2019 16:22:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CDD29319CA for ; Thu, 21 Feb 2019 16:22:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CBC7E319DC; Thu, 21 Feb 2019 16:22:09 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 76A5E319DF for ; Thu, 21 Feb 2019 16:22:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=KRLaXdzrykU2xj+OWdsPw3VIRN7vmRVSnzzGCENLpTU=; b=PZCJJj25rSfp6WRwutHXTiBwBJ S7Mpi4S5TcPnE5hrKLOS9cVILd4zCgOqtX96aCu0x33bl2OkkdU+gIRAu8akfFIL/l52mUtk+zuH6 NCPKWo3wo2U+6yPt485nF+Arav0vUOAqIFxH/zmS2CIOQ5yk7xuXdCs8ZRj+hgczSaj3O3yg+N76E YpOo+3wOHzCe3JfUhAk+sd4fzTy9RtE7rqgfgI/O8BPgxc2hKyl3DqSQFDmd/VltCmNKnzQ/Y4xd1 BLBYw9WEfyo3tLqbpkyIg0SxxlWrcSb3f6NbyftBLXjyViaCwPKHH4vgf60NDmUI5809cT9uKdndE 8bC9b3LQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gwr6u-0002BH-I8; Thu, 21 Feb 2019 16:22:08 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gwr6r-0002Af-VS for ath10k@lists.infradead.org; Thu, 21 Feb 2019 16:22:07 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 5829060EE8; Thu, 21 Feb 2019 16:22:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1550766125; bh=x6mbtZLchhAtSgSgjExPChUEXfr4Yx6kSSB2wPccl50=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VKY8T1JGGQ+id/sBX3erarGKYR4lrRGKGgzspDNBJ3MMup2ki0DXCNcHxn6y5jrfo TyO2vWdFoUtsMGcJaYMI1nexpTwPYJOqOk21MvoXVSy6jqMVMYAq/+NsgHY5w0HerP cJ6bNxTTaVbXn95H7oXjafuYii9S36dwErAL90Eo= Received: from potku.adurom.net (88-114-240-156.elisa-laajakaista.fi [88.114.240.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: kvalo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 91CBA60EC1; Thu, 21 Feb 2019 16:22:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1550766124; bh=x6mbtZLchhAtSgSgjExPChUEXfr4Yx6kSSB2wPccl50=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PNdtqHKPgBy2C+Nqmu5f3gzo6bW7NCv4NH/zHAAOytuYC6MdkrLTb63HthNX3cmjA AprHaKPhiAjcJF6CQfh64PC0/jLZ7JqlIP8wnfuAB2122MDS7EWxrxQLfdlgg+amHF UGsfnB7PS+cYt/BXMABMKdk8NUh5GFEtYRfr9QVI= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 91CBA60EC1 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: ath10k@lists.infradead.org Subject: [PATCH 1/4] ath10k: sdio: set hi_acs_flags Date: Thu, 21 Feb 2019 18:21:55 +0200 Message-Id: <1550766118-31703-2-git-send-email-kvalo@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1550766118-31703-1-git-send-email-kvalo@codeaurora.org> References: <1550766118-31703-1-git-send-email-kvalo@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190221_082206_024573_5ECDBD61 X-CRM114-Status: GOOD ( 10.82 ) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alagu Sankar , linux-wireless@vger.kernel.org, Wen Gong MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Alagu Sankar The SDIO firmware does not allow transmitting packets with the reduced tx completion HI_ACS option. SDIO firmware uses 1544 as alternate credit size, which is not big enough for the maximum sized mac80211 frames. Disable both these HI_ACS flags for SDIO. Co-developed-by: Wen Gong Signed-off-by: Alagu Sankar Signed-off-by: Wen Gong Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath10k/core.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index ac2cf3f1c7b4..0c62a61b5eac 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -637,10 +637,16 @@ static void ath10k_init_sdio(struct ath10k *ar) ath10k_bmi_write32(ar, hi_mbox_isr_yield_limit, 99); ath10k_bmi_read32(ar, hi_acs_flags, ¶m); - param |= (HI_ACS_FLAGS_SDIO_SWAP_MAILBOX_SET | - HI_ACS_FLAGS_SDIO_REDUCE_TX_COMPL_SET | - HI_ACS_FLAGS_ALT_DATA_CREDIT_SIZE); + /* Data transfer is not initiated, when reduced Tx completion + * is used for SDIO. disable it until fixed + */ + param &= ~HI_ACS_FLAGS_SDIO_REDUCE_TX_COMPL_SET; + /* Alternate credit size of 1544 as used by SDIO firmware is + * not big enough for mac80211 / native wifi frames. disable it + */ + param &= ~HI_ACS_FLAGS_ALT_DATA_CREDIT_SIZE; + param |= HI_ACS_FLAGS_SDIO_SWAP_MAILBOX_SET; ath10k_bmi_write32(ar, hi_acs_flags, param); }