RE: [PATCH v6 1/9] rpmb: add Replay Protected Memory Block (RPMB) subsystem

2016-09-23 Thread Avri Altman
> > Signed-off-by: Tomas Winkler <tomas.wink...@intel.com> > Signed-off-by: Alexander Usyskin <alexander.usys...@intel.com> Tested-by: Avri Altman <avri.alt...@sandisk.com> - mmc - full functionality. One issue found that was fixed on V6: patch V6 2/9. - ufs

RE: [PATCH] scsi: ufs: reqs and tasks were put in the wrong order

2017-08-30 Thread Avri Altman
m > Cc: linux-scsi@vger.kernel.org > Subject: [PATCH] scsi: ufs: reqs and tasks were put in the wrong order > > Signed-off-by: Zang Leigang <zangleig...@hisilicon.com> Acked-by: Avri Altman <avri.alt...@sandisk.com> > > diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/uf

RE: [PATCH] scsi: ufs: Fix Runtime PM

2017-11-13 Thread Avri Altman
> -Original Message- > From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi- > ow...@vger.kernel.org] On Behalf Of Michal Potomski > Sent: Thursday, November 09, 2017 11:17 AM > To: linux-scsi@vger.kernel.org > Cc: vinholika...@gmail.com; martin.peter...@oracle.com; >

RE: [PATCH 4/4] scsi: ufs: make ufshcd_config_pwr_mode of non-static func

2018-05-16 Thread Avri Altman
o that other vendors like > exynos can use the same. > > Signed-off-by: Seungwon Jeon <ess...@gmail.com> > Signed-off-by: Alim Akhtar <alim.akh...@samsung.com> Acked-by: Avri Altman <avri.alt...@wdc.com> Might be also useful exporting an API for all uic commands? Thanks, Avri

RE: [PATCH 1/1] scsi: ufs: make sure all interrupts are processed

2018-01-30 Thread Avri Altman
Hi, Can you elaborate how this can even happen? Isn't the interrupt aggregation capability should attend for those cases? Thanks, Avri > -Original Message- > From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi- > ow...@vger.kernel.org] On Behalf Of Asutosh Das > Sent: Tuesday,

RE: [PATCH 1/1] scsi: ufs: make sure all interrupts are processed

2018-02-05 Thread Avri Altman
> >>> -Original Message- > >>> From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi- > >>> ow...@vger.kernel.org] On Behalf Of Asutosh Das > >>> Sent: Tuesday, January 30, 2018 6:54 AM > >>> To: subha...@codeaurora.org; c...@codeaurora.org; > >>> vivek.gau...@codeaurora.org;

RE: [PATCH 1/1] scsi: ufs: Add support for Auto-Hibernate Idle Timer

2018-02-18 Thread Avri Altman
> -Original Message- > From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi- > ow...@vger.kernel.org] On Behalf Of Adrian Hunter > Sent: Friday, February 16, 2018 2:01 PM > To: Vinayak Holikatti ; Martin K. Petersen > ; James E.J.

RE: [PATCH 2/2 v4] scsi: ufs: introduce sysfs entries exposing UFS health info

2017-12-27 Thread Avri Altman
> -Original Message- > From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi- > ow...@vger.kernel.org] On Behalf Of Greg Kroah-Hartman > Sent: Thursday, December 21, 2017 10:00 AM > To: Jaegeuk Kim > Cc: linux-ker...@vger.kernel.org; linux-scsi@vger.kernel.org;

RE: [PATCH 6/6] scsi: ufs-bsg: Add support for uic commands in ufs_bsg_request()

2018-08-02 Thread Avri Altman
Thanks, Avri > -Original Message- > From: Bart Van Assche > Sent: Wednesday, August 01, 2018 6:39 PM > To: h...@lst.de; Avri Altman ; linux-scsi@vger.kernel.org; > jthumsh...@suse.de; h...@suse.com; martin.peter...@oracle.com; > j...@linux.vnet.ibm.com > Cc: Vi

RE: [PATCH 1/6] scsi: Add ufs transport class

2018-08-01 Thread Avri Altman
Johannes, Thanks a lot for your comments. Cheers, Avri > -Original Message- > From: linux-scsi-ow...@vger.kernel.org > On Behalf Of Johannes Thumshirn > Sent: Wednesday, August 01, 2018 2:17 PM > To: Avri Altman > Cc: Christoph Hellwig ; Hannes Reinecke ; > Bart V

[RFC 4/6] scsi: ufs: Add API to execute raw upiu commands

2018-07-29 Thread Avri Altman
and task work queues. That is, all utrd-typed UPIUs are "disguised" as device management commands. Similarly, the utmrd-typed UPUIs uses the task management infrastructure. It is up to the caller to fill the upiu request properly, as it will be copied without any further input validations. Signed-off

[RFC 3/6] scsi: ufs: Instantiate a ufs transport if its available

2018-07-29 Thread Avri Altman
Call the Attach/Probe/Remove APIs. Signed-off-by: Avri Altman --- drivers/scsi/ufs/ufshcd.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 3560185..c2ae406 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs

[RFC 6/6] scsi: ufs-bsg: Add support for uic commands in ufs_bsg_request()

