+Bean
Thanks,
Avri
> -Original Message-
> From: linux-scsi-ow...@vger.kernel.org
> On Behalf Of Avri Altman
> Sent: Friday, November 30, 2018 9:32 AM
> To: James E.J. Bottomley ; Martin K. Petersen
> ; linux-scsi@vger.kernel.org
> Cc: Christoph Hellwig ; Avi
A gentle ping.
Cheers,
Avri
> -Original Message-
> From: linux-scsi-ow...@vger.kernel.org
> On Behalf Of Avri Altman
> Sent: Monday, November 26, 2018 11:03 AM
> To: James E.J. Bottomley ; Martin K. Petersen
> ; linux-scsi@vger.kernel.org
> Cc: Christoph Hell
Allow to read descriptors via raw upiu. This in fact was forbidden just
as a precaution, as ufs-bsg actually enforces which functionality is
supported.
Signed-off-by: Avri Altman
---
drivers/scsi/ufs/ufshcd.c | 20 ++--
1 file changed, 14 insertions(+), 6 deletions(-)
diff
Add this functionality, now that job->reply is big enough.
While at it, fix a typo in ufs_bsg_verify_query_params.
Signed-off-by: Avri Altman
---
Documentation/scsi/ufs.txt | 8
drivers/scsi/ufs/ufs_bsg.c | 25 +++--
2 files changed, 23 insertions(+), 10 deleti
be able to carry some useful information,
e.g. ufs descriptors, should be needed.
Signed-off-by: Avri Altman
---
block/bsg-lib.c | 4 ++--
include/linux/bsg-lib.h | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/block/bsg-lib.c b/block/bsg-lib.c
index f3501cd..5cb2e38
behind - allowing reading descriptors as well.
Avri Altman (3):
bsg: Make job reply size different than SCSI_SENSE_BUFFERSIZE
scsi: ufs: Allow reading descriptor via raw upiu
scsi: ufs-bsg: Allow reading descriptors
Documentation/scsi/ufs.txt | 8
block/bsg-lib.c| 4
By spec, the ufs sense data is 18 bytes long.
Signed-off-by: Avri Altman
---
drivers/scsi/ufs/ufs.h| 4 ++--
drivers/scsi/ufs/ufshcd.c | 17 +++--
2 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/drivers/scsi/ufs/ufs.h b/drivers/scsi/ufs/ufs.h
index 8e4e526
ld, allowing for the eventual
> removal of the latter.
>
> Signed-off-by: Christoph Hellwig
Tested-by: Avri Altman
Regardless of the ongoing discussion with Benjamin -
Tested the scsi pass-through (ufs-bsg) path - nothing is broken.
; > ---
> > block/bsg.c | 158
> > 1 file changed, 72 insertions(+), 86 deletions(-)
> >
>
> Looks fine to me. Did ran the same small test-tool I ran against Jens'
> patches, nothing broke.
>
> Reviewed-by: Benjamin Block
> Tested-by: Benjamin Block
Tested-by
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
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
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
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
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
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
-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
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
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
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
> 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
> >
> > 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
> > 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
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
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
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
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
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
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
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
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
-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
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
> > +
> > +/*
> > + * 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.
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
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
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
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
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
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
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
-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
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
>
> > -ufshcd_send_uic_cmd(struct ufs_hba *hba, struct uic_command *uic_cmd)
> > +int ufshcd_send_uic_cmd(struct ufs_hba *hba, struct uic_command
> *uic_cmd)
> > {
> > int ret;
> > unsigned long flags;
> > @@ -2081,6 +2080,7 @@ static inline u8 ufshcd_get_upmcrs(struct ufs_hba
> *hba)
>
>
> > + case UPIU_TRANSACTION_QUERY_REQ:
> > + qr = _request->upiu_req.qr;
> > + if (qr->opcode == UPIU_QUERY_OPCODE_READ_DESC)
> > + goto not_supported;
> > +
> > + if (ufs_bsg_get_query_desc_size(hba, qr, _len))
> > + goto
Bart/Christoph,
> + */
> +int ufs_bsg_probe(struct ufs_hba *hba)
> +{
> + struct device *bsg_dev = >bsg_dev;
> + struct Scsi_Host *shost = hba->host;
> + struct device *parent = >shost_gendev;
> + struct request_queue *q;
> + int ret;
> +
> + device_initialize(bsg_dev);
>
>
> Avri,
>
> > this looks generally good to me, but I'd suggest two small tweaks:
> >
> > - please split out a new prep patch that creates
> >include/uapi/scsi/scsi_bsg_ufs.h with the structures move there
> > - pleae keep the copyrights from drivers/scsi/ufs/ufs.h in this
> >new file
> > +
> > +/**
> > + * ufshcd_exec_raw_upiu_cmd - API function for sending raw upiu
> commands
> > + * @hba: per-adapter instance
> > + * @req_upiu: upiu request
> > + * @rsp_upiu: upiu reply - only 8 DW as we do not support scsi
> commands
> > + * @msgcode: message code, one of
> Hi Avri,
>
> this looks generally good to me, but I'd suggest two small tweaks:
>
> - please split out a new prep patch that creates
>include/uapi/scsi/scsi_bsg_ufs.h with the structures move there
> - pleae keep the copyrights from drivers/scsi/ufs/ufs.h in this
>new file
Done.
>Configuration descriptor buffer consists of Device and Unit
>descriptor configurable parameters which are parsed from vendor
>specific provisioning file and then passed via configfs node at
>runtime to provision ufs device.
Can you describe your test setup?
Will try to re-test it if not too
Make ufshcd_send_uic_cmd() public for that.
Signed-off-by: Avri Altman
---
drivers/scsi/ufs/ufs_bsg.c | 11 ++-
drivers/scsi/ufs/ufshcd.c| 4 ++--
drivers/scsi/ufs/ufshcd.h| 2 ++
include/uapi/scsi/scsi_bsg_ufs.h | 2 ++
4 files changed, 16 insertions(+), 3
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
---
drivers/scsi/ufs/ufs.h| 2 +-
drivers/scsi/ufs/ufshcd.c | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi
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
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
---
Documentation/scsi/ufs.txt | 20
drivers/scsi/ufs/Kconfig | 19
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 | 141
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 | 112
o 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.
Avri Altman (5):
scsi: ufs: Add ufs-bsg module
scsi: ufs:
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:
> > +static inline struct ufs_hba *dev_to_ufs_hba(struct device *d)
> > +{
> > + struct Scsi_Host *shost = dev_to_shost(d->parent);
> > +
> > + return shost_priv(shost);
>
> This just has one caller that culd directly do:
>
> struct ufs_hba *hba =
> > + lrbp->command_type = hba->ufs_version == UFSHCI_VERSION_10 ||
> > +hba->ufs_version == UFSHCI_VERSION_11 ?
> > +UTP_CMD_TYPE_DEV_MANAGE :
> > +UTP_CMD_TYPE_UFS_STORAGE;
>
> I think a good old if/self or even a switch
> -Original Message-
> From: linux-scsi-ow...@vger.kernel.org
> On Behalf Of Bart Van Assche
> Sent: Wednesday, September 19, 2018 12:41 AM
> To: Avri Altman ; Christoph Hellwig ;
> Johannes Thumshirn ; Hannes Reinecke
> ; James E.J. Bottomley ; Martin K.
&g
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
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
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 | 141
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:
n 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 (4):
scsi: ufs: Add ufs-bsg module
scsi: ufs: Add API to execute raw upiu commands
scsi: ufs-bsg: Add support for raw
>
> > @@ -5,6 +5,9 @@ obj-$(CONFIG_SCSI_UFS_DWC_TC_PLATFORM) += tc-
> dwc-g210-pltfrm.o ufshcd-dwc.o tc-d
> > obj-$(CONFIG_SCSI_UFS_QCOM) += ufs-qcom.o
> > obj-$(CONFIG_SCSI_UFSHCD) += ufshcd-core.o
> > ufshcd-core-objs := ufshcd.o ufs-sysfs.o
> > +ifeq ($(CONFIG_SCSI_UFS_BSG),y)
> >
>
> On 09/15/18 23:41, Avri Altman wrote:
> >> Since this patch series does not touch any include/uapi header and since no
> >> uapi UFS header files already exist, how is user space software expected to
> >> know which message format it should use for
Hi Bart,
> Since this patch series does not touch any include/uapi header and since no
> uapi UFS header files already exist, how is user space software expected to
> know which message format it should use for communicating over the UFS BSG
> endpoint? I don't think that "read the source" is an
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
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
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
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
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
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:
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
- 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.
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
> 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
> > ---
> > 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
> > +++
> -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
> > + */
> > +#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:
> -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
> -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
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
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
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
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
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
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
Call the probe/remove APIs.
Signed-off-by: Avri Altman
---
drivers/scsi/ufs/ufshcd.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 9d5d2ca..ed37914 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
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
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
> -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
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
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
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
> -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
> 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
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
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
1 - 100 of 136 matches
Mail list logo