Re: [PATCH] ibmvscsi: use GFP_KERNEL with dma_alloc_coherent in initialize_event_pool

2021-10-20 Thread Martin K. Petersen
On Wed, 9 Jan 2019 18:59:09 -0800, Tyrel Datwyler wrote:

> During driver probe we allocate a dma region for our event pool.
> Currently, zero is passed for the gfp_flags parameter. Driver probe
> callbacks run in process context and we hold no locks so we can sleep
> here if necessary.
> 
> Fix by passing GFP_KERNEL explicitly to dma_alloc_coherent().
> 
> [...]

Applied to 5.16/scsi-queue, thanks!

[1/1] ibmvscsi: use GFP_KERNEL with dma_alloc_coherent in initialize_event_pool
  https://git.kernel.org/mkp/scsi/c/3319a8ba82b9

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] ibmvscsi: use GFP_KERNEL with dma_alloc_coherent in initialize_event_pool

2021-10-16 Thread Martin K. Petersen


Michael,

> It's marked "Changes Requested" here:

Not sure why.

Applied to 5.16/scsi-staging, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: ibmvfc: Stop using scsi_cmnd.tag

2021-08-24 Thread Martin K. Petersen
On Tue, 17 Aug 2021 21:43:37 +0800, John Garry wrote:

> Use scsi_cmd_to_rq(scsi_cmnd)->tag in preference to scsi_cmnd.tag.
> 
> 
> 
> 

Applied to 5.15/scsi-queue, thanks!

[1/1] scsi: ibmvfc: Stop using scsi_cmnd.tag
  https://git.kernel.org/mkp/scsi/c/6a036ce0e25c

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: ibmvfc: Stop using scsi_cmnd.tag

2021-08-17 Thread Martin K. Petersen


John,

> Use scsi_cmd_to_rq(scsi_cmnd)->tag in preference to scsi_cmnd.tag.

Applied to 5.15/scsi-staging and rebased for bisectability.

Just to be picky it looks like there's another scsi_cmmd tag lurking in
qla1280.c but it's sitting behind an #ifdef DEBUG_QLA1280.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] ibmvfc: fix command state accounting and stale response detection

2021-07-28 Thread Martin K. Petersen
On Fri, 16 Jul 2021 14:52:20 -0600, Tyrel Datwyler wrote:

> Prior to commit 1f4a4a19508d ("scsi: ibmvfc: Complete commands outside
> the host/queue lock") responses to commands were completed sequentially
> with the host lock held such that a command had a basic binary state of
> active or free. It was therefore a simple affair of ensuring the
> assocaiated ibmvfc_event to a VIOS response was valid by testing that it
> was not already free. The lock relexation work to complete commands
> outside the lock inadverdently made it a trinary command state such that
> a command is either in flight, received and being completed, or
> completed and now free. This breaks the stale command detection logic as
> a command may be still marked active and been placed on the delayed
> completion list when a second stale response for the same command
> arrives. This can lead to double completions and list corruption. This
> issue was exposed by a recent VIOS regression were a missing memory
> barrier could occasionally result in the ibmvfc client receiveing a
> duplicate response for the same command.
> 
> [...]

Applied to 5.14/scsi-fixes, thanks!

[1/1] ibmvfc: fix command state accounting and stale response detection
      https://git.kernel.org/mkp/scsi/c/73bfdf707d01

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: switch the block layer to use kmap_local_page v2

2021-06-16 Thread Martin K. Petersen


Christoph,

> this series switches the core block layer code and all users of the
> existing bvec kmap helpers to use kmap_local_page.  Drivers that
> currently use open coded kmap_atomic calls will converted in a follow
> on series.

Looks OK to me.

Reviewed-by: Martin K. Petersen 

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] ibmvfc: Fix invalid state machine BUG_ON

2021-04-15 Thread Martin K. Petersen
On Mon, 12 Apr 2021 18:10:09 -0600, Tyrel Datwyler wrote:

> This fixes an issue hitting the BUG_ON in ibmvfc_do_work. When
> going through a host action of IBMVFC_HOST_ACTION_RESET,
> we change the action to IBMVFC_HOST_ACTION_TGT_DEL,
> then drop the host lock, and reset the CRQ, which changes
> the host state to IBMVFC_NO_CRQ. If, prior to setting the
> host state to IBMVFC_NO_CRQ, ibmvfc_init_host is called,
> it can then end up changing the host action to IBMVFC_HOST_ACTION_INIT.
> If we then change the host state to IBMVFC_NO_CRQ, we will then
> hit the BUG_ON. This patch makes a couple of changes to avoid this.
> It leaves the host action to be IBMVFC_HOST_ACTION_RESET
> or IBMVFC_HOST_ACTION_REENABLE until after we drop the host
> lock and reset or reenable the CRQ. It also hardens the
> host state machine to ensure we cannot leave the reset / reenable
> state until we've finished processing the reset or reenable.

Applied to 5.13/scsi-queue, thanks!

[1/1] ibmvfc: Fix invalid state machine BUG_ON
  https://git.kernel.org/mkp/scsi/c/15cfef8623a4

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] ibmvfc: Fix invalid state machine BUG_ON

2021-04-12 Thread Martin K. Petersen


Tyrel,

> This fixes an issue hitting the BUG_ON in ibmvfc_do_work. When going
> through a host action of IBMVFC_HOST_ACTION_RESET, we change the
> action to IBMVFC_HOST_ACTION_TGT_DEL, then drop the host lock, and
> reset the CRQ, which changes the host state to IBMVFC_NO_CRQ.

[...]

Applied to 5.13/scsi-staging, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: ibmvscsi: delete the useless casting value returned

2021-03-29 Thread Martin K. Petersen
On Fri, 12 Mar 2021 10:18:53 +0800, Wang Qing wrote:

> Fix the following coccicheck warning:
> WARNING: casting value returned by memory allocation function is useless.

Applied to 5.13/scsi-queue, thanks!

[1/1] scsi: ibmvscsi: delete the useless casting value returned
  https://git.kernel.org/mkp/scsi/c/0d556a21a9da

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 00/36] [Set 4] Rid W=1 warnings in SCSI

2021-03-24 Thread Martin K. Petersen
ain the function name
https://git.kernel.org/mkp/scsi/c/2efd8631d6a5
[19/36] scsi: isci: phy: Provide function name and demote non-conforming header
https://git.kernel.org/mkp/scsi/c/6ab7ca5139b7
[20/36] scsi: isci: request: Fix a myriad of kernel-doc issues
https://git.kernel.org/mkp/scsi/c/db35a0835357
[21/36] scsi: isci: host: Fix bunch of kernel-doc related issues
https://git.kernel.org/mkp/scsi/c/44b7ca966128
[22/36] scsi: isci: task: Demote non-conformant header and remove superfluous 
param
https://git.kernel.org/mkp/scsi/c/0afdee03f2e7
[23/36] scsi: isci: remote_node_table: Fix a bunch of kernel-doc misdemeanours
https://git.kernel.org/mkp/scsi/c/103d61927ed3
[24/36] scsi: isci: remote_node_context: Fix one function header and demote a 
couple more
https://git.kernel.org/mkp/scsi/c/ad276048f1bc
[25/36] scsi: isci: port_config: Fix a bunch of doc-rot and demote abuses
https://git.kernel.org/mkp/scsi/c/29faa5ce26ae
[26/36] scsi: isci: remote_device: Fix a bunch of doc-rot issues
https://git.kernel.org/mkp/scsi/c/242e15d7a4f4
[27/36] scsi: isci: request: Fix doc-rot issue relating to 'ireq' param
https://git.kernel.org/mkp/scsi/c/a8604e44514d
[28/36] scsi: isci: port: Fix a bunch of kernel-doc issues
https://git.kernel.org/mkp/scsi/c/7292a8b039c5
[29/36] scsi: isci: remote_node_context: Demote kernel-doc abuse
https://git.kernel.org/mkp/scsi/c/d2d480f132e8
[30/36] scsi: isci: remote_node_table: Provide some missing params and remove 
others
https://git.kernel.org/mkp/scsi/c/188f513dd22c
[31/36] scsi: cxlflash: main: Fix a little do-rot
https://git.kernel.org/mkp/scsi/c/cf0ad7a15ac5
[32/36] scsi: cxlflash: superpipe: Fix a few misnaming issues
https://git.kernel.org/mkp/scsi/c/32b3edfd28f8
[33/36] scsi: ibmvscsi: Fix a bunch of kernel-doc related issues
https://git.kernel.org/mkp/scsi/c/841d7df0d416
[34/36] scsi: ibmvscsi: ibmvfc: Fix a bunch of misdocumentation
https://git.kernel.org/mkp/scsi/c/dd9c77297148
[35/36] scsi: ibmvscsi_tgt: ibmvscsi_tgt: Remove duplicate section 'NOTE'
https://git.kernel.org/mkp/scsi/c/cba3ebfc008e
[36/36] scsi: cxlflash: vlun: Fix some misnaming related doc-rot
https://git.kernel.org/mkp/scsi/c/a690baa47fd1

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 0/2] Fix EH race and MQ support

