From owner-freebsd-mobile Fri Jan 22 01:11:38 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA13237 for freebsd-mobile-outgoing; Fri, 22 Jan 1999 01:11:38 -0800 (PST) (envelope-from owner-freebsd-mobile@FreeBSD.ORG) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.40.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA13228 for ; Fri, 22 Jan 1999 01:11:35 -0800 (PST) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.9.1/8.8.5) with ESMTP id KAA02127; Fri, 22 Jan 1999 10:09:49 +0100 (CET) To: Mike Smith cc: Bill Trost , mobile@FreeBSD.ORG Subject: Re: Reclaiming irqs for unsupported PCI hardware? In-reply-to: Your message of "Thu, 21 Jan 1999 17:58:34 PST." <199901220158.RAA12743@dingo.cdrom.com> Date: Fri, 22 Jan 1999 10:09:47 +0100 Message-ID: <2125.916996187@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org In message <199901220158.RAA12743@dingo.cdrom.com>, Mike Smith writes: >> 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. You get special bus cycles I belive, and aborted IO if you try, this should be catchable and if drivers are aware of it, recoverable. >> 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. Well, the point is, if you could rely on it, you could do something... >> 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? PCMCIA/PCcard is fundamentally flawed in this respect, we can add some kludges (see "gone" in sio.c" for instance), but we can never guarantee that it will not crash the machine. -- Poul-Henning Kamp FreeBSD coreteam member phk@FreeBSD.ORG "Real hackers run -current on their laptop." FreeBSD -- It will take a long time before progress goes too far! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message