2018-07-29 Thread Avri Altman
Add support to those uic commands, that are currently supported by ufshcd api: the variants of dme_{peer}_{set_get}. At this point better not to add any new api, as careless uic command may turn the device into a brick. Signed-off-by: Avri Altman --- drivers/scsi/ufs/ufs_bsg.c | 56

[RFC 5/6] scsi: ufs-bsg: Add support for raw upiu in ufs_bsg_request()

2018-07-29 Thread Avri Altman
for that. We also still not supporting uic commands: For first phase, we plan to use the existing api, and send only uic commands that are already supported. Anyway, all that will come in the next patch. Signed-off-by: Avri Altman --- drivers/scsi/ufs/ufs_bsg.c | 119

[RFC 1/6] scsi: Add ufs transport class

2018-07-29 Thread Avri Altman
retty lean structure. This is because we are using upiu transactions that contains the outmost detailed info, so we don't really need complex constructs to support it. The transport will keep track of its ufs-ports via its scsi host. Signed-off-by: Avri Altman --- drivers/scsi/Kconfig |

[RFC 2/6] scsi: ufs: Add ufs-bsg module

2018-07-29 Thread Avri Altman
, and able to communicate with the device in ways, that are sometimes beyond the capacity of the ufs driver. Signed-off-by: Avri Altman --- drivers/scsi/ufs/Makefile| 1 + drivers/scsi/ufs/ufs_bsg.c | 127 +++ drivers/scsi/ufs/ufs_bsg.h | 74

[RFC 0/6] scsi: scsi transport for ufs devices

2018-07-29 Thread Avri Altman
platform with a V4.14 kernel, "modernized" by recent bsg and ufs patches. We also used a htc11 with a V4.4 kernel, but needed much more transport/bsg/ufs patches to make it relevant. Avri Altman (6): scsi: Add ufs transport class scsi: ufs: Add ufs-bsg module scsi: ufs: Instant

RE: [RFC 0/6] scsi: scsi transport for ufs devices

2018-08-01 Thread Avri Altman
suse.de; martin.peter...@oracle.com; > Avri Altman > Cc: Vinayak Holikatti ; Avi Shchislowski > ; Alex Lemberg ; > Stanislav Nijnikov ; subha...@codeaurora.org > Subject: Re: [RFC 0/6] scsi: scsi transport for ufs devices > > On 2018-07-30 02:13 PM, Hannes Reinecke wrote: > &g

[PATCH 1/6] scsi: Add ufs transport class

2018-08-01 Thread Avri Altman
retty lean structure. This is because we are using upiu transactions that contains the outmost detailed info, so we don't really need complex constructs to support it. The transport will keep track of its ufs-ports via its scsi host. Signed-off-by: Avri Altman --- drivers/scsi/Kconfig |

[PATCH 0/6] scsi: scsi transport for ufs devices

2018-08-01 Thread Avri Altman
platform with a V4.14 kernel, "modernized" by recent bsg and ufs patches. We also used a htc11 with a V4.4 kernel, but needed much more transport/bsg/ufs patches to make it relevant. Avri Altman (6): scsi: Add ufs transport class scsi: ufs: Add ufs-bsg module scsi: ufs: Instant

[PATCH 5/6] scsi: ufs-bsg: Add support for raw upiu in ufs_bsg_request()

2018-08-01 Thread Avri Altman
for that. We also still not supporting uic commands: For first phase, we plan to use the existing api, and send only uic commands that are already supported. Anyway, all that will come in the next patch. Signed-off-by: Avri Altman --- drivers/scsi/ufs/ufs_bsg.c | 119

[PATCH 4/6] scsi: ufs: Add API to execute raw upiu commands

2018-08-01 Thread Avri Altman
and task work queues. That is, all utrd-typed UPIUs are "disguised" as device management commands. Similarly, the utmrd-typed UPUIs uses the task management infrastructure. It is up to the caller to fill the upiu request properly, as it will be copied without any further input validations. Signed-off

[PATCH 3/6] scsi: ufs: Instantiate a ufs transport if its available

2018-08-01 Thread Avri Altman
Call the Attach/Probe/Remove APIs. Signed-off-by: Avri Altman --- drivers/scsi/ufs/ufshcd.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 3560185..c2ae406 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs

[PATCH 2/6] scsi: ufs: Add ufs-bsg module

2018-08-01 Thread Avri Altman
, and able to communicate with the device in ways, that are sometimes beyond the capacity of the ufs driver. Signed-off-by: Avri Altman --- drivers/scsi/ufs/Makefile| 1 + drivers/scsi/ufs/ufs_bsg.c | 127 +++ drivers/scsi/ufs/ufs_bsg.h | 74

[PATCH 6/6] scsi: ufs-bsg: Add support for uic commands in ufs_bsg_request()

2018-08-01 Thread Avri Altman
Add support to those uic commands, that are currently supported by ufshcd api: the variants of dme_{peer}_{set_get}. At this point better not to add any new api, as careless uic command may turn the device into a brick. Signed-off-by: Avri Altman --- drivers/scsi/ufs/ufs_bsg.c | 56

[PATCH v2 2/8] scsi: ufs: Add ufs-bsg module