2021-03-24 Thread Martin K. Petersen
On Fri, 19 Mar 2021 14:50:27 -0600, Tyrel Datwyler wrote:

> Changes to the locking pattern protecting the event lists and handling of scsi
> command completion introduced a race where an ouststanding command that EH is
> waiting ifor to complete is no longer identifiable by being on the sent list, 
> but
> instead as a command that is not on the free list. This is a result of moving
> commands to be completed off the sent list to a private list to be completed
> outside the list lock.
> 
> [...]

Applied to 5.12/scsi-fixes, thanks!

[1/2] ibmvfc: fix potential race in ibmvfc_wait_for_ops
  https://git.kernel.org/mkp/scsi/c/8b1c9b202549
[2/2] ibmvfc: make ibmvfc_wait_for_ops MQ aware
  https://git.kernel.org/mkp/scsi/c/62fc2661482b

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 00/36] [Set 4] Rid W=1 warnings in SCSI

2021-03-18 Thread Martin K. Petersen


Lee,

> This set is part of a larger effort attempting to clean-up W=1 kernel
> builds, which are currently overwhelmingly riddled with niggly little
> warnings.

Applied to 5.13/scsi-staging, thanks! I fixed a few little things.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: ibmvfc: Switch to using the new API kobj_to_dev()

2021-03-16 Thread Martin K. Petersen
On Mon, 22 Feb 2021 14:47:09 +0800, Yang Li wrote:

> fixed the following coccicheck:
> ./drivers/scsi/ibmvscsi/ibmvfc.c:3161:60-61: WARNING opportunity for
> kobj_to_dev()

Applied to 5.13/scsi-queue, thanks!

[1/1] scsi: ibmvfc: Switch to using the new API kobj_to_dev()
  https://git.kernel.org/mkp/scsi/c/18c2a59a4190

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: ibmvfc: Switch to using the new API kobj_to_dev()

2021-03-15 Thread Martin K. Petersen
On Thu, 4 Mar 2021 17:28:44 +0800, Jiapeng Chong wrote:

> Fix the following coccicheck warnings:
> 
> ./drivers/scsi/ibmvscsi/ibmvfc.c:3483:60-61: WARNING opportunity for
> kobj_to_dev().

Applied to 5.13/scsi-queue, thanks!

[1/1] scsi: ibmvfc: Switch to using the new API kobj_to_dev()
  https://git.kernel.org/mkp/scsi/c/18c2a59a4190

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] ibmvfc: free channel_setup_buf during device tear down

2021-03-15 Thread Martin K. Petersen
On Wed, 10 Mar 2021 19:22:12 -0600, Tyrel Datwyler wrote:

> The buffer for negotiating channel setup is DMA allocated at device
> probe time. However, the remove path fails to free this allocation which
> will prevent the hypervisor from releasing the virtual device in the
> case of a hotplug remove.
> 
> Fix this issue by freeing the buffer allocation in ibmvfc_free_mem().

Applied to 5.12/scsi-fixes, thanks!

[1/1] ibmvfc: free channel_setup_buf during device tear down
  https://git.kernel.org/mkp/scsi/c/febb0cc847e7

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v5 0/5] ibmvfc: hard reset fixes

2021-03-03 Thread Martin K. Petersen
On Tue, 2 Mar 2021 17:05:38 -0600, Tyrel Datwyler wrote:

> This series contains a minor simplification of ibmvfc_init_sub_crqs() followed
> by a couple fixes for sub-CRQ handling which effect hard reset of the
> client/host adapter CRQ pair.
> 
> changes in v5:
> Patches 2-5: Corrected upstream commit ids for Fixes: tags
> 
> [...]

Applied to 5.12/scsi-fixes, thanks!

[1/5] ibmvfc: simplify handling of sub-CRQ initialization
  https://git.kernel.org/mkp/scsi/c/2e415356fd6f
[2/5] ibmvfc: fix invalid sub-CRQ handles after hard reset
  https://git.kernel.org/mkp/scsi/c/2de4c19179b1
[3/5] ibmvfc: treat H_CLOSED as success during sub-CRQ registration
  https://git.kernel.org/mkp/scsi/c/98cf9a92b8d6
[4/5] ibmvfc: store return code of H_FREE_SUB_CRQ during cleanup
  https://git.kernel.org/mkp/scsi/c/5bc26ea9498a
[5/5] ibmvfc: reinitialize sub-CRQs and perform channel enquiry after LPM
  https://git.kernel.org/mkp/scsi/c/f4c5e949056d

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH][next] scsi: ibmvfc: Fix spelling mistake "succeded" -> "succeeded"

2021-01-22 Thread Martin K. Petersen
On Mon, 18 Jan 2021 11:13:46 +, Colin King wrote:

> There is a spelling mistake in a ibmvfc_dbg debug message. Fix it.

Applied to 5.12/scsi-queue, thanks!

[1/1] scsi: ibmvfc: Fix spelling mistake "succeded" -> "succeeded"
  https://git.kernel.org/mkp/scsi/c/ff79acc49af8

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v5 00/21] ibmvfc: initial MQ development/enablement

2021-01-20 Thread Martin K. Petersen
On Thu, 14 Jan 2021 14:31:27 -0600, Tyrel Datwyler wrote:

> Recent updates in pHyp Firmware and VIOS releases provide new infrastructure
> towards enabling Subordinate Command Response Queues (Sub-CRQs) such that each
> Sub-CRQ is a channel backed by an actual hardware queue in the FC stack on the
> partner VIOS. Sub-CRQs are registered with the firmware via hypercalls and 
> then
> negotiated with the VIOS via new Management Datagrams (MADs) for channel 
> setup.
> 
> This initial implementation adds the necessary Sub-CRQ framework and 
> implements
> the new MADs for negotiating and assigning a set of Sub-CRQs to associated 
> VIOS
> HW backed channels.
> 
> [...]

Applied to 5.12/scsi-queue, thanks!

