Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp989212pxb; Thu, 15 Apr 2021 11:04:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/m8Zyo0EPRyB0N2slrfF8o6fc3UNmN2nwTX4d5Loq65Tzykt4uvjkeminRnBWbOIgBets X-Received: by 2002:a05:6402:447:: with SMTP id p7mr5755883edw.89.1618509859669; Thu, 15 Apr 2021 11:04:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618509859; cv=none; d=google.com; s=arc-20160816; b=A/mIXq9Pw5QnXDdf5s6U9AuPDkBPP6/KAWQ/Fh94AJTFlJvy47/XLgXR4MsiLsa0C6 WJirFYWdAninT7b27A9WnGrz/S32s0bmRx8keFURJ+dLsPMZamRY3dvBuHYNtWHK3NbR nU5JU+LlJcH5BUO6ssOn9Q/bi6oIJuR7Jr05GzBYp1PBkqNVjkL7VBKcHz1iFADwII/F QPlRr5ztJmI/93XMmfGsNFo2p+dxkSRc3FCDF4FG1B9jpVLDvVBxDRncawkHE1YerwAw z5QNDh0nIEH0b0EfUjX6pksAl5ax1lCkCI/cEBAKV9493oKp6peV76GUksrhM7o2oP86 BVmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject:dkim-signature; bh=nsE6kRNpFdum15DlpExZUD1dZfo8/ZjGacMJ9dRueTA=; b=ES23T5jxRSj2a9IA0DzZXtboOCnEHE47HaR9E+qAdcn2lAajbOf36M/ZarWkjluyzu LMKRskimA1IvXNWJibGwnKev42ed2iqikh0EJ4VyAkxFhnWtlLWtcdMsEpTh5nto/7wa vnqb7Eb3T0+cYUesQoNWF/oPZ4F4gqGs3r590l8h+oNajZJ+4xJXmGXjU50ssvL1tATc eM+2UtztVdAfgsrxFRdbzyr9QKGS0jpCHAOXhwqJU8NFhkGg6BR1SbGsH6bjUYXvYhg8 tKZEhEREvX3V5ZfDazt7nOvZd46meCf9VMlnCyh29Ys5jqHCkNGbriZEo+56Uhmkp0ay 5ang== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@web.de header.s=dbaedf251592 header.b=fgmi82Rq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=web.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hg20si2704746ejc.465.2021.04.15.11.03.56; Thu, 15 Apr 2021 11:04:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@web.de header.s=dbaedf251592 header.b=fgmi82Rq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=web.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234531AbhDOSCy (ORCPT + 99 others); Thu, 15 Apr 2021 14:02:54 -0400 Received: from mout.web.de ([212.227.15.3]:37907 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234407AbhDOSCy (ORCPT ); Thu, 15 Apr 2021 14:02:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1618509745; bh=JVNsfyzS9pcv9aOIQP2PqYZOV0tqmt0zJQQhKeJU3fc=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=fgmi82RqwnG8uVWenVb4P5JAIkJ0EAuLQOCOi+qTYXHMeqLnOeG0ZBsYqoy04l5Nh xdZly78oXPs1c1whNL29N432jrql6XdiumDvENow4z6bdreK3IgUWk7OSmJ6AhCtRL PvFjmEnkK+G/zQkgqLVP/9IZbFCZ3Cj5dP2TiOWc= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from [192.168.2.111] ([178.4.39.112]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0M5OaF-1lk3na1Jq3-00zU5j; Thu, 15 Apr 2021 20:02:25 +0200 Subject: Re: QCA6174 pcie wifi: Add pci quirks To: Alex Williamson , Bjorn Helgaas Cc: bhelgaas@google.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org References: <08982e05-b6e8-5a8d-24ab-da1488ee50a8@web.de> <20210414210350.GA2537653@bjorn-Precision-5520> <20210414203650.1f83a5dd@x1.home.shazbot.org> From: Ingmar Klein Message-ID: Date: Thu, 15 Apr 2021 20:02:23 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: <20210414203650.1f83a5dd@x1.home.shazbot.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:j2RWH3VMgFo4SJLh5Oqo3oT6N1ks0sB8h/CGSCzOScAvbQU0EKE ua5oklAip9qKaAqw2LTMzHn7GclOLNvAmhbNSmeqFu6KFy7gX/ObqoQsLXJblrQnXCjpJNl 2LNDtmDgQhU4e5nHV03gMwY5LJ7SkY7O6ZNeIG3F0YC+qztWlrjc7PD/+9wbsd9bRszi+2d 9KMMN14H76Takn4I+di0g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:B76y/98jsU0=:eNACdmYeQ0p39ggwgPuGDc OKj02qUQBS/NYp3i0eQ0Rscs7v1QXkgqXVMuVMkMpNXPsqw3s51CRUrvpSj982OIwu9JKORPv tLizloQnKW7VheU3YHPftE8bBgYj41krTs1KC0ADEY4tSXl1XFq7gG1diTDw9ZUlHGo2x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+sO8l5sylgoU= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org First thanks to you both, Alex and Bjorn! I am in no way an expert on this topic, so I have to fully rely on your feedback, concerning this issue. If you should have any other solution approach, in form of patch-set, I would be glad to test it out. Just let me know, what you think might make sense. I will wait for your further feedback on the issue. In the meantime I have my current workaround via quirk entry. By the way, my layman's question: Do you think, that the following topic might also apply for the QCA6174? https://www.spinics.net/lists/linux-pci/msg106395.html Or in other words, should a similar approach be tried for the QCA6174 and if yes, would it bring any benefit at all? I hope you can excuse me, in case the questions should not make too much sense. Best regards, Ingmar Am 15.04.2021 um 04:36 schrieb Alex Williamson: > On Wed, 14 Apr 2021 16:03:50 -0500 > Bjorn Helgaas wrote: > >> [+cc Alex] >> >> On Fri, Apr 09, 2021 at 11:26:33AM +0200, Ingmar Klein wrote: >>> Edit: Retry, as I did not consider, that my mail-client would make thi= s >>> party html. >>> >>> Dear maintainers, >>> I recently encountered an issue on my Proxmox server system, that >>> includes a Qualcomm QCA6174 m.2 PCIe wifi module. >>> https://deviwiki.com/wiki/AIRETOS_AFX-QCA6174-NX >>> >>> On system boot and subsequent virtual machine start (with passed-throu= gh >>> QCA6174), the VM would just freeze/hang, at the point where the ath10k >>> driver loads. >>> Quick search in the proxmox related topics, brought me to the followin= g >>> discussion, which suggested a PCI quirk entry for the QCA6174 in the k= ernel: >>> https://forum.proxmox.com/threads/pcie-passthrough-freezes-proxmox.275= 13/ >>> >>> I then went ahead, got the Proxmox kernel source (v5.4.106) and applie= d >>> the attached patch. >>> Effect was as hoped, that the VM hangs are now gone. System boots and >>> runs as intended. >>> >>> Judging by the existing quirk entries for Atheros, I would think, that >>> my proposed "fix" could be included in the vanilla kernel. >>> As far as I saw, there is no entry yet, even in the latest kernel sour= ces. >> This would need a signed-off-by; see >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree= /Documentation/process/submitting-patches.rst?id=3Dv5.11#n361 >> >> This is an old issue, and likely we'll end up just applying this as >> yet another quirk. But looking at c3e59ee4e766 ("PCI: Mark Atheros >> AR93xx to avoid bus reset"), where it started, it seems to be >> connected to 425c1b223dac ("PCI: Add Virtual Channel to save/restore >> support"). >> >> I'd like to dig into that a bit more to see if there are any clues. >> AFAIK Linux itself still doesn't use VC at all, and 425c1b223dac added >> a fair bit of code. I wonder if we're restoring something out of >> order or making some simple mistake in the way to restore VC config. > I don't really have any faith in that bisect report in commit > c3e59ee4e766. To double check I dug out the card from that commit, > installed an old Fedora release so I could build kernel v3.13, > pre-dating 425c1b223dac and tested triggering a bus reset both via > setpci and by masking PM reset so that sysfs can trigger the bus reset > path with the kernel save/restore code. Both result in the system > hanging when the device is accessed either restoring from the kernel > bus reset or reading from the device after the setpci reset. Thanks, > > Alex >