linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare-l3A5Bk7waGM@public.gmane.org>
To: "Martin K. Petersen"
	<martin.petersen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>,
	Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
Cc: ygardi-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	Greg KH
	<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
	james.bottomley-JuX6DAaQMKPCXq6kfMZ53/egYHeGw8Jk@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	santoshsy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-scsi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Dolev Raviv <draviv-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Gilad Broner <gbroner-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Vinayak Holikatti
	<vinholikatti-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Michael Neuling <mikey-/owAOxkjmzZAfugRpC6u6w@public.gmane.org>,
	"Matthew R. Ochs"
	<mrochs-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>,
	Wen Xiong
	<wenxiong-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>,
	Subhash Jadavani
	<subhashj-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	"open list:ABI/API"
	<linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH v7] scsi: ufs: add ioctl interface for query request
Date: Fri, 11 Mar 2016 09:45:32 +0100	[thread overview]
Message-ID: <56E285AC.1030803@suse.de> (raw)
In-Reply-To: <yq1io0tn604.fsf-+q57XtR/GgMb6DWv4sQWN6xOck334EZe@public.gmane.org>

On 03/11/2016 02:43 AM, Martin K. Petersen wrote:
>>>>>> "Arnd" == Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org> 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/
> 
And indeed I would expose this 'special' UFS RPMB as a 'generic'
SCSI device and add the required fields in sysfs, much like Greg KH
suggested.
Plus adding a 'bsg' interface for sending 'raw' UFS commands sounds
much more appealing; that's what we do for SAS and FC, too.

But then, none of the above can be done if there is no hardware
available. At the same time, you wouldn't be able to test any
proposed fixes to the original ioctl patch.
So I guess you'll have to retract this patch or get hold of the
hardware to actually _test_ something there.

Or send me some, I'll be happy to help out here :-)

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare-l3A5Bk7waGM@public.gmane.org			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

  parent reply	other threads:[~2016-03-11  8: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
     [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 [this message]
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
     [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=56E285AC.1030803@suse.de \
    --to=hare-l3a5bk7wagm@public.gmane.org \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=draviv-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=gbroner-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=james.bottomley-JuX6DAaQMKPCXq6kfMZ53/egYHeGw8Jk@public.gmane.org \
    --cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-scsi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=martin.petersen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=mikey-/owAOxkjmzZAfugRpC6u6w@public.gmane.org \
    --cc=mrochs-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
    --cc=santoshsy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=subhashj-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=vinholikatti-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=wenxiong-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
    --cc=ygardi-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.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;
as well as URLs for NNTP newsgroup(s).