[PATCH RFC 1/2] cxlflash: Base support for IBM CXL Flash Adapter

2015-04-26 Thread Matthew R. Ochs
SCSI device driver to support filesystem access on the IBM CXL Flash adapter. Signed-off-by: Matthew R. Ochs mro...@linux.vnet.ibm.com Signed-off-by: Manoj N. Kumar ma...@linux.vnet.ibm.com --- Documentation/powerpc/cxlflash.txt | 275 + drivers/scsi/Kconfig |1 + drivers

[PATCH RFC 0/2] IBM CXL Flash Adapter

2015-04-26 Thread Matthew R. Ochs
/cflash/dev Patch 1 contains support for only filesystem access. Patch 2 adds support for userspace applications that wish to communicate using the superpipe in lieu of filesystem access. Any thoughts on our approach for supporing this adapter/function? Matthew R. Ochs (2): cxlflash: Base support

[PATCH RFC 2/2] cxlflash: Support for superpipe I/O API

2015-04-26 Thread Matthew R. Ochs
Allow userspace applications to obtain CXL resources and exploit the superpipe functionality of the IBM CXL Flash adapter. Signed-off-by: Matthew R. Ochs mro...@linux.vnet.ibm.com Signed-off-by: Manoj N. Kumar ma...@linux.vnet.ibm.com --- drivers/scsi/cxlflash/Makefile |2 +- drivers

Re: [PATCH v4] cxlflash: Base support for IBM CXL Flash Adapter

2015-06-08 Thread Matthew R. Ochs
On Jun 8, 2015, at 5:05 AM, Michael Neuling wrote: Reviewed-by: Michael Neuling mi...@neuling.org Thanks again for helping us to review the code. The core cxl changes needed for this are in mpe's powerpc next branch queued up for 4.2. They are in linux next-20150605. To compile this

[PATCH v5] cxlflash: Base support for IBM CXL Flash Adapter

2015-06-08 Thread Matthew R. Ochs
SCSI device driver to support filesystem access on the IBM CXL Flash adapter. Reviewed-by: Michael Neuling mi...@neuling.org Signed-off-by: Matthew R. Ochs mro...@linux.vnet.ibm.com Signed-off-by: Manoj N. Kumar ma...@linux.vnet.ibm.com --- drivers/scsi/Kconfig|1 + drivers/scsi

[PATCH v4] cxlflash: Base support for IBM CXL Flash Adapter

2015-06-05 Thread Matthew R. Ochs
SCSI device driver to support filesystem access on the IBM CXL Flash adapter. Signed-off-by: Matthew R. Ochs mro...@linux.vnet.ibm.com Signed-off-by: Manoj N. Kumar ma...@linux.vnet.ibm.com --- drivers/scsi/Kconfig|1 + drivers/scsi/Makefile |1 + drivers/scsi

[PATCH v4] IBM CXL Flash Adapter

2015-06-05 Thread Matthew R. Ochs
unused code - Revert to using pr_*/dev_* print services - Remove unneeded locking and barrier instructions Matthew R. Ochs (1): cxlflash: Base support for IBM CXL Flash Adapter drivers/scsi/Kconfig|1 + drivers/scsi/Makefile |1 + drivers/scsi/cxlflash/Kconfig | 11

[PATCH v3] cxlflash: Base support for IBM CXL Flash Adapter

2015-06-02 Thread Matthew R. Ochs
SCSI device driver to support filesystem access on the IBM CXL Flash adapter. Signed-off-by: Matthew R. Ochs mro...@linux.vnet.ibm.com Signed-off-by: Manoj N. Kumar ma...@linux.vnet.ibm.com --- drivers/scsi/Kconfig|1 + drivers/scsi/Makefile |1 + drivers/scsi

[PATCH v3] IBM CXL Flash Adapter

2015-06-02 Thread Matthew R. Ochs
concerns/issues - Remove unused code - Revert to using pr_*/dev_* print services - Remove unneeded locking and barrier instructions Matthew R. Ochs (1): cxlflash: Base support for IBM CXL Flash Adapter drivers/scsi/Kconfig|1 + drivers/scsi/Makefile |1 + drivers

Re: [PATCH v5] cxlflash: Base support for IBM CXL Flash Adapter

2015-06-09 Thread Matthew R. Ochs
Brian/Manoj, See my alternate proposal below. -matt On Jun 9, 2015, at 9:37 AM, Manoj Kumar wrote: On 6/9/2015 6:29 AM, Brian King wrote: This was the optimization to avoid the MMIO for both threads. The other thread that raced should do the atomic set of afu-room to a positive value.

Re: [PATCH v5] cxlflash: Base support for IBM CXL Flash Adapter

