Re: [RESEND] [PATCH v3] cxl: Prevent adapter reset if an active context exists

2016-11-04 Thread Uma Krishnan
] [c009f3707c60] [c0547224] pci_read_config+0xf4/0x2e0 [ 5895.247398] [c009f3707ce0] [c03efb3c] read+0x10c/0x2a0 [ 5895.247561] [c009f3707da0] [c031d160] vfs_read+0x110/0x290 [ 5895.247726] [c009f3707de0] [c031ec70] SyS_pread64+0xb0/0xd0 Uma Krishnan

Re: [PATCH 0/4] cxlflash: Enhancements, cleanup and fixes

2017-01-10 Thread Uma Krishnan
On 1/9/2017 11:00 PM, Martin K. Petersen wrote: "Uma" == Uma Krishnan <ukri...@linux.vnet.ibm.com> writes: Uma, Uma> This patch series includes an enhancement to support a new command Uma> queuing model and also cleans up prints throughout the driver. The Uma> last

[PATCH v2 1/4] cxlflash: Refactor context reset to share reset logic

2017-01-11 Thread Uma Krishnan
different reset register to leverage existing code. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/main.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff -

[PATCH v2 4/4] cxlflash: Cancel scheduled workers before stopping AFU

2017-01-11 Thread Uma Krishnan
is problem and to simplify things, this commit removes the mapcount solution. Instead, the scheduled worker thread is cancelled after interrupts have been disabled and prior to the mapping being freed. Fixes: b45cdbaf9f7f ("cxlflash: Resolve oops in wait_port_offline") Signed-off-by

[PATCH v2 0/4] cxlflash: Enhancements, cleanup and fixes

2017-01-11 Thread Uma Krishnan
the submitted patches Matthew R. Ochs (3): cxlflash: Refactor context reset to share reset logic cxlflash: Support SQ Command Mode cxlflash: Cleanup prints Uma Krishnan (1): cxlflash: Cancel scheduled workers before stopping AFU drivers/scsi/cxlflash/common.h | 32 ++- drivers/scsi/cxlflash

[PATCH v2 3/4] cxlflash: Cleanup prints

2017-01-11 Thread Uma Krishnan
hew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnel...@au1.ibm.com> --- drivers/scsi/cxlflash/lunmgt.c| 31 ++-- drivers/scsi/cxlflash/main.c | 319 ++-

[PATCH v2 2/4] cxlflash: Support SQ Command Mode

2017-01-11 Thread Uma Krishnan
hew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/common.h | 30 +++- drivers/scsi/cxlflash/main.c | 98 -- drivers/scsi/cxlflash/sislite.h| 19 +++- drivers/scs

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

2016-11-30 Thread Uma Krishnan
priv() to derive the aligned/zeroed private command on queuecommand and TMF paths. Remove cmd_checkout() as it is no longer required. The remaining AFU private command infrastructure will be removed in a cleanup commit. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Acked-

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

2016-11-30 Thread Uma Krishnan
utines to better reflect the queue model they support. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Acked-by: Uma Krishnan <ukri...@linux.vnet.ibm.com>

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

2016-11-30 Thread Uma Krishnan
timeout. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Acked-by: Uma Krishnan <ukri...@linux.vnet.ibm.com>

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

2016-11-30 Thread Uma Krishnan
From: "Matthew R. Ochs" <mro...@linux.vnet.ibm.com> Clean up and remove the remaining private command pool infrastructure that is no longer required. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Acked-by: Uma Krishnan <ukri...@linux.vnet.ibm.com>

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

2016-11-30 Thread Uma Krishnan
he other command initialization statements for clarity. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Acked-by: Uma Krishnan <ukri...@linux.vnet.ibm.com>

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

2016-11-30 Thread Uma Krishnan
eturn a success or failure. Additionally, as the simplification to the AFU internal command routine, explicit assignments of AFU command fields to zero are removed as the memory is zeroed upon allocation. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Acked-by: Uma Krishnan <ukri...@linux.vnet.ibm.com>

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

2016-11-30 Thread Uma Krishnan
ent requirements. Since the AFU sync service is only executed from the process environment, blocking is acceptable. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Acked-by: Uma Krishnan <ukri...@linux.vnet.ibm.com>

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

