From owner-freebsd-current Mon Apr 20 17:54:03 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA12917 for freebsd-current-outgoing; Mon, 20 Apr 1998 17:54:03 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA12799 for ; Tue, 21 Apr 1998 00:53:33 GMT (envelope-from julian@whistle.com) Received: (from daemon@localhost) by alpo.whistle.com (8.8.5/8.8.5) id RAA16103; Mon, 20 Apr 1998 17:32:42 -0700 (PDT) Received: from current1.whistle.com(207.76.205.22) via SMTP by alpo.whistle.com, id smtpd016088; Tue Apr 21 00:32:33 1998 Message-ID: <353BE7E0.5656AEC7@whistle.com> Date: Mon, 20 Apr 1998 17:27:12 -0700 From: Julian Elischer Organization: Whistle Communications X-Mailer: Mozilla 3.0Gold (X11; I; FreeBSD 2.2.5-RELEASE i386) MIME-Version: 1.0 To: Nate Williams CC: Charlie ROOT , FreeBSD-Current Subject: Re: DEVFS not for PCMCIA? References: <353BAF9E.6201DD56@whistle.com> <199804202347.RAA03390@mt.sri.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Nate Williams wrote: > > > Justin, is there a way that the "probe-when-interrupts-are-on" > > code can do the requested probe Immediatly, when the probe is > > being requested AFTER booting has completed? > > ???? Which probe are you talking about? Justin has added a function. in sd.c for example there is: sd->ich.ich_func = sds_init; sd->ich.ich_arg = sd; config_intrhook_establish(&sd->ich); basically, once interrupts are started up, sds_init will be called with the argument sd. In CAM this will be done at the BOARD level rather than the scsi device level. So the SCSI bus will be probed once the system is fully operational. This allows devices to probe for sub-partitions etc, at full speed rather than in polling mode. it also means that support for polling mode need not be so great. (in fact it may go away eventually in some cases?) The trouble is that if you "miss the boat" and make your config_intrhook_establish(&sd->ich); call too late, it never gets called.. I'm going to go look at that now.. Nate, what context does the 'attach' code for a driver get called from in the case of a OC-CARD insertion? is it in the kernel level context of a daemon, or is it run from an interrupt level event? > > > > is there a way to force a SLICE reprobe? > > > > not yet but I'm thinking about it.. > > I know what needs to be done.. > > What worries me is the case for when you REMOVE the card... That > > hasn't been thought out all that well WRT the SCSI system. > > PAO has some 'bus removal' code as part of the system, but I haven't > looked at it much since it works w/out the removal. > > FreeBSD in general doesn't deal with removal of resources. :( yep. DEVFS will revert an open vnode to DEADFS if the underlying driver requests that the node be removed. the next access will return Exxxxx (I forget). So every device driver should grow a "invalidate yourself" entrypoint. I don't know what the argument would be however.. I assume that there is some way that the PCCARD code, and the driver can identify themselves to each other.. Probably the driver should return a cookie to the bus that called it on attach, so that the bus can call it later and say, "hey make that device go away". then the driver can invalidate the appropriate devfs entries and devfs will convert the appropriate vnodes. julian > > Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message