2015-06-09 Thread Matthew R. Ochs
On Jun 9, 2015, at 1:30 PM, Brian King wrote: On 06/09/2015 11:01 AM, Matthew R. Ochs wrote: On Jun 9, 2015, at 9:37 AM, Manoj Kumar wrote: On 6/9/2015 6:29 AM, Brian King wrote: This was the optimization to avoid the MMIO for both threads. The other thread that raced should do

[PATCH v6] cxlflash: Base support for IBM CXL Flash Adapter

2015-06-09 Thread Matthew R. Ochs
SCSI device driver to support filesystem access on the IBM CXL Flash adapter. Supported-by: Stephen Bates stephen.ba...@pmcs.com Reviewed-by: Michael Neuling mi...@neuling.org Signed-off-by: Matthew R. Ochs mro...@linux.vnet.ibm.com Signed-off-by: Manoj N. Kumar ma...@linux.vnet.ibm.com

[PATCH 0/2] IBM CXL Flash Superpipe

2015-06-19 Thread Matthew R. Ochs
user space. Matthew R. Ochs (2): cxlflash: Base superpipe support cxlflash: Virtual LUN support Documentation/powerpc/cxlflash.txt | 298 ++ drivers/scsi/cxlflash/Makefile |2 +- drivers/scsi/cxlflash/common.h | 18 + drivers/scsi/cxlflash/main.c | 12 + drivers

[PATCH 1/2] cxlflash: Base superpipe support

2015-06-19 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 mro

[PATCH 2/2] cxlflash: Virtual LUN support

2015-06-19 Thread Matthew R. Ochs
-by: Matthew R. Ochs mro...@linux.vnet.ibm.com Signed-off-by: Manoj N. Kumar ma...@linux.vnet.ibm.com --- drivers/scsi/cxlflash/Makefile|2 +- drivers/scsi/cxlflash/superpipe.c | 28 + drivers/scsi/cxlflash/vlun.c | 1096 + 3 files changed, 1125 insertions

Re: [PATCH v2] cxlflash: Base support for IBM CXL Flash Adapter

2015-05-30 Thread Matthew R. Ochs
Brian, Thanks for reviewing this patch. Responses are inline below. -matt On May 29, 2015, at 3:54 PM, Brian King wrote: +/* Check for power of 2 at compile time */ +#define NOT_POW2(_x) ((_x) ((_x) ((_x) - 1))) +#if NOT_POW2(CXLFLASH_NUM_CMDS) +#error CXLFLASH_NUM_CMDS is not a power

Re: [PATCH RFC 1/2] cxlflash: Base support for IBM CXL Flash Adapter

2015-07-02 Thread Matthew R. Ochs
...@vger.kernel.org [mailto:linux-scsi-ow...@vger.kernel.org] On Behalf Of Matthew R. Ochs Sent: Monday, April 27, 2015 2:50 PM To: linux-scsi@vger.kernel.org; james.bottom...@hansenpartnership.com; n...@linux-iscsi.org; brk...@linux.vnet.ibm.com Cc: mi...@neuling.org; imun...@au1.ibm.com; Manoj N. Kumar

Re: [PATCH 1/2] cxlflash: Base superpipe support

2015-07-02 Thread Matthew R. Ochs
Mikey, Thanks for reviewing. Responses are inline below. -matt On Jul 2, 2015, at 1:39 AM, Michael Neuling wrote: On Fri, 2015-06-19 at 17:37 -0500, Matthew R. Ochs wrote: --- a/drivers/scsi/cxlflash/common.h +++ b/drivers/scsi/cxlflash/common.h @@ -103,6 +103,14 @@ struct cxlflash_cfg

[PATCH v2] IBM CXL Flash Adapter

2015-05-22 Thread Matthew R. Ochs
in with the mainline (submission expected shortly). In the interim, this code may be found on Github: https://github.com/mikey/linux/tree/cxl/kernelapi Matthew R. Ochs (1): cxlflash: Base support for IBM CXL Flash Adapter drivers/scsi/Kconfig|1 + drivers/scsi/Makefile

[PATCH v2] cxlflash: Base support for IBM CXL Flash Adapter

2015-05-22 Thread Matthew R. Ochs
SCSI device driver to support filesystem access on the IBM CXL Flash adapter. Signed-off-by: Matthew R. Ochs mro...@linux.vnet.ibm.com Signed-off-by: Manoj N. Kumar ma...@linux.vnet.ibm.com --- drivers/scsi/Kconfig|1 + drivers/scsi/Makefile |1 + drivers/scsi

Re: [PATCH 1/1] cxlflash: Base support for IBM CXL Flash Adapter

2015-05-21 Thread Matthew R. Ochs
Mikey, Thanks for reviewing this patch. Responses are inline below. -matt On May 20, 2015, at 12:51 AM, Michael Neuling wrote: Does this driver work when compiled big endian? We haven't tested on big endian but agree that the code should support both little and big endian. +#define

[PATCH v3 1/4] cxlflash: Updates to legacy I/O

