Return-path: Received: from youngberry.canonical.com ([91.189.89.112]:60189 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751221AbdJEGjP (ORCPT ); Thu, 5 Oct 2017 02:39:15 -0400 Received: from mail-wm0-f69.google.com ([74.125.82.69]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1dzzoP-0005B5-Ux for linux-wireless@vger.kernel.org; Thu, 05 Oct 2017 06:39:13 +0000 Received: by mail-wm0-f69.google.com with SMTP id i124so2230795wmf.1 for ; Wed, 04 Oct 2017 23:39:13 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1506408099-18488-1-git-send-email-acelan.kao@canonical.com> <1506408099-18488-2-git-send-email-acelan.kao@canonical.com> <20170926064456.GA28611@infradead.org> <20170926140413.GA19977@infradead.org> <878th14kde.fsf@kamboji.qca.qualcomm.com> From: AceLan Kao Date: Thu, 5 Oct 2017 14:39:12 +0800 Message-ID: (sfid-20171005_083932_362588_8564362F) Subject: Re: [PATCH 2/6] ath9k: add a quirk to set use_msi automatically To: Daniel Drake Cc: Kalle Valo , Christoph Hellwig , QCA ath9k Development , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, "Linux-Kernel@Vger. Kernel. Org" Content-Type: text/plain; charset="UTF-8" Sender: linux-wireless-owner@vger.kernel.org List-ID: Hi all, Please drop my patches, Qualcomm is working internally and will submit the MSI patch by themselves. Thanks. Hi Daniel, I'll try your patches tomorrow. Best regards, AceLan Kao. 2017-10-02 12:21 GMT+08:00 Daniel Drake : > Hi AceLan, > > On Thu, Sep 28, 2017 at 4:28 PM, AceLan Kao wrote: >> Hi Daniel, >> >> I've tried your patch, but it doesn't work for me. >> Wifi can scan AP, but can't get connected. > > Can you please clarify which patch(es) you have tried? > > This is the base patch which adds the infrastructure to request > specific MSI IRQ vectors: > https://marc.info/?l=linux-wireless&m=150631274108016&w=2 > > This is the ath9k MSI patch which makes use of that: > https://github.com/endlessm/linux/commit/739c7a924db8f4434a9617657 > > If you were already able to use ath9k MSI interrupts without specific > consideration for which MSI vector numbers were used, these are the > possible explanations that spring to mind: > > 1. You got lucky and it picked a vector number that is 4-aligned. You > can check this in the "lspci -vvv" output. You'll see something like: > Capabilities: [50] MSI: Enable+ Count=1/4 Maskable+ 64bit+ > Address: 00000000fee0300c Data: 4142 > The lower number is the vector number. In my example here 0x42 (66) is > not 4-aligned so the failure condition will be hit. > > 2. You are using interrupt remapping, which I suspect may provide a > high likelihood of MSI interrupt vectors being 4-aligned. See if > /proc/interrupts shows the IRQ type as IR-PCI-MSI > Unfortunately interrupt remapping is not available here, > https://lists.linuxfoundation.org/pipermail/iommu/2017-August/023717.html > > 3. My assumption that all ath9k hardware corrupts the MSI vector > number could wrong. However we've seen this on different wifi modules > in laptops produced by different OEMs and ODMs, so it seems to be a > somewhat widespread problem at least. > > 4. My assumption that ath9k hardware is corrupting the MSI vector > number could be wrong; maybe another component is to blame, could it > be a BIOS issue? Admittedly I don't really know how I can debug the > layers inbetween seeing the MSI Message Data value disagree with the > vector number being handled inside do_IRQ(). > > Daniel