2018-08-05 Thread Avri Altman
, and able to communicate with the device in ways, that are sometimes beyond the capacity of the ufs driver. Signed-off-by: Avri Altman --- drivers/scsi/ufs/Makefile| 1 + drivers/scsi/ufs/ufs_bsg.c | 127 +++ drivers/scsi/ufs/ufs_bsg.h | 72

[PATCH v2 4/8] scsi: ufs: Add fill task management request

2018-08-05 Thread Avri Altman
Do that in preparation to re-use ufshcd_issue_tm_cmd code. Signed-off-by: Avri Altman --- drivers/scsi/ufs/ufshcd.c | 50 +++ 1 file changed, 29 insertions(+), 21 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index

[PATCH v2 0/8] scsi: scsi transport for ufs devices

2018-08-05 Thread Avri Altman
Use a more appropriate name when checking if enough memory was allocated for write descriptor, and remove redundant goto. Add reference to the spec to explain uic command size. Fix a lot of typos. Avri Altman (8): scsi: Add ufs transport class scsi: ufs: Add ufs-bsg modul

[PATCH v2 1/8] scsi: Add ufs transport class

2018-08-05 Thread Avri Altman
retty lean structure. This is because we are using upiu transactions that contains the outmost detailed info, so we don't really need complex constructs to support it. The transport will keep track of its ufs-ports via its scsi host. Signed-off-by: Avri Altman --- drivers/scsi/Kconfig |

[PATCH v2 7/8] scsi: ufs-bsg: Add support for raw upiu in ufs_bsg_request()

2018-08-05 Thread Avri Altman
for that. We also still not supporting uic commands: For first phase, we plan to use the existing api, and send only uic commands that are already supported. Anyway, all that will come in the next patch. Signed-off-by: Avri Altman --- drivers/scsi/ufs/ufs_bsg.c | 118

[PATCH v2 8/8] scsi: ufs-bsg: Add support for uic commands in ufs_bsg_request()

2018-08-05 Thread Avri Altman
Add support to those uic commands, that are currently supported by ufshcd api: the variants of dme_{peer}_{set_get}. At this point better not to add any new api, as careless uic command may turn the device into a brick. Signed-off-by: Avri Altman --- drivers/scsi/ufs/ufs_bsg.c | 56

[PATCH v2 5/8] scsi: ufs: Allow ufshcd_issue_tm_cmd accept raw task upius

2018-08-05 Thread Avri Altman
Do that in order to re-use its code if the task request and response UPIUs are given externally. Signed-off-by: Avri Altman --- drivers/scsi/ufs/ufshcd.c | 35 ++- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers

[PATCH v2 3/8] scsi: ufs: Instantiate a ufs transport if its available

2018-08-05 Thread Avri Altman
Call the Attach/Probe/Remove APIs. Signed-off-by: Avri Altman --- drivers/scsi/ufs/ufshcd.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 3560185..c2ae406 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs

[PATCH v2 6/8] scsi: ufs: Add API to execute raw upiu commands

2018-08-05 Thread Avri Altman
and task work queues. That is, all utrd-typed UPIUs are "disguised" as device management commands. Similarly, the utmrd-typed UPUIs uses the task management infrastructure. It is up to the caller to fill the upiu request properly, as it will be copied without any further input validations. Signed-off

RE: [PATCH 5/6] scsi: ufs-bsg: Add support for raw upiu in ufs_bsg_request()

2018-08-02 Thread Avri Altman
Thanks, Avri > -Original Message- > From: Bart Van Assche > Sent: Wednesday, August 01, 2018 6:36 PM > To: h...@lst.de; Avri Altman ; linux-scsi@vger.kernel.org; > jthumsh...@suse.de; h...@suse.com; martin.peter...@oracle.com; > j...@linux.vnet.ibm.com > Cc: Vi

RE: [PATCH 2/6] scsi: ufs: Add ufs-bsg module

2018-08-02 Thread Avri Altman
Bart, Thanks a lot, Avri > -Original Message- > From: Bart Van Assche > Sent: Wednesday, August 01, 2018 6:13 PM > To: h...@lst.de; Avri Altman ; linux-scsi@vger.kernel.org; > jthumsh...@suse.de; h...@suse.com; martin.peter...@oracle.com; > j...@linux.vnet.ibm.com >

RE: [PATCH 4/6] scsi: ufs: Add API to execute raw upiu commands

2018-08-02 Thread Avri Altman
Bart, thanks. > -Original Message- > From: Bart Van Assche > Sent: Wednesday, August 01, 2018 6:28 PM > To: h...@lst.de; Avri Altman ; linux-scsi@vger.kernel.org; > jthumsh...@suse.de; h...@suse.com; martin.peter...@oracle.com; > j...@linux.vnet.ibm.com > Cc: Vi

RE: [PATCH 4/6] scsi: ufs: Add API to execute raw upiu commands

2018-08-02 Thread Avri Altman
Thanks, Avri > -Original Message- > From: Bart Van Assche > Sent: Wednesday, August 01, 2018 6:36 PM > To: h...@lst.de; Avri Altman ; linux-scsi@vger.kernel.org; > jthumsh...@suse.de; h...@suse.com; martin.peter...@oracle.com; > j...@linux.vnet.ibm.com > Cc: Vi

RE: [PATCH v2 7/8] scsi: ufs-bsg: Add support for raw upiu in ufs_bsg_request()

