Updated switch/glue patch?
Stefan Bethke
stb at lassitu.de
Tue Dec 27 17:18:55 UTC 2011
Am 27.12.2011 um 01:07 schrieb Stefan Bethke:
> Am 26.12.2011 um 21:46 schrieb Adrian Chadd:
>
>> Hi,
>>
>> I've tested the two patches.
>>
>> * the iicbb patch is fine at first glance, but I haven't yet sat down
>> to figure out whether it's fine for older (and non-rtl8366rb) devices.
>> I'll commit it to my repo, so you can just pull it into yours.
>> We should likely change it to default to 10uS to preserve behaviour
>> and then override it in hints (hint.iicbb.0.udelay=3) for this
>> particular board.
>>
>> * the rtl8366rb change however applied and compiled, but it has
>> completely broken things. I don't get any port status updates and
>> etherswitchcfg doesn't actually return any configuration. Would you
>> mind retesting all of that?
>
> Here's a slightly updated patch (pushed to https://gitorious.org/~stb/freebsd/stb-adrianchadd-freebsd-work/commits/work/ath):
Another update:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rtl8366rb.patch
Type: application/octet-stream
Size: 32060 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-embedded/attachments/20111227/969f5cea/rtl8366rb-0001.obj
-------------- next part --------------
Make code more robust.
o Add ioctls to read and write PHY registers.
o properly stop I2C transaction when selection fails, or the transaction
fails halfway through. With debugging enabled,
debug.rtl8366rb.reset_count counts the number of times the bus has been
reset after an error.
o Add a DELAY() to reading and writing PHY registers to give the chip
time to talk to the PHY. Without this DELAY, the chip may be
unresponsive.
o Add debugging code to print info on failed I2C transactions.
o When selecting the chip fails, retry a number of times. With debugging
enabled, debug.rtl8366rb.delayed_select counts the number of times
this has happened.
o Don't call PHY_SERVICE() (because that runs the phy service code that
queries the PHY for the currently selected media); call mii_phy_update()
--
Stefan Bethke <stb at lassitu.de> Fon +49 151 14070811
More information about the freebsd-embedded
mailing list