2016-11-30 Thread Uma Krishnan
e reserved field, the pointer is migrated to outside the descriptor where it can still be found during completion processing. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Acked-by: Uma Krishnan <ukri...@linux.vnet.ibm.com>

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

2016-11-30 Thread Uma Krishnan
became obsolete. As it is no longer necessary, the buffer is removed. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Acked-by: Uma Krishnan <ukri...@linux.vnet.ibm.com>

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

2016-11-30 Thread Uma Krishnan
ructure the code to remove the unnecessary logic and create an organized flow: handle state -> DMA map -> populate command -> send command Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Acked-by: Uma Krishnan <ukri...@linux.vnet.ibm.com>

[PATCH 2/4] cxlflash: Support SQ Command Mode

2017-01-06 Thread Uma Krishnan
From: "Matthew R. Ochs" The SISLite specification outlines a new queuing model to improve over the MMIO-based IOARRIN model that exists today. This new model uses a submission queue that exists in host memory and is shared with the device. Each entry in the queue is an

[PATCH 1/4] cxlflash: Refactor context reset to share reset logic

2017-01-06 Thread Uma Krishnan
From: "Matthew R. Ochs" As staging for supporting hardware with different context reset registers but a similar reset procedure, refactor the existing context reset routine to move the reset logic to a common routine. This will allow hardware with a different reset

[PATCH 3/4] cxlflash: Cleanup prints

2017-01-06 Thread Uma Krishnan
From: "Matthew R. Ochs" The usage of prints within the cxlflash driver is inconsistent. This hinders debug and makes the driver source and log output appear sloppy. The following cleanups help unify the prints within cxlflash: - move all prints to dev-* where

[PATCH 0/4] cxlflash: Enhancements, cleanup and fixes

2017-01-06 Thread Uma Krishnan
context reset to share reset logic cxlflash: Support SQ Command Mode cxlflash: Cleanup prints Uma Krishnan (1): cxlflash: Cancel scheduled workers before stopping AFU drivers/scsi/cxlflash/common.h | 32 ++- drivers/scsi/cxlflash/lunmgt.c | 31 +-- drivers/scsi/cxlflash/main.c

[PATCH 4/4] cxlflash: Cancel scheduled workers before stopping AFU

2017-01-06 Thread Uma Krishnan
is problem and to simplify things, this commit removes the mapcount solution. Instead, the scheduled worker thread is cancelled after interrupts have been disabled and prior to the mapping being freed. Fixes: b45cdbaf9f7f ("cxlflash: Resolve oops in wait_port_offline") Signed-off-by

[PATCH 00/17] cxlflash: Enhancements and miscellaneous fixes

2017-04-12 Thread Uma Krishnan
cxlflash: Improve asynchronous interrupt processing cxlflash: Add hardware queues attribute cxlflash: Introduce hardware queue steering Uma Krishnan (1): cxlflash: Support multiple hardware queues Documentation/powerpc/cxlflash.txt |5 + drivers/scsi/cxlflash/common.h | 137 +++-- drivers

[PATCH 01/17] cxlflash: Separate RRQ processing from the RRQ interrupt handler

2017-04-12 Thread Uma Krishnan
her than the RRQ hardware interrupt handler. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/main.c | 27 +-- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/

[PATCH 02/17] cxlflash: Serialize RRQ access and support offlevel processing

2017-04-12 Thread Uma Krishnan
mand completions can execute on softirq context. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/common.h | 2 ++ drivers/scsi/cxlflash/main.c | 42 +++

[PATCH 03/17] cxlflash: Implement IRQ polling for RRQ processing

2017-04-12 Thread Uma Krishnan
the IRQ polling API to schedule this processing on softirq context. This function will be disabled by default until starting values can be established for the hardware supported by this driver. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <u

[PATCH 04/17] cxlflash: Update sysfs helper routines to pass config structure

2017-04-12 Thread Uma Krishnan
From: "Matthew R. Ochs" <mro...@linux.vnet.ibm.com> As staging for future function, pass the config pointer instead of the AFU pointer for port-related sysfs helper routines. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <u

[PATCH 05/17] cxlflash: Support dynamic number of FC ports

2017-04-12 Thread Uma Krishnan
@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/common.h| 7 ++-- drivers/scsi/cxlflash/main.c | 71 --- drivers/scsi/cxlflash/main.h | 2 -- drivers/scsi/cxlflash/sislite.h |

[PATCH 06/17] cxlflash: Remove port configuration assumptions

