Re: [PATCH 1/6] cxlflash: Fix to escalate LINK_RESET also on port 1

2015-12-17 Thread Uma Krishnan
On 12/14/2015 11:30 AM, Matthew R. Ochs wrote: Acked-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Reviewed-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord..

Re: [PATCH 2/6] cxlflash: Fix to avoid virtual LUN failover failure

2015-12-17 Thread Uma Krishnan
On 12/10/2015 4:53 PM, Uma Krishnan wrote: From: "Matthew R. Ochs" <mro...@linux.vnet.ibm.com> Applications which use virtual LUN's that are backed by a physical LUN over both adapter ports may experience an I/O failure in the event of a link loss (e.g. cable pull).

Re: [PATCH 5/6] cxlflash: Resolve oops in wait_port_offline

2015-12-17 Thread Uma Krishnan
On 12/10/2015 4:54 PM, Uma Krishnan wrote: From: Manoj Kumar <ma...@linux.vnet.ibm.com> If an async error interrupt is generated, and the error requires the FC link to be reset, it cannot be performed in the interrupt context. So a work element is scheduled to complete the link

[PATCH 0/6] cxlflash: Miscellaneous fixes and updates

2015-12-10 Thread Uma Krishnan
in wait_port_offline cxlflash: Enable device id for future IBM CXL adapter Matthew R. Ochs (1): cxlflash: Fix to avoid virtual LUN failover failure Uma Krishnan (1): cxlflash: Updated date of the driver drivers/scsi/cxlflash/common.h | 2 ++ drivers/scsi/cxlflash/main.c | 51

[PATCH 4/6] cxlflash: Fix to resolve cmd leak after host reset

2015-12-10 Thread Uma Krishnan
From: Manoj Kumar After a few iterations of resetting the card, either during EEH recovery, or a host_reset the following is seen in the logs. cxlflash 0008:00: cxlflash_queuecommand: could not get a free command At every reset of the card, the commands that are

[PATCH 5/6] cxlflash: Resolve oops in wait_port_offline

2015-12-10 Thread Uma Krishnan
From: Manoj Kumar If an async error interrupt is generated, and the error requires the FC link to be reset, it cannot be performed in the interrupt context. So a work element is scheduled to complete the link reset in a process context. If either an EEH event or an

[PATCH 3/6] cxlflash: Updated date of the driver

2015-12-10 Thread Uma Krishnan
This change is to update the date when last change was made to the cxlflash driver Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/cxlflash/main.h b/drivers/scsi/cx

[PATCH 1/6] cxlflash: Fix to escalate LINK_RESET also on port 1

2015-12-10 Thread Uma Krishnan
From: Manoj Kumar The original fix to escalate a 'login timed out' error to a LINK_RESET was only made for one of the two ports on the card. This fix resolves the same issue for the second port (port 1). Signed-off-by: Manoj N. Kumar ---

[PATCH 2/6] cxlflash: Fix to avoid virtual LUN failover failure

2015-12-10 Thread Uma Krishnan
From: "Matthew R. Ochs" Applications which use virtual LUN's that are backed by a physical LUN over both adapter ports may experience an I/O failure in the event of a link loss (e.g. cable pull). Virtual LUNs may be accessed through one or both ports of the adapter.

[PATCH 6/6] cxlflash: Enable device id for future IBM CXL adapter

2015-12-10 Thread Uma Krishnan
From: Manoj Kumar This drop enables a future card with a device id of 0x0600 to be recognized by the cxlflash driver. No card specific programming has been added. These card specific changes will be staged in later. Signed-off-by: Manoj N. Kumar

[PATCH v2 0/6] cxlflash: Miscellaneous fixes and updates

2015-12-14 Thread Uma Krishnan
cxlflash: Resolve oops in wait_port_offline cxlflash: Enable device id for future IBM CXL adapter Matthew R. Ochs (1): cxlflash: Fix to avoid virtual LUN failover failure Uma Krishnan (1): cxlflash: Removed driver date print drivers/scsi/cxlflash/common.h | 2 ++ drivers/scsi/cxlflash/main.c

[PATCH v2 5/6] cxlflash: Resolve oops in wait_port_offline

2015-12-14 Thread Uma Krishnan
From: Manoj Kumar If an async error interrupt is generated, and the error requires the FC link to be reset, it cannot be performed in the interrupt context. So a work element is scheduled to complete the link reset in a process context. If either an EEH event or an

