All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: UFS utilities
@ 2017-11-29 15:39 Bean Huo (beanhuo)
  2017-11-29 16:19 ` Greg KH
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Bean Huo (beanhuo) @ 2017-11-29 15:39 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-scsi, linux-kernel, stable, vinholikatti

Hi, Greg

>On Mon, Nov 27, 2017 at 11:25:47AM +0000, Bean Huo (beanhuo) wrote:
>> Hi, all
>> Is there someone knows if exists one utilis dedicated to UFS device, rather
>than SCSI utils?
>> I have tried sg3-utils, but it is not convenient for the embedded ARM-based
>system.
>> And also it doesn't support several UFS special command.
>
>What specific UFS commands do you need to make to the device that the
>current driver does not support?


There are some UFS/vendor native commands. They are not SCSI based.

>And yes, this is a trick question as there are about 4 different major forks that
>I know of of the UFS driver in different vendor trees, all of which support
>different types of UFS commands :(
>
>> If we don't have this kind of tool for UFS, is it necessary for us to develop a
>>ufs-utils?
>
>I doubt it, what neds to happen is getting all of the functionality that lives in
>these different forks all merged upstream into the in-kernel driver.  Then I bet
>all of the needed functionality you are looking for will be there.
>
Sometimes customers tend to use user space tool to do some configuration.
And especially, for example the UFS FFU.

>good luck!
>
Thanks !
>greg k-h

//Bean Huo

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: UFS utilities
  2017-11-29 15:39 UFS utilities Bean Huo (beanhuo)
@ 2017-11-29 16:19 ` Greg KH
  2017-11-29 16:20 ` James Bottomley
  2017-12-04  2:47 ` Kyuho Choi
  2 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2017-11-29 16:19 UTC (permalink / raw)
  To: Bean Huo (beanhuo); +Cc: linux-scsi, linux-kernel, stable, vinholikatti

On Wed, Nov 29, 2017 at 03:39:19PM +0000, Bean Huo (beanhuo) wrote:
> Hi, Greg
> 
> >On Mon, Nov 27, 2017 at 11:25:47AM +0000, Bean Huo (beanhuo) wrote:
> >> Hi, all
> >> Is there someone knows if exists one utilis dedicated to UFS device, rather
> >than SCSI utils?
> >> I have tried sg3-utils, but it is not convenient for the embedded ARM-based
> >system.
> >> And also it doesn't support several UFS special command.
> >
> >What specific UFS commands do you need to make to the device that the
> >current driver does not support?
> 
> 
> There are some UFS/vendor native commands. They are not SCSI based.

Exactly what ones are missing?  Again, there are numerous non-scsi UFS
commands supported in sysfs files in the in-kernel, and lots in the
different forks I mentioned.  I bet if you pull all of those together,
you should cover all of the ones you need, right?

