From: Douglas Gilbert <dougg@torque.net>
To: Lee Xing <lxing@Crossroads.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: A question on Linux SCSI low-level driver
Date: Wed, 19 May 2004 13:52:15 +1000 [thread overview]
Message-ID: <40AAD9EF.4000903@torque.net> (raw)
In-Reply-To: <519672568F040C41B6FAC21ADF51B18FEFF8@mailnode1.commstor.crossroads.com>
Lee Xing wrote:
> Thanks for the information. scsi_debug is very helpful for me.
>
> Two questions on scsi_debug/low-level driver:
>
> - Has anyone ever created a patch for scsi_debug to support ioctl calls in lk 2.4?
Yes, me and it is in the last 8 (at least) versions of the
lk 2.4 series. See scsi_debug_ioctl().
It doesn't do anything other than report it has been called
but a "template" it is.
The ioctl model is "trickle down". So if the block layer
(in the case of sd), the sd driver (or sg driver) and the
SCSI mid level do _not_ recognize the ioctl() 'request' [an
integer and the second argument given to the ioctl invocation
in the user space] _then_ the ioctl "tickles down" to the
corresponding LLD ioctl routine (if there is one).
If not, is it possible for some one to kindly create it or a
template/part of it?
>
> - Do SCSI passthrough ioctl calls sent to both sd and sg devices share/use the same ioctl routine defined in scsi_debug/low-level driver? In other words, ioctl routine defined in scsi_debug/low-level drivers can not tell and do not care from which type of device (sd or sg) the SCSI passthrough call comes in, correct?
The SCSI subsystem does not convey SCSI commands between the
mid level and LLDs via ioctl calls. ioctl()s defined in LLDs
are for very special, typically hardware specific, reasons.
For example the LLD of a RAID controller might use ioctls
to do RAID specific management functions.
Doug Gilbert
next prev parent reply other threads:[~2004-05-19 11:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-18 22:27 A question on Linux SCSI low-level driver Lee Xing
2004-05-19 3:52 ` Douglas Gilbert [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-05-19 16:14 Lee Xing
2004-05-10 17:55 Lee Xing
2004-05-07 21:28 Lee Xing
2004-05-09 2:10 ` Douglas Gilbert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40AAD9EF.4000903@torque.net \
--to=dougg@torque.net \
--cc=linux-scsi@vger.kernel.org \
--cc=lxing@Crossroads.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox