Updated switch/glue patch?

Stefan Bethke stb at lassitu.de
Wed Dec 28 13:52:31 UTC 2011


Am 28.12.2011 um 13:50 schrieb Adrian Chadd:

> Hi,
> 
> Ok, can you then please send me an updated diff which:
> 
> * renames *_lockheld() to *_locked(), just for consistency with the kernel;
> * rename smi_mtx back to sc_mtx, just for consistency;
> * add _LOCK, _UNLOCK, _LOCK_ASSERT, _UNLOCK_ASSERT macros;
> * use those to enforce correct locking. :)
> 
> Let's do that. We'll then worry about the callout mutex use afterwards.


Implement a number of suggestions by Adrian:
* add mutex to callout
* add locking macros
* rename _lockheld to _locked
* bring debugging under DEBUG, incl. sysctls
* move i2c select retry to its own function
* mtx_sleep when retrying the select
* only reset bus on probe
* do not DELAY on phy access retries
* count phy access retries (under DEBUG)

http://gitorious.org/~stb/freebsd/stb-adrianchadd-freebsd-work (branch work/ath)
http://www.lassitu.de/freebsd/etherswitch-adrian.patch (patch against Adrians gitorious repo as of now)
http://www.lassitu.de/freebsd/etherswitch.tbz (all files)

-- 
Stefan Bethke <stb at lassitu.de>   Fon +49 151 14070811





More information about the freebsd-embedded mailing list