[01/21] ibmvfc: add vhost fields and defaults for MQ enablement
https://git.kernel.org/mkp/scsi/c/6ae208e5d2db
[02/21] ibmvfc: move event pool init/free routines
https://git.kernel.org/mkp/scsi/c/225acf5f1aba
[03/21] ibmvfc: init/free event pool during queue allocation/free
https://git.kernel.org/mkp/scsi/c/003d91a1393d
[04/21] ibmvfc: add size parameter to ibmvfc_init_event_pool
https://git.kernel.org/mkp/scsi/c/bb35ecb2a949
[05/21] ibmvfc: define hcall wrapper for registering a Sub-CRQ
https://git.kernel.org/mkp/scsi/c/9e6b6b81aafa
[06/21] ibmvfc: add Subordinate CRQ definitions
https://git.kernel.org/mkp/scsi/c/6d07f129dce2
[07/21] ibmvfc: add alloc/dealloc routines for SCSI Sub-CRQ Channels
https://git.kernel.org/mkp/scsi/c/3034ebe26389
[08/21] ibmvfc: add Sub-CRQ IRQ enable/disable routine
https://git.kernel.org/mkp/scsi/c/d20046e64c09
[09/21] ibmvfc: add handlers to drain and complete Sub-CRQ responses
https://git.kernel.org/mkp/scsi/c/1d956ad853fc
[10/21] ibmvfc: define Sub-CRQ interrupt handler routine
https://git.kernel.org/mkp/scsi/c/80a9e8eaed63
[11/21] ibmvfc: map/request irq and register Sub-CRQ interrupt handler
https://git.kernel.org/mkp/scsi/c/39e461fddff0
[12/21] ibmvfc: implement channel enquiry and setup commands
https://git.kernel.org/mkp/scsi/c/e95eef3fc0bc
[13/21] ibmvfc: advertise client support for using hardware channels
https://git.kernel.org/mkp/scsi/c/c53408baa502
[14/21] ibmvfc: set and track hw queue in ibmvfc_event struct
https://git.kernel.org/mkp/scsi/c/cb72477be729
[15/21] ibmvfc: send commands down HW Sub-CRQ when channelized
https://git.kernel.org/mkp/scsi/c/31750fbd7b6d
[16/21] ibmvfc: register Sub-CRQ handles with VIOS during channel setup
https://git.kernel.org/mkp/scsi/c/b88a5d9b7f56
[17/21] ibmvfc: add cancel mad initialization helper
https://git.kernel.org/mkp/scsi/c/a61236da7f9c
[18/21] ibmvfc: send Cancel MAD down each hw scsi channel
https://git.kernel.org/mkp/scsi/c/a835f386f970
[19/21] ibmvfc: purge scsi channels after transport loss/reset
https://git.kernel.org/mkp/scsi/c/7eb3ccd884ae
[20/21] ibmvfc: enable MQ and set reasonable defaults
https://git.kernel.org/mkp/scsi/c/9000cb998bcf
[21/21] ibmvfc: provide modules parameters for MQ settings
https://git.kernel.org/mkp/scsi/c/032d1900869f

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH][next] scsi: ibmvfc: Fix spelling mistake "succeded" -> "succeeded"

2021-01-20 Thread Martin K. Petersen


Colin,

> There is a spelling mistake in a ibmvfc_dbg debug message. Fix it.

Applied to 5.12/scsi-staging, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v5 00/21] ibmvfc: initial MQ development/enablement

2021-01-14 Thread Martin K. Petersen


Tyrel,

> Recent updates in pHyp Firmware and VIOS releases provide new
> infrastructure towards enabling Subordinate Command Response Queues
> (Sub-CRQs) such that each Sub-CRQ is a channel backed by an actual
> hardware queue in the FC stack on the partner VIOS. Sub-CRQs are
> registered with the firmware via hypercalls and then negotiated with
> the VIOS via new Management Datagrams (MADs) for channel setup.
>
> This initial implementation adds the necessary Sub-CRQ framework and
> implements the new MADs for negotiating and assigning a set of
> Sub-CRQs to associated VIOS HW backed channels.

Applied to 5.12/scsi-staging, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v2 0/5] ibmvfc: MQ preparatory locking work

2021-01-12 Thread Martin K. Petersen
On Wed, 6 Jan 2021 14:18:30 -0600, Tyrel Datwyler wrote:

> The ibmvfc driver in its current form relies heavily on the host_lock. This
> patchset introduces a genric queue with its own queue lock and sent/free event
> list locks. This generic queue allows the driver to decouple the primary queue
> and future subordinate queues from the host lock reducing lock contention 
> while
> also relaxing locking for submissions and completions to simply the list lock 
> of
> the queue in question.
> 
> [...]

Applied to 5.12/scsi-queue, thanks!

[1/5] ibmvfc: define generic queue structure for CRQs
  https://git.kernel.org/mkp/scsi/c/f8968665af28
[2/5] ibmvfc: make command event pool queue specific
  https://git.kernel.org/mkp/scsi/c/e4b26f3db864
[3/5] ibmvfc: define per-queue state/list locks
  https://git.kernel.org/mkp/scsi/c/57e80e0bc108
[4/5] ibmvfc: complete commands outside the host/queue lock
  https://git.kernel.org/mkp/scsi/c/1f4a4a19508d
[5/5] ibmvfc: relax locking around ibmvfc_queuecommand
  https://git.kernel.org/mkp/scsi/c/654080d02edb

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v2 0/5] ibmvfc: MQ preparatory locking work

2021-01-07 Thread Martin K. Petersen


Tyrel,

> The ibmvfc driver in its current form relies heavily on the
> host_lock. This patchset introduces a genric queue with its own queue
> lock and sent/free event list locks. This generic queue allows the
> driver to decouple the primary queue and future subordinate queues
> from the host lock reducing lock contention while also relaxing
> locking for submissions and completions to simply the list lock of the
> queue in question.

Applied to 5.12/scsi-staging, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] ibmvfc: fix missing cast of ibmvfc_event pointer to u64 handle

2021-01-07 Thread Martin K. Petersen
On Wed, 6 Jan 2021 14:37:21 -0600, Tyrel Datwyler wrote:

> Commit 2aa0102c6688 ("scsi: ibmvfc: Use correlation token to tag
> commands") sets the vfcFrame correlation token to the pointer handle of
> the associated ibmvfc_event. However, that commit failed to cast the
> pointer to an appropriate type which in this case is a u64. As such
> sparse warnings are generated for both correlation token assignments.
> 
>  ibmvfc.c:2375:36: sparse: incorrect type in argument 1 (different base types)
>  ibmvfc.c:2375:36: sparse: expected unsigned long long [usertype] val
>  ibmvfc.c:2375:36: sparse: got struct ibmvfc_event *[assigned] evt
> 
> [...]

Applied to 5.11/scsi-fixes, thanks!

[1/1] ibmvfc: fix missing cast of ibmvfc_event pointer to u64 handle
  https://git.kernel.org/mkp/scsi/c/901d01c8e50c

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v2 4/5] ibmvfc: complete commands outside the host/queue lock

2021-01-05 Thread Martin K. Petersen


Tyrel,

> Drain the command queue and place all commands on a completion list.
> Perform command completion on that list outside the host/queue locks.
> Further, move purged command compeletions outside the host_lock as well.

Please resubmit entire series instead of amending individual patches.

thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v3 0/6] ibmvfc: Protocol definition updates and new targetWWPN Support

2020-11-23 Thread Martin K. Petersen
On Tue, 17 Nov 2020 19:10:58 -0600, Tyrel Datwyler wrote:

> Several Management Datagrams (MADs) have been reversioned to add a targetWWPN
> field that is intended to better identify a target over in place of the 
> scsi_id.
> This patchset adds the new protocol definitions and implements support for 
> using
> the new targetWWPN field and exposing the capability to the VIOS. This
> targetWWPN support is a prerequisuite for upcoming channelization/MQ support.
> 
> changes in v3:
> * addressed field naming consistency in Patches 2 & 5 in response to [brking]
> * fixed commit log typos
> * fixed bad rebase of Patch 4 such that it now compiles
> 
> [...]

Applied to 5.11/scsi-queue, thanks!

[1/6] scsi: ibmvfc: Deduplicate common ibmvfc_cmd init code
  https://git.kernel.org/mkp/scsi/c/fad74a1be2db
[2/6] scsi: ibmvfc: Add new fields for version 2 of several MADs
  https://git.kernel.org/mkp/scsi/c/c16b8a6d8af1
[3/6] scsi: ibmvfc: Add helper for testing capability flags
  https://git.kernel.org/mkp/scsi/c/a318c2b71cce
[4/6] scsi: ibmvfc: Add FC payload retrieval routines for versioned vfcFrames
  https://git.kernel.org/mkp/scsi/c/5a9d16f71c26
