RE: [PATCH net-next v3] net: mana: Add handler for sriov configure
Haiyang Zhang <[email protected]> Fri, 10 Jul 2026 19:19:56 +0000
| Newsgroups | org.kernel.vger.linux-hyperv,org.kernel.vger.linux-kernel,org.kernel.vger.netdev |
|---|---|
| Message-ID | <LV5PR21MB470461A0C1153760D4C14645CAFD2@LV5PR21MB4704.namprd21.prod.outlook.com> |
> -----Original Message----- > From: Haiyang Zhang <[email protected]> > Sent: Wednesday, July 8, 2026 4:59 PM > To: [email protected]; [email protected]; KY Srinivasan > <[email protected]>; Haiyang Zhang <[email protected]>; Wei Liu > <[email protected]>; Dexuan Cui <[email protected]>; Long Li > <[email protected]>; Andrew Lunn <[email protected]>; David S. > Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub > Kicinski <[email protected]>; Paolo Abeni <[email protected]>; Simon Horman > <[email protected]>; Erni Sri Satya Vennela <[email protected]>; > Dipayaan Roy <[email protected]>; Aditya Garg > <[email protected]>; Shradha Gupta > <[email protected]>; [email protected] > Cc: Paul Rosswurm <[email protected]> > Subject: [PATCH net-next v3] net: mana: Add handler for sriov configure > > From: Haiyang Zhang <[email protected]> > > Add callback function for the pci_driver / sriov_configure. > > It asks the NIC to provide certain number of VFs, or disable > VFs if the request is zero. > > Signed-off-by: Haiyang Zhang <[email protected]> > --- > v3: > Updated sriov disabling paths suggested by Paolo Abeni > > v2: > No longer change VF autoprobe as discussed with Leon Romanovsky and > Bjorn Helgaas. > > --- > .../net/ethernet/microsoft/mana/gdma_main.c | 26 +++++++++++++++++++ > 1 file changed, 26 insertions(+) > > diff --git a/drivers/net/ethernet/microsoft/mana/gdma_main.c > b/drivers/net/ethernet/microsoft/mana/gdma_main.c > index aef3b77229c1..80a9118a90bc 100644 > --- a/drivers/net/ethernet/microsoft/mana/gdma_main.c > +++ b/drivers/net/ethernet/microsoft/mana/gdma_main.c > @@ -2456,6 +2456,8 @@ static void mana_gd_remove(struct pci_dev *pdev) > { > struct gdma_context *gc = pci_get_drvdata(pdev); > > + pci_disable_sriov(pdev); > + > mana_rdma_remove(&gc->mana_ib); > mana_remove(&gc->mana, false); > > @@ -2517,6 +2519,8 @@ static void mana_gd_shutdown(struct pci_dev *pdev) > > dev_info(&pdev->dev, "Shutdown was called\n"); > > + pci_disable_sriov(pdev); > + I will remove this unnecessary pci_disable_sriov() as found by AI review, and submit an updated patch. - Haiyang