public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: SCSI driver query
@ 2001-10-14  4:51 Douglas Gilbert
  0 siblings, 0 replies; 2+ messages in thread
From: Douglas Gilbert @ 2001-10-14  4:51 UTC (permalink / raw)
  To: Linux Bigot, linux-kernel; +Cc: linux-scsi

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

^ permalink raw reply	[flat|nested] 2+ messages in thread
* SCSI driver query
@ 2001-10-12 19:36 Linux Bigot
  0 siblings, 0 replies; 2+ messages in thread
From: Linux Bigot @ 2001-10-12 19:36 UTC (permalink / raw)
  To: linux-kernel

Hi All

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.

TIA

__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

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

end of thread, other threads:[~2001-10-14  4:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-14  4:51 SCSI driver query Douglas Gilbert
  -- strict thread matches above, loose matches on Subject: below --
2001-10-12 19:36 Linux Bigot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox