RE: [EXTERNAL] Re: [PATCH net-next,v5] net: mana: Add handler for hardware servicing events

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Paolo Abeni <pabeni@xxxxxxxxxx>
> Sent: Tuesday, May 27, 2025 5:29 AM
> To: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>; linux-hyperv@xxxxxxxxxxxxxxx;
> netdev@xxxxxxxxxxxxxxx
> Cc: Dexuan Cui <decui@xxxxxxxxxxxxx>; stephen@xxxxxxxxxxxxxxxxxx; KY
> Srinivasan <kys@xxxxxxxxxxxxx>; Paul Rosswurm <paulros@xxxxxxxxxxxxx>;
> olaf@xxxxxxxxx; vkuznets@xxxxxxxxxx; davem@xxxxxxxxxxxxx;
> wei.liu@xxxxxxxxxx; edumazet@xxxxxxxxxx; kuba@xxxxxxxxxx; leon@xxxxxxxxxx;
> Long Li <longli@xxxxxxxxxxxxx>; ssengar@xxxxxxxxxxxxxxxxxxx; linux-
> rdma@xxxxxxxxxxxxxxx; daniel@xxxxxxxxxxxxx; john.fastabend@xxxxxxxxx;
> bpf@xxxxxxxxxxxxxxx; ast@xxxxxxxxxx; hawk@xxxxxxxxxx; tglx@xxxxxxxxxxxxx;
> shradhagupta@xxxxxxxxxxxxxxxxxxx; andrew+netdev@xxxxxxx; Konstantin
> Taranov <kotaranov@xxxxxxxxxxxxx>; horms@xxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx
> 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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux