lkml.org 
[lkml]   [2022]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[net-next,v2,2/3] net: ethernet: adi: Add ADIN1110 support
Date
> > +static irqreturn_t adin1110_irq(int irq, void *p)
> > +{
> > + struct adin1110_priv *priv = p;
> > + u32 status1;
> > + u32 val;
> > + int ret;
> > + int i;
> > +
> > + mutex_lock(&priv->lock);
>
> The MDIO bus operations are using the same lock. MDIO can be quite
> slow. Do you really need mutual exclusion between MDIO and interrupts?
> What exactly is this lock protecting?
>
> Andrew

Hi Andrew,

Thanks for all the help here.

With this lock I am mainly protecting SPI read/writes. The hardware doesn't expose the MDIO pins.
In order to read/write a PHY reg, there has to be a SPI read/write to the device, the same
line where the MAC is programmed and ethernet frames are sent/received, not very efficient I know.

Best regards,
Alexandru

\
 
 \ /
  Last update: 2022-07-27 15:14    [W:0.078 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site