2018-08-09 Thread Avri Altman
Thanks, Avri > -Original Message- > From: Bart Van Assche > Sent: Wednesday, August 08, 2018 7:40 PM > To: h...@lst.de; Avri Altman ; linux-scsi@vger.kernel.org; > jthumsh...@suse.de; h...@suse.com; martin.peter...@oracle.com; > j...@linux.vnet.ibm.com > Cc: Vi

RE: [PATCH v2 2/8] scsi: ufs: Add ufs-bsg module

2018-08-09 Thread Avri Altman
Thanks, Avri > -Original Message- > From: Bart Van Assche > Sent: Wednesday, August 08, 2018 7:27 PM > To: h...@lst.de; Avri Altman ; linux-scsi@vger.kernel.org; > jthumsh...@suse.de; h...@suse.com; martin.peter...@oracle.com; > j...@linux.vnet.ibm.com > Cc: Vi

RE: [PATCH v2 6/8] scsi: ufs: Add API to execute raw upiu commands

2018-08-09 Thread Avri Altman
Thanks, Avri > -Original Message- > From: Bart Van Assche > Sent: Wednesday, August 08, 2018 7:39 PM > To: h...@lst.de; Avri Altman ; linux-scsi@vger.kernel.org; > jthumsh...@suse.de; h...@suse.com; martin.peter...@oracle.com; > j...@linux.vnet.ibm.com > Cc: Vi

RE: [PATCH v2 1/8] scsi: Add ufs transport class

2018-08-09 Thread Avri Altman
> -Original Message- > From: Bart Van Assche > Sent: Wednesday, August 08, 2018 7:21 PM > To: h...@lst.de; Avri Altman ; linux-scsi@vger.kernel.org; > jthumsh...@suse.de; h...@suse.com; martin.peter...@oracle.com; > j...@linux.vnet.ibm.com > Cc: Vinayak Holikat

RE: [PATCH v2 0/8] scsi: scsi transport for ufs devices

2018-08-07 Thread Avri Altman
> On Sun, Aug 05, 2018 at 02:39:48PM +0300, Avri Altman wrote: > > Here is a proposal to use the scsi transport subsystem to manage > > ufs devices. > > This should superceed previous patches to provide provisioning > support through sysfs or configfs, right? Yes. Thanks, Avri

RE: [PATCH v2 1/8] scsi: Add ufs transport class

2018-08-09 Thread Avri Altman
> -Original Message- > From: Bart Van Assche > Sent: Wednesday, August 08, 2018 7:58 PM > To: h...@lst.de; Avri Altman ; linux-scsi@vger.kernel.org; > jthumsh...@suse.de; h...@suse.com; martin.peter...@oracle.com; > j...@linux.vnet.ibm.com > Cc: Vinayak Holikat

RE: [PATCH v2 1/8] scsi: Add ufs transport class

2018-08-20 Thread Avri Altman
Hi Bart, > -Original Message- > From: Bart Van Assche > Sent: Tuesday, August 21, 2018 4:54 AM > To: jthumsh...@suse.de; h...@lst.de; Avri Altman ; > martin.peter...@oracle.com; linux-scsi@vger.kernel.org; h...@suse.com; > j...@linux.vnet.ibm.com; Stanislav Nijn

RE: [PATCH v3 3/7] scsi: ufs: Add fill task management request

2018-09-05 Thread Avri Altman
> On Wed, Sep 05, 2018 at 07:30:03AM +0000, Avri Altman wrote: > > Looking into the UFSHCI spec (JESD223C March 2016) paragraph 6.2, > > It doesn't specify any inner structure of the task management > > request or response, just a bunch of 8 DW each. > > I gues

RE: [PATCH v3 2/7] scsi: ufs: Instantiate a ufs bsg if its available

2018-09-05 Thread Avri Altman
> -Original Message- > From: Christoph Hellwig > Sent: Tuesday, September 04, 2018 10:16 PM > To: Avri Altman > Cc: Christoph Hellwig ; Johannes Thumshirn > ; Hannes Reinecke ; Bart Van Assche > ; James E.J. Bottomley > ; Martin K. Petersen > ; linux-scsi

RE: [PATCH v3 1/7] scsi: ufs: Add ufs-bsg module

2018-09-05 Thread Avri Altman
> > + */ > > +#ifndef SCSI_BSG_UFS_H > > +#define SCSI_BSG_UFS_H > > + > > +/* > > + * This file intended to be included by both kernel and user space > > + */ > > + > > + > > +/** > > + * struct ufs_bsg_upiu - upiu transaction structure > > + * > > + * @header: upiu header > > + * @tsf:

RE: [PATCH v3 1/7] scsi: ufs: Add ufs-bsg module

2018-09-05 Thread Avri Altman
> -Original Message- > From: Christoph Hellwig > Sent: Tuesday, September 04, 2018 10:20 PM > To: Avri Altman > Cc: Christoph Hellwig ; Johannes Thumshirn > ; Hannes Reinecke ; Bart Van Assche > ; James E.J. Bottomley > ; Martin K. Petersen > ; linux-scsi

RE: [PATCH v3 3/7] scsi: ufs: Add fill task management request

