[PATCH] scsi: mvsas: Replace pci_pool_alloc by pci_pool_zalloc

2016-11-28 Thread Souptick Joarder
Inside mvs_task_prep(), pci_pool_alloc() followed by memset will be replaced by pci_pool_zalloc() Signed-off-by: Souptick joarder --- drivers/scsi/mvsas/mv_sas.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/mvsas/mv_sas.c

Re: [PATCH v2] scsi: aic94xx: Add a missing call to kfree

2016-11-28 Thread Tomas Henzl
On 25.11.2016 13:23, Quentin Lambert wrote: > Most error branches following the call to kzalloc contain > a call to kfree. This patch add these calls where they are > missing and set the relevant pointers to NULL. > > This issue was found with Hector. > > Signed-off-by: Quentin Lambert

[PATCH] fs: configfs: don't return anything from drop_link

2016-11-28 Thread Andrzej Pietrasiewicz
Documentation/filesystems/configfs/configfs.txt says: "When unlink(2) is called on the symbolic link, the source item is notified via the ->drop_link() method. Like the ->drop_item() method, this is a void function and cannot return failure." The ->drop_item() is indeed a void function, the

Re: [PATCH] bnx2fc: shift wrapping bug in bnx2fc_process_unsol_compl()

2016-11-28 Thread Dan Carpenter
On Sat, Nov 26, 2016 at 07:36:29PM +0100, Christophe JAILLET wrote: > BNX2FC_NUM_ERR_BITS is 63. err_warn_bit_map is a u64. So, to make sure that > no shift wrapping will occur, we need need additionnal casting. > > The same test is already done a few lines above and '(u64)1' is already > used

Re: [PATCH] bnx2fc: shift wrapping bug in bnx2fc_process_unsol_compl()

2016-11-28 Thread Laurence Oberman
- Original Message - > From: "Christophe JAILLET" > To: qlogic-storage-upstr...@qlogic.com, j...@linux.vnet.ibm.com, "martin > petersen" > Cc: linux-scsi@vger.kernel.org, linux-ker...@vger.kernel.org, >

Re: [PATCH v2] qlogicpti: Fix compiler warnings

2016-11-28 Thread David Miller
From: Tushar Dave Date: Wed, 23 Nov 2016 18:28:04 -0800 > qlogicpti uses '__u32' for dma handle while invoking kernel DMA APIs, > instead of using dma_addr_t. This hasn't caused any 'incompatible > pointer type' warning on SPARC because until now dma_addr_t is of > type

[PATCH v2 08/14] cxlflash: Remove private command pool

2016-11-28 Thread Uma Krishnan
From: "Matthew R. Ochs" Clean up and remove the remaining private command pool infrastructure that is no longer required. Signed-off-by: Matthew R. Ochs --- drivers/scsi/cxlflash/common.h | 7 - drivers/scsi/cxlflash/main.c | 68

[PATCH v2 07/14] cxlflash: Use cmd_size for private commands

2016-11-28 Thread Uma Krishnan
From: "Matthew R. Ochs" Instead of using a private pool of AFU commands, use cmd_size to prime the private pool of SCSI commands such that they are allocated with a size large enough to contain an aligned AFU command. Use scsi_cmd_priv() to derive the aligned/zeroed

[PATCH v2 03/14] cxlflash: Improve context_reset() logic

2016-11-28 Thread Uma Krishnan
Currently, the context reset routine waits for command room to be available before sending the reset request. Per review of the SISLite specification and clarifications from the CXL Flash AFU designers, this wait is unnecessary. The reset request can be sent anytime regardless of command room, so

[PATCH v2 05/14] cxlflash: Remove unused buffer from AFU command

2016-11-28 Thread Uma Krishnan
From: "Matthew R. Ochs" The cxlflash driver originally required a per-command 4K buffer that hosted data passed to the AFU. When the routines that initiate AFU and internal SCSI commands were refactored to use scsi_execute(), the need for this buffer became obsolete.

[PATCH v2 06/14] cxlflash: Allocate memory instead of using command pool for AFU sync

2016-11-28 Thread Uma Krishnan
From: "Matthew R. Ochs" As staging for the removal of the AFU command pool, remove the reliance upon the pool for the internal AFU sync command. Instead of obtaining an AFU command from the pool, dynamically allocate memory with the appropriate alignment requirements.

[PATCH v2 10/14] cxlflash: Remove AFU command lock

2016-11-28 Thread Uma Krishnan
From: "Matthew R. Ochs" The original design of the cxlflash driver required AFU commands to convey state information across multiple threads. The IOASA "host use" byte was used to track if a command was done, errored, or timed out. A per-command spin lock was used to

[PATCH v2 14/14] cxlflash: Migrate scsi command pointer to AFU command

2016-11-28 Thread Uma Krishnan
From: "Matthew R. Ochs" Currently, when sending a SCSI command, the pointer is stored in a reserved field of the AFU command descriptor for retrieval once the SCSI command has completed. In order to support new descriptor formats that make use of the reserved field,

[PATCH v2 11/14] cxlflash: Cleanup send_tmf()

2016-11-28 Thread Uma Krishnan
From: "Matthew R. Ochs" The send_tmf() routine includes some copy/paste cruft that can be removed as well as the setting of an AFU command-specific while holding the tmf_slock. While not a bug, it is out of place and should be shifted down alongside the other command

[PATCH v2 12/14] cxlflash: Cleanup queuecommand()

