[PATCH] target/qla2xxx: Honor max_data_sg_nents I/O transfer limit

2015-08-13 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org Hi Arun, Roland Co, Based upon the feedback from last week, here is a proper patch for target-core to honor a fabric provided SGL limit using residual count plus underflow response bit. Everything appears to be working as expected with tcm-loop

Re: [PATCH] scsi: storvsc: be more picky about scmnd-sc_data_direction

2015-08-13 Thread Vitaly Kuznetsov
KY Srinivasan k...@microsoft.com writes: -Original Message- From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] Sent: Thursday, June 25, 2015 9:12 AM To: linux-scsi@vger.kernel.org Cc: Long Li; KY Srinivasan; Haiyang Zhang; James E.J. Bottomley; de...@linuxdriverproject.org;

Re: [PATCH V3] fnic: check pci_map_single() return value

2015-08-13 Thread Johannes Thumshirn
Maurizio Lombardi mlomb...@redhat.com writes: the kernel prints some warnings when compiled with CONFIG_DMA_API_DEBUG. This is because the fnic driver doesn't check the return value of pci_map_single(). [ 11.942770] scsi host12: fnic [ 11.950811] [ cut here ] [

Re: [PATCH] scsi: Fixup fixed sense generation

2015-08-13 Thread Hannes Reinecke
On 08/11/2015 08:49 AM, Sagi Grimberg wrote: -put_unaligned_be64(info, buf[3]); +/* + * Fixed format sense reserves only 32 bits for the + * 'information' field + */ +put_unaligned_be32((u32)info, buf[3]); } }

Re: [PATCH] scsi: storvsc: use shost_for_each_device() instead of open coding

2015-08-13 Thread Vitaly Kuznetsov
Long Li lon...@microsoft.com writes: -Original Message- From: KY Srinivasan Sent: Friday, July 03, 2015 11:35 AM To: Vitaly Kuznetsov; linux-scsi@vger.kernel.org Cc: Long Li; Haiyang Zhang; James E.J. Bottomley; de...@linuxdriverproject.org; linux-ker...@vger.kernel.org Subject:

Re: [PATCH v5 2/3] cxlflash: Superpipe support

2015-08-13 Thread Michael Neuling
Add superpipe supporting infrastructure to device driver for the IBM CXL Flash adapter. This patch allows userspace applications to take advantage of the accelerated I/O features that this adapter provides and bypass the traditional filesystem stack. Signed-off-by: Matthew R. Ochs

[PATCH 0/2] Patches for scsi misc branch

2015-08-13 Thread anil.gurumurthy
From: Anil Gurumurthy anil.gurumur...@qlogic.com Hi James, Christoph, Please apply the following patches to the scsi tree, misc branch at your earliest convenience. Thanks, Anil Anil Gurumurthy (2): bfa: Fix indentation bfa: Fix incorrect de-reference of pointer

[PATCH 1/2] bfa: Fix indentation

2015-08-13 Thread anil.gurumurthy
From: Anil Gurumurthy anil.gurumur...@qlogic.com Signed-off-by: Anil Gurumurthy anil.gurumur...@qlogic.com Tested-by : Sudarasana Kalluru sudarsana.kall...@qlogic.com --- drivers/scsi/bfa/bfa_ioc.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git

Re: [PATCH v5 1/3] cxlflash: Base error recovery support

2015-08-13 Thread Michael Neuling
On Wed, 2015-08-12 at 18:51 -0500, Matthew R. Ochs wrote: Introduce support for enhanced I/O error handling. A device state is added to track 3 possible states of the device: Normal - the device is operating normally and is fully operational Limbo - the device is in a reset/recovery

[PATCH 2/2] bfa: Fix incorrect de-reference of pointer