2018-09-05 Thread Avri Altman
> -Original Message- > From: linux-scsi-ow...@vger.kernel.org > On Behalf Of Christoph Hellwig > Sent: Tuesday, September 04, 2018 10:12 PM > To: Avri Altman > Cc: Christoph Hellwig ; Johannes Thumshirn > ; Hannes Reinecke ; Bart Van Assche > ; James E.J

RE: [PATCH v3 4/7] scsi: ufs: Allow ufshcd_issue_tm_cmd accept raw task upius

2018-09-05 Thread Avri Altman
> > --- > > drivers/scsi/ufs/ufshcd.c | 35 ++- > > 1 file changed, 26 insertions(+), 9 deletions(-) > > > > diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c > > index d18832a..15be103 100644 > > --- a/drivers/scsi/ufs/ufshcd.c > > +++

RE: [PATCH v3 3/7] scsi: ufs: Add fill task management request

2018-09-06 Thread Avri Altman
Ok thanks. Will test and those as the first 2 patches in the series. Thanks a lot, Avri > -Original Message- > From: Christoph Hellwig > Sent: Wednesday, September 05, 2018 8:15 PM > To: Avri Altman > Cc: Christoph Hellwig ; Johannes Thumshirn > ; Hannes Reinecke

[PATCH v4 0/7] scsi: ufs bsg endpoint

2018-09-07 Thread Avri Altman
- needed a couple of patches for that, and call req_upiu and rsp_upio with their appropriate struct pointers. Use a more appropriate name when checking if enough memory was allocated for write descriptor, and remove redundant goto. Add reference to the spec to explain uic command size. Fix a lot of typos.

[PATCH v4 4/7] scsi: ufs: Add ufs-bsg module

2018-09-07 Thread Avri Altman
structure - ufs_bsg_node has a pretty lean structure: using upiu transactions that contains the outmost detailed info, so we don't really need complex constructs to support it. Signed-off-by: Avri Altman --- drivers/scsi/ufs/Kconfig | 19 ++ drivers/scsi/ufs/Makefile | 3 + drivers/scsi/ufs

[PATCH v4 5/7] scsi: ufs: Add API to execute raw upiu commands

2018-09-07 Thread Avri Altman
and task work queues. That is, all utrd-typed UPIUs are "disguised" as device management commands. Similarly, the utmrd-typed UPUIs uses the task management infrastructure. It is up to the caller to fill the upiu request properly, as it will be copied without any further input validations. Signed-off

[PATCH v4 3/7] scsi: ufs: Allow ufshcd_issue_tm_cmd accept raw upiu

2018-09-07 Thread Avri Altman
Do that in order to re-use its code if the task request and response UPIUs are given externally. Signed-off-by: Avri Altman --- drivers/scsi/ufs/ufshcd.c | 39 --- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b

[PATCH v4 7/7] scsi: ufs-bsg: Add support for uic commands in ufs_bsg_request()

2018-09-07 Thread Avri Altman
Add support to those uic commands, that are currently supported by ufshcd api: the variants of dme_{peer}_{set_get}. At this point better not to add any new api, as careless uic command may turn the device into a brick. Signed-off-by: Avri Altman --- drivers/scsi/ufs/ufs_bsg.c | 54

[PATCH v4 6/7] scsi: ufs-bsg: Add support for raw upiu in ufs_bsg_request()

2018-09-07 Thread Avri Altman
for that. We also still not supporting uic commands: For first phase, we plan to use the existing api, and send only uic commands that are already supported. Anyway, all that will come in the next patch. Signed-off-by: Avri Altman --- drivers/scsi/ufs/ufs_bsg.c | 127

[PATCH v4 1/7] scsi: ufs: cleanup struct utp_task_req_desc

2018-09-07 Thread Avri Altman
From: Christoph Hellwig Remove the pointless task_req_upiu and task_rsp_upiu indirections, which are __le32 arrays always cast to given structures and just add the members directly. Also clean up variables names in use in the callers a bit to make the code more readable. Signed-off-by:

[PATCH v4 2/7] scsi: ufs: add a low-level __ufshcd_issue_tm_cmd helper

2018-09-07 Thread Avri Altman
From: Christoph Hellwig Add a helper that takes a utp_task_req_desc and issues it, which will be useful for UFS bsg support. Rewrite ufshcd_issue_tm_cmd0x to use this new helper. Signed-off-by: Christoph Hellwig --- drivers/scsi/ufs/ufshcd.c | 140

Re: [PATCH v8 0/8] scsi: Add ufs bsg endpoint

2018-10-05 Thread Avri Altman
12:28 AM To: Avri Altman; Christoph Hellwig; Johannes Thumshirn; Hannes Reinecke; Bart Van Assche; James E.J. Bottomley; Martin K. Petersen; linux-scsi@vger.kernel.org Cc: Stanislav Nijnikov; Avi Shchislowski; Alex Lemberg; Subhash Jadavani; Vinayak Holikatti Subject: RE: [PATCH v8 0/8] scsi: Add

[PATCH v7 2/8] scsi: ufs: add a low-level __ufshcd_issue_tm_cmd helper

2018-09-29 Thread Avri Altman
From: Christoph Hellwig Add a helper that takes a utp_task_req_desc and issues it, which will be useful for UFS bsg support. Rewrite ufshcd_issue_tm_cmd0x to use this new helper. Signed-off-by: Christoph Hellwig Tested-by: Avri Altman --- drivers/scsi/ufs/ufshcd.c | 141