2015-08-02 Thread Matthew R. Ochs
- parameter/comment updates - making functions static - supporting host rescan - refining prints, using dev_* prints Signed-off-by: Matthew R. Ochs mro...@linux.vnet.ibm.com Signed-off-by: Manoj N. Kumar ma...@linux.vnet.ibm.com --- drivers/scsi/cxlflash/common.h |9 +- drivers/scsi

[PATCH v3 2/4] cxlflash: Base error recovery support

2015-08-02 Thread Matthew R. Ochs
Introduce support for enhanced I/O error handling. Signed-off-by: Matthew R. Ochs mro...@linux.vnet.ibm.com Signed-off-by: Manoj N. Kumar ma...@linux.vnet.ibm.com --- drivers/scsi/cxlflash/Kconfig | 2 +- drivers/scsi/cxlflash/common.h | 11 ++- drivers/scsi/cxlflash/main.c | 151

[PATCH v3 3/4] cxlflash: Superpipe support

2015-08-02 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 mro

[PATCH v3 4/4] cxlflash: Virtual LUN support

2015-08-02 Thread Matthew R. Ochs
-by: Matthew R. Ochs mro...@linux.vnet.ibm.com Signed-off-by: Manoj N. Kumar ma...@linux.vnet.ibm.com --- Documentation/powerpc/cxlflash.txt | 63 +- drivers/scsi/cxlflash/Makefile |2 +- drivers/scsi/cxlflash/common.h |3 + drivers/scsi/cxlflash/main.c | 12 + drivers/scsi

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

2015-08-11 Thread Matthew R. Ochs
Mikey, Thanks for reviewing. Responses to your comments inline below. -matt On Aug 10, 2015, at 9:05 PM, Michael Neuling mi...@neuling.org wrote: On Mon, 2015-08-10 at 12:09 -0500, Matthew R. Ochs wrote: Introduce support for enhanced I/O error handling. This needs more description

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

2015-08-11 Thread Matthew R. Ochs
On Aug 10, 2015, at 10:41 PM, Benjamin Herrenschmidt b...@kernel.crashing.org wrote: On Mon, 2015-08-10 at 12:09 -0500, Matthew R. Ochs wrote: Introduce support for enhanced I/O error handling. Signed-off-by: Matthew R. Ochs mro...@linux.vnet.ibm.com Signed-off-by: Manoj N. Kumar ma

[PATCH v5 2/3] cxlflash: Superpipe support

2015-08-12 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 mro

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

2015-08-12 Thread Matthew R. Ochs
-by: Matthew R. Ochs mro...@linux.vnet.ibm.com Signed-off-by: Manoj N. Kumar ma...@linux.vnet.ibm.com --- Documentation/powerpc/cxlflash.txt | 63 +- drivers/scsi/cxlflash/Makefile |2 +- drivers/scsi/cxlflash/common.h |4 + drivers/scsi/cxlflash/lunmgt.c |3 + drivers/scsi

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

2015-08-12 Thread Matthew R. Ochs
state, normal operations are no longer allowed. Only specially designated operations related to graceful cleanup are permitted. Signed-off-by: Matthew R. Ochs mro...@linux.vnet.ibm.com Signed-off-by: Manoj N. Kumar ma...@linux.vnet.ibm.com Reviewed-by: Daniel Axtens d...@axtens.net --- drivers/scsi

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