2017-04-12 Thread Uma Krishnan
er. To mitigate this issue, remove the existing port assumptions and transition the code to support more than two ports. As a side effect, clarify the interpretation of the DK_CXLFLASH_ALL_PORTS_ACTIVE flag. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <u

[PATCH 07/17] cxlflash: Hide FC internals behind common access routine

2017-04-12 Thread Uma Krishnan
tructure without impacting existing code paths. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/common.h | 14 drivers/scsi/cxlflash/main.c | 72 +++--

[PATCH 08/17] cxlflash: SISlite updates to support 4 ports

2017-04-12 Thread Uma Krishnan
from the global port selection mask register reset value. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/common.h | 25 --- drivers/scsi/cxlflash/main.c| 77 +++

[PATCH 09/17] cxlflash: Support up to 4 ports

2017-04-12 Thread Uma Krishnan
From: "Matthew R. Ochs" <mro...@linux.vnet.ibm.com> Update the driver to allow for future cards with 4 ports. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/

[PATCH 10/17] cxlflash: Fence EEH during probe

2017-04-12 Thread Uma Krishnan
ed during device removal to avoid orphaned threads. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/common.h| 2 ++ drivers/scsi/cxlflash/main.c | 25 + drive

[PATCH 12/17] cxlflash: Fix power-of-two validations

2017-04-12 Thread Uma Krishnan
e initialization. As an additional, related cleanup, remove the now-defunct CXLFLASH_NUM_CMDS. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/common.h | 7 +-- drivers/scsi/cxlflash/main.c

[PATCH 11/17] cxlflash: Remove unnecessary DMA mapping

2017-04-12 Thread Uma Krishnan
ff-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/main.c | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c i

[PATCH 13/17] cxlflash: Fix warnings/errors

2017-04-12 Thread Uma Krishnan
net.ibm.com> Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/common.h| 27 ++--- drivers/scsi/cxlflash/sislite.h | 27 +++-- drivers/scsi/cxlflash/superpipe.h | 51 ++- drivers/sc

[PATCH 14/17] cxlflash: Improve asynchronous interrupt processing

2017-04-12 Thread Uma Krishnan
cale well as new status bits are supported. As an improvement, use the for_each_set_bit() service to iterate over the asynchronous status bits and refactor the information table such that it can be indexed by bit position. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-

[PATCH 15/17] cxlflash: Support multiple hardware queues

2017-04-12 Thread Uma Krishnan
in a later series to improve the memory footprint of the driver. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/common.h| 41 ++-- drivers/scsi/cxlflash/main.c | 426 -- drivers/scsi/cxlflash/superpipe.c | 6 +- 3

[PATCH 16/17] cxlflash: Add hardware queues attribute

2017-04-12 Thread Uma Krishnan
hardware queues to be tuned by a system administrator. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/common.h | 10 ++-- drivers/scsi/cxlflash/main.c | 112 ++

[PATCH 17/17] cxlflash: Introduce hardware queue steering

2017-04-12 Thread Uma Krishnan
@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/common.h | 12 - drivers/scsi/cxlflash/main.c | 120 +++-- 2 files changed, 126 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/cxlf

Re: [PATCH v4] cxl: Force context lock during EEH flow