[5/6] scsi: ibmvfc: Add support for target_wwpn field in v2 MADs and vfcFrame
  https://git.kernel.org/mkp/scsi/c/ebc7c74bd2dc
[6/6] scsi: ibmvfc: Advertise client support for targetWWPN using v2 commands
  https://git.kernel.org/mkp/scsi/c/e4af87b7079e

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 1/3] ibmvfc: byte swap login_buf.resp values in attribute show functions

2020-11-23 Thread Martin K. Petersen
On Tue, 17 Nov 2020 12:50:29 -0600, Tyrel Datwyler wrote:

> Both ibmvfc_show_host_(capabilities|npiv_version) functions retrieve
> values from vhost->login_buf.resp buffer. This is the MAD response
> buffer from the VIOS and as such any multi-byte non-string values are in
> big endian format.
> 
> Byte swap these values to host cpu endian format for better human
> readability.

Applied to 5.11/scsi-queue, thanks!

[1/3] scsi: ibmvfc: Byte swap login_buf.resp values in attribute show functions
  https://git.kernel.org/mkp/scsi/c/61bdb4eec8d1
[2/3] scsi: ibmvfc: Remove trailing semicolon
  https://git.kernel.org/mkp/scsi/c/4e0716199ab6
[3/3] scsi: ibmvfc: Use correlation token to tag commands
  https://git.kernel.org/mkp/scsi/c/2aa0102c6688

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v3 0/6] ibmvfc: Protocol definition updates and new targetWWPN Support

2020-11-19 Thread Martin K. Petersen


Tyrel,

> Several Management Datagrams (MADs) have been reversioned to add a
> targetWWPN field that is intended to better identify a target over in
> place of the scsi_id.  This patchset adds the new protocol definitions
> and implements support for using the new targetWWPN field and exposing
> the capability to the VIOS. This targetWWPN support is a prerequisuite
> for upcoming channelization/MQ support.

Applied to 5.11/scsi-staging, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 1/3] ibmvfc: byte swap login_buf.resp values in attribute show functions

2020-11-19 Thread Martin K. Petersen


Tyrel,

> Both ibmvfc_show_host_(capabilities|npiv_version) functions retrieve
> values from vhost->login_buf.resp buffer. This is the MAD response
> buffer from the VIOS and as such any multi-byte non-string values are in
> big endian format.

Applied 1-3 to 5.11/scsi-staging, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 1/6] ibmvfc: byte swap login_buf.resp values in attribute show functions

2020-11-16 Thread Martin K. Petersen


Tyrel,

> The checkpatch script only warns at 100 char lines these days. To be
> fair though I did have two lines go over that limit by a couple
> characters, there are a couple commit log typos, and I had an if
> keyword with no space after before the opening parenthesis. So, I'll
> happily re-spin.

Please tweak the little things that need fixing and resubmit.

> However, for my info going forward is the SCSI subsystem sticking to
> 80 char lines as a hard limit?

As far as I'm concerned the 80 char limit is mainly about ensuring that
the code is structured in a sensible way. Typesetting best practices
also suggest that longer lines are harder to read. So while I generally
don't strictly enforce the 80 char limit for drivers, I do push back if
I feel that readability could be improved by breaking the line or
restructuring the code.

Use your best judgment to optimize for readability.

Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] ibmvfc: add new fields for version 2 of several MADs

2020-10-29 Thread Martin K. Petersen


Tyrel,

> I'm going to have to ask that this patch be unstaged.

Done!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] ibmvfc: add new fields for version 2 of several MADs

2020-10-26 Thread Martin K. Petersen


Tyrel,

> Introduce a targetWWPN field to several MADs. Its possible that a scsi
> ID of a target can change due to some fabric changes. The WWPN of the
> scsi target provides a better way to identify the target. Also, add
> flags for receiving MAD versioning information and advertising client
> support for targetWWPN with the VIOS. This latter capability flag will
> be required for future clients capable of requesting multiple hardware
> queues from the host adapter.

Applied to 5.11/scsi-staging, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] ibmvscsi: fix race potential race after loss of transport

2020-10-26 Thread Martin K. Petersen


Tyrel,

> After a loss of tranport due to an adatper migration or
> crash/disconnect from the host partner there is a tiny window where we
> can race adjusting the request_limit of the adapter.

Applied to 5.10/scsi-fixes, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] ibmvfc: Protect vhost->task_set increment by the host lock

2020-09-29 Thread Martin K. Petersen
On Wed, 16 Sep 2020 15:09:59 -0500, Brian King wrote:

> In the discovery thread, ibmvfc does a vhost->task_set++ without
> any lock held. This could result in two targets getting the same
> cancel key, which could have strange effects in error recovery.
> The actual probability of this occurring should be extremely
> small, since this should all be done in a single threaded loop
> from the discovery thread, but let's fix it up anyway to be safe.

Applied to 5.10/scsi-queue, thanks!

[1/1] scsi: ibmvfc: Protect vhost->task_set increment by the host lock
  https://git.kernel.org/mkp/scsi/c/2584e5aef87a

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] ibmvfc: Protect vhost->task_set increment by the host lock

2020-09-22 Thread Martin K. Petersen


Brian,

> In the discovery thread, ibmvfc does a vhost->task_set++ without any
> lock held. This could result in two targets getting the same cancel
> key, which could have strange effects in error recovery.  The actual
> probability of this occurring should be extremely small, since this
> should all be done in a single threaded loop from the discovery
> thread, but let's fix it up anyway to be safe.

Applied to 5.10/scsi-staging, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] ibmvfc: Avoid link down on FS9100 canister reboot

2020-09-21 Thread Martin K. Petersen
On Fri, 11 Sep 2020 16:28:26 -0500, Brian King wrote:

> When a canister on a FS9100, or similar storage, running in NPIV mode,
> is rebooted, its WWPNs will fail over to another canister. When this
> occurs, we see a WWPN going away from the fabric at one N-Port ID,
> and, a short time later, the same WWPN appears at a different N-Port ID.
> When the canister is fully operational again, the WWPNs fail back to
> the original canister. If there is any I/O outstanding to the target
> when this occurs, it will result in the implicit logout the ibmvfc driver
> issues before removing the rport to fail. When the WWPN then shows up at a
> different N-Port ID, and we issue a PLOGI to it, the VIOS will
> see that it still has a login for this WWPN at the old N-Port ID,
> which results in the VIOS simulating a link down / link up sequence
> to the client, in order to get the VIOS and client LPAR in sync.
> 
> [...]

Applied to 5.10/scsi-queue, thanks!

[1/1] scsi: ibmvfc: Avoid link down on FS9100 canister reboot
  https://git.kernel.org/mkp/scsi/c/4b29cb6197d9

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] ibmvfc: Avoid link down on FS9100 canister reboot

2020-09-15 Thread Martin K. Petersen


Brian,

> When a canister on a FS9100, or similar storage, running in NPIV mode,
> is rebooted, its WWPNs will fail over to another canister.

[...]

Applied to 5.10/scsi-staging, thanks! I fixed a bunch of checkpatch
warnings.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: ibmvfc: Fix error return in ibmvfc_probe()

2020-09-15 Thread Martin K. Petersen
On Mon, 7 Sep 2020 16:39:49 +0800, Jing Xiangfeng wrote:

> Fix to return error code PTR_ERR() from the error handling case instead
> of 0.

Applied to 5.10/scsi-queue, thanks!

[1/1] scsi: ibmvfc: Fix error return in ibmvfc_probe()
  https://git.kernel.org/mkp/scsi/c/5e48a084f4e8

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: ibmvfc: Fix error return in ibmvfc_probe()

2020-09-09 Thread Martin K. Petersen


Jing,

> Fix to return error code PTR_ERR() from the error handling case instead
> of 0.

Applied to 5.10/scsi-staging. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 00/29] treewide: Convert comma separated statements

2020-09-08 Thread Martin K. Petersen
On Mon, 24 Aug 2020 21:55:57 -0700, Joe Perches wrote:

