Re: [PATCH v7] scsi: ufs: add ioctl interface for query request
From: <hidden>
Date: 2016-03-10 16:30:05
Also in:
linux-arm-msm, linux-scsi, lkml
On Thu, Mar 10, 2016 at 03:52:54PM -0000, ygardi@codeaurora.org wrote:quoted
quoted
On Wed, Mar 09, 2016 at 08:52:59PM -0000, ygardi@codeaurora.org wrote:quoted
quoted
On Wed, Mar 09, 2016 at 07:09:49PM -0000, ygardi@codeaurora.orgwrote:quoted
quoted
quoted
quoted
quoted
On Wed, Mar 09, 2016 at 04:11:33PM +0200, Yaniv Gardi wrote:quoted
This patch exposes the ioctl interface for UFS driver via SCSIdevicequoted
quoted
quoted
quoted
ioctl interface. As of now UFS driver would provide the ioctlforquoted
quoted
quoted
quoted
queryquoted
quoted
interface to connected UFS device. Reviewed-by: Subhash Jadavani <redacted> Signed-off-by: Dolev Raviv <redacted> Signed-off-by: Gilad Broner <redacted> Signed-off-by: Yaniv Gardi <redacted>What tool is going to use this ioctl? Why does userspcae wanttoquoted
quoted
doquoted
quoted
quoted
something "special" with UFS devices? Shouldn't they just betreatedquoted
quoted
quoted
like any other normal block device?Any userspace application can be a tool. We already implemented and used a user space application, thatsentquoted
quoted
quoted
quoted
queries to the UFS devices in order to get information anddescriptors.quoted
But do you want to do with that information? Why does userspacecare?quoted
quoted
quoted
i don't really understand the subtext of your question - as ANY ioctl cb, we decided to implement the ioctl callback of thisscsiquoted
quoted
device in order to get information like UNIT DESC, DEVICE DESC,FLAGs,quoted
quoted
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 attributesunderquoted
control by the UFS controller driver? Why do you need/want an ioctlforquoted
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.What is RPMB? And again, why not just use sysfs attributes on your host controller device? Why does this have to be a custom ioctl? greg k-h
RPMB is spcial Logical Unit in the UFS device. you can read about it in the UFS spec. Greg, you are insisting on sysfs, but i can't implement it now, as i don't have the Hardware anymore, or the time. This is a tested and verified code that was accepted and reviewed already, so i'm not sure what is wrong with this solution, not to say, it's already implemented, tested and verified. hope you are help us push it. thanks, Yaniv