RE: [PATCH net v1] mlxbf_gige: disable port during stop()
From: David Thompson
Date: Wed Aug 28 2024 - 17:37:20 EST
> -----Original Message-----
> From: Jakub Kicinski <kuba@xxxxxxxxxx>
> Sent: Monday, August 19, 2024 8:47 PM
> To: David Thompson <davthompson@xxxxxxxxxx>
> Cc: Benjamin Poirier <benjamin.poirier@xxxxxxxxx>; davem@xxxxxxxxxxxxx;
> edumazet@xxxxxxxxxx; pabeni@xxxxxxxxxx;
> andriy.shevchenko@xxxxxxxxxxxxxxx; u.kleine-koenig@xxxxxxxxxxxxxx; Asmaa
> Mnebhi <asmaa@xxxxxxxxxx>; netdev@xxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH net v1] mlxbf_gige: disable port during stop()
>
> On Mon, 19 Aug 2024 14:55:12 -0400 Benjamin Poirier wrote:
> > Is this memory barrier paired with another one?
>
> +1
> You probably want synchronize_irq() here?
> You should explain in the cover letter, the mb() seems to not be mentioned.
> --
> pw-bot: cr
Hello Jakub and Benjamin, thanks for your input.
I will post a v2 adding information about the "mb()" call.
Regarding the "synchronize_irq()" call, I did some research and noticed that
some already merged driver patches (see list below for a sample) state that
"synchronize_irq()" is unnecessary before "free_irq()":
3e0fcb782a9f i40e: Remove unnecessary synchronize_irq() before free_irq()
845517ed04ae RDMA/qedr: Remove unnecessary synchronize_irq() before free_irq()
d1e7f009bfff net: qede: Remove unnecessary synchronize_irq() before free_irq()
bd81bfb5a1d1 net: vxge: Remove unnecessary synchronize_irq() before free_irq()
29fd3ca1779f qed: Remove unnecessary synchronize_irq() before free_irq()
411dccf9d271 dmaengine: idxd: Remove unnecessary synchronize_irq() before free_irq()
d887ae3247e0 octeontx2-pf: Remove unnecessary synchronize_irq() before free_irq()
Given the above information, does my mlxbf_gige driver patch still need to
invoke "synchronize_irq()" in the stop() method? The "mlxbf_gige_free_irq()"
call within the stop() method invokes "free_irq()" for each of the driver's IRQs, so
sounds like this "synchronize_irq()" is implicitly being invoked?
Regards, Dave