Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Feb 1999 21:28:58 -0700 (MST)
From:      "Kenneth D. Merry" <ken@plutotech.com>
To:        jrs@enteract.com (John Sconiers)
Cc:        freebsd-questions@FreeBSD.ORG, freebsd-scsi@FreeBSD.ORG
Subject:   Re: CAM and ATAPI/IDE
Message-ID:  <199902030428.VAA45132@panzer.plutotech.com>
In-Reply-To: <Pine.BSF.4.05.9902022140220.2741-100000@adam.enteract.com> from John Sconiers at "Feb 2, 1999  9:44:17 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
John Sconiers wrote...
> Does CAM capture stsatus changes of devices on the SCSI bus?  IE I
> place a cd into the SCSI cd-rom does CAM capture the signal sent by the
> hardware?  Is there simular support for ide and atapi?  Writting an
> automounter that will automount cd-roms, possible floppys, zips etc.


In a word: No.

The reason that CAM does not detect media insertion, and events like that,
is that there are very, very few devices that support AEN.  AEN is
Asynchronous Event Notification.  It allows a device on the SCSI bus to
send a message to another device, notifying it of a specific event.

To support AEN, the device in question must be capable of being an
initiator, as well as a target.  Also, the controller and controller driver
must support target mode.

The only real way to detect media insertion, etc., is to continually probe
for it.  I think this is how things like mediad on SGI boxes work.  They
probe the drive every so often to see if something has been inserted.

I doubt that ATAPI CDROM drives support anything like AEN that would allow
you to detect media insertion without polling.

One thing to keep in mind is that media probe capability will likely be a
feature of a revamped DEVFS implementation, if it appears at some point.
In fact, Julian had something of the sort working last summer as part of
his DEVFS/SLICE stuff.  Since the media poll routines will block, they'll
probably need to be implemented as either a kernel process/thread, or a
userland daemon that polls for media insertion.

This is obviously an area that would need some thought/design for a good
implementation.

Ken
-- 
Kenneth Merry
ken@plutotech.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-scsi" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902030428.VAA45132>