2017-04-17 Thread Uma Krishnan
aster context as part of slot_reset callback. +*/ + cxl_adapter_context_unlock(adapter); + for (i = 0; i < adapter->slices; i++) { afu = adapter->afu[i]; Looks good. FV regressions and EEH recoveries (in parallel to I/O) were successful. Tested-by: Uma Krishnan <ukri...@linux.vnet.ibm.com>

[PATCH 08/17] cxlflash: Add scsi command abort handler

2017-06-21 Thread Uma Krishnan
pending I/O. This sequence is less invasive than a device or host reset and can be executed to support scsi command abort requests. Add eh_abort_handler callback support to process command timeouts and abort requests. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cx

[PATCH 07/17] cxlflash: Flush pending commands in cleanup path

2017-06-21 Thread Uma Krishnan
is acquired to prevent any data movement while the pending commands are processed. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/common.h | 5 +++- drivers/scsi/cxlflash/main.c | 57 +++--- 2 files changed, 57 inse

[PATCH 17/17] cxlflash: Update TMF command processing

2017-06-21 Thread Uma Krishnan
update comments in the TMF processing paths to describe the new behavior. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/main.c | 65 ++-- 1 file c

[PATCH 03/17] cxlflash: Reset hardware queue context via specified register

2017-06-21 Thread Uma Krishnan
evaluating for success and return status to the caller. Also update the context reset handler parameters to pass a hardware queue reference instead of a single command to better reflect that the entire queue associated with the context is impacted by the reset. Signed-off-by: Uma Krishnan <u

[PATCH 13/17] cxlflash: Support LUN provisioning

2017-06-21 Thread Uma Krishnan
ioctl interface for user LUN management software. Also update the cxlflash documentation to describe this new host ioctl. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- Documentation/powerpc/cxlflash.txt |

[PATCH 14/17] cxlflash: Support AFU debug

2017-06-21 Thread Uma Krishnan
terface for user debug software. Also update the cxlflash documentation to describe this new host ioctl. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- Documentation/powerpc/cxlflash.txt | 14 ++ drivers/scs

[PATCH 02/17] cxlflash: Update cxlflash_afu_sync() to return errno

2017-06-21 Thread Uma Krishnan
The cxlflash_afu_sync() routine returns a negative one to indicate any kind of failure. This makes it impossible to establish why the error occurred. Update the return codes to clearly indicate the failure cause to the caller. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- d

[PATCH 12/17] cxlflash: Refactor AFU capability checking

2017-06-21 Thread Uma Krishnan
hew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/common.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/cxlflash/common.h b/drivers/scsi/cxlflash/common.h index cbc0eb7..c9652

[PATCH 11/17] cxlflash: Introduce host ioctl support

2017-06-21 Thread Uma Krishnan
te a new section for documenting host ioctls. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- Documentation/ioctl/ioctl-number.txt | 2 +- Documentation/powerpc/cxlflash.txt | 19 +- drivers/scsi/c

[PATCH 05/17] cxlflash: Handle AFU sync failures

2017-06-21 Thread Uma Krishnan
failure should be acted upon. In the event of AFU sync failures, either log or cleanup as appropriate for operations that are dependent on a successful sync completion. Update documentation to reflect behavior in the event of an AFU sync failure. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.

[PATCH 04/17] cxlflash: Schedule asynchronous reset of the host

2017-06-21 Thread Uma Krishnan
. This will be done asynchronously to allow the acting thread to return to the user with a failure. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/common.h | 2 + drivers/scsi/cxlflash/main.c | 137 ++--- 2 files c

[PATCH 10/17] cxlflash: Separate AFU internal command handling from AFU sync specifics

2017-06-21 Thread Uma Krishnan
for the AFU sync command instead of a magic number. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/main.c| 79 ++--- drivers/scsi/cxlflash/sislite.h

[PATCH 06/17] cxlflash: Track pending scsi commands in each hardware queue

2017-06-21 Thread Uma Krishnan
. In order to avoid this problem and to better handle error path command cleanup, introduce a linked list for each hardware queue that tracks pending commands. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/common.h | 2 ++ drivers/scsi/cxlflash/main.c

[PATCH 15/17] cxlflash: Support WS16 unmap

2017-06-21 Thread Uma Krishnan
hew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/common.h | 1 + drivers/scsi/cxlflash/main.c| 12 drivers/scsi/cxlflash/sislite.h | 1 + drivers/scsi/cxlflash/vlun.c| 1 + 4 files changed, 15 inserti

[PATCH 16/17] cxlflash: Remove zeroing of private command data

2017-06-21 Thread Uma Krishnan
initializations. The zeroing that takes place in the device reset path remains intact as the private command data associated with the specified SCSI command is not guaranteed to be cleared. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukri...@linux.v

[PATCH 01/17] cxlflash: Combine the send queue locks

2017-06-21 Thread Uma Krishnan
regardless of the queueing model. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/common.h | 3 +-- drivers/scsi/cxlflash/main.c | 9 + 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/cxlflash/common.h b/drivers/scsi/cx

[PATCH 00/17] cxlflash: LUN provisioning support and miscellaneous fixes

2017-06-21 Thread Uma Krishnan
cxlflash: Introduce host ioctl support cxlflash: Refactor AFU capability checking cxlflash: Support LUN provisioning cxlflash: Support AFU debug cxlflash: Support WS16 unmap cxlflash: Remove zeroing of private command data cxlflash: Update TMF command processing Uma Krishnan (9

[PATCH 09/17] cxlflash: Create character device to provide host management interface

2017-06-21 Thread Uma Krishnan
, a character device will be created during probe of each adapter. This device will support a set of ioctls defined in the SISLite specification from which administrators can manage the adapter. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/common.h | 6 +- driver

[PATCH 1/3] cxlflash: Remove unnecessary existence check

2017-08-25 Thread Uma Krishnan
ff-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c index 6a4367c..7

[PATCH 2/3] cxlflash: Avoid double mutex unlock

2017-08-25 Thread Uma Krishnan
a local variable to track when the mutex should be unlocked. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/superpipe.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff -

[PATCH 3/3] cxlflash: Fix vlun resize failure in the shrink path

2017-08-25 Thread Uma Krishnan
. Fixes: 565180723294 ("scsi: cxlflash: SISlite updates to support 4 ports") Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/vlun.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/scsi/cxlflash/vlun.c b/drive

[PATCH 0/3] cxlflash: Miscellaneous fixes

2017-08-25 Thread Uma Krishnan
. Matthew R. Ochs (2): cxlflash: Remove unnecessary existence check cxlflash: Avoid double mutex unlock Uma Krishnan (1): cxlflash: Fix vlun resize failure in the shrink path drivers/scsi/cxlflash/main.c | 3 +-- drivers/scsi/cxlflash/superpipe.c | 13 ++--- drivers/scsi/cxlfl

[PATCH 1/3] cxlflash: Use derived maximum write same length

2017-10-25 Thread Uma Krishnan
ff-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/sislite.h | 3 --- drivers/scsi/cxlflash/vlun.c| 6 -- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/cxlflash/sisli

[PATCH 2/3] cxlflash: Allow cards without WWPN VPD to configure

2017-10-25 Thread Uma Krishnan
WPN, designating which cards are expected to have it in order to configure properly. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/main.c | 24 +--- drivers/scsi/cxlflash/main

[PATCH 0/3] cxlflash: Miscellaneous fixes

2017-10-25 Thread Uma Krishnan
This patch series contains miscellaneous fixes. All three patches resolve minor issues. This series is intended for 4.15 and is bisectable. Matthew R. Ochs (3): cxlflash: Use derived maximum write same length cxlflash: Allow cards without WWPN VPD to configure cxlflash: Derive pid through

[PATCH 3/3] cxlflash: Derive pid through accessors

2017-10-25 Thread Uma Krishnan
hew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/superpipe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/cxlflash/superpipe.c b/drivers/scsi/cxlflash/superpipe.c i

[PATCH 2/7] cxlflash: Limit the debug logs in the IO path

2018-05-11 Thread Uma Krishnan
useful data in the log. The best option available is to limit the messages that should serve most of the common use cases. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/driver

[PATCH 0/7] Miscellaneous patches and bug fixes

2018-05-11 Thread Uma Krishnan
This patch series adds few improvements to the cxlflash driver and it also contains couple of bug fixes. This patch series is intended for 4.18 and is bisectable. Matthew R. Ochs (1): cxlflash: Use local mutex for AFU serialization Uma Krishnan (6): cxlflash: Yield to active send threads

[PATCH 1/7] cxlflash: Yield to active send threads

2018-05-11 Thread Uma Krishnan
tly used to track internal AFU commands and quiesce during reset. This same counter can also be used for the active send threads. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/cxlfla

[PATCH 3/7] cxlflash: Acquire semaphore before invoking ioctl services

2018-05-11 Thread Uma Krishnan
it before invoking any ioctl services. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/superpipe.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/scsi/cxlflash/superpipe.c b/drivers/scsi/cxlflash/superpipe.c index 04a3bf9..5ba6e62

[PATCH 4/7] cxlflash: Use local mutex for AFU serialization

2018-05-11 Thread Uma Krishnan
d for other AFUs. Instead of using a global mutex, transition the mutex to be per-AFU. This will allow commands to only be blocked by siblings of the same AFU. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- driver

[PATCH 5/7] cxlflash: Add include guards to backend.h

2018-05-11 Thread Uma Krishnan
The new header file, backend.h, that was recently added is missing the include guards. This commit adds the guards. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/backend.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/scsi/cx

[PATCH 6/7] cxlflash: Abstract hardware dependent assignments

2018-05-11 Thread Uma Krishnan
As a staging cleanup to support transport specific builds of the cxlflash module, relocate device dependent assignments to header files. This will avoid littering the core driver with conditional compilation logic. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- driver

[PATCH 7/7] cxlflash: Isolate external module dependencies

2018-05-11 Thread Uma Krishnan
drivers and adjust the module dependencies accordingly. This commit isolates the object files that are dependent on CXL and/or OCXL. The cxl/ocxl fops used in the core driver are tucked under an ifdef to avoid compilation errors. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- d

Re: [PATCH 1/6] cxlflash: Reset command ioasc

2018-01-08 Thread Uma Krishnan
> On Jan 7, 2018, at 1:36 PM, Matthew R. Ochs <mro...@linux.vnet.ibm.com> wrote: > > On Thu, Jan 04, 2018 at 05:33:48PM +1100, Andrew Donnellan wrote: >> On 04/01/18 09:54, Uma Krishnan wrote: >>> In the event of a command failure, cxlflash returns the failure to t

Re: [PATCH 1/6] cxlflash: Reset command ioasc

2018-01-08 Thread Uma Krishnan
On Jan 7, 2018, at 1:36 PM, Matthew R. Ochs <mro...@linux.vnet.ibm.com> wrote:On Thu, Jan 04, 2018 at 05:33:48PM +1100, Andrew Donnellan wrote:On 04/01/18 09:54, Uma Krishnan wrote:In the event of a command failure, cxlflash returns the failure to theupper layers to process. After proc

Re: [PATCH 00/38] cxlflash: OpenCXL transport support

2018-02-23 Thread Uma Krishnan
On Feb 22, 2018, at 10:13 PM, Andrew Donnellan <andrew.donnel...@au1.ibm.com> wrote:On 23/02/18 09:20, Uma Krishnan wrote:This patch series adds OpenCXL support to the cxlflash driver. Withthis support, new devices using the OpenCXL transport will be supportedby the cxlflash driver

[PATCH 10/38] cxlflash: Setup AFU PASID

2018-02-22 Thread Uma Krishnan
Per the OpenCXL specification, the maximum PASID supported by the AFU is indicated by a field within the configuration space. Similar to acTags, implementations can choose to use any sub-range of PASID within their assigned range. For cxlflash, the entire range is used. Signed-off-by: Uma

[PATCH 17/38] cxlflash: Support starting an adapter context

2018-02-22 Thread Uma Krishnan
MMIO space while the rest have access to the context specific space. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/ocxl_hw.c | 39 +++ drivers/scsi/cxlflash/ocxl_hw.h | 3 +++ 2 files changed, 42 insertions(+) diff

[PATCH 20/38] cxlflash: Support reading adapter VPD data

2018-02-22 Thread Uma Krishnan
Use the PCI VPD services to support reading the VPD data of the underlying adapter. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/ocxl_hw.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/scsi/cxlflash/ocxl_hw.c b/driver

[PATCH 23/38] cxlflash: Support process element lifecycle

2018-02-22 Thread Uma Krishnan
fault error notification. While not used here, it will be expanded in a future commit. Also add a service to stop a context by terminating the corresponding PASID and remove the process element from the SPA. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cx

[PATCH 27/38] cxlflash: Support adapter context polling

2018-02-22 Thread Uma Krishnan
The cxlflash userspace API requires that users be able to poll the adapter context for any pending events or interrupts from the AFU. Support polling on various events by implementing the AFU poll fop using a waitqueue. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- driver

[PATCH 29/38] cxlflash: Support adapter context mmap and release

2018-02-22 Thread Uma Krishnan
and clean up the context when invoked. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/ocxl_hw.c | 72 + 1 file changed, 72 insertions(+) diff --git a/drivers/scsi/cxlflash/ocxl_hw.c b/drivers/scsi/cxlflash/ocxl_hw.c

[PATCH 31/38] cxlflash: Introduce object handle fop

2018-02-22 Thread Uma Krishnan
to the core driver as it manages the AFU specification (SISLite) for cxlflash. Note that for Power systems, the object handle is the effective address of the trigger page. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/backend.h | 1 + drivers/scsi/cx

[PATCH 02/38] cxlflash: Avoid clobbering context control register value

2018-02-22 Thread Uma Krishnan
is as described in SISLite (0). Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/main.c| 5 - drivers/scsi/cxlflash/sislite.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff -

[PATCH 16/38] cxlflash: MMIO map the AFU

2018-02-22 Thread Uma Krishnan
When the AFU is configured, the global and per process MMIO regions are presented by the configuration space. Save these regions and map the global MMIO region that is used to access all of the control and provisioning data in the AFU. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.

[PATCH 28/38] cxlflash: Support adapter context reading

2018-02-22 Thread Uma Krishnan
The cxlflash userspace API requires that users be able to read the adapter context for any pending events or interrupts from the AFU. Support reading various events by implementing the AFU read fop to copy out event data. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- driver

[PATCH 30/38] cxlflash: Support file descriptor mapping

2018-02-22 Thread Uma Krishnan
to map and release when requested. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/ocxl_hw.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/scsi/cxlflash/ocxl_hw.c b/drivers/scsi/cxlflash/ocxl_hw.c index f090563..1

[PATCH 33/38] cxlflash: Setup LISNs for master contexts

2018-02-22 Thread Uma Krishnan
Similar to user contexts, master contexts also require that the per-context LISN registers be programmed for certain AFUs. The mapped trigger page is obtained from underlying transport and registered with AFU for each master context. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.

[PATCH 35/38] cxlflash: Introduce OCXL context state machine

2018-02-22 Thread Uma Krishnan
to the context state field. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/ocxl_hw.c | 59 ++--- drivers/scsi/cxlflash/ocxl_hw.h | 8 ++ 2 files changed, 64 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/cx

[PATCH 37/38] cxlflash: Support AFU reset

2018-02-22 Thread Uma Krishnan
with execution. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/ocxl_hw.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/scsi/cxlflash/ocxl_hw.c b/drivers/scsi/cxlflash/ocxl_hw.c index dc45ed2..8a1a9fc 100644 --- a/drivers/scsi/cx

[PATCH 15/38] cxlflash: Support image reload policy modification

2018-02-22 Thread Uma Krishnan
On a PERST, the AFU image can be reloaded or left intact. Provide means to set this image reload policy. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/ocxl_hw.c | 13 + drivers/scsi/cxlflash/ocxl_hw.h | 1 + 2 files changed, 14 inse

[PATCH 00/38] cxlflash: OpenCXL transport support

2018-02-22 Thread Uma Krishnan
that communicates with the AFU. The first three patches contain a minor fix and staging improvements. This series is intended for 4.17 and is bisectable. Matthew R. Ochs (1): cxlflash: Avoid clobbering context control register value Uma Krishnan (37): cxlflash: Preserve number of interrupts

[PATCH 03/38] cxlflash: Add argument identifier names

2018-02-22 Thread Uma Krishnan
Checkpatch throws a warning when the argument identifier names are not included in the function definitions. To avoid these warnings, argument identifiers are added in the existing function definitions. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/bac

[PATCH 07/38] cxlflash: Setup function acTag range

2018-02-22 Thread Uma Krishnan
function per host is expected and thus the entire range is assigned. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/ocxl_hw.c | 15 +++ drivers/scsi/cxlflash/ocxl_hw.h | 3 +++ 2 files changed, 18 insertions(+) diff --git a/drivers/scsi/cx

[PATCH 11/38] cxlflash: Adapter context support for OpenCXL

2018-02-22 Thread Uma Krishnan
context is created when the hardware AFU is initialized. This is returned by the get_context() fop. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/ocxl_hw.c | 90 + drivers/scsi/cxlflash/ocxl_hw.h | 6 +++ 2 files chang

[PATCH 22/38] cxlflash: Setup OpenCXL transaction layer

2018-02-22 Thread Uma Krishnan
The first function of the link needs to configure the transaction layer between the host and device. This is accomplished by a call to the OCXL provider services. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/ocxl_hw.c | 10 ++ 1 file chang

[PATCH 13/38] cxlflash: Support adapter file descriptors for OpenCXL

2018-02-22 Thread Uma Krishnan
Allocate a file descriptor for an adapter context when requested. In order to allocate inodes for the file descriptors, a pseudo filesystem is created and used. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/ocxl_hw.c

[PATCH 14/38] cxlflash: Support adapter context discovery

2018-02-22 Thread Uma Krishnan
Provide means to obtain the process element of an adapter context as well as locate an adapter context by file. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/ocxl_hw.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/d

<    1   2   3   4   >