> >And yes, this is a trick question as there are about 4 different major forks that
> >I know of of the UFS driver in different vendor trees, all of which support
> >different types of UFS commands :(
> >
> >> If we don't have this kind of tool for UFS, is it necessary for us to develop a
> >>ufs-utils?
> >
> >I doubt it, what neds to happen is getting all of the functionality that lives in
> >these different forks all merged upstream into the in-kernel driver.  Then I bet
> >all of the needed functionality you are looking for will be there.
> >
> Sometimes customers tend to use user space tool to do some configuration.
> And especially, for example the UFS FFU.

Again, that's fine, have you looked at what is currently present and
what is missing?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: UFS utilities
  2017-11-29 15:39 UFS utilities Bean Huo (beanhuo)
  2017-11-29 16:19 ` Greg KH
@ 2017-11-29 16:20 ` James Bottomley
  2017-12-04  2:47 ` Kyuho Choi
  2 siblings, 0 replies; 10+ messages in thread
From: James Bottomley @ 2017-11-29 16:20 UTC (permalink / raw)
  To: Bean Huo (beanhuo), Greg KH
  Cc: linux-scsi, linux-kernel, stable, vinholikatti

On Wed, 2017-11-29 at 15:39 +0000, Bean Huo (beanhuo) wrote:
> Thread-Topic: UFS utilities
>  Thread-Index: AdNpKDYJWTPjczfxQHC/pD9WNnnl4w==

Could you fix your mail transfer agent?  It's using these non standard
headers instead of the RFC mandated In-Reply-To: and References:

The problem is that this breaks threading on the public mailing lists
and means most of us can't tie this email back to the original thread.

> > On Mon, Nov 27, 2017 at 11:25:47AM +0000, Bean Huo (beanhuo) wrote:
> > > 
> > > Hi, all
> > > Is there someone knows if exists one utilis dedicated to UFS
> > > device, rather than SCSI utils?
> > > 
> > > I have tried sg3-utils, but it is not convenient for the embedded
> > > ARM-based system.
> > > 
> > > And also it doesn't support several UFS special command.
> > 
> > What specific UFS commands do you need to make to the device that
> > the current driver does not support?
> 
> 
> There are some UFS/vendor native commands. They are not SCSI based.

Can you list them?  The reason for asking is that SCSI-3 is pretty
extensive in terms of management utilities, so any function you do with
vendor native commands that matches an sg3utils function could be done
by the latter instead via a SCSI translation layer.

James

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: UFS utilities
  2017-11-29 15:39 UFS utilities Bean Huo (beanhuo)
  2017-11-29 16:19 ` Greg KH
  2017-11-29 16:20 ` James Bottomley
@ 2017-12-04  2:47 ` Kyuho Choi
  2 siblings, 0 replies; 10+ messages in thread
From: Kyuho Choi @ 2017-12-04  2:47 UTC (permalink / raw)
  To: Bean Huo (beanhuo)
  Cc: Greg KH, linux-scsi, linux-kernel, stable, vinholikatti

Hi,

On 11/30/17, Bean Huo (beanhuo) <beanhuo@micron.com> wrote:
> Hi, Greg
>
>>On Mon, Nov 27, 2017 at 11:25:47AM +0000, Bean Huo (beanhuo) wrote:
>>> Hi, all
>>> Is there someone knows if exists one utilis dedicated to UFS device,
>>> rather
>>than SCSI utils?
>>> I have tried sg3-utils, but it is not convenient for the embedded
>>> ARM-based
>>system.
>>> And also it doesn't support several UFS special command.
>>
>>What specific UFS commands do you need to make to the device that the
>>current driver does not support?
>
>
> There are some UFS/vendor native commands. They are not SCSI based.
>

UFS command means uic/dme commands?.
AFAIK, many uic/dme commands need  pre/post operation of SoC related.
So, it would be need modify sg3-utils or another.

Therefore, IMHO, I don't know why we need it. But if you still want
it, You'll be need to modify/create user application and modified ufs
driver for your needs.

About vendor command, it's vendor specific.
It'll be possible to support by sg3-utils. And it need modify too.

>>And yes, this is a trick question as there are about 4 different major
>> forks that
>>I know of of the UFS driver in different vendor trees, all of which
>> support
>>different types of UFS commands :(
>>
>>> If we don't have this kind of tool for UFS, is it necessary for us to
>>> develop a
>>>ufs-utils?
>>
>>I doubt it, what neds to happen is getting all of the functionality that
>> lives in
>>these different forks all merged upstream into the in-kernel driver.  Then
>> I bet
>>all of the needed functionality you are looking for will be there.
>>
> Sometimes customers tend to use user space tool to do some configuration.
> And especially, for example the UFS FFU.
>

As i knew, in case of FFU, it's possible to support by sg_write_buffer.

>>good luck!
>>
> Thanks !
>>greg k-h
>
> //Bean Huo
>
>

WBR,
Kyuho Choi

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: UFS utilities
  2017-12-04 15:20   ` [EXT] " Bean Huo (beanhuo)
@ 2017-12-05 22:22     ` Bart Van Assche
  0 siblings, 0 replies; 10+ messages in thread
From: Bart Van Assche @ 2017-12-05 22:22 UTC (permalink / raw)
  To: beanhuo, linux-scsi, linux-kernel, stable; +Cc: gregkh, vinholikatti

On Mon, 2017-12-04 at 15:20 +0000, Bean Huo (beanhuo) wrote:
> Also, is it possible bypass SCSI stacks and go into directly UFS stack?

Hello Bean,

Sorry but I think it would be wrong to bypass the block layer when submitting
UFS commands. My understanding is that UFS devices are used in systems where
power management functionality is important (see also Documentation/power).
If the block layer would be bypassed then the power management support that
exists in the block layer will have to be reimplemented in UFS devices. That
would be a duplicate effort. I'm not sure that we want such duplication.

Bart.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: UFS utilities
  2017-12-05 15:44 Bean Huo (beanhuo)
@ 2017-12-05 15:49 ` gregkh
  0 siblings, 0 replies; 10+ messages in thread
From: gregkh @ 2017-12-05 15:49 UTC (permalink / raw)
  To: Bean Huo (beanhuo)
  Cc: Bart Van Assche, linux-scsi, linux-kernel, stable, vinholikatti

On Tue, Dec 05, 2017 at 03:44:19PM +0000, Bean Huo (beanhuo) wrote:
> Hi, greg k-h
> 
> >
> >So what UFS commands are you missing that you need to see implemented?
> >
> >And again, have you checked the different forks of the driver?
> >
> 
> Seems there is something misunderstood, I want to use UPIU, rather than CDB.
> Maybe it is not possible based on current UFS stacks. Of course, exactly, 
> there is no missing SCSI command listed in UFS 2.1.

Again, have you looked at the different forks out there?  I bet you can
already do this...

If not, I'm sure simple patches should be able to add the missing
functionality, it would be good to get a solid UFS driver one of these
days in the tree :)

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: UFS utilities
@ 2017-12-05 15:44 Bean Huo (beanhuo)
  2017-12-05 15:49 ` gregkh
  0 siblings, 1 reply; 10+ messages in thread
From: Bean Huo (beanhuo) @ 2017-12-05 15:44 UTC (permalink / raw)
  To: gregkh; +Cc: Bart Van Assche, linux-scsi, linux-kernel, stable, vinholikatti

Hi, greg k-h

>
>So what UFS commands are you missing that you need to see implemented?
>
>And again, have you checked the different forks of the driver?
>

Seems there is something misunderstood, I want to use UPIU, rather than CDB.
Maybe it is not possible based on current UFS stacks. Of course, exactly, 
there is no missing SCSI command listed in UFS 2.1.

>> >> And also it doesn't support several UFS special command.
>> >
>> >Are you referring to SCSI commands or rather to UFS commands that
>> >fall outside the SCSI spec? Anyway, an approach that is used by many
>> >SCSI drivers to export information to user space that falls outside
>> >the SCSI spec is to create additional sysfs attributes. See also the
>> >sdev_attrs and shost_attrs members of struct scsi_host_template.
>> >
>> Yes, for the UFS information, I can use these interface/approach to easily
>get.
>> I am thinking how about some testing case and configuration operation.
>
>Which ones exactly?
>
>> Also, is it possible bypass SCSI stacks and go into directly UFS stack?
>
>Look at the different sysfs files for the UFS device, it does that for some
>commands.
>
To be honest, I don't know which interface, it can pass UPIU to UFS driver,
And bypass SCSI stacks.

Thanks.
Bean Huo

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: UFS utilities
  2017-11-27 11:25 Bean Huo (beanhuo)
  2017-11-27 11:40 ` Greg KH
@ 2017-11-27 19:35 ` Bart Van Assche
  2017-12-04 15:20   ` [EXT] " Bean Huo (beanhuo)
  1 sibling, 1 reply; 10+ messages in thread
From: Bart Van Assche @ 2017-11-27 19:35 UTC (permalink / raw)
  To: beanhuo, linux-scsi, linux-kernel, stable; +Cc: gregkh, vinholikatti

On Mon, 2017-11-27 at 11:25 +0000, Bean Huo (beanhuo) wrote:
> Is there someone knows if exists one utilis dedicated to UFS device,
> rather than SCSI utils? I have tried sg3-utils, but it is not convenient
> for the embedded ARM-based system.

Hello Bean,

Please be more specific. What is inconvenient about sg3_utils on embedded
ARM systems?

> And also it doesn't support several UFS special command. 

Are you referring to SCSI commands or rather to UFS commands that fall
outside the SCSI spec? Anyway, an approach that is used by many SCSI drivers
to export information to user space that falls outside the SCSI spec is to
create additional sysfs attributes. See also the sdev_attrs and shost_attrs
members of struct scsi_host_template.

Bart.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: UFS utilities
  2017-11-27 11:25 Bean Huo (beanhuo)
@ 2017-11-27 11:40 ` Greg KH
  2017-11-27 19:35 ` Bart Van Assche
  1 sibling, 0 replies; 10+ messages in thread
From: Greg KH @ 2017-11-27 11:40 UTC (permalink / raw)
  To: Bean Huo (beanhuo); +Cc: linux-scsi, linux-kernel, stable, vinholikatti

On Mon, Nov 27, 2017 at 11:25:47AM +0000, Bean Huo (beanhuo) wrote:
> Hi, all 
> Is there someone knows if exists one utilis dedicated to UFS device, rather than SCSI utils?
> I have tried sg3-utils, but it is not convenient for the embedded ARM-based system.
> And also it doesn't support several UFS special command. 

What specific UFS commands do you need to make to the device that the
current driver does not support?

And yes, this is a trick question as there are about 4 different major
forks that I know of of the UFS driver in different vendor trees, all of
which support different types of UFS commands :(

> If we don't have this kind of tool for UFS, is it necessary for us to develop a ufs-utils?

I doubt it, what neds to happen is getting all of the functionality that
lives in these different forks all merged upstream into the in-kernel
driver.  Then I bet all of the needed functionality you are looking for
will be there.

good luck!

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* UFS utilities
@ 2017-11-27 11:25 Bean Huo (beanhuo)
  2017-11-27 11:40 ` Greg KH
  2017-11-27 19:35 ` Bart Van Assche
  0 siblings, 2 replies; 10+ messages in thread
From: Bean Huo (beanhuo) @ 2017-11-27 11:25 UTC (permalink / raw)
  To: linux-scsi, linux-kernel, stable; +Cc: vinholikatti

Hi, all 
Is there someone knows if exists one utilis dedicated to UFS device, rather than SCSI utils?
I have tried sg3-utils, but it is not convenient for the embedded ARM-based system.
And also it doesn't support several UFS special command. 
If we don't have this kind of tool for UFS, is it necessary for us to develop a ufs-utils?
I need your every expert's inputs and suggestions.
Thanks in advance.

//Bean Huo

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-12-05 22:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-29 15:39 UFS utilities Bean Huo (beanhuo)
2017-11-29 16:19 ` Greg KH
2017-11-29 16:20 ` James Bottomley
2017-12-04  2:47 ` Kyuho Choi
  -- strict thread matches above, loose matches on Subject: below --
2017-12-05 15:44 Bean Huo (beanhuo)
2017-12-05 15:49 ` gregkh
2017-11-27 11:25 Bean Huo (beanhuo)
2017-11-27 11:40 ` Greg KH
2017-11-27 19:35 ` Bart Van Assche
2017-12-04 15:20   ` [EXT] " Bean Huo (beanhuo)
2017-12-05 22:22     ` Bart Van Assche

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.