> There are many comma separated statements in the kernel.
> See:https://lore.kernel.org/lkml/alpine.DEB.2.22.394.2008201856110.2524@hadrien/
> 
> Convert the comma separated statements that are in if/do/while blocks
> to use braces and semicolons.
> 
> Many comma separated statements still exist but those are changes for
> another day.
> 
> [...]

Applied to 5.10/scsi-queue, thanks!

[01/29] coding-style.rst: Avoid comma statements
(no commit info)
[02/29] alpha: Avoid comma separated statements
(no commit info)
[03/29] ia64: Avoid comma separated statements
(no commit info)
[04/29] sparc: Avoid comma separated statements
(no commit info)
[05/29] ata: Avoid comma separated statements
(no commit info)
[06/29] drbd: Avoid comma separated statements
(no commit info)
[07/29] lp: Avoid comma separated statements
(no commit info)
[08/29] dma-buf: Avoid comma separated statements
(no commit info)
[09/29] drm/gma500: Avoid comma separated statements
(no commit info)
[10/29] drm/i915: Avoid comma separated statements
(no commit info)
[11/29] hwmon: (scmi-hwmon): Avoid comma separated statements
(no commit info)
[12/29] Input: MT - Avoid comma separated statements
(no commit info)
[13/29] bcache: Avoid comma separated statements
(no commit info)
[14/29] media: Avoid comma separated statements
(no commit info)
[15/29] mtd: Avoid comma separated statements
(no commit info)
[16/29] 8390: Avoid comma separated statements
(no commit info)
[17/29] fs_enet: Avoid comma separated statements
(no commit info)
[18/29] wan: sbni: Avoid comma separated statements
(no commit info)
[19/29] s390/tty3270: Avoid comma separated statements
(no commit info)
[20/29] scsi: arm: Avoid comma separated statements
https://git.kernel.org/mkp/scsi/c/a08a07326510
[21/29] media: atomisp: Avoid comma separated statements
(no commit info)
[22/29] video: fbdev: Avoid comma separated statements
(no commit info)
[23/29] fuse: Avoid comma separated statements
(no commit info)
[24/29] reiserfs: Avoid comma separated statements
(no commit info)
[25/29] lib/zlib: Avoid comma separated statements
(no commit info)
[26/29] lib: zstd: Avoid comma separated statements
(no commit info)
[27/29] ipv6: fib6: Avoid comma separated statements
(no commit info)
[28/29] sunrpc: Avoid comma separated statements
(no commit info)
[29/29] tools: Avoid comma separated statements
    (no commit info)

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v3 1/2] scsi: ibmvfc: use compiler attribute defines instead of __attribute__()

2020-09-08 Thread Martin K. Petersen


Tyrel,

> Update ibmvfc.h structs to use the preferred  __packed and __aligned()
> attribute macros defined in include/linux/compiler_attributes.h in place
> of __attribute__().

Applied 1+2 to my 5.10 staging tree. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v2] scsi: ibmvfc: interface updates for future FPIN and MQ support

2020-09-02 Thread Martin K. Petersen


Tyrel,

>   Fixup complier errors from neglected commit --amend

Bunch of formatting-related checkpatch warnings. Please fix.

Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 00/20] Documentation: eliminate duplicated words

2020-07-08 Thread Martin K. Petersen
On Tue, 7 Jul 2020 11:03:54 -0700, Randy Dunlap wrote:

> Drop doubled words in various parts of Documentation/.
> 
> [...]

Applied to 5.9/scsi-queue, thanks!

[17/20] scsi: advansys: docs: Eliminate duplicated word
https://git.kernel.org/mkp/scsi/c/3010dfb0b77c

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: target/sbp: remove firewire SBP target driver

2020-06-16 Thread Martin K. Petersen


Chris,

> I don't especially want it to be gone, nor can I be sure there are no
> users of what is as far as I can tell a working piece of code. I can
> tell you that I never hear about it (other than the odd patch),
> whereas I do get emails out of the blue for some of my other (much
> smaller) stuff which clearly has users. I'd be just as happy for this
> to be orphaned or for nothing to happen to it.
>
> Honestly, I am totally ambivalent as to what happens to this code.
> Martin, however, clearly cares enough to have asked me to supply a
> patch to remove it.

I love it when people take ownership of old drivers. I think it's
wonderful that Finn and others are on the ball when it comes to the 5380
family. I don't care how old things are as long as they are being
actively used.

I am also very happy to keep things in the tree as long as there is a
healthy community around them. However, keeping code around is not
free. Core interfaces change frequently. Nobody enjoys having to tweak
host templates for 50 devices they have never even heard about. Also, we
now live in a reality where there is a constant barrage of build bots
and code analyzers sending mail. So the effective cost of keeping code
around in the tree is going up. I get a substantial amount of code
analysis mail about drivers nobody have touched in a decade or more.

Consequently, I am much more inclined to remove drivers than I have been
in the past. But I am also very happy to bring them back if somebody
uses them or - even better - are willing to step up and maintain them.

I don't particularly like the notion of a driver being orphaned because
all that really means is that the driver transitions from being (at
least partially) somebody else's problem to being mine and mine alone.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: target/sbp: remove firewire SBP target driver

2020-06-16 Thread Martin K. Petersen


Finn,

> I haven't used this driver for a long time, but I still own PowerMacs
> with firewire, and I know I'm not the only one.

I also have old 1394 hardware kicking around in the basement. But having
worked with FireWire shared storage targets in the past, I have zero
desire to ever touch any of that again.

I could understand an objection if we were to entertain removing
sbp2. But really, how many people are setting up FireWire targets?

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 00/17] spelling.txt: /decriptors/descriptors/

2020-06-15 Thread Martin K. Petersen
On Tue, 9 Jun 2020 13:45:53 +0100, Kieran Bingham wrote:

> I wouldn't normally go through spelling fixes, but I caught sight of
> this typo twice, and then foolishly grepped the tree for it, and saw how
> pervasive it was.
> 
> so here I am ... fixing a typo globally... but with an addition in
> scripts/spelling.txt so it shouldn't re-appear ;-)
> 
> [...]

Applied to 5.9/scsi-queue, thanks!

[06/17] scsi: Fix trivial spelling
https://git.kernel.org/mkp/scsi/c/0a19a725c0ed

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] ibmvscsi: don't send host info in adapter info MAD after LPM

2020-06-09 Thread Martin K. Petersen
On Wed, 3 Jun 2020 15:36:32 -0500, Tyrel Datwyler wrote:

> The adatper info MAD is used to send the client info and receive the
> host info as a response. A peristent buffer is used and as such the
> client info is overwritten after the response. During the course of
> a normal adapter reset the client info is refreshed in the buffer in
> preparation for sending the adapter info MAD.
> 
> However, in the special case of LPM where we reenable the CRQ instead
> of a full CRQ teardown and reset we fail to refresh the client info in
> the adapter info buffer. As a result after Live Partition Migration
> (LPM) we erroneously report the hosts info as our own.

Applied to 5.8/scsi-queue, thanks!

[1/1] scsi: ibmvscsi: Don't send host info in adapter info MAD after LPM
  https://git.kernel.org/mkp/scsi/c/4919b33b63c8

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH -next] scsi: ibmvscsi: Make some functions static

2020-05-26 Thread Martin K. Petersen
On Wed, 20 May 2020 17:10:36 +0800, Chen Tao wrote:

> Fix the following warning:
> 
> drivers/scsi/ibmvscsi/ibmvscsi.c:2387:12: warning: symbol
> 'ibmvscsi_module_init' was not declared. Should it be static?
> drivers/scsi/ibmvscsi/ibmvscsi.c:2409:13: warning: symbol
> 'ibmvscsi_module_exit' was not declared. Should it be static?

Applied to 5.8/scsi-queue, thanks!

[1/1] scsi: ibmvscsi: Make some functions static
  https://git.kernel.org/mkp/scsi/c/1f93ad177d24

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] ibmvfc: don't send implicit logouts prior to NPIV login

2020-04-27 Thread Martin K. Petersen


Tyrel,

