* 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; 6+ messages in thread From: Bean Huo (beanhuo) @ 2017-11-27 11:25 UTC (permalink / raw) To: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: vinholikatti@gmail.com 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] 6+ messages in thread
* Re: UFS utilities 2017-11-27 11:25 UFS utilities Bean Huo (beanhuo) @ 2017-11-27 11:40 ` Greg KH 2017-11-27 19:35 ` Bart Van Assche 1 sibling, 0 replies; 6+ messages in thread From: Greg KH @ 2017-11-27 11:40 UTC (permalink / raw) To: Bean Huo (beanhuo) Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, vinholikatti@gmail.com 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] 6+ messages in thread
* Re: UFS utilities 2017-11-27 11:25 UFS utilities 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; 6+ messages in thread From: Bart Van Assche @ 2017-11-27 19:35 UTC (permalink / raw) To: beanhuo@micron.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: gregkh@linuxfoundation.org, vinholikatti@gmail.com 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] 6+ messages in thread
* RE: [EXT] Re: UFS utilities 2017-11-27 19:35 ` Bart Van Assche @ 2017-12-04 15:20 ` Bean Huo (beanhuo) 2017-12-04 18:38 ` gregkh 2017-12-05 22:22 ` Bart Van Assche 0 siblings, 2 replies; 6+ messages in thread From: Bean Huo (beanhuo) @ 2017-12-04 15:20 UTC (permalink / raw) To: Bart Van Assche, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: gregkh@linuxfoundation.org, vinholikatti@gmail.com Hi, Bart Sorry for later! > >Hello Bean, > >Please be more specific. What is inconvenient about sg3_utils on embedded >ARM systems? > Exactly, I don't know how to compile sg3_utils with static library, instead of sharing library. I used following configuration Parameter: ./configure --enable-static=yes --build=x86_64-unknown-linux-gnu --host=aarch64-linux-gnu --prefix=$PWD/out/ CC=aarch64-linux-gnu-g cc --target=aarch64-linux-gnu LD=aarch64-linux-gnu-ld AS=aarch64-linux-gnu-as CFLAGS=-static LDFLAGS=-static But the object files are still dynamically linked. ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=4f01b4c9f1ff47bc00aef93950c02734b4cc8e57, not stripped. I want it to be statically linked. Otherwise, I should copy its library to my lib folder, and sometimes for the embedded, Need to re-build rootfs. Meanwhile, for the UFS, there are totally 27 scsi commands being used based on UFS2.1. For the most case, we just use several sg3_utils object files, don't need to copy all object files to the ending product. >> 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. Also, is it possible bypass SCSI stacks and go into directly UFS stack? Thanks for your inputs. >Bart. //Bean Huo ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [EXT] Re: UFS utilities 2017-12-04 15:20 ` [EXT] " Bean Huo (beanhuo) @ 2017-12-04 18:38 ` gregkh 2017-12-05 22:22 ` Bart Van Assche 1 sibling, 0 replies; 6+ messages in thread From: gregkh @ 2017-12-04 18:38 UTC (permalink / raw) To: Bean Huo (beanhuo) Cc: Bart Van Assche, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, vinholikatti@gmail.com On Mon, Dec 04, 2017 at 03:20:34PM +0000, Bean Huo (beanhuo) wrote: > Hi, Bart > Sorry for later! > > > >Hello Bean, > > > >Please be more specific. What is inconvenient about sg3_utils on embedded > >ARM systems? > > > Exactly, I don't know how to compile sg3_utils with static library, instead of sharing library. I used following configuration > Parameter: > ./configure --enable-static=yes --build=x86_64-unknown-linux-gnu --host=aarch64-linux-gnu --prefix=$PWD/out/ CC=aarch64-linux-gnu-g > cc --target=aarch64-linux-gnu LD=aarch64-linux-gnu-ld AS=aarch64-linux-gnu-as CFLAGS=-static LDFLAGS=-static > > But the object files are still dynamically linked. > > ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, > for GNU/Linux 3.7.0, BuildID[sha1]=4f01b4c9f1ff47bc00aef93950c02734b4cc8e57, not stripped. > > I want it to be statically linked. Otherwise, I should copy its library to my lib folder, and sometimes for the embedded, > Need to re-build rootfs. Meanwhile, for the UFS, there are totally 27 scsi commands being used based on UFS2.1. > For the most case, we just use several sg3_utils object files, don't need to copy all object files to the ending product. So what UFS commands are you missing that you need to see implemented? And again, have you checked the different forks of the driver? > >> 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. thanks, greg k-h ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: UFS utilities 2017-12-04 15:20 ` [EXT] " Bean Huo (beanhuo) 2017-12-04 18:38 ` gregkh @ 2017-12-05 22:22 ` Bart Van Assche 1 sibling, 0 replies; 6+ messages in thread From: Bart Van Assche @ 2017-12-05 22:22 UTC (permalink / raw) To: beanhuo@micron.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: gregkh@linuxfoundation.org, vinholikatti@gmail.com 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] 6+ messages in thread
end of thread, other threads:[~2017-12-05 22:22 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-11-27 11:25 UFS utilities 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-04 18:38 ` gregkh 2017-12-05 22:22 ` Bart Van Assche
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).