Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Apr 1998 17:27:12 -0700
From:      Julian Elischer <julian@whistle.com>
To:        Nate Williams <nate@mt.sri.com>
Cc:        Charlie ROOT <root@totum.Plaut.de>, FreeBSD-Current <current@FreeBSD.ORG>
Subject:   Re: DEVFS not for PCMCIA?
Message-ID:  <353BE7E0.5656AEC7@whistle.com>
References:  <Pine.BSF.3.96.980420214120.613A-100000@nihil.plaut.de> <353BAF9E.6201DD56@whistle.com> <199804202347.RAA03390@mt.sri.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?353BE7E0.5656AEC7>