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

2018-08-01 Thread Avri Altman
> -Original Message- > From: linux-scsi-ow...@vger.kernel.org > On Behalf Of Douglas Gilbert > Sent: Monday, July 30, 2018 9:53 PM > To: Hannes Reinecke ; Bart Van Assche > ; h...@lst.de; j...@linux.vnet.ibm.com; linux- > s...@vger.kernel.org; jthumsh...@suse.de; martin.peter...@oracle.c

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

2018-08-01 Thread Avri Altman
Scsi transport is a framework that allow to send scsi commands to a non-scsi devices. Still, it is flexible enough to allow sending non-scsi commands as well. We will use this framework to manage ufs devices by sending UPIU transactions. In addition to the basic SCSI core objects this transport cl

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

2018-08-01 Thread Avri Altman
Here is a proposal to use the scsi transport subsystem to manage ufs devices. scsi transport is a framework that allow to send scsi commands to a non-scsi devices. Still, it is flexible enough to allow sending non-scsi commands as well. We will use this framework to manage ufs devices by sending U

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

2018-08-01 Thread Avri Altman
Do that for the currently supported UPIUs: query, nop out, and task management. We do not support UPIU of type scsi command yet, while we are using the job's request and reply pointers to hold the payload. We will look into it in later patches. We might need to elaborate the raw upiu api for that

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

2018-08-01 Thread Avri Altman
The UFS host software uses a combination of a host register set, and Transfer Request Descriptors in system memory to communicate with host controller hardware. In its mmio space, a separate places are assigned to UTP Transfer Request Descriptor ("utrd") list, and to UTP Task Management Request Des

