Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Aug 2005 16:22:20 -0400
From:      John Baldwin <jhb@FreeBSD.org>
To:        Robert Watson <rwatson@FreeBSD.org>
Cc:        cvs-src@FreeBSD.org, Maxim.Sobolev@portaone.com, cvs-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: cvs commit: src/sys/dev/re if_re.c
Message-ID:  <200508181622.22292.jhb@FreeBSD.org>
In-Reply-To: <20050818211150.W32515@fledge.watson.org>
References:  <200508181429.j7IET16d038533@repoman.freebsd.org> <200508181538.32988.jhb@FreeBSD.org> <20050818211150.W32515@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 18 August 2005 04:12 pm, Robert Watson wrote:
> On Thu, 18 Aug 2005, John Baldwin wrote:
> > I've still yet to see what the real panic is.  For one thing, if the
> > foo_stop method does its jobs, the ethernet hardware shouldn't be
> > generating interrupts.  The stop method should be shutting the card down
> > (i.e. turning off the receiver and transmitter for example).  Is your
> > ethernet driver sharing an interrupt with another device and the other
> > device is interrupting?  In that case, the ethernet driver would have
> > the same panic if you did an 'ifconfig foo0 down' and then the other
> > device interrupted.  So, I think clearing IFF_UPP in foo_shutdown() is
> > wrong.  foo_stop() should really be sufficient, and foo_intr() should be
> > able to handle a spurious interrupt while the interface is stopped
> > without panicing since it already needs to do so to handle the shared
> > interrupt case.
>
> Ideally, I'd like to see device drivers stop setting or clearing
> stack-owned bits, such as IFF_UP, IFF_PROMISC, etc.  However, we probably
> have a ways to go before we're there.

Yes, and I think that since we clear RUNNING in the driver by calling 
foo_stop() when IFF_UP is cleared by the stack, the real fix is to change 
re_intr to check RUNNING rather than UP.

-- 
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?200508181622.22292.jhb>