2015-08-13 Thread anil.gurumurthy
From: Anil Gurumurthy anil.gurumur...@qlogic.com Signed-off-by: Anil Gurumurthy anil.gurumur...@qlogic.com Tested-by: Sudarsana Kalluru sudarsana.kall...@qlogic.com --- drivers/scsi/bfa/bfa_ioc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/bfa/bfa_ioc.c

[PATCH] target: Fix handling of small allocation lengths in REPORT LUNS

2015-08-13 Thread Spencer Baugh
From: Roland Dreier rol...@purestorage.com REPORT LUNS should not fail just because the allocation length is less than 16. The relevant section of SPC-4 is: 4.2.5.6 Allocation length The ALLOCATION LENGTH field specifies the maximum number of bytes or blocks that an application client

Re: [PATCH v5 3/3] cxlflash: Virtual LUN support

2015-08-13 Thread Michael Neuling
On Wed, 2015-08-12 at 18:51 -0500, Matthew R. Ochs wrote: Add support for physical LUN segmentation (virtual LUNs) to device driver supporting the IBM CXL Flash adapter. This patch allows user space applications to virtually segment a physical LUN into N virtual LUNs, taking advantage of the

Re: [PATCH V2 2/8] pm80xx: Corrected device state changes in I_T_Nexus_Reset.

2015-08-13 Thread Jinpu Wang
Hi On Tue, Aug 11, 2015 at 11:36 AM, viswa...@pmcs.com wrote: From: Viswas G viswa...@pmcs.com In Nexus reset the device state request are not needed. Changes from V1: Device state change request has been removed as the firmware will handle it during internal cleanup. Also updated the

[PATCH] scsi: Export SCSI Inquiry data to sysfs

2015-08-13 Thread Johannes Thumshirn
Export the RAW SCSI Inquiry to sysfs as binfile. This way the data can be used by userlang without the need to have and ioctl or use the sg_inq tool. Here is an example of the provided data linux:~ # hexdump /sys/class/scsi_device/1\:0\:0\:0/device/inquiry 000 8005 3205 001f 4551 554d

Re: [PATCH v5 3/3] cxlflash: Virtual LUN support

2015-08-13 Thread wenxiong
Thanks for merging the comments I made for v3. Reviewed-by: Wen Xiong wenxi...@linux.vnet.ibm.com Thanks, Wendy Quoting Matthew R. Ochs mro...@linux.vnet.ibm.com: Add support for physical LUN segmentation (virtual LUNs) to device driver supporting the IBM CXL Flash adapter. This patch allows

[PATCH RESEND V2 7/7] scsi: storvsc: Set the error code correctly in failure conditions

2015-08-13 Thread K. Y. Srinivasan
In the function storvsc_channel_init(), error code was not getting set correctly in some of the failure cases. Fix this issue. Signed-off-by: K. Y. Srinivasan k...@microsoft.com Reported-by: Dan Carpenter dan.carpen...@oracle.com --- drivers/scsi/storvsc_drv.c | 12 +--- 1 files

[PATCH RESEND V2 1/7] scsi: storvsc: Rather than look for sets of specific protocol versions, make decisions based on ranges.

2015-08-13 Thread K. Y. Srinivasan
From: Keith Mange keith.ma...@microsoft.com Rather than look for sets of specific protocol versions, make decisions based on ranges. This will be safer and require fewer changes going forward as we add more storage protocol versions. Tested-by: Alex Ng ale...@microsoft.com Signed-off-by: Keith

[PATCH RESEND V2 6/7] scsi: storvsc: Allow write_same when host is windows 10

2015-08-13 Thread K. Y. Srinivasan
From: Keith Mange keith.ma...@microsoft.com Allow WRITE_SAME for Windows10 and above hosts. Tested-by: Alex Ng ale...@microsoft.com Signed-off-by: Keith Mange keith.ma...@microsoft.com Signed-off-by: K. Y. Srinivasan k...@microsoft.com --- drivers/scsi/storvsc_drv.c |6 +- 1 files

