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]); >> } >> } >>

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

2015-08-13 Thread Nicholas A. Bellinger
From: Nicholas Bellinger 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 LUNs with basic I/O and

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

2015-08-13 Thread Vitaly Kuznetsov
Long Li 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: [

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

2015-08-13 Thread Vitaly Kuznetsov
KY Srinivasan 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; linux-ker...@v

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/recover

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 > S

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

2015-08-13 Thread anil.gurumurthy
From: Anil Gurumurthy Signed-off-by: Anil Gurumurthy Tested-by: Sudarsana Kalluru --- drivers/scsi/bfa/bfa_ioc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c index 4e71044..98f7e8c 100644 --- a/drivers/scsi/bfa/b

[PATCH 0/2] Patches for scsi "misc" branch

2015-08-13 Thread anil.gurumurthy
From: Anil Gurumurthy 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 drivers/scsi/bfa/bfa_ioc.c | 24 -

[PATCH 1/2] bfa: Fix indentation

2015-08-13 Thread anil.gurumurthy
From: Anil Gurumurthy Signed-off-by: Anil Gurumurthy Tested-by : Sudarasana Kalluru --- drivers/scsi/bfa/bfa_ioc.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c index 315d6d6..4e71044 10064

[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 20

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 th

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, wrote: > From: Viswas G > > 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 > proper return value in case o

Re: [PATCH] pm80xx: Added pm8006 controller support

2015-08-13 Thread Jinpu Wang
Hi James, Ping? On Wed, Jul 29, 2015 at 11:33 AM, Suresh Thiagarajan wrote: > Hi James, > > This patch is not pulled in yet. > > Regards, > Suresh > > -Original Message- > From: Jack Wang [mailto:xjtu...@gmail.com] > Sent: Tuesday, February 24, 2015 2:07 PM > To: Suresh Thiagarajan > Cc:

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

2015-08-13 Thread wenxiong
Thanks for merging the comments I made for v3. Reviewed-by: Wen Xiong Quoting "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 -

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

2015-08-13 Thread wenxiong
Thanks for merging the comments I made for v4. Reviewed-by: Wen Xiong Thanks, Wendy Quoting "Matthew R. Ochs" : 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 th

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 Thanks, Wendy Quoting "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 phy

[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: Rat

[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 Currently we are making decisions based on vmbus protocol versions that have been negotiated; use storage potocol versions instead. Tested-by: Alex Ng Signed-off-by: Keith Mange Signed-off-by: K. Y. Srinivasan --- drivers/scsi/storvsc_drv.c | 109 ++

[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 Use storage protocol version instead of vmbus protocol version when determining storage capabilities. Tested-by: Alex Ng Signed-off-by: Keith Mange Signed-off-by: K. Y. Srinivasan --- drivers/scsi/storvsc_drv.c |8 1 files changed, 4 insertions(+), 4 deletions(

[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 Use a single value to track protocol versions to simplify comparisons and to be consistent with vmbus version tracking. Tested-by: Alex Ng Signed-off-by: Keith Mange Signed-off-by: K. Y. Srinivasan --- drivers/scsi/storvsc_drv.c | 35 +-- 1

[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 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 Signed-off-by: Keith Mange Signed-off-by: K. Y. Srinivasan --- dr

[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 Allow WRITE_SAME for Windows10 and above hosts. Tested-by: Alex Ng Signed-off-by: Keith Mange Signed-off-by: K. Y. Srinivasan --- drivers/scsi/storvsc_drv.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/drivers/scsi/storvsc_drv.c b/drivers/sc

[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 Use correct defaults for values determined by protocol negotiation, instead of resetting them with every scsi controller. Tested-by: Alex Ng Signed-off-by: Keith Mange Signed-off-by: K. Y. Srinivasan --- drivers/scsi/storvsc_drv.c | 33 +++-- 1

[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 Reported-by: Dan Carpenter --- drivers/scsi/storvsc_drv.c | 12 +--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --

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" writes: > From: Keith Mange > > Currently we are making decisions based on vmbus protocol versions > that have been negotiated; use storage potocol versions instead. > > Tested-by: Alex Ng > Signed-off-by: Keith Mange > Signed-off-by: K. Y. Srinivasan > --- > drivers/scsi/

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 ; Keith Mange > > Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; > de...@linuxdriverproject.org; oher...@suse.com; > jbottom...@paralle

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

2015-08-13 Thread Martin K. Petersen
> "Sumit" == Sumit Saxena 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 MAX_PHYSICAL_DEVICES is a count,

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

2015-08-13 Thread K. Y. Srinivasan
From: Dexuan Cui 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 Signed-off-by: K. Y. Srinivasan --- drivers/hv/channel_mgmt.c |

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 > > 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 affiliation logic > > W

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 > > > > This fixes the recent commit 3b71107d73b16074afa7658f3f0fcf837aabfe24: > > Which tree is this in? upstream linus is giving me bad object on

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 > > 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 th

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 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 happy if you add my reviewed by: Reviewed-by: Michael Neuling

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

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 7

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 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 a way to make

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 > Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; > de...@linuxdriverproject.org; oher...@suse.com; > jbottom...@paralle

[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() concurrentl

[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 Tota

[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 enhancemen

[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 Failed/terminat

[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: M

[PATCH v6 2/3] cxlflash: Superpipe support

2015-08-13 Thread Matthew R. Ochs
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 Signed-off-by:

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

2015-08-13 Thread Spencer Baugh
From: Roland Dreier 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 has allocated in the Data

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

2015-08-13 Thread Spencer Baugh
From: Chris Zankel The lun_flags field is not used, so drop it. Signed-off-by: Chris Zankel Signed-off-by: Spencer Baugh --- include/target/target_core_base.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 17ae2d

[PATCH v2] target: remove initiatorname field in se_acl_lun

2015-08-13 Thread Spencer Baugh
From: Chris Zankel 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 Signed-off-by: Spencer Baugh --- drivers/target/target_core

Re: [PATCH] scsi: Export SCSI Inquiry data to sysfs

2015-08-13 Thread Hannes Reinecke
On 08/13/2015 01:50 PM, Johannes Thumshirn wrote: > 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. > userland! > Here is an example of the provided data > > linux:~ # hexdump /sys/class/scsi_

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

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