Re: [PATCH net] bnxt_en: enable PTM function
Vadim Fedorenko <[email protected]>
| Newsgroups | org.kernel.vger.netdev |
|---|---|
| Message-ID | <[email protected]> |
On 07/08/2026 13:51, Pavan Chebbi wrote: > On Fri, Aug 7, 2026 at 2:16 AM Vadim Fedorenko > <[email protected]> wrote: >> >> On 06.08.2026 21:35, Michael Chan wrote: >>> On Thu, Aug 6, 2026 at 1:22 PM Vadim Fedorenko >>> <[email protected]> wrote: >>>> >>>> The patch mentioned in Fixes missed one main point of implementing >>>> proper PTM support. To make it fully operational it has to be explicitly >>>> enabled. Add missing call in probe callback and disable it in teardown >>>> callback. >>> >>> We were actually discussing this internally just a few weeks ago. I >>> think the FW always enables it and that's why pci_enable_ptm() is not >>> strictly required. I'll let Pavan comment on this further. Thanks. >> >> In my test even though firmware was acting as requestor, pcie_ptm_enabled() >> returns false and disables setup of getcrosststamp callback. This happens >> because kernel doesn't know that PTM is enabled. > > I think the right thing to do would be to first check the capability > from FW (which actually decides whether we can support PTM on the > installed RC/platform) and then enable it in the kernel. > This is what we internally decided to do. Can you wait for us to > complete that work and send the patch? Could you please be a bit more specific on how FW decides? Does it remove PTM capability in case it's not possible? As you can see from the code of pci_enable_ptm(), sometimes parent device needs PTM enabled as well before starting TLVs, will your FW be aware of this? What I'm trying to say is that it looks like you try to reinvent what has already been implemented. pcie_ptm_enabled() is harmless in case the platform cannot support it, and you are gating getcrosststamp() by FW capabilities already - why do you need another check?