[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/ufshc

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

2018-08-01 Thread Avri Altman
A LLD companion for the ufs scsi transport. For now, just provide an API to instantiate the ufs transport, allocating and removing ufs-ports. As we are attaching the transport template to the scsi host that was already alocated for the ufs hba, we'll need to pay extra attention on where to call th

[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 V7 0/2] Add UFS provisioning support in driver

2018-08-01 Thread Sayali Lokhande
This patch adds Configfs support to provision UFS device at runtime. This feature can be primarily useful in factory or assembly line as some devices may be required to be configured multiple times during initial system development phase. Configuration Descriptors can be written multiple times un

Re: next/master boot: 179 boots: 11 failed, 167 passed with 1 offline (next-20180731)

2018-08-01 Thread Guillaume Tucker
On 31/07/18 16:14, kernelci.org bot wrote: next/master boot: 179 boots: 11 failed, 167 passed with 1 offline (next-20180731) Full Boot Summary: https://kernelci.org/boot/all/job/next/branch/master/kernel/next-20180731/ Full Build Summary: https://kernelci.org/build/next/branch/master/kernel/n

Re: next/master boot: 179 boots: 11 failed, 167 passed with 1 offline (next-20180731)

2018-08-01 Thread Mark Brown
On Wed, Aug 01, 2018 at 11:05:36AM +0100, Guillaume Tucker wrote: > On 31/07/18 16:14, kernelci.org bot wrote: > > Boot Regressions Detected: > [...] > > x86: > > > > x86_64_defconfig: > > qemu: > > lab-baylibre: failing since 1 day (last pass: next-20180727 - > > firs

Re: next/master boot: 179 boots: 11 failed, 167 passed with 1 offline (next-20180731)

2018-08-01 Thread Ming Lei
On Wed, Aug 01, 2018 at 11:33:03AM +0100, Mark Brown wrote: > On Wed, Aug 01, 2018 at 11:05:36AM +0100, Guillaume Tucker wrote: > > On 31/07/18 16:14, kernelci.org bot wrote: > > > > Boot Regressions Detected: > > [...] > > > x86: > > > > > > x86_64_defconfig: > > > qemu: > > >

Re: next/master boot: 179 boots: 11 failed, 167 passed with 1 offline (next-20180731)

2018-08-01 Thread Mark Brown
On Wed, Aug 01, 2018 at 06:51:09PM +0800, Ming Lei wrote: > You may have to provide some clue, such as dmesg log, boot disk, ... > I guess you don't use virtio-scsi/virtio-blk since both run at blk-mq > mode at default, even though without d5038a13eca72fb. Boot logs and so on can be found here:

[PATCH v2] scsi: csiostor: update csio_get_flash_params()

2018-08-01 Thread Arjun Vynipadath
- Updates csio_get_flash_params() to take care of ISSI, Macronix and Winbond FLASH parts. - Assume flash part size to be 4MB if it cannot be identified Signed-off-by: Arjun Vynipadath Signed-off-by: Varun Prakash --- v2 - Simpilified switch-case statements --- drivers/scsi/csiostor/csio_hw.c

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

2018-08-01 Thread Johannes Thumshirn
Hi Avri, On Wed, Aug 01, 2018 at 11:04:27AM +0300, Avri Altman wrote: [... > +#include Why do you include bsg.h here and bsg-lib.h in the scsi_transport_ufs.h? [...] > +#define to_ufs_internal(tmpl)container_of(tmpl, struct ufs_internal, > t) I'd personally prefer this to be a inlin

Re: next/master boot: 179 boots: 11 failed, 167 passed with 1 offline (next-20180731)

2018-08-01 Thread Matt Hart
On 1 August 2018 at 11:59, Mark Brown wrote: > On Wed, Aug 01, 2018 at 06:51:09PM +0800, Ming Lei wrote: > >> You may have to provide some clue, such as dmesg log, boot disk, ... > >> I guess you don't use virtio-scsi/virtio-blk since both run at blk-mq >> mode at default, even though without d503

Re: next/master boot: 179 boots: 11 failed, 167 passed with 1 offline (next-20180731)

2018-08-01 Thread Johannes Thumshirn
On Wed, Aug 01, 2018 at 11:59:19AM +0100, Mark Brown wrote: > On Wed, Aug 01, 2018 at 06:51:09PM +0800, Ming Lei wrote: > > > You may have to provide some clue, such as dmesg log, boot disk, ... > > > I guess you don't use virtio-scsi/virtio-blk since both run at blk-mq > > mode at default, even

Re: [PATCH] scsi: csiostor: remove automatic irq affinity assignment

2018-08-01 Thread Varun Prakash
On Wed, Aug 01, 2018 at 08:33:23AM +0200, Hannes Reinecke wrote: > On 07/31/2018 05:07 PM, Varun Prakash wrote: > > If number of interrupt vectors are more than num_online_cpus() > > then pci_alloc_irq_vectors_affinity() assigns cpumask based > > on num_possible_cpus() to the remaining vectors beca

Re: next/master boot: 179 boots: 11 failed, 167 passed with 1 offline (next-20180731)

2018-08-01 Thread Johannes Thumshirn
On Wed, Aug 01, 2018 at 12:24:00PM +0100, Matt Hart wrote: > And a full LAVA boot log from my lab > http://lava.streamtester.net/scheduler/job/138067 > > QEMU command line here: > http://lava.streamtester.net/scheduler/job/138067#L75 > > And a LAVA job definition, which includes the url of the ra

Re: next/master boot: 179 boots: 11 failed, 167 passed with 1 offline (next-20180731)

2018-08-01 Thread Ming Lei
On Wed, Aug 01, 2018 at 12:24:00PM +0100, Matt Hart wrote: > On 1 August 2018 at 11:59, Mark Brown wrote: > > On Wed, Aug 01, 2018 at 06:51:09PM +0800, Ming Lei wrote: > > > >> You may have to provide some clue, such as dmesg log, boot disk, ... > > > >> I guess you don't use virtio-scsi/virtio-bl

Re: next/master boot: 179 boots: 11 failed, 167 passed with 1 offline (next-20180731)

2018-08-01 Thread Johannes Thumshirn
On Wed, Aug 01, 2018 at 07:52:21PM +0800, Ming Lei wrote: > On Wed, Aug 01, 2018 at 12:24:00PM +0100, Matt Hart wrote: > > On 1 August 2018 at 11:59, Mark Brown wrote: > > > On Wed, Aug 01, 2018 at 06:51:09PM +0800, Ming Lei wrote: > > > > > >> You may have to provide some clue, such as dmesg log,

Re: next/master boot: 179 boots: 11 failed, 167 passed with 1 offline (next-20180731)

2018-08-01 Thread Ming Lei
On Wed, Aug 01, 2018 at 07:52:19PM +0800, Ming Lei wrote: > On Wed, Aug 01, 2018 at 12:24:00PM +0100, Matt Hart wrote: > > On 1 August 2018 at 11:59, Mark Brown wrote: > > > On Wed, Aug 01, 2018 at 06:51:09PM +0800, Ming Lei wrote: > > > > > >> You may have to provide some clue, such as dmesg log,

Re: next/master boot: 179 boots: 11 failed, 167 passed with 1 offline (next-20180731)

2018-08-01 Thread Johannes Thumshirn
On Wed, Aug 01, 2018 at 08:00:44PM +0800, Ming Lei wrote: > On Wed, Aug 01, 2018 at 07:52:19PM +0800, Ming Lei wrote: > > On Wed, Aug 01, 2018 at 12:24:00PM +0100, Matt Hart wrote: > > > On 1 August 2018 at 11:59, Mark Brown wrote: > > > > On Wed, Aug 01, 2018 at 06:51:09PM +0800, Ming Lei wrote:

Re: next/master boot: 179 boots: 11 failed, 167 passed with 1 offline (next-20180731)

2018-08-01 Thread Guillaume Tucker
On 01/08/18 12:25, Johannes Thumshirn wrote: On Wed, Aug 01, 2018 at 11:59:19AM +0100, Mark Brown wrote: On Wed, Aug 01, 2018 at 06:51:09PM +0800, Ming Lei wrote: You may have to provide some clue, such as dmesg log, boot disk, ... I guess you don't use virtio-scsi/virtio-blk since both run

Re: next/master boot: 179 boots: 11 failed, 167 passed with 1 offline (next-20180731)

2018-08-01 Thread Johannes Thumshirn
On Wed, Aug 01, 2018 at 01:37:17PM +0100, Guillaume Tucker wrote: > The kernel images I used have the git revision in their file name > to make it clear where they came from, they were built with > x86_64_defconfig. The links to the kernel and ramdisks can be > found in the job definition: > >

Re: next/master boot: 179 boots: 11 failed, 167 passed with 1 offline (next-20180731)

2018-08-01 Thread Guillaume Tucker
On 01/08/18 13:40, Johannes Thumshirn wrote: On Wed, Aug 01, 2018 at 01:37:17PM +0100, Guillaume Tucker wrote: The kernel images I used have the git revision in their file name to make it clear where they came from, they were built with x86_64_defconfig. The links to the kernel and ramdisks can

Re: next/master boot: 179 boots: 11 failed, 167 passed with 1 offline (next-20180731)

2018-08-01 Thread Johannes Thumshirn
On Wed, Aug 01, 2018 at 02:50:40PM +0100, Guillaume Tucker wrote: > > Sure, although it didn't make any apparent difference, still on > next-20180731: > > https://lava.collabora.co.uk/scheduler/job/1215417 > > The .config file I used is available here, with just > CONFIG_BLK_DEV_RAM=y on top

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 Van Assche ; James E.J.

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

2018-08-01 Thread Bart Van Assche
On Wed, 2018-08-01 at 11:04 +0300, Avri Altman wrote: > +++ b/drivers/scsi/ufs/ufs_bsg.c > @@ -0,0 +1,127 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * SSCSI transport companion for UFS HBA What is "SSCSI"? > diff --git a/drivers/scsi/ufs/ufs_bsg.h b/drivers/scsi/ufs/ufs_bsg.h > new file

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

2018-08-01 Thread Bart Van Assche
On Wed, 2018-08-01 at 11:04 +0300, Avri Altman wrote: > + wait_event(hba->tm_tag_wq, ufshcd_get_tm_free_slot(hba, &free_slot)); The above is the weirdest API I have seen so far for tag allocation. Why does ufshcd_get_tm_free_slot() does a linear search through a bitmap instead of using the sbi

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

2018-08-01 Thread Bart Van Assche
On Wed, 2018-08-01 at 11:04 +0300, Avri Altman wrote: > +/** > + * ufshcd_exec_raw_upiu_cmd - API function for sending raw upiu commands > + * @hba: per-adapter instance > + * @req_upiu:upiu request - 8 dwards > + * @rsp_upiu:upiu reply - 8 dwards > + * @msgcode: message code, o

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

2018-08-01 Thread Bart Van Assche
On Wed, 2018-08-01 at 11:04 +0300, Avri Altman wrote: > + if (qr->opcode != UPIU_QUERY_OPCODE_WRITE_DESC || > + desc_size <= 0) > + return -EINVAL; Please use the full line length and don't split lines if that is not necessary. > + ret = ufshcd_map_desc_id_to_length(bs

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

2018-08-01 Thread Bart Van Assche
On Wed, 2018-08-01 at 11:04 +0300, Avri Altman wrote: > + struct uic_command uc = {0}; Please use "{ }" or "{}" for structure initialization as is done elsewhere in the kernel instead of "{0}". > +#define UIC_CMD_SIZE (sizeof(u32) * 4) Please add a comment above this definition that explains

Re: [PATCH 1/2] sysfs: Introduce sysfs_{un,}break_active_protection()

2018-08-01 Thread Tejun Heo
On Mon, Jul 30, 2018 at 11:40:51AM -0700, Bart Van Assche wrote: > Introduce these two functions and export them such that the next patch > can add calls to these functions from the SCSI core. > > Signed-off-by: Bart Van Assche > Cc: Greg Kroah-Hartman > Cc: Tejun Heo > Cc: Acked-by: Tejun He

Re: [PATCH 2/2] Avoid that SCSI device removal through sysfs triggers a deadlock

2018-08-01 Thread Tejun Heo
On Mon, Jul 30, 2018 at 11:40:52AM -0700, Bart Van Assche wrote: > A long time ago the unfortunate decision was taken to add a self- > deletion attribute to the sysfs SCSI device directory. That decision > was unfortunate because self-deletion is really tricky. We can't drop > that attribute becaus

Re: [PATCH 11/15] target: export initiator port values for all sessions

2018-08-01 Thread Mike Christie
On 07/19/2018 12:07 PM, Bart Van Assche wrote: > On Thu, 2018-07-19 at 11:38 -0500, Mike Christie wrote: >> On 07/19/2018 10:37 AM, Bart Van Assche wrote: >>> The general recommendation for configfs is that each attribute contains a >>> single value, just like for sysfs. Patch 11/15 exports two val

Re: [PATCH 11/15] target: export initiator port values for all sessions

2018-08-01 Thread Mike Christie
On 08/01/2018 11:44 AM, Mike Christie wrote: > 1. Create a file named "acl" in the session's dir. > 2. For dynamic_node_acl=0 the acl file will return a empty string or Miswrote this. Above should be dynamic_node_acl=1 > "generate_node_acls=1" or "demo mode enabled". > 3. For dynamic_node_acl=1

Re: [PATCH 11/15] target: export initiator port values for all sessions

2018-08-01 Thread Bart Van Assche
On Wed, 2018-08-01 at 11:44 -0500, Mike Christie wrote: > I agree knowing the acl info is useful, so how about the following: > > 1. Create a file named "acl" in the session's dir. > 2. For dynamic_node_acl=0 the acl file will return a empty string or > "generate_node_acls=1" or "demo mode enabled

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

2018-08-01 Thread Bart Van Assche
On Mon, 2018-07-30 at 14:52 -0400, Douglas Gilbert wrote: > I designed 'struct sg_io_v4' found in include/uapi/linux/bsg.h to handle > storage > related protocols, not just the SCSI command set. After the guard, the next > two fields in that structure are: > __u32 protocol; /* [i]

Re: [PATCH 2/2] Avoid that SCSI device removal through sysfs triggers a deadlock

2018-08-01 Thread Bart Van Assche
On Mon, 2018-07-30 at 11:40 -0700, Bart Van Assche wrote: > A long time ago the unfortunate decision was taken to add a self- > deletion attribute to the sysfs SCSI device directory. That decision > was unfortunate because self-deletion is really tricky. We can't drop > that attribute because widel

Re: [PATCH 2/2] Avoid that SCSI device removal through sysfs triggers a deadlock

2018-08-01 Thread Bart Van Assche
On Wed, 2018-08-01 at 21:16 +, Bart Van Assche wrote: > During my kernel tests of today I noticed that this patch makes booting > significantly slower: boot time for a VM increases from 6s to 157s. Martin, > please drop this patch series. Please ignore my previous message - these two patches a

Re: next/master boot: 179 boots: 11 failed, 167 passed with 1 offline (next-20180731)

2018-08-01 Thread Ming Lei
On Wed, Aug 01, 2018 at 02:06:11PM +0200, Johannes Thumshirn wrote: > On Wed, Aug 01, 2018 at 08:00:44PM +0800, Ming Lei wrote: > > On Wed, Aug 01, 2018 at 07:52:19PM +0800, Ming Lei wrote: > > > On Wed, Aug 01, 2018 at 12:24:00PM +0100, Matt Hart wrote: > > > > On 1 August 2018 at 11:59, Mark Brow