Linux wireless drivers development
 help / color / mirror / Atom feed
From: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
To: mani@kernel.org
Cc: alex@shazbot.org, ath11k@lists.infradead.org,
	ath12k@lists.infradead.org, bhelgaas@google.com,
	jjohnson@kernel.org, jtornosm@redhat.com,
	linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
	linux-wireless@vger.kernel.org, mhi@lists.linux.dev
Subject: Re: [PATCH v9] PCI: Add device-specific reset for Qualcomm devices
Date: Tue, 23 Jun 2026 14:56:35 +0200	[thread overview]
Message-ID: <20260623125637.1188867-1-jtornosm@redhat.com> (raw)
In-Reply-To: <r4jeqtx247iosfjdps6g4fqwtsdzine5qlgh33sdt4p6ktmaln@o725aolrpj4l>

Hi Mani and Alex,

Thank you both for the guidance. 


I think your insight about the BAR-space reset mechanisms is a much better
approach to have a "real" reset. With that, I've implemented device-specific
reset functions based on the driver code Mani referenced:

WCN6855/WCN7850 WiFi (reset_qualcomm_wifi):
- Uses SoC global reset via BAR0 offset 0x3008
- Follows the sequence from ath11k_pci_soc_global_reset() /
  ath12k_pci_soc_global_reset() / ath11k_pci_sw_reset()
- Set reset bit → 10ms delay → clear reset bit → 10ms delay → verify link
  recovery (up to 5s)
- Includes MHI controller reset cleanup (offset 0x38) to clear SYSERR after SoC
  reset
- Both WCN6855 and WCN7850 share identical register offsets and reset sequence

SDX62/SDX65 modems (reset_qualcomm_modem):
- Uses MHI SoC reset via BAR0 offset 0xb0
- Follows the sequence from mhi_soc_reset() / mhi_pci_reset_prepare()
- Write reset request → 2s delay for reset completion

All implementations follow Alex's pattern: save command register ->
enable memory decode -> ioremap BAR -> perform reset sequence ->
iounmap -> restore command.
Testing results: The implementation shows successful reset behavior for both
WiFi and modem devices in VFIO passthrough scenarios.


Regarding the approach (quirks.c vs dedicated VFIO driver):

Mani, I understand your concern about potential conflicts with the native
drivers. I want to make sure I implement this correctly. Could you clarify
when you envision the conflict occurring? 
From what I can see, the native drivers call their reset functions directly
without using pci_try_reset_function(), so the device-specific reset in
quirks.c could be enough, but I may be missing some error recovery paths or
other scenarios.

Alex, Mani - would you prefer a dedicated VFIO PCI variant driver (similar
to mlx5-vfio-pci) to ensure the reset logic only runs in VFIO scenarios, or
is the quirks.c approach acceptable? I can implement either approach.

With the decision I will send v10.


Thank you again for all your help

Best regards
José Ignacio


  reply	other threads:[~2026-06-23 12:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-12 14:26 [PATCH v9] PCI: Add device-specific reset for Qualcomm devices Jose Ignacio Tornos Martinez
2026-06-12 15:12 ` Alex Williamson
2026-06-12 15:17 ` Bjorn Helgaas
2026-06-15  7:30   ` Jose Ignacio Tornos Martinez
2026-06-17 14:47 ` Manivannan Sadhasivam
2026-06-17 15:47   ` Jose Ignacio Tornos Martinez
2026-06-17 16:55     ` Manivannan Sadhasivam
2026-06-18  6:33       ` Jose Ignacio Tornos Martinez
2026-06-22 16:22         ` Manivannan Sadhasivam
2026-06-22 22:08           ` Alex Williamson
2026-06-23  5:32             ` Manivannan Sadhasivam
2026-06-23 12:56               ` Jose Ignacio Tornos Martinez [this message]
2026-06-23 13:40                 ` Manivannan Sadhasivam
2026-06-23 14:15                 ` Alex Williamson
2026-06-23 13:50             ` Manivannan Sadhasivam
2026-06-23  8:55         ` Baochen Qiang
2026-06-23 12:57           ` Jose Ignacio Tornos Martinez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260623125637.1188867-1-jtornosm@redhat.com \
    --to=jtornosm@redhat.com \
    --cc=alex@shazbot.org \
    --cc=ath11k@lists.infradead.org \
    --cc=ath12k@lists.infradead.org \
    --cc=bhelgaas@google.com \
    --cc=jjohnson@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=mhi@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox