WARNING: current unstable
Brooks Davis
brooks at one-eyed-alien.net
Sat Jun 11 01:45:43 GMT 2005
On Fri, Jun 10, 2005 at 05:47:05PM -0700, Brooks Davis wrote:
> On Fri, Jun 10, 2005 at 03:10:17PM -0700, Brooks Davis wrote:
> > It looks like my test systems were running some of the few drivers that
> > aren't suffering from a very strange bug. You may wish to avoid
> > updating. I'm investigating, but so far, nothing makes much sense. :(
>
> Good news and bad news. The good news is that I think I've found
> the problem (at least I've fixed my vr(4) nic and an fxp nic works).
> The bad news is that I broke all the MII based drivers so it's going to
> take a while longer to fix (though I hope to do it tonight.)
>
> The problem is that I didn't notice the device_get_softc(<parent>) calls
> in mii.c that were being cast to ifnet pointers. As a result, all mii
> based drivers ended up with mii_ifp values that were actually softcs.
> I've committed a hack to get the ifp from the softc by dereferencing the
> softc pointer. I now need to audit all miibus users and make sure they
> call if_alloc() before mii_phy_probe(). Once I've done that, I need to
> work on modifying the mii_phy_probe() API to include the ifp so I can
> get rid of the evil casts.
OK, most files were well behaved so I only had six to fix. I've
commited changes moving if_alloc() up in those files attach functions.
I think this should resolve the currently reported panics.
-- Brooks
--
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20050610/de6d7a9e/attachment.bin
More information about the freebsd-current
mailing list