> Commit ed830385a2b1 ("scsi: ibmvfc: Avoid loss of all paths during SVC
> node reboot") introduced a regression where when the client resets or
> re-enables its CRQ with the hypervisor there is a chance that if the
> server side doesn't issue its INIT handshake quick enough the client
> can issue an Implicit Logout prior to doing an NPIV Login. The server
> treats this scenario as a protocol violation and closes the CRQ on its
> end forcing the client through a reset that gets the client host state
> and next host action out of agreement leading to a BUG assert.

Applied to 5.7/scsi-fixes, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] ibmvscsi: fix WARN_ON during event pool release

2020-04-27 Thread Martin K. Petersen
On Mon, 27 Apr 2020 15:49:53 -0700, Tyrel Datwyler wrote:

> While removing an ibmvscsi client adapter a WARN_ON like the following
> is seen in the kernel log:

Applied to 5.7/scsi-fixes, thanks!

[1/1] scsi: ibmvscsi: fix WARN_ON during event pool release
  https://git.kernel.org/mkp/scsi/c/cff6a5746645

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: ibmvfc: Mark expected switch fall-throughs

2019-08-07 Thread Martin K. Petersen


Gustavo,

> Mark switch cases where we are expecting to fall through.

Applied to 5.4/scsi-queue, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] ibmvfc: fix WARN_ON during event pool release

2019-07-24 Thread Martin K. Petersen


Tyrel,

> While removing an ibmvfc client adapter a WARN_ON like the following
> WARN_ON is seen in the kernel log:

Applied to 5.3/scsi-fixes, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v3] scsi: ibmvscsi: Don't use rc uninitialized in ibmvscsi_do_work

2019-06-04 Thread Martin K. Petersen


Nathan,

> clang warns:
>
> drivers/scsi/ibmvscsi/ibmvscsi.c:2126:7: warning: variable 'rc' is used
> uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
> case IBMVSCSI_HOST_ACTION_NONE:
>  ^

Applied to 5.3/scsi-queue, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v2 1/3] ibmvscsi: Wire up host_reset() in the drivers scsi_host_template

2019-05-29 Thread Martin K. Petersen


Tyrel,

> Wire up the host_reset function in our driver_template to allow a user
> requested adpater reset via the host_reset sysfs attribute.

Series applied to 5.3/scsi-queue. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 1/4] ibmvfc: Remove "failed" from logged errors

2019-03-27 Thread Martin K. Petersen


Tyrel,

> The text of messages logged with ibmvfc_log_error() always contain the
> term "failed". In the case of cancelled commands during EH they are
> reported back by the VIOS using error codes. This can be confusing to
> somebody looking at these log messages as to whether a command was
> successfully cancelled. The following real log message for example it
> is unclear if the transaction was actaully cancelled.

Applied to 5.1/scsi-fixes. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 1/2] ibmvscsi: Protect ibmvscsi_head from concurrent modificaiton

2019-03-20 Thread Martin K. Petersen


Tyrel,

> For each ibmvscsi host created during a probe or destroyed during a
> remove we either add or remove that host to/from the global
> ibmvscsi_head list. This runs the risk of concurrent modification.
>
> This patch adds a simple spinlock around the list modification calls
> to prevent concurrent updates as is done similarly in the ibmvfc
> driver and ipr driver.

Applied to 5.1/scsi-fixes.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 2/2] ibmvscsi: Fix empty event pool access during host removal

2019-03-20 Thread Martin K. Petersen


Tyrel,

> The event pool used for queueing commands is destroyed fairly early in
> the ibmvscsi_remove() code path. Since, this happens prior to the call
> so scsi_remove_host() it is possible for further calls to queuecommand
> to be processed which manifest as a panic due to a NULL pointer
> dereference as seen here:

Applied to 5.1/scsi-fixes. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: cxlflash: Prevent deadlock when adapter probe fails

2019-02-04 Thread Martin K. Petersen


Vaibhav,

> Presently when an error is encountered during probe of the cxlflash
> adapter, a deadlock is seen with cpu thread stuck inside
> cxlflash_remove(). Below is the trace of the deadlock as logged by
> khungtaskd:

Applied to 5.0/scsi-fixes, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 0/7] Miscellaneous patches and bug fixes

2018-05-18 Thread Martin K. Petersen

Uma,

> This patch series adds few improvements to the cxlflash driver and it
> also contains couple of bug fixes.

Applied to 4.18/scsi-queue, thank you!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v3 00/41] cxlflash: OCXL transport support and miscellaneous fixes

2018-03-28 Thread Martin K. Petersen

Uma,

> This patch series adds OCXL support to the cxlflash driver. With this
> support, new devices using the OCXL transport will be supported by the
> cxlflash driver along with the existing CXL devices. An effort is made
> to keep this transport specific function independent of the existing
> core driver 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.

Something this big really needs to be submitted around rc2/rc3. It's way
too late in the cycle to ensure proper zeroday coverage for all these
commits.

I have started a 4.18/scsi-queue branch to hold this series for now.
The 4.18 branch will be rebased once 4.17rc1 is out in a few weeks. Your
changes won't show up in for-next until then either.

Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [trivial PATCH V2] treewide: Align function definition open/close braces

2018-03-21 Thread Martin K. Petersen

Joe,

> Some functions definitions have either the initial open brace and/or
> the closing brace outside of column 1.
>
> Move those braces to column 1.

drivers/scsi and drivers/message/fusion parts look fine.

Acked-by: Martin K. Petersen <martin.peter...@oracle.com>

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH v2 00/38] cxlflash: OCXL transport support

2018-03-06 Thread Martin K. Petersen

> This patch series adds OCXL support to the cxlflash driver. With this
> support, new devices using the OCXL transport will be supported by the
> cxlflash driver along with the existing CXL devices. An effort is made
> to keep this transport specific function independent of the existing
> core driver that communicates with the AFU.

This one has been sitting for a week without any reviews. Andrew, when
will you have time to take a look?

Being a pretty big chunk of code, I would like to merge it sooner rather
than later. Or we can postpone until 4.18, of course.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] ibmvfc: fix misdefined reserved field in ibmvfc_fcp_rsp_info

2018-01-30 Thread Martin K. Petersen

Tyrel,

> The fcp_rsp_info structure as defined in the FC spec has an initial 3 bytes
> reserved field. The ibmvfc driver mistakenly defined this field as 4 bytes
> resulting in the rsp_code field being defined in what should be the start of
> the second reserved field and thus always being reported as zero by the
> driver.

Applied to 4.16/scsi-fixes, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 0/6] cxlflash: Miscellaneous patches

2018-01-08 Thread Martin K. Petersen

Uma,

> This patch series contains miscellaneous fixes. The first patch fixes
> a bug while the rest improve the code structure and prepare the code
> for future enhancements.

Added stable tag to first patch and applied series to
4.16/scsi-queue. Thank you!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [trivial PATCH] treewide: Align function definition open/close braces

2017-12-18 Thread Martin K. Petersen

Joe,

> Some functions definitions have either the initial open brace and/or
> the closing brace outside of column 1.
>
> Move those braces to column 1.

SCSI bits look OK.

Acked-by: Martin K. Petersen <martin.peter...@oracle.com>

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: ibmvscsi: Convert timers to use timer_setup()

2017-10-31 Thread Martin K. Petersen

Kees,

> In preparation for unconditionally passing the struct timer_list
> pointer to all timer callbacks, switch to using the new timer_setup()
> and from_timer() to pass the timer pointer explicitly.

Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com>

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 0/3] cxlflash: Miscellaneous fixes

2017-10-31 Thread Martin K. Petersen

Uma,

> This patch series contains miscellaneous fixes. All three patches resolve
> minor issues.
>
> This series is intended for 4.15 and is bisectable.

Applied to 4.15/scsi-queue. Thank you!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 0/3] cxlflash: Miscellaneous fixes

2017-08-25 Thread Martin K. Petersen

Uma,

