Thread (9 messages) 9 messages, 4 authors, 2021-06-04

Re: [RFC PATCH 3/3] mwifiex: pcie: add reset_wsid quirk for Surface 3

From: Andy Shevchenko <hidden>
Date: 2021-06-04 21:28:17
Also in: linux-pci, lkml, netdev

On Sat, Jun 5, 2021 at 12:15 AM Bjorn Helgaas [off-list ref] wrote:
On Sat, May 22, 2021 at 03:18:27PM +0200, Jonas Dreßler wrote:
quoted
From: Tsuchiya Yuto <redacted>

This commit adds reset_wsid quirk and uses this quirk for Surface 3 on
card reset.

To reset mwifiex on Surface 3, it seems that calling the _DSM method
exists in \_SB.WSID [1] device is required.

On Surface 3, calling the _DSM method removes/re-probes the card by
itself. So, need to place the reset function before performing FLR and
skip performing any other reset-related works.
Maybe this is a nit-pick, but I understand "probing" to be something
the OS does, namely what we normally call "enumeration," i.e.,
discovering a device.

So it sounds like the _DSM causes a logical hot-removal of the card,
which the PCI hotplug driver should notice and it should remove the
driver and remove the pci_dev.

And the _DSM also causes a hot-add (reading the code below, it looks
like this is actually a second _DSM),
_DSM can be only one (single) per device node in ACPI.
But _DSM may have "functions", that's what we see here.
which the PCI hotplug driver
should also notice and enumerate the bus (i.e., it reads config space
looking for a device).  This all would cause a new pci_dev to be
allocated, resources assigned for its BARs, and the driver .probe()
method to be called again?

That seems like a lot, so maybe I didn't understand what's actually
happening.

-- 
With Best Regards,
Andy Shevchenko
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help