[PATCH v7 3/8] uapi: ufs: Make utp_upiu_req visible to user space

2018-09-29 Thread Avri Altman
in preparation to send UPIU requests via bsg. Signed-off-by: Avri Altman --- drivers/scsi/ufs/ufs.h | 61 + include/uapi/scsi/scsi_bsg_ufs.h | 74 2 files changed, 75 insertions(+), 60 deletions(-) create mode

[PATCH v7 4/8] scsi: ufs: Add ufs-bsg module

2018-09-29 Thread Avri Altman
structure - ufs_bsg_node has a pretty lean structure: using upiu transactions that contains the outmost detailed info, so we don't really need complex constructs to support it. Signed-off-by: Avri Altman Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche --- Documentation/scsi/ufs.txt

[PATCH v7 1/8] scsi: ufs: cleanup struct utp_task_req_desc

2018-09-29 Thread Avri Altman
-by: Christoph Hellwig Tested-by: Avri Altman --- drivers/scsi/ufs/ufs.h| 30 - drivers/scsi/ufs/ufshcd.c | 68 ++- drivers/scsi/ufs/ufshci.h | 25 + 3 files changed, 34 insertions(+), 89 deletions(-) diff --git a/drivers

[PATCH v7 8/8] scsi: ufs-bsg: Add support for uic commands in ufs_bsg_request()

2018-09-29 Thread Avri Altman
Make ufshcd_send_uic_cmd() public for that. Signed-off-by: Avri Altman Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche --- drivers/scsi/ufs/ufs_bsg.c | 11 +++ drivers/scsi/ufs/ufshcd.c| 3 +-- drivers/scsi/ufs/ufshcd.h| 2 ++ include/uapi/scsi

[PATCH v7 7/8] scsi: ufs-bsg: Add support for raw upiu in ufs_bsg_request()

2018-09-29 Thread Avri Altman
for that. We also still not supporting uic commands: For first phase, we plan to use the existing api, and send only uic commands that are already supported. Anyway, all that will come in the next patch. Signed-off-by: Avri Altman Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche

[PATCH v7 5/8] scsi: ufs: Use data structure size in pointer arithmetic

2018-09-29 Thread Avri Altman
Use the structure size in pointer arithmetic's instead of an opaque 32 bytes for the over allocation of descriptors. Signed-off-by: Avri Altman Reviewed-by: Christoph Hellwig --- drivers/scsi/ufs/ufs.h| 2 +- drivers/scsi/ufs/ufshcd.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions

[PATCH v7 6/8] scsi: ufs: Add API to execute raw upiu commands

2018-09-29 Thread Avri Altman
and task work queues. That is, all utrd-typed UPIUs are "disguised" as device management commands. Similarly, the utmrd-typed UPUIs uses the task management infrastructure. It is up to the caller to fill the upiu request properly, as it will be copied without any further input validations. Signed

[PATCH v7 0/8] scsi: Add ufs bsg endpoint

2018-09-29 Thread Avri Altman
was allocated for write descriptor, and remove redundant goto. Add reference to the spec to explain uic command size. Fix a lot of typos. Avri Altman (6): uapi: ufs: Make utp_upiu_req visible to user space scsi: ufs: Add ufs-bsg module scsi: ufs: Use data structure size in pointer arithmetic

RE: [PATCH v7 3/8] uapi: ufs: Make utp_upiu_req visible to user space

2018-10-01 Thread Avri Altman
> > + > > +/* > > + * This file intended to be included by both kernel and user space > > + */ > > + > > +#define MAX_CDB_SIZE 16 > > Please rename this constant such that it has either "UFS" or "UTP" in its > name. This name is too generic for a protocol-specific header file. Done.

[PATCH v8 1/8] scsi: ufs: cleanup struct utp_task_req_desc

2018-10-03 Thread Avri Altman
-by: Christoph Hellwig Tested-by: Avri Altman --- drivers/scsi/ufs/ufs.h| 30 - drivers/scsi/ufs/ufshcd.c | 68 ++- drivers/scsi/ufs/ufshci.h | 25 + 3 files changed, 34 insertions(+), 89 deletions(-) diff --git a/drivers

[PATCH v8 0/8] scsi: Add ufs bsg endpoint

2018-10-03 Thread Avri Altman
name when checking if enough memory was allocated for write descriptor, and remove redundant goto. Add reference to the spec to explain uic command size. Fix a lot of typos. Avri Altman (6): uapi: ufs: Make utp_upiu_req visible to user space scsi: ufs: Add ufs-bsg module scsi: ufs: Use da

[PATCH v8 3/8] uapi: ufs: Make utp_upiu_req visible to user space

2018-10-03 Thread Avri Altman
in preparation to send UPIU requests via bsg. Signed-off-by: Avri Altman Reviewed-by: Bart Van Assche --- drivers/scsi/ufs/ufs.h | 61 + drivers/scsi/ufs/ufshcd.c| 6 ++-- include/uapi/scsi/scsi_bsg_ufs.h | 74

[PATCH v8 5/8] scsi: ufs: Use data structure size in pointer arithmetic