[PATCH v2 1/6] cxlflash: Fix to escalate LINK_RESET also on port 1

2015-12-14 Thread Uma Krishnan
From: Manoj Kumar The original fix to escalate a 'login timed out' error to a LINK_RESET was only made for one of the two ports on the card. This fix resolves the same issue for the second port (port 1). Signed-off-by: Manoj N. Kumar

[PATCH v2 0/6] cxlflash: Miscellaneous fixes and updates

2015-12-14 Thread Uma Krishnan
cxlflash: Resolve oops in wait_port_offline cxlflash: Enable device id for future IBM CXL adapter Matthew R. Ochs (1): cxlflash: Fix to avoid virtual LUN failover failure Uma Krishnan (1): cxlflash: Removed driver date print drivers/scsi/cxlflash/common.h | 2 ++ drivers/scsi/cxlflash/main.c

[PATCH v2 0/6] cxlflash: Miscellaneous fixes and updates

2015-12-14 Thread Uma Krishnan
cxlflash: Resolve oops in wait_port_offline cxlflash: Enable device id for future IBM CXL adapter Matthew R. Ochs (1): cxlflash: Fix to avoid virtual LUN failover failure Uma Krishnan (1): cxlflash: Removed driver date print drivers/scsi/cxlflash/common.h | 2 ++ drivers/scsi/cxlflash/main.c

[PATCH v2 2/6] cxlflash: Fix to avoid virtual LUN failover failure

2015-12-14 Thread Uma Krishnan
From: "Matthew R. Ochs" Applications which use virtual LUN's that are backed by a physical LUN over both adapter ports may experience an I/O failure in the event of a link loss (e.g. cable pull). Virtual LUNs may be accessed through one or both ports of the adapter.

[PATCH 0/1] cxlflash: Fix in EEH recovery

2016-06-15 Thread Uma Krishnan
This patch addresses a deadlock issue seen during EEH recovery and is intended for 4.7. Manoj N. Kumar (1): cxlflash: Fix to resolve dead-lock during EEH recovery drivers/scsi/cxlflash/superpipe.c | 15 +++ 1 file changed, 15 insertions(+) -- 2.1.0 -- To unsubscribe from this

[PATCH 0/3] cxlflash: Shutdown notification and reset patch

2016-06-15 Thread Uma Krishnan
This patch set contains support to notify CXL Flash devices of an impending shutdown and a fix to drain operations prior to a reset. This series is intended for 4.8 and is bisectable. Manoj N. Kumar (1): cxlflash: Fix to drain operations from previous reset Uma Krishnan (2): cxlflash: Add

Re: [PATCH 0/1] cxlflash: Fix in EEH recovery

2016-06-15 Thread Uma Krishnan
Please ignore this email. It was sent in error. Sorry for the confusion. On 6/15/2016 6:46 PM, Uma Krishnan wrote: This patch addresses a deadlock issue seen during EEH recovery and is intended for 4.7. Manoj N. Kumar (1): cxlflash: Fix to resolve dead-lock during EEH recovery drivers/scsi

[PATCH 2/3] cxlflash: Add device dependent flags

2016-06-15 Thread Uma Krishnan
in the driver to bypass or invoke specific functionality. In this patch, a member 'flags' has been added to device dependent values. These flags will be used and expanded in the future to support various device specific functions. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- d

[PATCH 3/3] cxlflash: Shutdown notify support for CXL Flash cards

2016-06-15 Thread Uma Krishnan
to complete. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/main.c| 67 - drivers/scsi/cxlflash/main.h| 1 + drivers/scsi/cxlflash/sislite.h | 6 3 files changed, 73 insertions(+), 1 deletion(-) diff

[PATCH 1/3] cxlflash: Fix to drain operations from previous reset

2016-06-15 Thread Uma Krishnan
From: "Manoj N. Kumar" While running 'sg_reset -H' in a loop with a user-space application active, hit the following exception: cpu 0x2: Vector: 300 (Data Access) pc: : afu_attach+0x50/0x240 [cxlflash] lr: : cxlflash_afu_recover+0x3dc/0x7d0 [cxlflash] pid

[PATCH 2/2] cxlflash: Move to exponential back-off when cmd_room is not available