> This patch series contains miscellaneous fixes. The first two address
> issues that were identified by smatch and the last patch fixes a
> regression introduced by Commit 565180723294 ("scsi: cxlflash: SISlite
> updates to support 4 ports").

Applied to 4.14/scsi-queue. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [BUG][bisected 270065e] linux-next fails to boot on powerpc

2017-08-21 Thread Martin K. Petersen

Brian,

>> Thanks for the detailed analysis. This is very helpful. Have you
>> considered to change the ipr driver such that it terminates REPORT
>> SUPPORTED OPERATION CODES commands with the appropriate check
>> condition code instead of DID_ERROR?
>
> Yes. That data is actually in the sense buffer, but since I'm also
> setting DID_ERROR, scsi_decide_disposition isn't using it. I've got a
> patch to do just as you suggest, to stop setting DID_ERROR when there
> is more detailed error data available, but it will need some
> additional testing before I submit, as it will impact much more than
> just this case.

I agree. In this case where a command is not supported, a check
condition would be a better way to signal the failure to the SCSI
midlayer.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] ipr: Set no_report_opcodes for RAID arrays

2017-08-21 Thread Martin K. Petersen

Brian,

> Since ipr RAID arrays do not support the MAINTENANCE_IN /
> MI_REPORT_SUPPORTED_OPERATION_CODES, set no_report_opcodes to prevent
> it from being sent.

Applied to 4.13/scsi-fixes. Thank you!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] ipr: Fix scsi-mq lockdep issue

2017-08-07 Thread Martin K. Petersen

Brian,

> Fixes the following lockdep warning that can occur when scsi-mq is
> enabled with ipr due to ipr calling scsi_unblock_requests from irq
> context. The fix is to move the call to scsi_unblock_requests to ipr's
> existing workqueue.

Applied to 4.13/scsi-fixes. Thank you!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: ibmvfc: constify dev_pm_ops structures.

2017-07-01 Thread Martin K. Petersen

Arvind,

> dev_pm_ops are not supposed to change at runtime. All functions
> working with dev_pm_ops provided by  work with const
> dev_pm_ops. So mark the non-const structs as const.

Applied to 4.13/scsi-queue. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: ibmvscsi: constify dev_pm_ops structures.

2017-07-01 Thread Martin K. Petersen

Arvind,

> dev_pm_ops are not supposed to change at runtime. All functions
> working with dev_pm_ops provided by  work with const
> dev_pm_ops. So mark the non-const structs as const.

Applied to 4.13/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 0/3] cxlflash: Minor fix and EH refactoring

2017-07-01 Thread Martin K. Petersen

Matthew,

> This small series fixes a recently injected double free and also
> includes two patches to refactor the host and reset handlers to ease
> the burden of making this driver compatible with an updated SCSI EH
> framework.

Applied to 4.13/scsi-queue. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


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

2017-06-26 Thread Martin K. Petersen

Uma,

> This patch series contains miscellaneous fixes and several
> enhancements such as LUN provisioning support, WS16 unmap and AFU
> debug capabilities.

Applied to 4.13/scsi-queue. Thank you!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: ibmvfc: don't check for failure from mempool_alloc()

2017-04-18 Thread Martin K. Petersen
NeilBrown <ne...@suse.com> writes:

> mempool_alloc() cannot fail when passed GFP_NOIO or any other gfp
> setting that is permitted to sleep.  So remove this pointless code.

Applied to 4.12/scsi-queue. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


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

2017-04-13 Thread Martin K. Petersen

Uma,

> This patch series contains miscellaneous patches and adds 4 port
> device support. This series also includes patches to improve
> performance of the driver in the legacy IO path.

Applied to 4.12/scsi-queue. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


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

2017-02-20 Thread Martin K. Petersen
>>>>> "Uma" == Uma Krishnan <ukri...@linux.vnet.ibm.com> writes:

Uma> From: "Matthew R. Ochs" <mro...@linux.vnet.ibm.com> Add support for
Uma> a future IBM Coherent Accelerator (CXL) flash AFU with an ID of
Uma> 0x0624.

Applied to 4.11/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering


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

2017-01-11 Thread Martin K. Petersen
>>>>> "Uma" == Uma Krishnan <ukri...@linux.vnet.ibm.com> writes:

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 in the series fixes a racing issue.

Applied to 4.11/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering


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

2017-01-10 Thread Martin K. Petersen
>>>>> "Uma" == Uma Krishnan <ukri...@linux.vnet.ibm.com> writes:

Uma,

>> The first three patches in the series were submitted by you but do
>> not carry your Signed-off-by:...
>> 

Uma> I will send out a V2 with the SOBs soon. Thanks for pointing out!

I don't mind adding them if there are no other changes. Just want it to
be on record.

Without your Signed-off-by: you'd also be a tag short of me queueing the
patches up.

-- 
Martin K. Petersen  Oracle Linux Engineering


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

2017-01-09 Thread Martin K. Petersen
>>>>> "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 in the series fixes a racing issue.

Uma> The series is based upon v4.10-rc2, intended for 4.11 and is
Uma> bisectable.

Uma> Matthew R. Ochs (3):
Uma>   cxlflash: Refactor context reset to share reset logic cxlflash:
Uma>   Support SQ Command Mode cxlflash: Cleanup prints

The first three patches in the series were submitted by you but do not
carry your Signed-off-by:...

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 1/2] ibmvscsi: add vscsi hosts to global list_head

2016-12-08 Thread Martin K. Petersen
>>>>> "Tyrel" == Tyrel Datwyler <tyr...@linux.vnet.ibm.com> writes:

Tyrel> Add each vscsi host adatper to a new global list_head named
Tyrel> ibmvscsi_head. There is no functional change. This is meant
Tyrel> primarily as a convience for locating adatpers from within the
Tyrel> debugger or crash utility.

Applied 1+2 to 4.10/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi/ipr: Fix runaway IRQs when falling back from MSI to LSI

2016-11-30 Thread Martin K. Petersen
>>>>> "Brian" == Brian King <brk...@linux.vnet.ibm.com> writes:

Brian> Looks good. Thanks! Here is an updated version that should apply
Brian> cleanly on top of scsi-next.

Applied to 4.10/scsi-queue. Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


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

2016-11-30 Thread Martin K. Petersen
>>>>> "Uma" == Uma Krishnan <ukri...@linux.vnet.ibm.com> writes:

Uma> The first four patches in this patch series include fixes for
Uma> command room violation and lun table management.

Applied patches 5 through 14 to 4.10/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering


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

2016-11-30 Thread Martin K. Petersen
>>>>> "Uma" == Uma Krishnan <ukri...@linux.vnet.ibm.com> writes:

Uma> The first four patches in this patch series include fixes for
Uma> command room violation and lun table management.

Applied patches 1-4 to 4.10/scsi-queue. The remainder of the series
needs review.

Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi/ipr: Fix runaway IRQs when falling back from MSI to LSI

2016-11-29 Thread Martin K. Petersen
>>>>> "Benjamin" == Benjamin Herrenschmidt <b...@kernel.crashing.org> writes:

Benjamin> LSIs must be ack'ed with an MMIO otherwise they remain
Benjamin> asserted forever. This is controlled by the "clear_isr" flag.

Benjamin> While we set that flag properly when deciding initially
Benjamin> whether to use LSIs or MSIs, we fail to set it if we first
Benjamin> chose MSIs, the test fails, then fallback to LSIs.

Brian: Please review!

-- 
Martin K. Petersen  Oracle Linux Engineering


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

2016-09-14 Thread Martin K. Petersen
>>>>> "Uma" == Uma Krishnan <ukri...@linux.vnet.ibm.com> writes:

Applied patches 3 through 6 to 4.9/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 0/6] cxlflash: Miscellaneous fixes

2016-09-09 Thread Martin K. Petersen
>>>>> "Uma" == Uma Krishnan <ukri...@linux.vnet.ibm.com> writes:

Uma> This patch set contains miscellaneous fixes in the device cleanup
Uma> and EEH recovery paths. One of the patches simplifies the WWPN
Uma> assignment routine.

