From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: ygardi@codeaurora.org, "Greg KH" <gregkh@linuxfoundation.org>,
james.bottomley@hansenpartnership.com,
linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
linux-arm-msm@vger.kernel.org, santoshsy@gmail.com,
linux-scsi-owner@vger.kernel.org,
"Dolev Raviv" <draviv@codeaurora.org>,
"Gilad Broner" <gbroner@codeaurora.org>,
"Vinayak Holikatti" <vinholikatti@gmail.com>,
"Michael Neuling" <mikey@neuling.org>,
"Matthew R. Ochs" <mrochs@linux.vnet.ibm.com>,
"Wen Xiong" <wenxiong@linux.vnet.ibm.com>,
"Subhash Jadavani" <subhashj@codeaurora.org>,
"open list\:ABI\/API" <linux-api@vger.kernel.org>
Subject: Re: [PATCH v7] scsi: ufs: add ioctl interface for query request
Date: Thu, 10 Mar 2016 20:43:55 -0500 [thread overview]
Message-ID: <yq1io0tn604.fsf@sermon.lab.mkp.net> (raw)
In-Reply-To: <201603102019.32467.arnd@arndb.de> (Arnd Bergmann's message of "Thu, 10 Mar 2016 20:19:32 +0100")
>>>>> "Arnd" == Arnd Bergmann <arnd@arndb.de> writes:
Arnd> Looking through what other drivers do, I've found a couple of
Arnd> patterns now. n particular, most use the SG_IO ioctl to pass down
Arnd> commands from user space into a device specific command
Arnd> queue. Have you looked at that interface in the past to see if it
Arnd> would fit your use case?
Arnd> There is also a 'bsg' API that some drivers implement, which I
Arnd> think would be another alternative.
Arnd> Could any of the SCSI experts comment on what they expect a driver
Arnd> to use out of those three alternatives (if any):
My preference is that if you want to expose any information that a user
or admin would care about, put it in sysfs where it is easily accessible
and can be scripted.
For things that need to directly send commands to the hardware (to
configure vendor specific settings or inspect parameters for development
purposes) use the sg or bsg interfaces like we do for both ATA and
SCSI. bsg is newer and supports more features like bidirectional
commands. But for this particular use case I don't think it offers any
particular advantages over SG_IO. Both interfaces take the same
descriptors so it really doesn't matter much.
See:
http://sg.danny.cz/sg/
--
Martin K. Petersen Oracle Linux Engineering
next prev parent reply other threads:[~2016-03-11 1:45 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-09 14:11 [PATCH v7] scsi: ufs: add ioctl interface for query request Yaniv Gardi
2016-03-09 16:29 ` Greg KH
2016-03-09 19:09 ` ygardi
2016-03-10 17:18 ` Arnd Bergmann
2016-03-10 19:19 ` Arnd Bergmann
2016-03-11 1:43 ` Martin K. Petersen [this message]
2016-03-11 8:45 ` Hannes Reinecke
2016-03-13 12:45 ` Winkler, Tomas
2016-03-09 19:09 ` ygardi
2016-03-09 20:18 ` Greg KH
2016-03-09 20:52 ` ygardi
2016-03-09 22:47 ` Greg KH
2016-03-10 15:52 ` ygardi
2016-03-10 16:24 ` Greg KH
2016-03-10 16:29 ` ygardi
2016-03-10 16:39 ` Greg KH
2016-03-10 18:48 ` ygardi
2016-03-10 18:58 ` Greg KH
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=yq1io0tn604.fsf@sermon.lab.mkp.net \
--to=martin.petersen@oracle.com \
--cc=arnd@arndb.de \
--cc=draviv@codeaurora.org \
--cc=gbroner@codeaurora.org \
--cc=gregkh@linuxfoundation.org \
--cc=james.bottomley@hansenpartnership.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi-owner@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mikey@neuling.org \
--cc=mrochs@linux.vnet.ibm.com \
--cc=santoshsy@gmail.com \
--cc=subhashj@codeaurora.org \
--cc=vinholikatti@gmail.com \
--cc=wenxiong@linux.vnet.ibm.com \
--cc=ygardi@codeaurora.org \
/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