From owner-freebsd-mobile Sun Jan 7 8:49: 0 2001 Delivered-To: freebsd-mobile@freebsd.org Received: from harmony.village.org (rover.village.org [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id BD85237B400 for ; Sun, 7 Jan 2001 08:48:41 -0800 (PST) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.11.1/8.11.1) with ESMTP id f07GmTs31894; Sun, 7 Jan 2001 09:48:29 -0700 (MST) (envelope-from imp@harmony.village.org) Message-Id: <200101071648.f07GmTs31894@harmony.village.org> To: "Justin T. Gibbs" Subject: Re: NEWCARD update Cc: Peter Wemm , Jonathan Chen , freebsd-mobile@FreeBSD.ORG In-reply-to: Your message of "Sun, 07 Jan 2001 09:25:14 MST." <200101071625.f07GPEs61330@aslan.scsiguy.com> References: <200101071625.f07GPEs61330@aslan.scsiguy.com> Date: Sun, 07 Jan 2001 09:48:29 -0700 From: Warner Losh Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org In message <200101071625.f07GPEs61330@aslan.scsiguy.com> "Justin T. Gibbs" writes: : Is there anyway to know if you have the connection? The only reason : I think this might be interesting is to provide modem cards with : a unique IRQ so they can use fast interrupt handlers. No. There's no reliable way of knowing. At least none that I've seen to date. I haven't probed this issue, but I am leery to try to probe for this sort of thing since probing interrupts can lead to machine lockups. Also, you run into issues of "can I use this interrupt on this machine" when you are allocating them. The current bus space code does a good job of preventing the wrong interrupts from being assigned. However, there are still issues with probe order and PnP devices having IRQs staked out. I think those issues would only apply to the managment IRQ, since we do all probe/attaching of the card after the PnP cards have probed/attached (or pseudo attached). : pccards going through a cardbus bridge should be able to share : interrupts so long as their drivers are smart enough to guard : against "stray interrups". This could be as simple as asking the : bridge if the interrupt is for the card manually or better yet, : registering a proxy interrupt handler on behalf of the child that : only dispatches to the child if the interrupt bit for that slot is : set. You need to be careful when checking the bridge interrupt status for the card status to make sure that you don't introduce a race. It is better for the card's driver to deal with stray interrupts. Also, I don't recall if the cardbus bridge can be asked if there's an interrupt pending for me in the non-multi-function card case. I see that one can read the status of the #IREQ/#CINT line, but I don't know if that translates to the actual interrupt status of the card or not in all cases (I'd have to look at the standard/mind share books to find out what cards do in pulse interrupt mode). Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message