Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Jan 1999 17:58:34 -0800
From:      Mike Smith <mike@smith.net.au>
To:        Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc:        Mike Smith <mike@smith.net.au>, Bill Trost <trost@cloud.rain.com>, mobile@FreeBSD.ORG
Subject:   Re: Reclaiming irqs for unsupported PCI hardware? 
Message-ID:  <199901220158.RAA12743@dingo.cdrom.com>
In-Reply-To: Your message of "Fri, 22 Jan 1999 00:51:49 %2B0100." <802.916962709@critter.freebsd.dk> 

next in thread | previous in thread | raw e-mail | index | archive | help
> In message <199901211928.LAA10433@dingo.cdrom.com>, Mike Smith writes:
> 
> >Once the card is gone, all of the 
> >registers in the mapped space read all-1s.
> 
> This should not be relied on.  It is my understanding that you will
> get fireworks bus-cycles on CardBus in this situation, and it will
> be left to the BIOS writer to figure out what should happen since
> I belive we end up in SMM mode in that case...

Cardbus is completely different.  I can hardly wait to see what happens 
when you pull a cardbus card.

> Also I have not seen any documentation saying the all-1s is a standard,
> but would accept a survey of pcic's which show this to be universal
> so far.

The input drivers are pulled up, IIRC, so in the absence of anything 
driving them, and modulo noise from the card departing, I'd expect an 
*eventaul* all-1s.  I certainly wouldn't want to rely on it though.

> > - Polling for the card's presence every iteration of the interrupt 
> >   handler loop.  This is absurdly expensive.  Don't suggest polling 
> >   once on interrupt entry, unless you can guarantee the card won't be 
> >   pulled during the interrupt handler's execution.
> 
> There is no way to guarantee that the card will not be pulled in the
> next N microseconds.

Rrrg.  This is actually a really good point, and I can see where this 
leads to.

 1) DO NOT REMOVE THE CARD UNTIL YOU HAVE SHUT IT DOWN.
 2) Poll for insertions/removals since the cards are never active in
    either state (see point 1).

Perhaps we're just looking at this the wrong way?  We don't try to 
detect when floppies are stupidly removed, perhaps we shouldn't try to 
do it with pccard/cardbus cards either?

Commentary?  Are we trying too hard to do something that's not worth 
the effort?

-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\  msmith@cdrom.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mobile" in the body of the message



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