Uma> There are a couple of fixes that resolve regressions introduced by
Uma> Commit 704c4b0ddc03 ("cxlflash: Shutdown notify support for CXL
Uma> Flash cards") and Commit 888baf069f49 ("scsi: cxlflash: Add kref to
Uma> context")

Applied patches 1 and 2 to 4.9/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH -next] scsi: ibmvfc: fix typo in parameter description

2016-09-09 Thread Martin K. Petersen
>>>>> "Wei" == Wei Yongjun <weiyj...@gmail.com> writes:

Wei> From: Wei Yongjun <weiyongj...@huawei.com> Fix typo in parameter
Wei> description.

Applied to 4.9/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 0/2] ibmvfc: FC-TAPE Support

2016-08-25 Thread Martin K. Petersen
>>>>> "Tyrel" == Tyrel Datwyler <tyr...@linux.vnet.ibm.com> writes:

Tyrel> This patchset introduces optional FC-TAPE/FC Class 3 Error
Tyrel> Recovery to the ibmvfc client driver.

Applied to 4.9/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 4/6] cxlflash: Transition to application close model

2016-08-23 Thread Martin K. Petersen
>>>>> "Matthew" == Matthew R Ochs <mro...@linux.vnet.ibm.com> writes:

Matthew> Caching the adapter file descriptor and performing a close on
Matthew> behalf of an application is a poor design. This is due to the
Matthew> fact that once a file descriptor in installed, it is free to be
Matthew> altered without the knowledge of the cxlflash driver. This can
Matthew> lead to inconsistencies between the application and
Matthew> kernel. Furthermore, the nature of the former design is more
Matthew> exploitable and thus should be abandoned.

Matthew> To support applications performing a close on the adapter file
Matthew> that is associated with a context, a new flag is introduced to
Matthew> the user API to indicate to applications that they are
Matthew> responsible for the close following the cleanup (detach) of a
Matthew> context. The documentation is also updated to reflect this
Matthew> change in behavior.

Applied patches 4 through 6 to 4.9/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 0/6] cxlflash: Improvements and cleanup

2016-08-18 Thread Martin K. Petersen
>>>>> "Matthew" == Matthew R Ochs <mro...@linux.vnet.ibm.com> writes:

Matthew> This patch set contains various code improvements and cleanups
Matthew> that were inspired by Al Viro upon reviewing the cxlflash
Matthew> driver. The core improvement is that the driver will no longer
Matthew> cache the adapter file descriptor associated with a
Matthew> context. This results in a user API change that is documented
Matthew> alongside the modifications.

Applied patches 1-3 to 4.9/scsi-queue. The remainder await reviews.

Matthew> The series is based upon 4.8-rc1, intended for 4.9, and is
Matthew> bisectable.

Thanks for making that explicit. Makes my life easier!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH 0/2] ibmvfc: FC-TAPE Support

2016-08-11 Thread Martin K. Petersen
>>>>> "Tyrel" == Tyrel Datwyler <tyr...@linux.vnet.ibm.com> writes:

Tyrel> On 08/03/2016 02:36 PM, Tyrel Datwyler wrote:
>> This patchset introduces optional FC-TAPE/FC Class 3 Error Recovery
>> to the ibmvfc client driver.
>> 
>> Tyrel Datwyler (2): ibmvfc: Set READ FCP_XFER_READY DISABLED bit in
>> PRLI ibmvfc: add FC Class 3 Error Recovery support
>> 
>> drivers/scsi/ibmvscsi/ibmvfc.c | 11 +++
>> drivers/scsi/ibmvscsi/ibmvfc.h | 1 + 2 files changed, 12
>> insertions(+)
>> 

Tyrel> ping?

-ENOREVIEWS

-- 
Martin K. Petersen  Oracle Linux Engineering


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

2016-07-22 Thread Martin K. Petersen
>>>>> "Uma" == Uma Krishnan <ukri...@linux.vnet.ibm.com> writes:

Uma> First patch in this set fixes a regression that was casued by the
Uma> Commit 704c4b0ddc03 ("cxlflash: Shutdown notify support for CXL
Uma> Flash cards"), which is currently staged for 4.8 in next/master.
Uma> Second patch updates the Maintainers list for cxlflash driver.

Uma> This series is intended for 4.8 and is bisectable. These patches
Uma> are cut against next/master that contains the original commit.

Applied to 4.8/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [patch] ibmvfc: prevent a potential deadlock

2016-07-15 Thread Martin K. Petersen
>>>>> "Dan" == Dan Carpenter <dan.carpen...@oracle.com> writes:

Dan> My static checker complains that we need to unlock on this path.
Dan> Seems true.

Applied to 4.8/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH] cxl: remove dead Kconfig options

2016-07-13 Thread Martin K. Petersen
>>>>> "Andrew" == Andrew Donnellan <andrew.donnel...@au1.ibm.com> writes:

>> This patch straddles a few subsystems. Did you intend for me to queue
>> it through SCSI?

Andrew> Sorry for not stating explicitly - I'd like this taken through
Andrew> powerpc as the cxlflash change is incidental to the cxl changes.

No problem.

-- 
Martin K. Petersen  Oracle Linux Engineering
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH] cxl: remove dead Kconfig options

2016-07-13 Thread Martin K. Petersen
>>>>> "Andrew" == Andrew Donnellan <andrew.donnel...@au1.ibm.com> writes:

Andrew> Remove the CXL_KERNEL_API and CXL_EEH Kconfig options, as they
Andrew> were only needed to coordinate the merging of the cxlflash
Andrew> driver. Also remove the stub implementation of
Andrew> cxl_perst_reloads_same_image() in cxlflash which is only used if
Andrew> CXL_EEH isn't defined (i.e. never).

This patch straddles a few subsystems. Did you intend for me to queue it
through SCSI?

-- 
Martin K. Petersen  Oracle Linux Engineering
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

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

2016-06-20 Thread Martin K. Petersen
>>>>> "Uma" == Uma Krishnan <ukri...@linux.vnet.ibm.com> writes:

Uma> This patch set contains support to notify CXL Flash devices of an
Uma> impending shutdown and a fix to drain operations prior to a reset.

Uma> This series is intended for 4.8 and is bisectable.

Applied to 4.8/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

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

2016-05-05 Thread Martin K. Petersen
>>>>> "Uma" == Uma Krishnan <ukri...@linux.vnet.ibm.com> writes:

Uma> When a cxlflash adapter goes into EEH recovery and multiple
Uma> processes (each having established its own context) are active, the
Uma> EEH recovery can hang if the processes attempt to recover in
Uma> parallel. The symptom logged after a couple of minutes is:

Applied to 4.7/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

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

2016-03-28 Thread Martin K. Petersen
>>>>> "Uma" == Uma Krishnan <ukri...@linux.vnet.ibm.com> writes:

Hey Uma,

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

Uma> The second patch addresses a performance issue.

main.c |  138 -
main.h |5 --
2 files changed, 97 insertions(+), 46 deletions(-)

This starts to push the limits of what constitutes "a bug fix".

I let it slide because you submitted inside the merge window. Applied to
4.6/scsi-fixes.

-- 
Martin K. Petersen  Oracle Linux Engineering
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

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

2016-03-08 Thread Martin K. Petersen
>>>>> "Uma" == Uma Krishnan <ukri...@linux.vnet.ibm.com> writes:

Uma> The first 5 patches of this series contain fixes to support the
Uma> cxlflash driver in a PowerVM guest. For the cxlflash driver to be
Uma> functional in a PowerVM guest, a corresponding set of cxl patches
Uma> (currently being upstreamed) is required. Note that this cxlflash
Uma> patch series does not have any build dependencies on the new cxl
Uma> code.

Uma> The sixth patch in the series is a fix to dynamically swap between
Uma> the AFU's internal LUN and an actual LUN detected on the fabric.

Uma> The last patch in the series is a performance enhancement to
Uma> improve throughput with cxlflash driver.

Applied to 4.6/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

  1   2   >