[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180403042717.746strvy4a6s7kk5@localhost>
Date: Mon, 2 Apr 2018 21:27:17 -0700
From: Richard Cochran <richardcochran@...il.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: netdev@...r.kernel.org, devicetree@...r.kernel.org,
David Miller <davem@...emloft.net>,
Florian Fainelli <f.fainelli@...il.com>,
Mark Rutland <mark.rutland@....com>,
Miroslav Lichvar <mlichvar@...hat.com>,
Rob Herring <robh+dt@...nel.org>,
Willem de Bruijn <willemb@...gle.com>
Subject: Re: [PATCH net-next RFC V1 5/5] net: mdio: Add a driver for InES
time stamping IP core.
On Mon, Mar 26, 2018 at 01:01:58AM +0200, Andrew Lunn wrote:
> The phylib core code will take the phydev lock before calling into the
> driver. By violating the layering, we are missing on this lock.
That lock protects the fields within the struct phy_device, like the
state field. None of the time stamping methods need to read or write
any part of that data structure.
Actually it is not true that the core always takes the lock before
calling the driver methods. See .ack_interrupt for example.
> Maybe the one driver which currently implements these calls does not
> need locking.
It has locking. If a specific device needs locking to protect the
integrity of its registers or other internal data structures, then it
can and should implement those locks.
Thanks,
Richard
Powered by blists - more mailing lists