Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 01 May 2003 11:13:15 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        gibbs@scsiguy.com
Cc:        gallatin@cs.duke.edu
Subject:   Re: cvs commit: src/sys/dev/fxp if_fxp.c if_fxpvar.h
Message-ID:  <20030501.111315.85393988.imp@bsdimp.com>
In-Reply-To: <1742240000.1051807110@aslan.btc.adaptec.com>
References:  <1721460000.1051803729@aslan.btc.adaptec.com> <20030501.101409.57443470.imp@bsdimp.com> <1742240000.1051807110@aslan.btc.adaptec.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <1742240000.1051807110@aslan.btc.adaptec.com>
            "Justin T. Gibbs" <gibbs@scsiguy.com> writes:
: I don't see that there is any problem with the above approach (it is the
: same flow as is used by the ahc and ahd driver) but I still don't see why
: a gone flag is required.  Just run through the handler as you normally
: would in the shared interrupt case.  The handler will exit if written
: correctly.

You assume that the hardware is still there in this case.  It might be
gone.  Certainly by the time the detach routine is called it is gone
for cardbus case.  However, you may be right in that cardbus stops
delivering interrupts to the card as soon as we determine it is gone
and then calls detach.  The only race would be something like:

	fxp_intr()
	<interrupt for us>
				eject happens here, card no longer there
	<interrupt for us == 0xfffff, so we keep looping>

However, this race is very hard to hit.  I've managed to hit it once
in about 100 card ejects, and then only on a busy network.

Warner



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