* [experimental] scsimon driver [was scsiinfo driver]
@ 2001-03-14 1:01 Douglas Gilbert
0 siblings, 0 replies; only message in thread
From: Douglas Gilbert @ 2001-03-14 1:01 UTC (permalink / raw)
To: linux-hotplug
Due to the name clash between my scsiinfo driver and a
utility of the same name, this driver has been renamed
"scsimon". Consequently the web page has become:
http://www.torque.net/scsi/scsimon.html
The tarball on that page includes a kernel patch against
lk 2.4.2, a test program called sm_test.c and a simple
scsi.agent for loading scsi upper level drivers (e.g.
sr_mod).
One extension that I have asked several people about
is media ready/not_ready alert via the hotplug
infrastructure. This would involve adding an ioctl
to scsimon that would spawn a kernel thread which
would periodically poll the given device (with a
TEST UNIT READY command). When a state change occurred
then a notification would sent to /sbin/hotplug with
either "ready" or "not_ready" set as the ACTION.
Sending TEST UNIT READY commands to a device being
actively used by another driver could cause
problems. In such cases supplying a notification to
/sbin/hotplug when the Scsi_Device::changed flag
toggled from 0 to 1 may be useful. [This flag
indicates that some driver has seen a UNIT ATTENTION
reported.]
With help from Oliver Neukum, I have been playing
around with making sg handle "dirty" detaches.
It is more difficult than expected, but possible.
[Some midlevel changes would also be useful.]
While testing, I noticed that the scsi_devicelist
variable is exported. This allows an adapter driver
to scan that list, looking for a particular driver
and perhaps call the detach() method. [N.B. The
scsi midlevel has been bypassed.] These detach()
calls could be pre-emptive. If one was sent to
the scsimon driver then that would cause an
alert to be sent /sbin/hotplug. Via some user
space magic, an application like SANE might
gracefully let go of its sg file descriptor.
An adapter driver like usb/microtek might then
notice its usage count had dropped to zero and
then unregister and unload itself.
Doug Gilbert
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-03-14 1:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-03-14 1:01 [experimental] scsimon driver [was scsiinfo driver] Douglas Gilbert
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).