2018-10-03 Thread Avri Altman
Use the structure size in pointer arithmetic's instead of an opaque 32 bytes for the over allocation of descriptors. Signed-off-by: Avri Altman Reviewed-by: Christoph Hellwig --- drivers/scsi/ufs/ufs.h| 2 +- drivers/scsi/ufs/ufshcd.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions

[PATCH v8 2/8] scsi: ufs: add a low-level __ufshcd_issue_tm_cmd helper

2018-10-03 Thread Avri Altman
From: Christoph Hellwig Add a helper that takes a utp_task_req_desc and issues it, which will be useful for UFS bsg support. Rewrite ufshcd_issue_tm_cmd0x to use this new helper. Signed-off-by: Christoph Hellwig Tested-by: Avri Altman --- drivers/scsi/ufs/ufshcd.c | 141

[PATCH v8 8/8] scsi: ufs-bsg: Add support for uic commands in ufs_bsg_request()

2018-10-03 Thread Avri Altman
Make ufshcd_send_uic_cmd() public for that. Signed-off-by: Avri Altman Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche --- drivers/scsi/ufs/ufs_bsg.c | 11 +++ drivers/scsi/ufs/ufshcd.c| 3 +-- drivers/scsi/ufs/ufshcd.h| 2 ++ include/uapi/scsi

[PATCH v8 4/8] scsi: ufs: Add ufs-bsg module

2018-10-03 Thread Avri Altman
structure - ufs_bsg_node has a pretty lean structure: using upiu transactions that contains the outmost detailed info, so we don't really need complex constructs to support it. Signed-off-by: Avri Altman Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche --- Documentation/scsi/ufs.txt

[PATCH v8 7/8] scsi: ufs-bsg: Add support for raw upiu in ufs_bsg_request()

2018-10-03 Thread Avri Altman
for that. We also still not supporting uic commands: For first phase, we plan to use the existing api, and send only uic commands that are already supported. Anyway, all that will come in the next patch. Signed-off-by: Avri Altman Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche

[PATCH v8 6/8] scsi: ufs: Add API to execute raw upiu commands

2018-10-03 Thread Avri Altman
and task work queues. That is, all utrd-typed UPIUs are "disguised" as device management commands. Similarly, the utmrd-typed UPUIs uses the task management infrastructure. It is up to the caller to fill the upiu request properly, as it will be copied without any further input validations. Signed

[PATCH v9 3/8] uapi: ufs: Make utp_upiu_req visible to user space

2018-10-07 Thread Avri Altman
in preparation to send UPIU requests via bsg. Signed-off-by: Avri Altman Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig --- drivers/scsi/ufs/ufs.h | 61 + drivers/scsi/ufs/ufshcd.c| 6 ++-- include/uapi/scsi/scsi_bsg_ufs.h | 74

[PATCH v9 7/8] scsi: ufs-bsg: Add support for raw upiu in ufs_bsg_request()

2018-10-07 Thread Avri Altman
for that. We also still not supporting uic commands: For first phase, we plan to use the existing api, and send only uic commands that are already supported. Anyway, all that will come in the next patch. Signed-off-by: Avri Altman Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche

[PATCH v9 0/8] scsi: Add ufs bsg endpoint

2018-10-07 Thread Avri Altman
ufshcd_issue_tm_cmd code - needed a couple of patches for that, and call req_upiu and rsp_upio with their appropriate struct pointers. Use a more appropriate name when checking if enough memory was allocated for write descriptor, and remove redundant goto. Add reference to the spec to explain uic comm

[PATCH v9 2/8] scsi: ufs: add a low-level __ufshcd_issue_tm_cmd helper

2018-10-07 Thread Avri Altman
From: Christoph Hellwig Add a helper that takes a utp_task_req_desc and issues it, which will be useful for UFS bsg support. Rewrite ufshcd_issue_tm_cmd0x to use this new helper. Signed-off-by: Christoph Hellwig Signed-off-by: Avri Altman --- drivers/scsi/ufs/ufshcd.c | 141

[PATCH v9 4/8] scsi: ufs: Add a bsg endpoint that supports UPIUs

2018-10-07 Thread Avri Altman
structure: using upiu transactions that contains the outmost detailed info, so we don't really need complex constructs to support it. Signed-off-by: Avri Altman Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche --- Documentation/scsi/ufs.txt | 20 + drivers/scsi/ufs

[PATCH v9 8/8] scsi: ufs-bsg: Add support for uic commands in ufs_bsg_request()

2018-10-07 Thread Avri Altman
Make ufshcd_send_uic_cmd() public for that. Signed-off-by: Avri Altman Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche --- drivers/scsi/ufs/ufs_bsg.c | 11 +++ drivers/scsi/ufs/ufshcd.c| 3 +-- drivers/scsi/ufs/ufshcd.h| 2 ++ include/uapi/scsi

[PATCH v9 1/8] scsi: ufs: cleanup struct utp_task_req_desc

2018-10-07 Thread Avri Altman
-by: Christoph Hellwig Signed-off-by: Avri Altman --- drivers/scsi/ufs/ufs.h| 30 - drivers/scsi/ufs/ufshcd.c | 68 ++- drivers/scsi/ufs/ufshci.h | 25 + 3 files changed, 34 insertions(+), 89 deletions(-) diff --git

[PATCH v9 5/8] scsi: ufs: Use data structure size in pointer arithmetic