2015-08-17 Thread Matthew R. Ochs
, Matthew R. Ochs wrote: --- a/drivers/scsi/cxlflash/common.h +++ b/drivers/scsi/cxlflash/common.h @@ -76,6 +76,12 @@ enum cxlflash_init_state { INIT_STATE_SCSI }; +enum cxlflash_state { +STATE_NORMAL, /* Normal running state, everything good */ +STATE_LIMBO,/* Limbo

Re: [patch] cxlflash: off by one bug in cxlflash_show_port_status()

2015-08-15 Thread Matthew R. Ochs
On Aug 14, 2015, at 3:35 PM, Dan Carpenter dan.carpen...@oracle.com wrote: The should be = or we read one element past the end of the array. Dan - Good catch! Acked-by: Matthew R. Ochs mro...@linux.vnet.ibm.com Fixes: c21e0bbfc485 ('cxlflash: Base support for IBM CXL Flash Adapter

Re: [patch] cxlflash: shift wrapping bug in afu_link_reset()

2015-08-18 Thread Matthew R. Ochs
, AFU_GSYNC); Acked-by: Matthew R. Ochs mro...@linux.vnet.ibm.com -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v3 1/4] cxlflash: Updates to legacy I/O

2015-08-05 Thread Matthew R. Ochs
On Aug 5, 2015, at 10:44 AM, Brian King brk...@linux.vnet.ibm.com wrote: Hi Matt, Can you break this up into separate patches for these separate logical bug fixes / changes? There is too much bundled all into a single patch here from my perspective. Sure, I can do that for v4.

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

2015-08-11 Thread Matthew R. Ochs
On Aug 10, 2015, at 6:52 PM, Daniel Axtens d...@axtens.net wrote: @@ -487,11 +515,27 @@ static int cxlflash_eh_host_reset_handler(struct scsi_cmnd *scp) get_unaligned_be32(((u32 *)scp-cmnd)[2]), get_unaligned_be32(((u32 *)scp-cmnd)[3])); -rcr =

Re: [PATCH v4 0/3] CXL Flash Error Recovery and Superpipe

2015-08-11 Thread Matthew R. Ochs
On Aug 10, 2015, at 8:32 PM, Michael Neuling mi...@neuling.org wrote: 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

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

2015-08-11 Thread Matthew R. Ochs
On Aug 11, 2015, at 12:23 AM, Michael Neuling mi...@neuling.org wrote: Some comments inline Thanks for reviewing, responses below. On Mon, 2015-08-10 at 12:09 -0500, Matthew R. Ochs wrote: Add superpipe supporting infrastructure to device driver for the IBM CXL Flash adapter. This patch

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

2015-08-13 Thread Matthew R. Ochs
- Use existing SCSI defines - Sleep instead of busy-wait - Remove duplicate parenths - Refine patch staging Matthew R. Ochs (3): cxlflash: Base error recovery support cxlflash: Superpipe support cxlflash: Virtual LUN support Documentation/ioctl/ioctl-number.txt |1 + Documentation/powerpc

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

2015-08-13 Thread Matthew R. Ochs
-by: Matthew R. Ochs mro...@linux.vnet.ibm.com Signed-off-by: Manoj N. Kumar ma...@linux.vnet.ibm.com Reviewed-by: Michael Neuling mi...@neuling.org Reviewed-by: Wen Xiong wenxi...@linux.vnet.ibm.com --- Documentation/powerpc/cxlflash.txt | 63 +- drivers/scsi/cxlflash/Makefile |2 +- drivers

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

2015-08-13 Thread Matthew R. Ochs
state, normal operations are no longer allowed. Only specially designated operations related to graceful cleanup are permitted. Signed-off-by: Matthew R. Ochs mro...@linux.vnet.ibm.com Signed-off-by: Manoj N. Kumar ma...@linux.vnet.ibm.com Reviewed-by: Daniel Axtens d...@axtens.net Reviewed

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

2015-08-10 Thread Matthew R. Ochs
branch hints - Use scsi_execute() to issue SCSI commands - Use existing SCSI defines - Sleep instead of busy-wait - Remove duplicate parenths - Refine patch staging Matthew R. Ochs (3): cxlflash: Base error recovery support cxlflash: Superpipe support cxlflash: Virtual LUN support

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

2015-08-10 Thread Matthew R. Ochs
-by: Matthew R. Ochs mro...@linux.vnet.ibm.com Signed-off-by: Manoj N. Kumar ma...@linux.vnet.ibm.com --- drivers/scsi/cxlflash/Makefile |2 +- drivers/scsi/cxlflash/common.h |4 + drivers/scsi/cxlflash/main.c | 14 +- drivers/scsi/cxlflash/sislite.h|3 + drivers/scsi

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

2015-08-10 Thread Matthew R. Ochs
Introduce support for enhanced I/O error handling. Signed-off-by: Matthew R. Ochs mro...@linux.vnet.ibm.com Signed-off-by: Manoj N. Kumar ma...@linux.vnet.ibm.com --- drivers/scsi/cxlflash/Kconfig | 2 +- drivers/scsi/cxlflash/common.h | 11 ++- drivers/scsi/cxlflash/main.c | 166

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

2015-08-12 Thread Matthew R. Ochs
On Aug 11, 2015, at 10:54 PM, Michael Neuling mi...@neuling.org wrote: + pr_debug(%s: Wait for user context to quiesce...\n, __func__); + wake_up_all(cfg-limbo_waitq); + ssleep(1); Why 1 sec and why in a loop? Can’t you poll/wait for completion somewhere?

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

2015-08-12 Thread Matthew R. Ochs
Hi Wendy, Thanks for reviewing. Comments inline below. -matt On Aug 11, 2015, at 11:18 PM, wenxi...@linux.vnet.ibm.com wrote: Quoting Matthew R. Ochs mro...@linux.vnet.ibm.com: +struct ctx_info *get_context(struct cxlflash_cfg *cfg, u64 rctxid, + void *arg, enum

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

2015-08-12 Thread Matthew R. Ochs
Hi Wendy, Thanks for reviewing. Comments inline below. -matt On Aug 11, 2015, at 11:15 PM, wenxi...@linux.vnet.ibm.com wrote: Quoting Matthew R. Ochs mro...@linux.vnet.ibm.com: Introduce support for enhanced I/O error handling. Signed-off-by: Matthew R. Ochs mro

Re: [PATCH v3 2/4] cxlflash: Base error recovery support

2015-08-05 Thread Matthew R. Ochs
Hi Brian, Thanks for reviewing. Comments inline below. -matt On Aug 5, 2015, at 11:04 AM, Brian King brk...@linux.vnet.ibm.com wrote: On 08/02/2015 11:33 PM, Matthew R. Ochs wrote: diff --git a/drivers/scsi/cxlflash/common.h b/drivers/scsi/cxlflash/common.h index ba070a5..3d6217a

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

2015-07-25 Thread Matthew R. Ochs
Hi Brian, Thanks for reviewing. Comments inline below. -matt On Jul 24, 2015, at 3:15 PM, Brian King wrote: On 07/16/2015 06:26 PM, Matthew R. Ochs wrote: + +/** + * ba_clone() - frees a block from the block allocator + * @ba_lun: Block allocator from which to allocate a block

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

2015-07-16 Thread Matthew R. Ochs
-by: Matthew R. Ochs mro...@linux.vnet.ibm.com Signed-off-by: Manoj N. Kumar ma...@linux.vnet.ibm.com --- drivers/scsi/cxlflash/Makefile |2 +- drivers/scsi/cxlflash/common.h |3 + drivers/scsi/cxlflash/main.c | 12 + drivers/scsi/cxlflash/sislite.h|3 + drivers/scsi

[PATCH v2 2/3] cxlflash: Superpipe support

2015-07-16 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 mro

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

2015-07-16 Thread Matthew R. Ochs
- Remove duplicate parenths - Refine patch staging Matthew R. Ochs (3): cxlflash: Base error recovery support cxlflash: Superpipe support cxlflash: Virtual LUN support Documentation/powerpc/cxlflash.txt | 298 + drivers/scsi/cxlflash/Makefile |2 +- drivers/scsi/cxlflash

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

2015-07-16 Thread Matthew R. Ochs
Introduce support for enhanced I/O error handling. Signed-off-by: Matthew R. Ochs mro...@linux.vnet.ibm.com Signed-off-by: Manoj N. Kumar ma...@linux.vnet.ibm.com --- drivers/scsi/cxlflash/common.h | 11 +++- drivers/scsi/cxlflash/main.c | 135 ++--- 2

Re: [PATCH v2 1/2] scsi: lpfc: Use kzalloc instead of kmalloc

2015-10-24 Thread Matthew R. Ochs
Signed-off-by: Punit Vara <punitv...@gmail.com> Reviewed-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] block: remove useless casting value returned by kmalloc to structure

2015-10-24 Thread Matthew R. Ochs
Reviewed-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH v6 31/37] cxlflash: Correct trace string

2015-10-21 Thread Matthew R. Ochs
The trace following the failure of alloc_mem() incorrectly identifies which function failed. This can lead to misdiagnosing a failure. Fix the string to correctly indicate that alloc_mem() failed. Reported-by: Brian King <brk...@linux.vnet.ibm.com> Signed-off-by: Matthew R. Och

[PATCH v6 32/37] cxlflash: Fix to avoid potential deadlock on EEH

2015-10-21 Thread Matthew R. Ochs
-by: Brian King <brk...@linux.vnet.ibm.com> Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Manoj N. Kumar <ma...@linux.vnet.ibm.com> Reviewed-by: Brian King <brk...@linux.vnet.ibm.com> Reviewed-by: Daniel Axtens <d...@axtens.net> --- drivers/

[PATCH v6 30/37] cxlflash: Fix to avoid corrupting adapter fops

2015-10-21 Thread Matthew R. Ochs
R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Manoj N. Kumar <ma...@linux.vnet.ibm.com> Reviewed-by: Brian King <brk...@linux.vnet.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnel...@au1.ibm.com> Reviewed-by: Daniel Axtens <d...@axtens.net> --- drivers/

[PATCH v6 28/37] MAINTAINERS: Add cxlflash driver

2015-10-21 Thread Matthew R. Ochs
Add stanza for cxlflash SCSI driver. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Manoj N. Kumar <ma...@linux.vnet.ibm.com> Reviewed-by: Brian King <brk...@linux.vnet.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnel...@au1.ibm.com&

[PATCH v6 29/37] cxlflash: Fix to double the delay each time

2015-10-21 Thread Matthew R. Ochs
From: Manoj Kumar <ma...@linux.vnet.ibm.com> The operator used to double the master context response delay is incorrect and does not result in delay doubling. To fix, use a left shift instead of the XOR operator. Reported-by: Tomas Henzl <the...@redhat.com> Signed-off-by: Matthew

[PATCH v6 13/37] cxlflash: Fix to avoid stall while waiting on TMF

2015-10-21 Thread Matthew R. Ochs
such that a bigger hammer reset can occur. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Manoj N. Kumar <ma...@linux.vnet.ibm.com> Reviewed-by: Brian King <brk...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/common.h | 1 + drivers/scsi/cxlf

[PATCH v6 14/37] cxlflash: Fix location of setting resid

2015-10-21 Thread Matthew R. Ochs
The resid is incorrectly set which can lead to unnecessary retry attempts by the stack. This is due to resid _always_ being set using a value returned from the adapter. Instead, the value should only be interpreted and set when in an underrun scenario. Signed-off-by: Matthew R. Ochs <

[PATCH v6 07/37] cxlflash: Fix context encode mask width

2015-10-21 Thread Matthew R. Ochs
The context encode mask covers more than 32-bits, making it a long integer. This should be noted by appending the ULL width suffix to the mask. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Manoj N. Kumar <ma...@linux.vnet.ibm.com> Reviewed-by: Bri

[PATCH v6 06/37] cxlflash: Fix to avoid sizeof(bool)

2015-10-21 Thread Matthew R. Ochs
Using sizeof(bool) is considered poor form for various reasons and sparse warns us of that. Correct by changing type from bool to u8. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Manoj N. Kumar <ma...@linux.vnet.ibm.com> Reviewed-by: Bri

[PATCH v6 16/37] cxlflash: Fix async interrupt bypass logic

2015-10-21 Thread Matthew R. Ochs
-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Manoj N. Kumar <ma...@linux.vnet.ibm.com> Reviewed-by: Brian King <brk...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/cxlflash/mai

[PATCH v6 27/37] cxlflash: Fix to prevent stale AFU RRQ

2015-10-21 Thread Matthew R. Ochs
after each reset. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Manoj N. Kumar <ma...@linux.vnet.ibm.com> Reviewed-by: Brian King <brk...@linux.vnet.ibm.com> Reviewed-by: Daniel Axtens <d...@axtens.net> --- drivers/scsi/cxlflash/main.c | 3 +++ 1 fi

[PATCH v6 17/37] cxlflash: Remove dual port online dependency

2015-10-21 Thread Matthew R. Ochs
behavior needs to be altered again in the near future based on testing. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Manoj N. Kumar <ma...@linux.vnet.ibm.com> Reviewed-by: Brian King <brk...@linux.vnet.ibm.com> Reviewed-by: Daniel Axtens <d...@axtens.n

[PATCH v6 24/37] cxlflash: Fix MMIO and endianness errors

2015-10-21 Thread Matthew R. Ochs
Sparse uncovered several errors with MMIO operations (accessing directly) and handling endianness. These can cause issues when running in different environments. Introduce __iomem and proper endianness tags/swaps where appropriate to make driver sparse clean. Signed-off-by: Matthew R. Ochs <

[PATCH v6 25/37] cxlflash: Fix to prevent EEH recovery failure

2015-10-21 Thread Matthew R. Ochs
. The context can be safely moved to the error state if needed during the unavailable window as no other threads will hold its reference. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Manoj N. Kumar <ma...@linux.vnet.ibm.com> Reviewed-by: Bri

[PATCH v6 26/37] cxlflash: Correct spelling, grammar, and alignment mistakes

2015-10-21 Thread Matthew R. Ochs
and consistency. Remove extra lines and a few unneeded variables/statements. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Manoj N. Kumar <ma...@linux.vnet.ibm.com> Reviewed-by: Brian King <brk...@linux.vnet.ibm.com> Reviewed-by: Andrew Donnellan <andrew.

[PATCH v6 23/37] cxlflash: Fix function prolog parameters and return codes

2015-10-21 Thread Matthew R. Ochs
Several function prologs have incorrect parameter names and return code descriptions. This can lead to confusion when reviewing the source and creates inaccurate documentation. To remedy, update the function prologs to properly reflect parameter names and return codes. Signed-off-by: Matthew R

[PATCH v6 00/37] cxlflash: Miscellaneous bug fixes and corrections

2015-10-21 Thread Matthew R. Ochs
Replace magic numbers with literals cxlflash: Fix read capacity timeout cxlflash: Fix to double the delay each time cxlflash: Fix to escalate to LINK_RESET on login timeout Matthew R. Ochs (32): cxlflash: Fix potential oops following LUN removal cxlflash: Fix data corruption when vLUN used

[PATCH v6 20/37] cxlflash: Fix to prevent workq from accessing freed memory

2015-10-21 Thread Matthew R. Ochs
() as there is not a need to process any scheduled work when shutting down. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Manoj N. Kumar <ma...@linux.vnet.ibm.com> Reviewed-by: Brian King <brk...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/main.c | 2 +-

[PATCH v6 19/37] cxlflash: Correct usage of scsi_host_put()

2015-10-21 Thread Matthew R. Ochs
on remove to be the last cleanup action taken and introduce a call to scsi_host_put() in the one initialization error path that does not use remove to cleanup. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Manoj N. Kumar <ma...@linux.vnet.ibm.com> Reviewed-by: Bri

[PATCH v6 18/37] cxlflash: Fix AFU version access/storage and add check

2015-10-21 Thread Matthew R. Ochs
-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Manoj N. Kumar <ma...@linux.vnet.ibm.com> Reviewed-by: Brian King <brk...@linux.vnet.ibm.com> Reviewed-by: Daniel Axtens <d...@axtens.net> --- drivers/scsi/cxlflash/common.h | 2 +- drivers/scsi

[PATCH v6 21/37] cxlflash: Correct behavior in device reset handler following EEH

2015-10-21 Thread Matthew R. Ochs
the TMF was not sent. To fix, the state is rechecked after coming out of the reset state. When the state is normal, a TMF will be sent out. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Manoj N. Kumar <ma...@linux.vnet.ibm.com> Reviewed-by: Bri

[PATCH v6 03/37] cxlflash: Fix read capacity timeout

2015-10-21 Thread Matthew R. Ochs
e used in sd.c) and rework the timeout literal to a more appropriate description. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Manoj N. Kumar <ma...@linux.vnet.ibm.com> Reviewed-by: Brian King <brk...@linux.vnet.ibm.com> Reviewed-by: Tomas Henzl <the.

[PATCH v6 02/37] cxlflash: Replace magic numbers with literals

2015-10-21 Thread Matthew R. Ochs
From: Manoj Kumar <kuma...@us.ibm.com> Magic numbers are not meaningful and can create confusion. As a remedy, replace them with descriptive literals. Replace 512 with literal MAX_SECTOR_UNIT. Replace 5 with literal CMD_RETRIES. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.co

[PATCH v6 34/37] cxlflash: Fix to escalate to LINK_RESET on login timeout

2015-10-21 Thread Matthew R. Ochs
lation. Signed-off-by: Manoj N. Kumar <ma...@linux.vnet.ibm.com> Acked-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Reviewed-by: Brian King <brk...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver

[PATCH v6 33/37] cxlflash: Fix to avoid leaving dangling interrupt resources

2015-10-21 Thread Matthew R. Ochs
and the appropriate goto is added to each error path. As a mini side fix while refactoring in this routine, the else statement following the AFU version evaluation is eliminated as it is not needed. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Acked-by: Manoj Kumar <ma...@linux.vne

[PATCH v6 22/37] cxlflash: Remove unnecessary scsi_block_requests

2015-10-21 Thread Matthew R. Ochs
The host reset handler is called with I/O already blocked, thus there is no need to explicitly block and unblock I/O in the handler. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Manoj N. Kumar <ma...@linux.vnet.ibm.com> Reviewed-by: Bri

[PATCH v6 37/37] cxlflash: Fix to avoid bypassing context cleanup

2015-10-21 Thread Matthew R. Ochs
of the table-list mutex within get_context() is simply changed to use the uninterruptible version of the mutex locking service. This is safe as the timing windows for holding this mutex are short and also protected against blocking. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.

[PATCH v6 35/37] cxlflash: Fix to avoid corrupting port selection mask

2015-10-21 Thread Matthew R. Ochs
selection mask, SCSI channel, and LUN ID each time the port LUN table is programmed. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/lunmgt.c| 36 ++-- drivers/scsi/cxlflash/superpipe.h | 1 - 2 files changed, 18 inse

[PATCH v6 15/37] cxlflash: Fix host link up event handling

2015-10-21 Thread Matthew R. Ochs
-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Manoj N. Kumar <ma...@linux.vnet.ibm.com> Reviewed-by: Brian King <brk...@linux.vnet.ibm.com> Conflicts: drivers/scsi/cxlflash/common.h --- drivers/scsi/cxlflash/common.h | 1 + drivers/scsi/cxlf

[PATCH v6 36/37] cxlflash: Fix to avoid lock instrumentation rejection

2015-10-21 Thread Matthew R. Ochs
When running with lock instrumentation (e.g. lockdep), some of the instrumentation can become disabled at probe time for a cxlflash adapter. This is due to a missing lock registration for the tmf_slock. The fix is to call spin_lock_init() for the tmf_slock during probe. Signed-off-by: Matthew R

[PATCH v6 12/37] cxlflash: Fix to avoid spamming the kernel log

2015-10-21 Thread Matthew R. Ochs
'. The following changes were made: - pr_debug to pr_devel - pr_debug to pr_debug_ratelimited - pr_err to dev_err - pr_debug to dev_dbg Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Manoj N. Kumar <ma...@linux.vnet.ibm.com> Reviewed-by: Bri

[PATCH v6 10/37] cxlflash: Make functions static

2015-10-21 Thread Matthew R. Ochs
*); struct afu_cmd *cxlflash_cmd_checkout(struct afu *); void cxlflash_cmd_checkin(struct afu_cmd *); void init_pcr(struct cxlflash_cfg *); int init_global(struct cxlflash_cfg *); Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Manoj N. Kumar <ma...@linux.vne

[PATCH v6 04/37] cxlflash: Fix potential oops following LUN removal

2015-10-21 Thread Matthew R. Ochs
. This resolves a potential Oops in the release handler when a dealing with a LUN that has already been removed. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Manoj N. Kumar <ma...@linux.vnet.ibm.com> Reviewed-by: Brian King <brk...@linux.vnet.ibm.com> Review

[PATCH v6 01/37] cxlflash: Fix to avoid invalid port_sel value

2015-10-21 Thread Matthew R. Ochs
n from find_and_create_lun(), the value of port_sel will be set incorrectly to indicate a single port, though in this case it should have been set to both ports. To fix, use the global mutex to serialize the lookup of the WWID and the subsequent modification of port_sel. Signed-off-by: Matthew R. Och

[PATCH v6 08/37] cxlflash: Fix to avoid CXL services during EEH

2015-10-21 Thread Matthew R. Ochs
ioctls by wrapping the ioctl handler call in a read semaphore and then implementing a small routine that obtains the write semaphore, effectively creating a wait point for all currently executing ioctls. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Manoj N. Kum

[PATCH v6 11/37] cxlflash: Refine host/device attributes

2015-10-21 Thread Matthew R. Ochs
Implement the following suggestions and add two new attributes to allow for debugging the port LUN table. - use scnprintf() instead of snprintf() - use DEVICE_ATTR_RO and DEVICE_ATTR_RW Suggested-by: Shane Seymour <shane.seym...@hp.com> Signed-off-by: Matthew R. Ochs <mro...@linux.vne

[PATCH v6 05/37] cxlflash: Fix data corruption when vLUN used over multiple cards

2015-10-21 Thread Matthew R. Ochs
for that card needs to be programmed. The mode word would be setup by the first card, causing the LUN table for the second card to not be programmed. By unconditionally initializing the LUN table (not depending on the mode word), the problem is avoided. Signed-off-by: Matthew R. Ochs <

[PATCH v6 09/37] cxlflash: Correct naming of limbo state and waitq

2015-10-21 Thread Matthew R. Ochs
Limbo is not an accurate representation of this state and is also not consistent with the terminology that other drivers use to represent this concept. Rename the state and and its associated waitq to 'reset'. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: M

Re: [PATCH 1 15/25] hpsa: enhance hpsa_get_device_id

2015-10-29 Thread Matthew R. Ochs
minated = true; > + if (terminated || *s < 0x20 || *s > 0x7e) > + *s = ' '; > + } > +} > + Perhaps in a future commit the version in scsi_scan can be exported and this duplication can be eliminated. Reviewed-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1 14/25] hpsa: add function is_logical_device

2015-10-29 Thread Matthew R. Ochs
Reviewed-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1 13/25] hpsa: simplify update scsi devices

2015-10-29 Thread Matthew R. Ochs
> On Oct 28, 2015, at 5:05 PM, Don Brace wrote: > > From: Kevin Barnett > > remove repeated calculation that checks for physical > or logical devices. > > Reviewed-by: Scott Teel > Reviewed-by: Justin Lindley

Re: [PATCH 1 17/25] hpsa: move scsi_add_device and scsi_remove_device calls to new function

2015-10-29 Thread Matthew R. Ochs
> On Oct 28, 2015, at 5:06 PM, Don Brace wrote: > > From: Kevin Barnett > > preparation for adding the sas transport class > > Reviewed-by: Scott Teel > Reviewed-by: Justin Lindley > Reviewed-by: Kevin

Re: [PATCH 1 18/25] External array LUNs must use target and lun numbers assigned by the

2015-10-29 Thread Matthew R. Ochs
> On Oct 28, 2015, at 5:06 PM, Don Brace wrote: > > From: Scott Teel > > external array. So the driver must treat these differently from > local LUNs when assigning lun/target. > > LUN's 'model' field has been used to detect Lun types that need >

Re: [PATCH 1 19/25] hpsa: eliminate fake lun0 enclosures

2015-10-29 Thread Matthew R. Ochs
Reviewed-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1 13/25] hpsa: simplify update scsi devices

2015-10-29 Thread Matthew R. Ochs
> On Oct 29, 2015, at 2:01 PM, Don Brace <brace77...@gmail.com> wrote: > > On 10/29/2015 11:43 AM, Matthew R. Ochs wrote: >>> On Oct 28, 2015, at 5:05 PM, Don Brace <don.br...@pmcs.com> wrote: >>> >>> From: Kevin Barnett <kevin.barn...@pmcs.co

Re: [PATCH 1 20/25] hpsa: add discovery polling for PT RAID devices.

2015-10-29 Thread Matthew R. Ochs
> On Oct 28, 2015, at 5:06 PM, Don Brace wrote: > > From: Scott Teel > > There are problems with getting configuration change notification > in pass-through RAID environments. So, activate flag > h->discovery_polling when one of these devices is

  1   2   3   4   5   >