2016-03-23 Thread Uma Krishnan
From: "Manoj N. Kumar" While profiling the cxlflash_queuecommand() path under a heavy load it was found that number of retries to find cmd_room was fairly high. There are two problems with the current back-off: a) It starts with a udelay of 0 b) It backs-off linearly

[PATCH 1/2] cxlflash: Fix regression issue with re-ordering patch

2016-03-23 Thread Uma Krishnan
From: "Manoj N. Kumar" While running 'sg_reset -H' back to back the following exception was seen: [ 735.115695] Faulting instruction address: 0xd98c0864 cpu 0x0: Vector: 300 (Data Access) at [c00afa80] pc: d98c0864:

[PATCH 0/2] Fix regression and performance issue in cxlflash

2016-03-23 Thread Uma Krishnan
This series has a couple of patches in cxlflash. The first patch is critical as it fixes a regression that was introduced by Commit 6ded8b3cbd9a ("cxlflash: Unmap problem state area before detaching master context") as part of the first SCSI push for v4.6. The second patch addresses a

[PATCH v2 1/2] cxlflash: Fix regression issue with re-ordering patch

2016-03-25 Thread Uma Krishnan
Matthew R. Ochs <mro...@linux.vnet.ibm.com> Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/main.c | 130 ++- drivers/scsi/cxlflash/main.h | 5 +- 2

[PATCH v2 0/2] Fix regression and performance issue in cxlflash

2016-03-25 Thread Uma Krishnan
This series has a couple of patches in cxlflash. The first patch is critical as it fixes a regression that was introduced by Commit 6ded8b3cbd9a ("cxlflash: Unmap problem state area before detaching master context") as part of the first SCSI push for v4.6. The second patch addresses a

[PATCH v2 2/2] cxlflash: Move to exponential back-off when cmd_room is not available

2016-03-25 Thread Uma Krishnan
f. This solution also takes care of the problem with the initial delay (starts with 1 usec). Signed-off-by: Manoj N. Kumar <ma...@linux.vnet.ibm.com> Acked-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> Signed-off-by: Uma Kr

Re: [PATCH 6/7] cxlflash: Fix to avoid unnecessary scan with internal LUNs

2016-03-08 Thread Uma Krishnan
On 3/4/2016 3:55 PM, Uma Krishnan wrote: From: "Manoj N. Kumar" <ma...@linux.vnet.ibm.com> When switching to the internal LUN defined on the IBM CXL flash adapter, there is an unnecessary scan occurring on the second port. This scan leads to the following extra lines in the lo

Re: [PATCH 4/7] cxlflash: Simplify attach path error cleanup

2016-03-08 Thread Uma Krishnan
On 3/4/2016 3:55 PM, Uma Krishnan wrote: From: "Matthew R. Ochs" <mro...@linux.vnet.ibm.com> The cxlflash_disk_attach() routine currently uses a cascading error gate strategy for its error cleanup path. While this strategy is commonly used to handle cleanup scenarios, it is too

Re: [PATCH 3/7] cxlflash: Split out context initialization

2016-03-08 Thread Uma Krishnan
On 3/4/2016 3:55 PM, Uma Krishnan wrote: From: "Matthew R. Ochs" <mro...@linux.vnet.ibm.com> Presently, context information structures are allocated and initialized in the same routine, create_context(). This imposes an ordering restriction such that all pieces of in

Re: [PATCH 1/7] cxlflash: Simplify PCI registration

2016-03-08 Thread Uma Krishnan
On 3/4/2016 3:55 PM, Uma Krishnan wrote: From: "Manoj N. Kumar" <ma...@linux.vnet.ibm.com> The calls to pci_request_regions(), pci_resource_start(), pci_set_dma_mask(), pci_set_master() and pci_save_state() are all unnecessary for the IBM CXL flash adapter since data buffers

Re: [PATCH 7/7] cxlflash: Increase cmd_per_lun for better throughput

2016-03-08 Thread Uma Krishnan
On 3/4/2016 3:55 PM, Uma Krishnan wrote: From: "Manoj N. Kumar" <ma...@linux.vnet.ibm.com> With the current value of cmd_per_lun at 16, the throughput over a single adapter is limited to around 150kIOPS. Increase the value of cmd_per_lun to 256 to improve throughput. With this

[PATCH 6/7] cxlflash: Fix to avoid unnecessary scan with internal LUNs