2016-11-28 Thread Uma Krishnan
From: "Matthew R. Ochs" The queuecommand routine is disorganized where it populates the private command and also contains some logic/statements that are not needed given that cxlflash devices do not (and likely never will) support scatter-gather. Restructure the code

[PATCH v2 04/14] cxlflash: Avoid command room violation

2016-11-28 Thread Uma Krishnan
During test, a command room violation interrupt is occasionally seen for the master context when the CXL flash devices are stressed. After studying the code, there could be gaps in the way command room value is being cached in cxlflash. When the cached command room is zero the thread attempting

[PATCH v2 09/14] cxlflash: Wait for active AFU commands to timeout upon tear down

2016-11-28 Thread Uma Krishnan
From: "Matthew R. Ochs" With the removal of the static private command pool, the ability to 'complete' outstanding commands was lost. While not an issue for the commands originating outside the driver, internal AFU commands are synchronous and therefore have a timeout

RE: [PATCH 1/2] hpsa: cleanup sas_phy structures in sysfs when unloading

2016-11-28 Thread Don Brace
> -Original Message- > From: Martin Wilck [mailto:mwi...@suse.de] > Sent: Monday, November 21, 2016 8:04 AM > To: Don Brace > Cc: dl-esc-Team ESD Storage Dev Support; iss_storage...@hp.com; linux- > s...@vger.kernel.org; jbottom...@odin.com; h...@lst.de; h...@suse.de; > Martin Wilck >

[PATCH v2 02/14] cxlflash: Fix crash in cxlflash_restore_luntable()

2016-11-28 Thread Uma Krishnan
During test, the following crash was observed: [34538.981505] Faulting instruction address: 0xd7c9c870 cpu 0x9: Vector: 300 (Data Access) at [c007f1e8f590] pc: d7c9c870: cxlflash_restore_luntable+0x70/0x1d0 [cxlflash] lr: d7c9c84c:

[PATCH v2 01/14] cxlflash: Set sg_tablesize to 1 instead of SG_NONE

2016-11-28 Thread Uma Krishnan
The following Oops is encountered when blk_mq is enabled with the cxlflash driver: [ 2960.817172] Oops: Kernel access of bad area, sig: 11 [#5] [ 2960.817309] NIP __blk_mq_run_hw_queue+0x278/0x4c0 [ 2960.817313] LR __blk_mq_run_hw_queue+0x2bc/0x4c0 [ 2960.817314] Call Trace: [ 2960.817320]

[PATCH v2 00/14] cxlflash: Fixes, enhancements, cleanup and staging

2016-11-28 Thread Uma Krishnan
The first four patches in this patch series include fixes for command room violation and lun table management. The remaining patches remove the reliance upon an internally maintained private command pool in favor of private commands being allocated alongside the SCSI commands. Several cleanup

RE: [PATCH 1/3] hpsa: use correct DID_NO_CONNECT hostbyte

2016-11-28 Thread Don Brace
> -Original Message- > From: Hannes Reinecke [mailto:h...@suse.de] > Sent: Friday, November 18, 2016 1:33 AM > To: Martin K. Petersen > Cc: Christoph Hellwig; James Bottomley; Don Brace; Martin Wilck; linux- > s...@vger.kernel.org; Hannes Reinecke; Hannes Reinecke > Subject: [PATCH 1/3]

RE: [PATCH 3/3] hpsa: add 'ctlr_num' sysfs attribute

2016-11-28 Thread Don Brace
> -Original Message- > From: Hannes Reinecke [mailto:h...@suse.de] > Sent: Friday, November 18, 2016 1:33 AM > To: Martin K. Petersen > Cc: Christoph Hellwig; James Bottomley; Don Brace; Martin Wilck; linux- > s...@vger.kernel.org; Hannes Reinecke; Hannes Reinecke > Subject: [PATCH 3/3]

[PATCH v2 13/14] cxlflash: Migrate IOARRIN specific routines to function pointers

2016-11-28 Thread Uma Krishnan
From: "Matthew R. Ochs" As staging for supporting hardware with a different queuing mechanism, move the send_cmd() and context_reset() routines to function pointers that are configured when the AFU is initialized. In addition, rename the existing routines to better

Re: [PATCH] scsi: lpfc: Replace pci_pool_alloc by pci_pool_zalloc

2016-11-28 Thread Johannes Thumshirn
On Mon, Nov 28, 2016 at 03:22:37PM +0530, Souptick Joarder wrote: > In lpfc_new_scsi_buf_s3() and lpfc_new_scsi_buf_s4() pci_pool_alloc > followed by memset will be replaced by pci_pool_zalloc() > > Signed-off-by: Souptick joarder > --- Looks good, Reviewed-by: Johannes

Re: SG does not ignore dxferp (direct io + mmap)

2016-11-28 Thread Johannes Thumshirn
On Fri, Nov 25, 2016 at 09:46:05AM -0500, Laurence Oberman wrote: [...] > > Johannes, you are reproducing another race in your test I think. > This might actually be true. Disclaimer I'm hauntiung that one for quite some time and now have a reproducer for it not just a downstream bug report.

[PATCH] scsi: lpfc: Replace pci_pool_alloc by pci_pool_zalloc

2016-11-28 Thread Souptick Joarder
In lpfc_new_scsi_buf_s3() and lpfc_new_scsi_buf_s4() pci_pool_alloc followed by memset will be replaced by pci_pool_zalloc() Signed-off-by: Souptick joarder --- drivers/scsi/lpfc/lpfc_scsi.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git