From: Bjorn Helgaas <helgaas@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
m.chetan.kumar@linux.intel.com, netdev@vger.kernel.org,
davem@davemloft.net, johannes@sipsolutions.net,
ryazanov.s.a@gmail.com, loic.poulain@linaro.org,
ilpo.jarvinen@linux.intel.com, ricardo.martinez@linux.intel.com,
chiranjeevi.rapolu@linux.intel.com, haijun.liu@mediatek.com,
edumazet@google.com, pabeni@redhat.com,
chandrashekar.devegowda@intel.com, linuxwwan@intel.com,
linuxwwan_5g@intel.com,
Madhusmita Sahu <madhusmita.sahu@intel.com>,
linux-pci@vger.kernel.org
Subject: Re: [PATCH v5 net-next 3/5] net: wwan: t7xx: PCIe reset rescan
Date: Thu, 26 Jan 2023 09:25:52 -0600 [thread overview]
Message-ID: <20230126152552.GA1265322@bhelgaas> (raw)
In-Reply-To: <20230124204543.550d88e3@kernel.org>
On Tue, Jan 24, 2023 at 08:45:43PM -0800, Jakub Kicinski wrote:
> Hi Bjorn,
>
> any objections to the kind of shenanigans this is playing?
Yes, thanks for asking. Drivers definitely should not have to do this
sort of thing.
> On Sat, 21 Jan 2023 19:03:23 +0530 m.chetan.kumar@linux.intel.com wrote:
> > From: M Chetan Kumar <m.chetan.kumar@linux.intel.com>
> >
> > PCI rescan module implements "rescan work queue".
> > In firmware flashing or coredump collection procedure
> > WWAN device is programmed to boot in fastboot mode and
> > a work item is scheduled for removal & detection.
> >
> > The WWAN device is reset using APCI call as part driver
> > removal flow. Work queue rescans pci bus at fixed interval
> > for device detection, later when device is detect work queue
> > exits.
I'm not sure what's going on here. Do we need to reset the device
when the t7xx driver is loaded so the device will load new firmware
when it comes out of reset?
There are a few drivers that do that, e.g., with pci_reset_function().
> > +static struct remove_rescan_context t7xx_rescan_ctx;
Apparently this only supports a single t7xx instance in a system? Not
good.
> > +void t7xx_pci_dev_rescan(void)
> > +{
> > + struct pci_bus *b = NULL;
> > +
> > + pci_lock_rescan_remove();
> > + while ((b = pci_find_next_bus(b)))
> > + pci_rescan_bus(b);
No, this driver absolutely cannot rescan and assign unassigned
resources for all the PCI buses in the system.
Bjorn
next prev parent reply other threads:[~2023-01-26 15:26 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-21 13:32 [PATCH v5 net-next 0/5] net: wwan: t7xx: fw flashing & coredump support m.chetan.kumar
2023-01-21 13:32 ` [PATCH v5 net-next 1/5] net: wwan: t7xx: Add AP CLDMA m.chetan.kumar
2023-01-21 13:33 ` [PATCH v5 net-next 2/5] net: wwan: t7xx: Infrastructure for early port configuration m.chetan.kumar
2023-01-21 13:33 ` [PATCH v5 net-next 3/5] net: wwan: t7xx: PCIe reset rescan m.chetan.kumar
2023-01-25 4:45 ` Jakub Kicinski
2023-01-26 15:25 ` Bjorn Helgaas [this message]
2023-01-27 10:27 ` Kumar, M Chetan
2023-01-27 13:30 ` Bjorn Helgaas
2023-01-21 13:33 ` [PATCH v5 net-next 4/5] net: wwan: t7xx: Enable devlink based fw flashing and coredump collection m.chetan.kumar
2023-01-25 4:53 ` Jakub Kicinski
2023-01-25 10:37 ` Kumar, M Chetan
2023-01-21 13:33 ` [PATCH v5 net-next 5/5] net: wwan: t7xx: Devlink documentation m.chetan.kumar
2023-01-22 2:13 ` Bagas Sanjaya
2023-01-24 14:30 ` Kumar, M Chetan
2023-01-25 4:51 ` Jakub Kicinski
2023-01-25 10:33 ` Kumar, M Chetan
2023-01-25 11:34 ` Ilpo Järvinen
2023-01-25 18:08 ` Jakub Kicinski
2023-01-26 10:55 ` Kumar, M Chetan
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=20230126152552.GA1265322@bhelgaas \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=chandrashekar.devegowda@intel.com \
--cc=chiranjeevi.rapolu@linux.intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=haijun.liu@mediatek.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linuxwwan@intel.com \
--cc=linuxwwan_5g@intel.com \
--cc=loic.poulain@linaro.org \
--cc=m.chetan.kumar@linux.intel.com \
--cc=madhusmita.sahu@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ricardo.martinez@linux.intel.com \
--cc=ryazanov.s.a@gmail.com \
/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