Crash at boot on 2.6.29-rc5

Dan Williams dcbw at redhat.com
Wed Feb 18 22:51:58 EST 2009


On Wed, 2009-02-18 at 13:55 -0800, Bing Zhao wrote:
> > So I think we now need an "lbs_priv()" function to use everywhere we
> use
> > netdev_priv() or dev->ml_priv.  Given that the main netdev doesn't use
> > dev->ml_priv, we can use that as a check and do something like:
> > 
> > static inline struct lbs_private *lbs_priv(struct net_device *dev)
> > {
> > 	return dev->ml_priv ? dev->ml_priv : netdev_priv(dev);
> > }
> > 
> > and thus get the right private structure every time no matter what the
> device.
> > Seem sane?
> > 
> > Dan
> 
> Dan,
> 
> As mesh and rtap have already used ml_priv to store priv structure in
> netdev, how about pointing main netdev's ml_priv to priv as well? This
> way all interfaces (ethX, msh0, rtap0) can use ml_priv to access the
> priv data.

Could do that, but then we still have to switch all the netdev_priv()
calls over to dev->ml_priv...  Either way, doesn't really matter to me.
Using ml_priv everywhere would save a few instructions whenever
lbs_private gets accessed.

Dan

> @@ -1171,6 +1171,7 @@ struct lbs_private *lbs_add_card(void *card,
> struct device *dmdev)
> 		goto done;
> 	}
> 	priv = netdev_priv(dev);
> +	dev->ml_priv = priv;
> 
> 	if (lbs_init_adapter(priv)) {
> 		lbs_pr_err("failed to initialize adapter structure.\n");
> 
> 
> static inline struct lbs_private *lbs_priv(struct net_device *dev)
> {
> 	return dev->ml_priv;
> }
> 
>  
> Bing
> 
> _______________________________________________
> libertas-dev mailing list
> libertas-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/libertas-dev




More information about the libertas-dev mailing list