[PATCH RESEND V2 4/7] scsi: storvsc: use correct defaults for values determined by protocol negotiation

2015-08-13 Thread K. Y. Srinivasan
From: Keith Mange keith.ma...@microsoft.com Use correct defaults for values determined by protocol negotiation, instead of resetting them with every scsi controller. Tested-by: Alex Ng ale...@microsoft.com Signed-off-by: Keith Mange keith.ma...@microsoft.com Signed-off-by: K. Y. Srinivasan

[PATCH RESEND V2 2/7] scsi: storvsc: Use a single value to track protocol versions

2015-08-13 Thread K. Y. Srinivasan
From: Keith Mange keith.ma...@microsoft.com Use a single value to track protocol versions to simplify comparisons and to be consistent with vmbus version tracking. Tested-by: Alex Ng ale...@microsoft.com Signed-off-by: Keith Mange keith.ma...@microsoft.com Signed-off-by: K. Y. Srinivasan

[PATCH RESEND V2 0/7] scsi: storvsc: Some miscellaneous cleanup

2015-08-13 Thread K. Y. Srinivasan
Cleanup version handling as well as base feature detection on storage version as opposed to host version. In this version, I have addressed comments from Dan Carpenter. K. Y. Srinivasan (1): scsi: storvsc: Set the error code correctly in failure conditions Keith Mange (6): scsi: storvsc:

[PATCH RESEND V2 3/7] scsi: storvsc: Untangle the storage protocol negotiation from the vmbus protocol negotiation.

2015-08-13 Thread K. Y. Srinivasan
From: Keith Mange keith.ma...@microsoft.com Currently we are making decisions based on vmbus protocol versions that have been negotiated; use storage potocol versions instead. Tested-by: Alex Ng ale...@microsoft.com Signed-off-by: Keith Mange keith.ma...@microsoft.com Signed-off-by: K. Y.

[PATCH RESEND V2 5/7] scsi: storvsc: use storage protocol version to determine storage capabilities

2015-08-13 Thread K. Y. Srinivasan
From: Keith Mange keith.ma...@microsoft.com Use storage protocol version instead of vmbus protocol version when determining storage capabilities. Tested-by: Alex Ng ale...@microsoft.com Signed-off-by: Keith Mange keith.ma...@microsoft.com Signed-off-by: K. Y. Srinivasan k...@microsoft.com ---

Re: [PATCH RESEND V2 3/7] scsi: storvsc: Untangle the storage protocol negotiation from the vmbus protocol negotiation.

2015-08-13 Thread Johannes Thumshirn
K. Y. Srinivasan k...@microsoft.com writes: From: Keith Mange keith.ma...@microsoft.com Currently we are making decisions based on vmbus protocol versions that have been negotiated; use storage potocol versions instead. Tested-by: Alex Ng ale...@microsoft.com Signed-off-by: Keith Mange

RE: [PATCH RESEND V2 3/7] scsi: storvsc: Untangle the storage protocol negotiation from the vmbus protocol negotiation.

2015-08-13 Thread KY Srinivasan
-Original Message- From: Johannes Thumshirn [mailto:jthumsh...@suse.de] Sent: Thursday, August 13, 2015 7:34 AM To: KY Srinivasan k...@microsoft.com; Keith Mange keith.ma...@microsoft.com Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; de...@linuxdriverproject.org;

Re: [PATCH 1/7] megaraid_sas : Jbod sequence number support

2015-08-13 Thread Martin K. Petersen
Sumit == Sumit Saxena sumit.sax...@avagotech.com writes: Sumit I will create separate patch for these new flags which are not Sumit related to JBOD sequence support. These flags are created to keep Sumit APIs in sync across driver and firmware. *nod* Why -1 here? Presumably

Re: [PATCH 1/1] Drivers: hv: vmbus: fix init_vp_index() for reloading hv_netvsc