2016-03-04 Thread Uma Krishnan
From: "Manoj N. Kumar" When switching to the internal LUN defined on the IBM CXL flash adapter, there is an unnecessary scan occurring on the second port. This scan leads to the following extra lines in the log: Dec 17 10:09:00 tul83p1 kernel: [ 3708.561134] cxlflash

[PATCH 3/7] cxlflash: Split out context initialization

2016-03-04 Thread Uma Krishnan
From: "Matthew R. Ochs" Presently, context information structures are allocated and initialized in the same routine, create_context(). This imposes an ordering restriction such that all pieces of information needed to initialize a context must be known before the

[PATCH 2/7] cxlflash: Unmap problem state area before detaching master context

2016-03-04 Thread Uma Krishnan
for the master context to be detached first and the problem state area to be unmapped second. To resolve this issue, stop_afu() should be called before term_mc(). Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/main.c | 6 +++--- 1 file changed, 3 insertions

[PATCH 1/7] cxlflash: Simplify PCI registration

2016-03-04 Thread Uma Krishnan
From: "Manoj N. Kumar" The calls to pci_request_regions(), pci_resource_start(), pci_set_dma_mask(), pci_set_master() and pci_save_state() are all unnecessary for the IBM CXL flash adapter since data buffers are not required to be mapped to the device's memory. The use

[PATCH 5/7] cxlflash: Reorder user context initialization

2016-03-04 Thread Uma Krishnan
the process element is attached. The cxlflash module is unable to create contexts without a valid process element id. To fix this problem, cxl_start_work() is called before obtaining the process element id. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/superpipe.

[PATCH 7/7] cxlflash: Increase cmd_per_lun for better throughput

2016-03-04 Thread Uma Krishnan
From: "Manoj N. Kumar" With the current value of cmd_per_lun at 16, the throughput over a single adapter is limited to around 150kIOPS. Increase the value of cmd_per_lun to 256 to improve throughput. With this change a single adapter is able to attain close to the

[PATCH 0/7] Miscellaneous patches to support cxlflash in PowerVM

2016-03-04 Thread Uma Krishnan
error cleanup Uma Krishnan (2): cxlflash: Unmap problem state area before detaching master context cxlflash: Reorder user context initialization drivers/scsi/cxlflash/common.h| 8 +- drivers/scsi/cxlflash/main.c | 72 +++--- drivers/scsi/cxlflash/superpipe.c | 195

[PATCH 4/7] cxlflash: Simplify attach path error cleanup

2016-03-04 Thread Uma Krishnan
From: "Matthew R. Ochs" The cxlflash_disk_attach() routine currently uses a cascading error gate strategy for its error cleanup path. While this strategy is commonly used to handle cleanup scenarios, it is too restrictive when function callouts need to be restructured.

[PATCH 0/1] cxlflash: Fix in EEH recovery

2016-05-03 Thread Uma Krishnan
This patch addresses a deadlock issue seen during EEH recovery and is intended for 4.7. Manoj N. Kumar (1): cxlflash: Fix to resolve dead-lock during EEH recovery drivers/scsi/cxlflash/superpipe.c | 15 +++ 1 file changed, 15 insertions(+) -- 2.1.0 -- To unsubscribe from this

[PATCH 1/1] cxlflash: Fix to resolve dead-lock during EEH recovery

2016-05-03 Thread Uma Krishnan
From: "Manoj N. Kumar" When a cxlflash adapter goes into EEH recovery and multiple processes (each having established its own context) are active, the EEH recovery can hang if the processes attempt to recover in parallel. The symptom logged after a couple of minutes is:

[PATCH 2/2] MAINTAINERS: Update cxlflash maintainers

2016-07-21 Thread Uma Krishnan
Adding myself as a cxlflash maintainer. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 2dbc028..e5f5882 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3487,6 +3487,

[PATCH 1/2] cxlflash: Verify problem state area is mapped before notifying shutdown

2016-07-21 Thread Uma Krishnan
Shutdown notify support for CXL Flash cards") Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/main.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c index 860008d..66

[PATCH 0/2] cxlflash: Regression patch and updating Maintainers list

2016-07-21 Thread Uma Krishnan
ed for 4.8 and is bisectable. These patches are cut against next/master that contains the original commit. Uma Krishnan (2): cxlflash: Verify problem state area is mapped before notifying shutdown MAINTAINERS: Update cxlflash maintainers MAINTAINERS | 1 + drivers/scsi/cxlfl

