lkml.org 
[lkml]   [2001]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: SCSI driver query
Linux Bigot <linuxopinion@yahoo.com> wrote:

> How is the ioctl() entry point in Scsi_Host_Template
> used. What device node is associated with it and what
> all commands can be passed down through this
> interface.

That ioctl can be accessed (if defined) via a "trickle
down" ioctl call to any open SCSI device name (e.g. /dev/sda).

When an ioctl is called on an open SCSI device name
then the first match in the following list processes
it:
- the associated upper level SCSI driver looks for
a match on the ioctl 'cmd' number
- the mid-level looks for a match on the ioctl
'cmd' number
- otherwise if Scsi_Host_Template::ioctl is non-NULL
then it is called for the given SCSI device with
the 'cmd' and 'arg' of the original user ioctl call

A SCSI lower level (adapter) driver is not required to
support Scsi_Host_Template::ioctl in which case it will
be NULL. If it is supported then it is up to that adapter
driver what is supported.


This mechanism only allows an adapter which has attached
SCSI devices to be sent an ioctl. The proc_fs interface
may be useful for contacting an adapter driver even if it
doesn't have any attached devices. Something like:
$ echo "<some_command>" > /proc/scsi/advansys/0


Doug Gilbert
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:08    [W:0.028 / U:30.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site