2015-08-13 Thread James Bottomley
On Thu, 2015-08-13 at 17:07 -0700, K. Y. Srinivasan wrote: From: Dexuan Cui de...@microsoft.com This fixes the recent commit 3b71107d73b16074afa7658f3f0fcf837aabfe24: Which tree is this in? upstream linus is giving me bad object on that id. Drivers: hv: vmbus: Further improve CPU

Re: [PATCH] target: Fix handling of small allocation lengths in REPORT LUNS

2015-08-13 Thread Nicholas A. Bellinger
Hi Spencer Co, On Wed, 2015-08-12 at 23:05 -0700, Spencer Baugh wrote: From: Roland Dreier rol...@purestorage.com REPORT LUNS should not fail just because the allocation length is less than 16. The relevant section of SPC-4 is: 4.2.5.6 Allocation length The ALLOCATION LENGTH

[PATCH 1/1] Drivers: hv: vmbus: fix init_vp_index() for reloading hv_netvsc

2015-08-13 Thread K. Y. Srinivasan
From: Dexuan Cui de...@microsoft.com This fixes the recent commit 3b71107d73b16074afa7658f3f0fcf837aabfe24: Drivers: hv: vmbus: Further improve CPU affiliation logic Without the fix, reloading hv_netvsc hangs the guest. Signed-off-by: Dexuan Cui de...@microsoft.com Signed-off-by: K. Y.

Re: [PATCH 1/1] Drivers: hv: vmbus: fix init_vp_index() for reloading hv_netvsc

2015-08-13 Thread Dan Carpenter
On Thu, Aug 13, 2015 at 04:09:10PM -0700, James Bottomley wrote: On Thu, 2015-08-13 at 17:07 -0700, K. Y. Srinivasan wrote: From: Dexuan Cui de...@microsoft.com This fixes the recent commit 3b71107d73b16074afa7658f3f0fcf837aabfe24: Which tree is this in? upstream linus is giving me bad

Re: [PATCH v5 2/3] cxlflash: Superpipe support

