9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] detaching devices in kernel
@ 2002-10-04 15:50 andrey mirtchovski
  0 siblings, 0 replies; 5+ messages in thread
From: andrey mirtchovski @ 2002-10-04 15:50 UTC (permalink / raw)
  To: 9fans

hi,

a 9p file server can be detached by clunk-ing the connection,
however there doesn't seem to be a way one can detach a kernel-
level driver?

there's devattach, devopen, devclose, etc, but the only thing
reminiscent of 'devdetach' is 'devremove', which of course is
different...

there is detach code in the bitsy kernel for the wavelan ethernet,
but nothing in /sys/src/9/pc...

do i assume that once bound a device cannot be 'unbound'? if
devremove the answer?

andrey



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] detaching devices in kernel
@ 2002-10-04 18:47 presotto
  0 siblings, 0 replies; 5+ messages in thread
From: presotto @ 2002-10-04 18:47 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 633 bytes --]

It would be a control message to the appropriate device that in turn
calls the devtab[whatever]->config routine.  The first argument is
0 or 1, meaning unconfigure or configure.  Look at etherconfig in
bitsy/devether.c.  Its already in devtab, but noone uses it except
bitsy/devpcmcia.c.  I was going to make it a bit more universal but
it was just at the time pb was doing the pccard interface for the
pc and I got deflected.  I'ld like the pcmcia/pccard interface on the
pc's to work the same way as the one in the bitsy.  Maybe in my next
lifetime or maybe someone out there will decide its a good idea and
find the time.

[-- Attachment #2: Type: message/rfc822, Size: 2321 bytes --]

From: Ronald G Minnich <rminnich@lanl.gov>
To: <9fans@cse.psu.edu>
Subject: Re: [9fans] detaching devices in kernel
Date: Fri, 4 Oct 2002 12:38:41 -0600 (MDT)
Message-ID: <Pine.LNX.4.33.0210041237570.8559-100000@xed.acl.lanl.gov>

On Fri, 4 Oct 2002 presotto@plan9.bell-labs.com wrote:

> Once the device is notices, it's there forever.  The exception is
> the bitsy were we've started putting in stuff to take out pccards.
> We need to move that work everywhere, just haven't gotten around
> to it.

thanks for the clarification.

What would be the process by which a device is removed. A new function in
the interface (detach?) or some sequence of existing functions?

ron

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] detaching devices in kernel
  2002-10-04 18:33 presotto
@ 2002-10-04 18:38 ` Ronald G Minnich
  0 siblings, 0 replies; 5+ messages in thread
From: Ronald G Minnich @ 2002-10-04 18:38 UTC (permalink / raw)
  To: 9fans

On Fri, 4 Oct 2002 presotto@plan9.bell-labs.com wrote:

> Once the device is notices, it's there forever.  The exception is
> the bitsy were we've started putting in stuff to take out pccards.
> We need to move that work everywhere, just haven't gotten around
> to it.

thanks for the clarification.

What would be the process by which a device is removed. A new function in
the interface (detach?) or some sequence of existing functions?

ron



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] detaching devices in kernel
@ 2002-10-04 18:33 presotto
  2002-10-04 18:38 ` Ronald G Minnich
  0 siblings, 1 reply; 5+ messages in thread
From: presotto @ 2002-10-04 18:33 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 207 bytes --]

Once the device is notices, it's there forever.  The exception is
the bitsy were we've started putting in stuff to take out pccards.
We need to move that work everywhere, just haven't gotten around
to it.

[-- Attachment #2: Type: message/rfc822, Size: 1886 bytes --]

From: andrey mirtchovski <andrey@lanl.gov>
To: 9fans@cse.psu.edu
Subject: [9fans] detaching devices in kernel
Date: Fri, 4 Oct 2002 09:50:14 -0600 (MDT)
Message-ID: <20021004094303.Q71774-100000@fbsd.acl.lanl.gov>

hi,

a 9p file server can be detached by clunk-ing the connection,
however there doesn't seem to be a way one can detach a kernel-
level driver?

there's devattach, devopen, devclose, etc, but the only thing
reminiscent of 'devdetach' is 'devremove', which of course is
different...

there is detach code in the bitsy kernel for the wavelan ethernet,
but nothing in /sys/src/9/pc...

do i assume that once bound a device cannot be 'unbound'? if
devremove the answer?

andrey

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] detaching devices in kernel
@ 2002-10-04 16:03 Russ Cox
  0 siblings, 0 replies; 5+ messages in thread
From: Russ Cox @ 2002-10-04 16:03 UTC (permalink / raw)
  To: 9fans

you can remove a device from your namespace
using unmount, but in most (all?) cases, that doesn't
make the device stop talking to the underlying hardware or
whatever it does.

the devices typically are initialized before you
bind them into the namespace, so it makes a little sense
that they don't get torn down just because you don't
have them in your namespace anymore.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-10-04 18:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-04 15:50 [9fans] detaching devices in kernel andrey mirtchovski
2002-10-04 16:03 Russ Cox
2002-10-04 18:33 presotto
2002-10-04 18:38 ` Ronald G Minnich
2002-10-04 18:47 presotto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).