From: Douglas Gilbert <dougg@torque.net>
To: Arjan van de Ven <arjan@infradead.org>
Cc: HighPoint Linux Team <linux@highpoint-tech.com>,
linux-scsi@vger.kernel.org, jejb@steeleye.com,
Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH] hptiop: backout ioctl mess
Date: Wed, 02 Aug 2006 23:29:01 -0400 [thread overview]
Message-ID: <44D16D7D.7090705@torque.net> (raw)
In-Reply-To: <1154559337.2861.2.camel@laptopd505.fenrus.org>
Arjan van de Ven wrote:
> On Mon, 2006-07-31 at 10:53 +0800, HighPoint Linux Team wrote:
>> Christoph Hellwig wrote:
>>> The hptiop just got merged with a horrible amount of really bad ioctl
>>> code that is against the standards for new scsi drivers. This patch
>>> backs it out (and fixes a small bug where scsi_add_host is called to
>>> early). We can re-add proper APIs once we agree on them.
>> What is the standard implemetation of private ioctls for scsi drivers?
>> Thanks.
>
> Hi,
>
> the real answer is: try really hard to use generic ioctls for your
> functionality.
Now there is an idea :-) Pick a vendor specific opcode
like 0xff (and maybe have a module parameter to override
it to something else) and then use the SG_IO ioctl to
send "highpoint" specific SCSI commands that provide
the same functionality within the LLD that Christoph
just stripped out.
One problem with this approach is interacting with the
LLD in the absence of any (real) SCSI devices. It shouldn't be
too hard to trick the mid level into believing there are
SCSI devices connected (see the scsi_debug driver). May
I suggest a LUN slightly above the WLUN range (e.g.
49409+10). The fake device could then be created with:
# cd /sys/class/scsi_host/host0
# echo "- - 49419" > scan
The fake device would need to respond to an INQUIRY and a few
other simple SCSI commands to keep the mid-level happy.
May I also suggest the "processor" peripheral device type
which stops other ULDs getting involved. Then you can talk
to the LLD via a sg device node.
What exactly do you need private ioctls for?
> It's quite possible that there is a generic way to do the same thing
> already, or something that can easily be extended to do what you need...
Is the above generic enough?
Doug Gilbert
next prev parent reply other threads:[~2006-08-03 3:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-30 17:13 [PATCH] hptiop: backout ioctl mess Christoph Hellwig
2006-07-31 2:53 ` HighPoint Linux Team
2006-07-31 3:19 ` Douglas Gilbert
2006-08-02 22:55 ` Arjan van de Ven
2006-08-03 3:12 ` HighPoint Linux Team
2006-08-03 3:29 ` Douglas Gilbert [this message]
2006-08-03 11:02 ` Arjan van de Ven
2006-08-06 18:18 ` James Bottomley
2006-09-12 5:40 ` HighPoint Linux Team
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=44D16D7D.7090705@torque.net \
--to=dougg@torque.net \
--cc=arjan@infradead.org \
--cc=hch@lst.de \
--cc=jejb@steeleye.com \
--cc=linux-scsi@vger.kernel.org \
--cc=linux@highpoint-tech.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