From: ygardi@codeaurora.org
To: Greg KH <gregkh@linuxfoundation.org>
Cc: ygardi@codeaurora.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>,
"James E.J. Bottomley" <jbottomley@odin.com>,
"Martin K. Petersen" <martin.petersen@oracle.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 15:52:54 -0000 [thread overview]
Message-ID: <5da84d4088cfc5db4e620d884e1c2920.squirrel@us.codeaurora.org> (raw)
In-Reply-To: <20160309224716.GA30523@kroah.com>
> On Wed, Mar 09, 2016 at 08:52:59PM -0000, ygardi@codeaurora.org wrote:
>> > On Wed, Mar 09, 2016 at 07:09:49PM -0000, ygardi@codeaurora.org wrote:
>> >> > On Wed, Mar 09, 2016 at 04:11:33PM +0200, Yaniv Gardi wrote:
>> >> >> This patch exposes the ioctl interface for UFS driver via SCSI
>> device
>> >> >> ioctl interface. As of now UFS driver would provide the ioctl for
>> >> query
>> >> >> interface to connected UFS device.
>> >> >>
>> >> >> Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>
>> >> >> Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
>> >> >> Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
>> >> >> Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
>> >> >
>> >> > What tool is going to use this ioctl? Why does userspcae want to
>> do
>> >> > something "special" with UFS devices? Shouldn't they just be
>> treated
>> >> > like any other normal block device?
>> >> >
>> >>
>> >> Any userspace application can be a tool.
>> >> We already implemented and used a user space application, that sent
>> >> queries to the UFS devices in order to get information and
>> descriptors.
>> >
>> > But do you want to do with that information? Why does userspace care?
>> >
>>
>> i don't really understand the subtext of your question -
>> as ANY ioctl cb, we decided to implement the ioctl callback of this scsi
>> device in order to get information like UNIT DESC, DEVICE DESC, FLAGs,
>> ATTRIBUTES.
>> When dealing with UFS devices, one should be able to read the
>> characteristics of the device. why ? well, why not ?
>
> Why aren't those characteristics just exported as sysfs attributes under
> control by the UFS controller driver? Why do you need/want an ioctl for
> this?
>
Hi greg k-h,
in our code, we used the IOCTL during runtime, in order to determine some
information about the RPMB well known lun.
with the rpmb lun ID we could then go to /dev/sgX and issue
UFS_IOCTL_QUERY to this lun and get the data -
reading the QUERY_DESC_IDN_GEOMETRY descriptor and reading the
QUERY_DESC_IDN_UNIT descriptor.
this was crucial to the work we do in RPMB.
thanks,
Yaniv
>> during development of this driver, it was useful in many cases to be
>> able
>> to communicate with the device, by simple IOCTL command, rather than
>> implementing ad-hock.
>
> Do other storage busses have these types of "custom" ioctls for their
> bus-type alone? For simple attributes like this, shouldn't you be using
> sysfs instead so that it is much easier for userspace tools to get
> access to them?
>
> thanks,
>
> greg k-h
>
next prev parent reply other threads:[~2016-03-10 15:52 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
[not found] ` <201603101818.33826.arnd-r2nGTMty4D4@public.gmane.org>
2016-03-10 19:19 ` Arnd Bergmann
2016-03-11 1:43 ` Martin K. Petersen
[not found] ` <yq1io0tn604.fsf-+q57XtR/GgMb6DWv4sQWN6xOck334EZe@public.gmane.org>
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
[not found] ` <20160309201808.GA24568-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2016-03-09 20:52 ` ygardi-sgV2jX0FEOL9JmXXK+q4OQ
[not found] ` <551d9d1ae5418dd2dfa91aa6db69deb9.squirrel-tfvNlV/SBG3LzYW4gMljz9i2O/JbrIOy@public.gmane.org>
2016-03-09 22:47 ` Greg KH
2016-03-10 15:52 ` ygardi [this message]
[not found] ` <5da84d4088cfc5db4e620d884e1c2920.squirrel-tfvNlV/SBG3LzYW4gMljz9i2O/JbrIOy@public.gmane.org>
2016-03-10 16:24 ` Greg KH
2016-03-10 16:29 ` ygardi
2016-03-10 16:39 ` Greg KH
[not found] ` <20160310163910.GA30247-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2016-03-10 18:48 ` ygardi-sgV2jX0FEOL9JmXXK+q4OQ
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=5da84d4088cfc5db4e620d884e1c2920.squirrel@us.codeaurora.org \
--to=ygardi@codeaurora.org \
--cc=draviv@codeaurora.org \
--cc=gbroner@codeaurora.org \
--cc=gregkh@linuxfoundation.org \
--cc=james.bottomley@hansenpartnership.com \
--cc=jbottomley@odin.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=martin.petersen@oracle.com \
--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 \
/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;
as well as URLs for NNTP newsgroup(s).