Re: RFC: PHY Abstraction Layer II
From: Andy Fleming <hidden>
Date: 2005-06-01 20:45:41
Also in:
netdev
From: Andy Fleming <hidden>
Date: 2005-06-01 20:45:41
Also in:
netdev
On May 31, 2005, at 12:59, Stephen Hemminger wrote:
Here are some patches:
* allow phy's to be modules
* use driver owner for ref count
* make local functions static where ever possibleI agree with all these.
* get rid of bus read may sleep implication in comment.
since you are holding phy spin lock it better not!!But not this one. The phy_read and phy_write functions are reading from and writing to a bus. It is a reasonable implementation to have the operation block in the bus driver, and be awoken when an interrupt signals the operation is done. All of the phydev spinlocks have been arranged so as to prevent the lock being taken during interrupt time. Unless I've misunderstood spinlocks (it wouldn't be the first time), as long as the lock is never taken in interrupt time, it should be ok to hold the lock, and wait for an interrupt before clearing the lock. Andy Fleming