[PATCH-next] scsi: libsas: dynamically allocate and free ata host

2018-05-09 Thread Jason Yan
Commit 2623c7a5f2 ("libata: add refcounting to ata_host") v4.17+ introduced refcounting to ata_host and will increase or decrease the refcount when adding or deleting transport ATA port. Now the ata host for libsas is embedded in domain_device, and the ->kref member is not initialized. Afer we

Re: [PATCH v6 05/13] firmware_loader: enhance Kconfig documentation over FW_LOADER

2018-05-09 Thread Kees Cook
On Wed, May 9, 2018 at 1:55 PM, Luis R. Rodriguez wrote: > On Tue, May 08, 2018 at 03:42:33PM -0700, Kees Cook wrote: >> On Tue, May 8, 2018 at 11:12 AM, Luis R. Rodriguez wrote: >> > + This used to be the default firmware loading facility, and udev

Re: [PATCH] libiscsi: add lock around task lists to fix list corruption regression

2018-05-09 Thread Ilkka Sovanto
Hi again, Chris and others! We're hitting this again on 4.14.32. Looks like the path iscsi_queuecommand -> prepd_reject/prepd_fault results in iscsi_complete_task getting called with frwd_lock held instead of the requisite back_lock which might explain the task list corruption under heavy loads.

[PATCH v2] target: transport should allow st ILI reads

2018-05-09 Thread Lee Duncan
When a tape drive is exported via LIO using the pscsi module, a read that requests more bytes per block than the tape can supply returns an empty buffer. This is because the pscsi pass-through target module sees the "ILI" illegal length bit set and thinks there is no reason to return the data.

Re: [PATCH v6 05/13] firmware_loader: enhance Kconfig documentation over FW_LOADER

2018-05-09 Thread Luis R. Rodriguez
On Tue, May 08, 2018 at 03:42:33PM -0700, Kees Cook wrote: > On Tue, May 8, 2018 at 11:12 AM, Luis R. Rodriguez wrote: > > + This used to be the default firmware loading facility, and udev > > used > > + to listen for uvents to load firmware for the kernel. The

[PATCH] ipr: new IOASC update

2018-05-09 Thread wenxiong
From: Wen Xiong This patch adds new adapter error log for P9 system with the new AZ SAS cable. Signed-off-by: Wen Xiong Acked-by: Brian King --- drivers/scsi/ipr.c |2 ++ 1 files changed, 2

Re: [PATCH v6 12/13] Documentation: remove stale firmware API reference

2018-05-09 Thread Luis R. Rodriguez
On Wed, May 09, 2018 at 12:12:09PM -0300, Mauro Carvalho Chehab wrote: > Em Tue, 8 May 2018 11:12:46 -0700 > "Luis R. Rodriguez" escreveu: > > > It refers to a pending patch, but this was merged eons ago. > > Didn't know that such patch was already merged. Great! > >

Re: simplify procfs code for seq_file instances V2

2018-05-09 Thread Alexey Dobriyan
On Sun, May 06, 2018 at 06:45:31PM +0100, Al Viro wrote: > On Sun, May 06, 2018 at 08:19:49PM +0300, Alexey Dobriyan wrote: > > @@ -62,9 +62,9 @@ struct proc_dir_entry { > > umode_t mode; > > u8 namelen; > > #ifdef CONFIG_64BIT > > -#define SIZEOF_PDE_INLINE_NAME (192-139) > >

[PATCH 2/6] scsi: hisi_sas: make return type of prep functions void

2018-05-09 Thread John Garry
From: Xiang Chen Since the task prep functions now should not fail, adjust the return types to void. In addition, some checks in the task prep functions are relocated to the main module; this is specifically the check for the number of elements in an sg list exceeded

[PATCH 6/6] scsi: hisi_sas: add check of device in hisi_sas_task_exec()

2018-05-09 Thread John Garry
From: Xiaofei Tan Currently we don't check that device is not gone before dereferencing it's elements in the function hisi_sas_task_exec() (specifically, the DQ pointer). This patch fixes this issue by filling in the DQ pointer in hisi_sas_task_prep(), after we check that

[PATCH 3/6] scsi: hisi_sas: allocate slot buffer earlier

2018-05-09 Thread John Garry
From: Xiang Chen Currently we allocate the slot's memory buffer after allocating the DQ slot. To aid DQ lockout reduction, and allow slots to be built in parallel, move this step (which can fail) prior to allocating the slot. Also a stray spin_unlock_irqrestore() is

[PATCH 4/6] scsi: hisi_sas: Don't lock DQ for complete task sending

2018-05-09 Thread John Garry
From: Xiang Chen Currently we lock the DQ to protect whole delivery process. So this stops us building slots for the same queue in parallel, and can affect performance. To optimise it, only lock the DQ during special periods, specifically when allocating a slot from

Re: [PATCH 06/10] lpfc: Check if SCSI scanning is complete, before allowing I/O commands

2018-05-09 Thread Ewan D. Milne
On Fri, 2018-05-04 at 20:37 -0700, James Smart wrote: > A race condition is being seen. I/O is being issued to scsi targets > simultaneous to a short connectivity loss. The rport block/unblock is > occurring, but the unblock is allowing pending I/O commands to intermix > with the commands being

Re: [PATCH v6 12/13] Documentation: remove stale firmware API reference

2018-05-09 Thread Mauro Carvalho Chehab
Em Tue, 8 May 2018 11:12:46 -0700 "Luis R. Rodriguez" escreveu: > It refers to a pending patch, but this was merged eons ago. Didn't know that such patch was already merged. Great! Regards, Mauro > > Signed-off-by: Luis R. Rodriguez > --- >

[PATCH 5/6] scsi: hisi_sas: Use device lock to protect slot alloc/free

2018-05-09 Thread John Garry
From: Xiang Chen The IPTT of a slot is unique, and we currently use hisi_hba lock to protect it. Now slot is managed on hisi_sas_device.list, so use DQ lock to protect for allocating and freeing the slot. Signed-off-by: Xiang Chen

[PATCH 1/6] scsi: hisi_sas: relocate smp sg map

2018-05-09 Thread John Garry
From: Xiang Chen Currently we use DQ lock to protect delivery of DQ entry one by one. To optimise to allow more than one slot to be built for a single DQ in parallel, we need to remove the DQ lock when preparing slots, prior to delivery. To achieve this, we rearrange

Re: [PATCH v6 13/13] Documentation: clarify firmware_class provenance and why we can't rename the module

2018-05-09 Thread Mauro Carvalho Chehab
Em Tue, 8 May 2018 11:12:47 -0700 "Luis R. Rodriguez" escreveu: > Clarify the provenance of the firmware loader firmware_class module name > and why we cannot rename the module in the future. > > Signed-off-by: Luis R. Rodriguez > --- >

Re: [PATCH 0/3] scsi: arcmsr: Add driver parameter cmd_timeout for scsi command timeout setting

2018-05-09 Thread Steffen Maier
On 05/08/2018 08:43 AM, Ching Huang wrote: On Tue, 2018-05-08 at 14:32 +0800, Ching Huang wrote: On Tue, 2018-05-08 at 01:41 -0400, Martin K. Petersen wrote: Hello Ching, 1. Add driver parameter cmd_timeout, default value is ARCMSR_DEFAULT_TIMEOUT. 2. Add slave_configure callback function