Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Oct 2005 13:20:51 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        "Yuriy N. Shkandybin" <jura@networks.ru>
Cc:        freebsd-net@freebsd.org
Subject:   Re: if_nge & if_lge drivers
Message-ID:  <200510131320.52797.jhb@freebsd.org>
In-Reply-To: <002c01c5cf72$54901fc0$0701010a@notebook>
References:  <092e01c5cb15$f7fe5840$6504010a@Jura> <200510121610.47507.jhb@freebsd.org> <002c01c5cf72$54901fc0$0701010a@notebook>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 12 October 2005 05:13 pm, Yuriy N. Shkandybin wrote:
> > Note that lge() has a bzero() call after the contigmalloc(), but M_ZERO
> > is probably better to use:
> >
> > sc->lge_ldata = contigmalloc(sizeof(struct lge_list_data), M_DEVBUF,
> >     M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0);
> >
> > ...
> > bzero(sc->lge_ldata, sizeof(struct lge_list_data));
>
> Yes, i;ve missed that.
> But there is no such bzero in nge.

Right.

> > I'll put that in my lge(4) patches and incorporate your nge(4) patches.
> > One
> > issue with your nge(4) patch is that you moved the bus_setup_intr() up
> > when
> > it really should happen after ether_ifattach().
>
> Probably.
> I've looked into if_lge.c for that as example.
> There goes bus_setup_intr() first and later ether_ifattach().

My locking patches for lge(4) move it. :)  Once a driver is properly locked it 
should call ether_ifattach() first, and nge is mostly properly locked.

> > Also, is there a reason you added a call to nge_reset() after nge_stop()
> > in
> > nge_init()?
>
> Only reason - same done in if_lge.c

Ah, hmm.  Do you have nge(4) hardware such that you can test my slightly 
larger nge patch?

-- 
John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200510131320.52797.jhb>