> -----Original Message----- > From: Paolo Abeni <[email protected]> > Sent: Tuesday, May 27, 2025 5:29 AM > To: Haiyang Zhang <[email protected]>; [email protected]; > [email protected] > Cc: Dexuan Cui <[email protected]>; [email protected]; KY > Srinivasan <[email protected]>; Paul Rosswurm <[email protected]>; > [email protected]; [email protected]; [email protected]; > [email protected]; [email protected]; [email protected]; [email protected]; > Long Li <[email protected]>; [email protected]; linux- > [email protected]; [email protected]; [email protected]; > [email protected]; [email protected]; [email protected]; [email protected]; > [email protected]; [email protected]; Konstantin > Taranov <[email protected]>; [email protected]; linux- > [email protected] > Subject: [EXTERNAL] Re: [PATCH net-next,v5] net: mana: Add handler for > hardware servicing events > > On 5/22/25 2:22 AM, Haiyang Zhang wrote: > > @@ -400,6 +448,33 @@ static void mana_gd_process_eqe(struct gdma_queue > *eq) > > eq->eq.callback(eq->eq.context, eq, &event); > > break; > > > > + case GDMA_EQE_HWC_FPGA_RECONFIG: > > + dev_info(gc->dev, "Recv MANA service type:%d\n", type); > > + > > + if (gc->in_service) { > > + dev_info(gc->dev, "Already in service\n"); > > + break; > > + } > > + > > + if (!try_module_get(THIS_MODULE)) { > > + dev_info(gc->dev, "Module is unloading\n"); > > + break; > > + } > > + > > + mns_wk = kzalloc(sizeof(*mns_wk), GFP_ATOMIC); > > + if (!mns_wk) { > > + module_put(THIS_MODULE); > > + break; > > + } > > + > > + dev_info(gc->dev, "Start MANA service type:%d\n", type); > > + gc->in_service = true; > > + mns_wk->pdev = to_pci_dev(gc->dev); > > + pci_dev_get(mns_wk->pdev); > > Acquiring both the device and the module reference is confusing and > likely unnecessary. pci_dev_get() should suffice. >
Thanks for the review. I updated the patch accordingly, and submitted v6 yesterday. Thanks, - Haiyang
