public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: ygardi@codeaurora.org
Cc: 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: Wed, 9 Mar 2016 14:47:16 -0800	[thread overview]
Message-ID: <20160309224716.GA30523@kroah.com> (raw)
In-Reply-To: <551d9d1ae5418dd2dfa91aa6db69deb9.squirrel@us.codeaurora.org>

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?

> 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

  reply	other threads:[~2016-03-09 22:47 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
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 [this message]
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=20160309224716.GA30523@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=draviv@codeaurora.org \
    --cc=gbroner@codeaurora.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 \
    --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