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. /P