[PATCH] cxlflash: Enable PCI device ID for future IBM CXL Flash AFU

2017-02-16 Thread Uma Krishnan
From: "Matthew R. Ochs" <mro...@linux.vnet.ibm.com> Add support for a future IBM Coherent Accelerator (CXL) flash AFU with an ID of 0x0624. Signed-off-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- driv

[PATCH 6/6] cxlflash: Fix context reference tracking on detach

2016-09-02 Thread Uma Krishnan
From: "Matthew R. Ochs" Commit 888baf069f49 ("scsi: cxlflash: Add kref to context") introduced a kref to the context. In particular, the detach routine was updated to use the kref services for managing the removal and destruction of a context. As part of this change,

[PATCH 4/6] cxlflash: Improve EEH recovery time

2016-09-02 Thread Uma Krishnan
From: "Matthew R. Ochs" When an EEH occurs during device initialization, the port timeout logic can cause excessive delays as MMIO reads will fail. Depending on where they are experienced, these delays can lead to a prolonged reset, causing an unnecessary triggering of

[PATCH 5/6] cxlflash: Refactor WWPN setup

2016-09-02 Thread Uma Krishnan
From: "Matthew R. Ochs" Commit 964497b3bf3f ("cxlflash: Remove dual port online dependency") logically removed the ability for the WWPN setup routine afu_set_wwpn() to return a non-success value. This routine can safely be made a void to simplify the code as there is

[PATCH 3/6] cxlflash: Fix to avoid EEH and host reset collisions

2016-09-02 Thread Uma Krishnan
From: "Matthew R. Ochs" The EEH reset handler is ignorant to the current state of the driver when processing a frozen event and initiating a device reset. This can be an issue if an EEH event occurs while a user or stack initiated reset is executing. More specifically,

[PATCH 1/6] cxlflash: Scan host only after the port is ready for I/O

2016-09-02 Thread Uma Krishnan
performed after 'login succeeded' interrupt could portentially return error and the devices may not be scanned properly. To avoid this problem, scsi_scan_host() should be called only after the 'login succeeded' interrupt. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- driver

[PATCH 2/6] cxlflash: Remove the device cleanly in the system shutdown path

