tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Another MII PHY fix.
Hi.
(2013/06/09 18:43), Mouse wrote:
> I don't know this stuff in enough detail to vet the code more than
> trivially. But I do notice one minor issue and one possible issue:
>
>>> /*
>>> + * mii_tick == 0 means it's the first tick after changing the media or
>>> + * the link became down since the last tick (see above), so return with
>>> + * 0 to update the status.
>>> + */
>>> + if (sc->mii_ticks == 0)
>>> + return (0);
>>> +
>>> + /* Now increment the tick */
>>> + sc->mii_ticks++;
>
> (a) The comment says mii_tick but the code says mii_ticks.
I'll fix it.
> (b) If mii_ticks is zero, it remains zero, so unless something else
> changes it, it will stay stuck at zero.
You're correct. The FreeBSD's original change was
if (sc->mii_tick++ == 0)
so I'll fix to be the same with FreeBSD.
Thanks!
> /~\ The ASCII Mouse
> \ / Ribbon Campaign
> X Against HTML mouse%rodents-montreal.org@localhost
> / \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
>
--
-----------------------------------------------
SAITOH Masanobu (msaitoh%execsw.org@localhost
msaitoh%netbsd.org@localhost)
Home |
Main Index |
Thread Index |
Old Index