2015-08-13 Thread Manoj Kumar
Mikey: Good catch. Will resolve this in the v6 patch. Thanks, - Manoj On 8/13/2015 5:53 AM, Michael Neuling wrote: + + ctxi = kzalloc(sizeof(*ctxi), GFP_KERNEL); + lli = kzalloc((MAX_RHT_PER_CONTEXT * sizeof(*lli)), GFP_KERNEL); + if (unlikely(!ctxi || !lli)) { +

Re: [PATCH v5 3/3] cxlflash: Virtual LUN support

2015-08-13 Thread Manoj Kumar
Mikey: Thanks for pointing this out. The patch for 2/3 should address this issue. Regards, - Manoj Kumar On 8/13/2015 8:08 PM, Michael Neuling wrote: On Thu, 2015-08-13 at 18:43 -0500, Manoj Kumar wrote: Mikey: Thanks for your review. See comment inline below. - Manoj Kumar On 8/13/2015

[PATCH v4 1/2] mpt2sas: Refcount sas_device objects and fix unsafe list usage

2015-08-13 Thread Calvin Owens
These objects can be referenced concurrently throughout the driver, we need a way to make sure threads can't delete them out from under each other. This patch adds the refcount, and refactors the code to use it. Additionally, we cannot iterate over the sas_device_list without holding the lock, or

[PATCH v4 0/2] Fixes for memory corruption in mpt2sas

2015-08-13 Thread Calvin Owens
Hello all, This patchset attempts to address problems we've been having with panics due to memory corruption from the mpt2sas driver. Thanks, Calvin [PATCH v4 1/2] mpt2sas: Refcount sas_device objects and fix unsafe list [PATCH v4 2/2] mpt2sas: Refcount fw_events and fix unsafe list usage

Re: [PATCH v5 3/3] cxlflash: Virtual LUN support

2015-08-13 Thread Michael Neuling
On Thu, 2015-08-13 at 18:43 -0500, Manoj Kumar wrote: Mikey: Thanks for your review. See comment inline below. - Manoj Kumar On 8/13/2015 7:03 AM, Michael Neuling wrote: Thanks for integrating my suggestions. create_context() has the same freeing bug as 2/3 but if you fix that I'm

Re: [PATCH v3 1/2] mpt2sas: Refcount sas_device objects and fix unsafe list usage

2015-08-13 Thread Calvin Owens
On Monday 08/10 at 18:45 +0530, Sreekanth Reddy wrote: On Sat, Aug 1, 2015 at 10:32 AM, Calvin Owens calvinow...@fb.com wrote: Sreekanth, Thanks for the review, responses below. I'll have a v4 out shortly. Calvin These objects can be referenced concurrently throughout the driver, we need

[PATCH v6 0/3] CXL Flash Error Recovery and Superpipe

2015-08-13 Thread Matthew R. Ochs
This patch set is intended for the 4.3 release and adds support for error recovery and the superpipe features provided by the IBM CXL Flash adapter. The superpipe function was originally presented in an RFC patch set in late April. To aid with the review of the superpipe portion of these

[PATCH v2] target: Fix handling of small allocation lengths in REPORT LUNS

2015-08-13 Thread Spencer Baugh
From: Roland Dreier rol...@purestorage.com REPORT LUNS should not fail just because the allocation length is less than 16. The relevant section of SPC-4 is: 4.2.5.6 Allocation length The ALLOCATION LENGTH field specifies the maximum number of bytes or blocks that an application client

[PATCH v6 3/3] cxlflash: Virtual LUN support

2015-08-13 Thread Matthew R. Ochs
Add support for physical LUN segmentation (virtual LUNs) to device driver supporting the IBM CXL Flash adapter. This patch allows user space applications to virtually segment a physical LUN into N virtual LUNs, taking advantage of the translation features provided by this adapter. Signed-off-by:

[PATCH v6 1/3] cxlflash: Base error recovery support

2015-08-13 Thread Matthew R. Ochs
Introduce support for enhanced I/O error handling. A device state is added to track 3 possible states of the device: Normal - the device is operating normally and is fully operational Limbo - the device is in a reset/recovery scenario and its operational status is paused

[PATCH v4 2/2] mpt2sas: Refcount fw_events and fix unsafe list usage

2015-08-13 Thread Calvin Owens
The fw_event_work struct is concurrently referenced at shutdown, so add a refcount to protect it, and refactor the code to use it. Additionally, refactor _scsih_fw_event_cleanup_queue() such that it no longer iterates over the list without holding the lock, since _firmware_event_work()

RE: [PATCH 1/1] Drivers: hv: vmbus: fix init_vp_index() for reloading hv_netvsc

2015-08-13 Thread KY Srinivasan
-Original Message- From: James Bottomley [mailto:james.bottom...@hansenpartnership.com] Sent: Thursday, August 13, 2015 4:09 PM To: KY Srinivasan k...@microsoft.com Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; de...@linuxdriverproject.org; oher...@suse.com;

[PATCH v2] target: remove initiatorname field in se_acl_lun

2015-08-13 Thread Spencer Baugh
From: Chris Zankel czan...@purestorage.com The initiatorname field in se_acl_lun is only a copy of the same field in se_node_acl, so remove it and use the version in se_node_acl where needed (it's actually only used for pr_debug) Signed-off-by: Chris Zankel czan...@purestorage.com Signed-off-by:

[PATCH v2] target: remove unused lun_flags field from se_lun

2015-08-13 Thread Spencer Baugh
From: Chris Zankel czan...@purestorage.com The lun_flags field is not used, so drop it. Signed-off-by: Chris Zankel czan...@purestorage.com Signed-off-by: Spencer Baugh sba...@catern.com --- include/target/target_core_base.h | 1 - 1 file changed, 1 deletion(-) diff --git