From owner-freebsd-mobile Thu Apr 6 12:58:33 2000 Delivered-To: freebsd-mobile@freebsd.org Received: from tasogare.imasy.or.jp (tasogare.imasy.or.jp [202.227.24.5]) by hub.freebsd.org (Postfix) with ESMTP id 3866737B8F1 for ; Thu, 6 Apr 2000 12:58:29 -0700 (PDT) (envelope-from iwasaki@jp.FreeBSD.org) Received: from localhost (isdn49.imasy.or.jp [202.227.24.241]) by tasogare.imasy.or.jp (8.9.3+3.2W/3.7W-tasogare/smtpfeed 1.01) with ESMTP id EAA15431; Fri, 7 Apr 2000 04:58:24 +0900 (JST) (envelope-from iwasaki@jp.FreeBSD.org) Message-Id: <200004061958.EAA15431@tasogare.imasy.or.jp> To: imp@village.org Cc: iwasaki@jp.FreeBSD.org, nate@yogotech.com, freebsd-mobile@FreeBSD.ORG Subject: Re: Call for review: restart pccardd by SIGHUP In-Reply-To: Your message of "Thu, 06 Apr 2000 12:37:08 -0600" <200004061837.MAA92697@harmony.village.org> References: <200004061837.MAA92697@harmony.village.org> X-Mailer: Mew version 1.93 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 07 Apr 2000 04:58:23 +0900 From: Mitsuru IWASAKI X-Dispatcher: imput version 980905(IM100) Lines: 53 Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > OK. This won't take into account device drivers that are loaded after > pccardd gets into information, but will likely be enough to do the > right thing. > > Hmmm, thinking in API terms... > > struct resource_usage { > long base; // Base of resource to query > long length; // Length of resource > int type; // Type of resource > u_int8_t *map; // Map of resources in use. > } Great! > You'd pass the base (0x240 in your example), the length (0x1bf) and > the type SYS_RES_IOPORT if that's visible to userland. map would > point to an area that is at least 0x1bf bits long (or 56 bytes). Bits > in this range would be set when that resource is in use. You could OK, I can check map[i] != 0 if the resource is in use for each 8 bytes address. > also get IRQs this way, which is bar far the most useful thing to do. > > Hmmm, come to think of it, you could use this just before allocating > resources to the card too if you wanted to. It would be the most > flexible way to deal :-). Maybe we can get away from resource management in pccardd eventually :) > BTW, on the topic of IRQs, I have two questions. How would you feel > about making the default behavior of the pcic device to be polling > rather than using an interrupt. This is a simple change to the config > file. It should help on installations. Second, I'd like make the I prefer polling mode because it works in most of cases and user can change to use interrupt easily by UserConfig or loader command. I'm having `device pcic0 at isa? irq 0' line in my config file for a long time. > default for the pcic to *NOT* share interrupts. You'd have to set a > flag in the device to enable it. This will also help people get > things setup correctly. I'm not sure about this, but I believe you :) > I know that the default polling is dangarous because it increases the > window of system hangs, but for system installs, this won't matter > because one generally doesn't pull the plug and expect things to work > :-) I'm using my development laptop in polling mode, but no serious problems so far in spite of hard testing :-) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message