2018-10-07 Thread Avri Altman
Use the structure size in pointer arithmetic's instead of an opaque 32 bytes for the over allocation of descriptors. Signed-off-by: Avri Altman Reviewed-by: Christoph Hellwig --- drivers/scsi/ufs/ufs.h| 2 +- drivers/scsi/ufs/ufshcd.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions

[PATCH v9 6/8] scsi: ufs: Add API to execute raw upiu commands

2018-10-07 Thread Avri Altman
and task work queues. That is, all utrd-typed UPIUs are "disguised" as device management commands. Similarly, the utmrd-typed UPUIs uses the task management infrastructure. It is up to the caller to fill the upiu request properly, as it will be copied without any further input validations. Signed

RE: [PATCH v8 3/8] uapi: ufs: Make utp_upiu_req visible to user space

2018-10-06 Thread Avri Altman
> > > > diff --git a/include/uapi/scsi/scsi_bsg_ufs.h > > b/include/uapi/scsi/scsi_bsg_ufs.h > > new file mode 100644 > > index 000..4108ce3 > > --- /dev/null > > +++ b/include/uapi/scsi/scsi_bsg_ufs.h > > @@ -0,0 +1,74 @@ > > +/* SPDX-License-Identifier: GPL-2.0 */ > > +/* > > + * TBD - UFS

RE: [PATCH v8 1/8] scsi: ufs: cleanup struct utp_task_req_desc

2018-10-06 Thread Avri Altman
> On Thu, Oct 04, 2018 at 08:20:30AM +0300, Avri Altman wrote: > > From: Christoph Hellwig > > > > Remove the pointless task_req_upiu and task_rsp_upiu indirections, > > which are __le32 arrays always cast to given structures and just add > > the members directl

RE: [PATCH v8 4/8] scsi: ufs: Add ufs-bsg module

2018-10-06 Thread Avri Altman
> > Add a bsg endpoint that supports UPIUs. > > This should probably go into the subject line. Done. > > > > > For now, just provide an API to allocate and remove > > ufs-bsg node. We will use this framework to > > manage ufs devices by sending UPIU transactions. > > Please use up to 73

RE: [PATCH v8 0/8] scsi: Add ufs bsg endpoint

2018-10-07 Thread Avri Altman
gt; >Will reply with the full list on Sunday. > > > >Thanks, > >Avri > >____ > >From: Bean Huo (beanhuo) > >Sent: Friday, October 5, 2018 12:28 AM > >To: Avri Altman; Christoph Hellwig; Johannes Thumshirn; Hannes Rein

[PATCH v3 6/7] scsi: ufs-bsg: Add support for raw upiu in ufs_bsg_request()

2018-09-03 Thread Avri Altman
for that. We also still not supporting uic commands: For first phase, we plan to use the existing api, and send only uic commands that are already supported. Anyway, all that will come in the next patch. Signed-off-by: Avri Altman --- drivers/scsi/ufs/ufs_bsg.c | 118

[PATCH v3 7/7] scsi: ufs-bsg: Add support for uic commands in ufs_bsg_request()

2018-09-03 Thread Avri Altman
Add support to those uic commands, that are currently supported by ufshcd api: the variants of dme_{peer}_{set_get}. At this point better not to add any new api, as careless uic command may turn the device into a brick. Signed-off-by: Avri Altman --- drivers/scsi/ufs/ufs_bsg.c | 56

[PATCH v3 0/7] scsi: ufs bsg endpoint

2018-09-03 Thread Avri Altman
priate name when checking if enough memory was allocated for write descriptor, and remove redundant goto. Add reference to the spec to explain uic command size. Fix a lot of typos. Avri Altman (7): scsi: ufs: Add ufs-bsg module scsi: ufs: Instantiate a ufs bsg if its available scsi: uf

[PATCH v3 1/7] scsi: ufs: Add ufs-bsg module

2018-09-03 Thread Avri Altman
structure - ufs_bsg_node has a pretty lean structure: using upiu transactions that contains the outmost detailed info, so we don't really need complex constructs to support it. Signed-off-by: Avri Altman --- drivers/scsi/ufs/Kconfig | 19 + drivers/scsi/ufs/Makefile| 1

[PATCH v3 3/7] scsi: ufs: Add fill task management request

2018-09-03 Thread Avri Altman
Do that in preparation to re-use ufshcd_issue_tm_cmd code. Signed-off-by: Avri Altman --- drivers/scsi/ufs/ufshcd.c | 50 +++ 1 file changed, 29 insertions(+), 21 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index

[PATCH v3 4/7] scsi: ufs: Allow ufshcd_issue_tm_cmd accept raw task upius

2018-09-03 Thread Avri Altman
Do that in order to re-use its code if the task request and response UPIUs are given externally. Signed-off-by: Avri Altman --- drivers/scsi/ufs/ufshcd.c | 35 ++- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers

[PATCH v3 5/7] scsi: ufs: Add API to execute raw upiu commands

2018-09-03 Thread Avri Altman
and task work queues. That is, all utrd-typed UPIUs are "disguised" as device management commands. Similarly, the utmrd-typed UPUIs uses the task management infrastructure. It is up to the caller to fill the upiu request properly, as it will be copied without any further input validations. Signed-off

  1   2   >