2016-09-02 Thread Uma Krishnan
th already includes the AFU notification and thus this solution will continue to perform the original intent. At the same time, the remove hook is updated to protect against being called when the device is not enabled. Fixes: 704c4b0ddc03 ("cxlflash: Shutdown notify support for CXL Flash cards"

[PATCH 0/6] cxlflash: Miscellaneous fixes

2016-09-02 Thread Uma Krishnan
xlflash: Fix context reference tracking on detach Uma Krishnan (2): cxlflash: Scan host only after the port is ready for I/O cxlflash: Remove the device cleanly in the system shutdown path drivers/scsi/cxlflash/main.c | 81 +-- drivers/scsi/cxlflash/su

Re: [PATCH 2/6] cxlflash: Remove the device cleanly in the system shutdown path

2016-09-06 Thread Uma Krishnan
On 9/5/2016 2:12 AM, Andrew Donnellan wrote: On 03/09/16 06:39, Uma Krishnan wrote: Commit 704c4b0ddc03 ("cxlflash: Shutdown notify support for CXL Flash cards") was recently introduced to notify the AFU when a system is going down. Due to the position of the cxlflash driver in

Re: [PATCH 4/6] cxlflash: Improve EEH recovery time

2016-09-09 Thread Uma Krishnan
On 9/2/2016 3:40 PM, Uma Krishnan wrote: From: "Matthew R. Ochs" <mro...@linux.vnet.ibm.com> When an EEH occurs during device initialization, the port timeout logic can cause excessive delays as MMIO reads will fail. Depending on where they are experienced, these delays can lea

Re: [PATCH 5/6] cxlflash: Refactor WWPN setup

2016-09-09 Thread Uma Krishnan
On 9/2/2016 3:40 PM, Uma Krishnan wrote: From: "Matthew R. Ochs" <mro...@linux.vnet.ibm.com> Commit 964497b3bf3f ("cxlflash: Remove dual port online dependency") logically removed the ability for the WWPN setup routine afu_set_wwpn() to return a non-success valu

Re: [PATCH 3/6] cxlflash: Fix to avoid EEH and host reset collisions

2016-09-09 Thread Uma Krishnan
On 9/2/2016 3:39 PM, Uma Krishnan wrote: From: "Matthew R. Ochs" <mro...@linux.vnet.ibm.com> The EEH reset handler is ignorant to the current state of the driver when processing a frozen event and initiating a device reset. This can be an issue if an EEH event occurs while

Re: [PATCH 6/6] cxlflash: Fix context reference tracking on detach

2016-09-09 Thread Uma Krishnan
On 9/2/2016 3:40 PM, Uma Krishnan wrote: From: "Matthew R. Ochs" <mro...@linux.vnet.ibm.com> Commit 888baf069f49 ("scsi: cxlflash: Add kref to context") introduced a kref to the context. In particular, the detach routine was updated to use the kref service

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

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

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

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

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

2016-11-28 Thread Uma Krishnan
long as only a single reset request is active at any one point in time. This commit simplifies the reset routine by removing the wait for command room. Additionally it adds a debug trace to help pinpoint hardware errors when a context reset does not complete. Signed-off-by: Uma Krishnan <u

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

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

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

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

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

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

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

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

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

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

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

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

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

2016-11-28 Thread Uma Krishnan
of cached value also takes into account the current thread consuming a hardware command. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/common.h | 4 +-- drivers/scsi/cxlflash/main.c | 66 -- 2 files chang

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

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

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

2016-11-28 Thread Uma Krishnan
recovery operation. To fix this issue, the local LUN information structure is updated to reflect the LUN is no longer in the LUN table once all references to the LUN are gone. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> Acked-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> ---

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

2016-11-28 Thread Uma Krishnan
of values results in the Oops above. To resolve this issue, sg_tablesize for cxlflash can simply be set to 1, a value which satisfies the constraints in cxlflash and the lack of support of SG_NONE in SCSI blk_mq. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> Acked-by: Matthew R

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

2016-11-28 Thread Uma Krishnan
pointer to AFU command Uma Krishnan (4): cxlflash: Set sg_tablesize to 1 instead of SG_NONE cxlflash: Fix crash in cxlflash_restore_luntable() cxlflash: Improve context_reset() logic cxlflash: Avoid command room violation drivers/scsi/cxlflash/common.h | 39 ++-- drivers/scsi/cxlflash

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

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

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

2016-11-17 Thread Uma Krishnan
Thanks for catching this Matt. Looking into this. Will send out a V2. On 11/17/2016 1:36 PM, Matthew R. Ochs wrote: Hi Uma, I do see a potential hang issue with this patch. See my comments below. -matt On Nov 15, 2016, at 5:14 PM, Uma Krishnan <ukri...@linux.vnet.ibm.com> wrote:

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

2016-11-15 Thread Uma Krishnan
AFU command lock cxlflash: Cleanup send_tmf() cxlflash: Cleanup queuecommand() cxlflash: Migrate IOARRIN specific routines to function pointers cxlflash: Migrate scsi command pointer to AFU command Uma Krishnan (4): cxlflash: Set sg_tablesize to 1 instead of SG_NONE cxlflash: Fix crash

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

2016-11-15 Thread Uma Krishnan
of values results in the Oops above. To resolve this issue, sg_tablesize for cxlflash can simply be set to 1, a value which satisfies the constraints in cxlflash and the lack of support of SG_NONE in SCSI blk_mq. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cx

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

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

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

2016-11-15 Thread Uma Krishnan
/exchange, the cached value can be incorrectly clobbered. To correct these issues, the runtime updates of the cached command room are updated to use atomic64_cmpxchg() and the send routine is updated to take into account the current thread consuming a hardware command. Signed-off-by: Uma

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

2016-11-15 Thread Uma Krishnan
recovery operation. To fix this issue, the local LUN information structure is updated to reflect the LUN is no longer in the LUN table once all references to the LUN are gone. Signed-off-by: Uma Krishnan <ukri...@linux.vnet.ibm.com> --- drivers/scsi/cxlflash/lunmgt.c | 6 ++ 1 file chan

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

2016-11-15 Thread Uma Krishnan
long as only a single reset request is active at any one point in time. This commit simplifies the reset routine by removing the wait for command room. Additionally it adds a debug trace to help pinpoint hardware errors when a context reset does not complete. Signed-off-by: Uma Krishnan <u

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

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

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

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> -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo inf

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> -- To unsu

  1   2   3   >