[PATCH v2 11/17] ibmvfc: set and track hw queue in ibmvfc_event struct

2020-12-01 Thread Tyrel Datwyler
Extract the hwq id from a SCSI command and store it in the ibmvfc_event structure to identify which Sub-CRQ to send the command down when channels are being utilized. Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 5 + drivers/scsi/ibmvscsi

[PATCH v2 01/17] ibmvfc: add vhost fields and defaults for MQ enablement

2020-12-01 Thread Tyrel Datwyler
Introduce several new vhost fields for managing MQ state of the adapter as well as initial defaults for MQ enablement. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 9 - drivers/scsi/ibmvscsi/ibmvfc.h | 13 +++-- 2 files changed, 19 insertions(+), 3

[PATCH v2 12/17] ibmvfc: send commands down HW Sub-CRQ when channelized

2020-12-01 Thread Tyrel Datwyler
When the client has negotiated the use of channels all vfcFrames are required to go down a Sub-CRQ channel or it is a protocoal violation. If the adapter state is channelized submit vfcFrames to the appropriate Sub-CRQ via the h_send_sub_crq() helper. Signed-off-by: Tyrel Datwyler Reviewed

[PATCH v2 10/17] ibmvfc: advertise client support for using hardware channels

2020-12-01 Thread Tyrel Datwyler
ady in use during a subsequent NPIV Login. The later is required because channel support is only renegotiated after a CRQ pair is broken. Simple NPIV Logout/Logins require the client to continue to advertise the channel capability until the CRQ pair between the client is broken. Signed-off-by: Ty

[PATCH v2 08/17] ibmvfc: map/request irq and register Sub-CRQ interrupt handler

2020-12-01 Thread Tyrel Datwyler
Create an irq mapping for the hw_irq number provided from phyp firmware. Request an irq assigned our Sub-CRQ interrupt handler. Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 22 ++ 1 file changed, 22 insertions(+) diff --git

[PATCH v2 00/17] ibmvfc: initial MQ development

2020-12-01 Thread Tyrel Datwyler
: NULL'd scsi_scrq reference after deallocation [brking] * Patch 6: Added switch case to handle XPORT event [brking] * Patch 9: fixed ibmvfc_event leak and double free [brking] * added support for cancel command with MQ * added parameter toggles for MQ settings Tyrel Datwyler (17): ibmvfc: add

[PATCH v2 13/17] ibmvfc: register Sub-CRQ handles with VIOS during channel setup

2020-12-01 Thread Tyrel Datwyler
the VIOS Sub-CRQ handle for each queue. This VIOS handle is needed as a parameter with h_send_sub_crq(). Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 32 +++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git

[PATCH v2 17/17] ibmvfc: provide modules parameters for MQ settings

2020-12-01 Thread Tyrel Datwyler
Add the various module parameter toggles for adjusting the MQ characteristics at boot/load time as well as a device attribute for changing the client scsi channel request amount. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 75 +- 1 file

[PATCH v2 05/17] ibmvfc: add Sub-CRQ IRQ enable/disable routine

2020-12-01 Thread Tyrel Datwyler
Each Sub-CRQ has its own interrupt. A hypercall is required to toggle the IRQ state. Provide the necessary mechanism via a helper function. Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 20 1 file changed, 20 insertions(+) diff

Re: [PATCH v3 06/18] ibmvfc: add handlers to drain and complete Sub-CRQ responses

2020-12-04 Thread Tyrel Datwyler
On 12/4/20 6:51 AM, Brian King wrote: > On 12/2/20 8:07 PM, Tyrel Datwyler wrote: >> The logic for iterating over the Sub-CRQ responses is similiar to that >> of the primary CRQ. Add the necessary handlers for processing those >> responses. >> >> Signed-off-by: T

Re: [PATCH v3 18/18] ibmvfc: drop host lock when completing commands in CRQ

2020-12-04 Thread Tyrel Datwyler
On 12/4/20 1:35 PM, Brian King wrote: > On 12/2/20 8:08 PM, Tyrel Datwyler wrote: >> The legacy CRQ holds the host lock the even while completing commands. >> This presents a problem when in legacy single queue mode and >> nr_hw_queues is greater than one since calling s

Re: [PATCH v3 04/18] ibmvfc: add alloc/dealloc routines for SCSI Sub-CRQ Channels

2020-12-04 Thread Tyrel Datwyler
On 12/4/20 6:47 AM, Brian King wrote: > On 12/2/20 8:07 PM, Tyrel Datwyler wrote: >> @@ -4983,6 +4993,118 @@ static int ibmvfc_init_crq(struct ibmvfc_host *vhost) >> return retrc; >> } >> >> +static int ibmvfc_register_scsi_

Re: [PATCH v2 1/2] powerpc/rtas: Restrict RTAS requests from userspace

2020-12-08 Thread Tyrel Datwyler
On 8/19/20 9:45 PM, Andrew Donnellan wrote: > A number of userspace utilities depend on making calls to RTAS to retrieve > information and update various things. > > The existing API through which we expose RTAS to userspace exposes more > RTAS functionality than we actually need, through the

[PATCH] powerpc/rtas: fix typo of ibm,open-errinjct in rtas filter

2020-12-08 Thread Tyrel Datwyler
tool functions again as expected. [root@ltcalpine2-lp5 linux]# errinjct open RTAS error injection facility open, token = 1 fixes: bd59380c5ba4 ("powerpc/rtas: Restrict RTAS requests from userspace") Signed-off-by: Tyrel Datwyler --- arch/powerpc/kernel/rtas.c | 2 +- 1 file chang

Re: [PATCH v2 01/17] ibmvfc: add vhost fields and defaults for MQ enablement

2020-12-08 Thread Tyrel Datwyler
On 12/7/20 3:56 AM, Hannes Reinecke wrote: > On 12/4/20 3:26 PM, Brian King wrote: >> On 12/2/20 11:27 AM, Tyrel Datwyler wrote: >>> On 12/2/20 7:14 AM, Brian King wrote: >>>> On 12/1/20 6:53 PM, Tyrel Datwyler wrote: >>>>> Introduce several new vhos

Re: [PATCH 06/13] ibmvfc: add handlers to drain and complete Sub-CRQ responses

2020-11-30 Thread Tyrel Datwyler
On 11/27/20 9:47 AM, Brian King wrote: > On 11/25/20 7:48 PM, Tyrel Datwyler wrote: >> The logic for iterating over the Sub-CRQ responses is similiar to that >> of the primary CRQ. Add the necessary handlers for processing those >> responses. >> >> Signed-off-by: T

Re: [PATCH 09/13] ibmvfc: implement channel enquiry and setup commands

2020-11-30 Thread Tyrel Datwyler
On 11/27/20 9:49 AM, Brian King wrote: > On 11/25/20 7:48 PM, Tyrel Datwyler wrote: >> --- a/drivers/scsi/ibmvscsi/ibmvfc.c >> +++ b/drivers/scsi/ibmvscsi/ibmvfc.c > >> @@ -4462,6 +4464,118 @@ static void ibmvfc_discover_targets(struct >> ibmvfc_host *vhost) &g

Re: [PATCH 01/13] ibmvfc: add vhost fields and defaults for MQ enablement

2020-11-30 Thread Tyrel Datwyler
On 11/27/20 9:45 AM, Brian King wrote: > On 11/25/20 7:48 PM, Tyrel Datwyler wrote: >> diff --git a/drivers/scsi/ibmvscsi/ibmvfc.h b/drivers/scsi/ibmvscsi/ibmvfc.h >> index 9d58cfd774d3..8225bdbb127e 100644 >> --- a/drivers/scsi/ibmvscsi/ibmvfc.h >> +++ b/drivers/scsi/ib

Re: [PATCH 04/13] ibmvfc: add alloc/dealloc routines for SCSI Sub-CRQ Channels

2020-11-30 Thread Tyrel Datwyler
On 11/27/20 9:46 AM, Brian King wrote: > On 11/25/20 7:48 PM, Tyrel Datwyler wrote: >> Allocate a set of Sub-CRQs in advance. During channel setup the client >> and VIOS negotiate the number of queues the VIOS supports and the number >> that the client desires to

[PATCH v3 00/18] ibmvfc: initial MQ development

2020-12-02 Thread Tyrel Datwyler
changes in v2: * Patch 4: NULL'd scsi_scrq reference after deallocation * Patch 6: Added switch case to handle XPORT event * Patch 9: fixed ibmvfc_event leak and double free * added support for cancel command with MQ * added parameter toggles for MQ settings Tyrel Datwyler (18): ibmvfc: add vhost

[PATCH v3 03/18] ibmvfc: add Subordinate CRQ definitions

2020-12-02 Thread Tyrel Datwyler
initially. Add definitions for the Sub CRQ command element and queue. Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.h | 23 +++ 1 file changed, 23 insertions(+) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.h b/drivers/scsi/ibmvscsi

[PATCH v3 09/18] ibmvfc: implement channel enquiry and setup commands

2020-12-02 Thread Tyrel Datwyler
NPIV login where the VIOS has set the SUPPORT_CHANNELS capability bit in the NPIV Login response. Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 135 - drivers/scsi/ibmvscsi/ibmvfc.h | 3 + 2 files changed, 136

[PATCH v3 14/18] ibmvfc: add cancel mad initialization helper

2020-12-02 Thread Tyrel Datwyler
Add a helper routine for initializing a Cancel MAD. This will be useful for a channelized client that needs to send a Cancel commands down every channel commands were sent for a particular LUN. Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 67

[PATCH v3 16/18] ibmvfc: enable MQ and set reasonable defaults

2020-12-02 Thread Tyrel Datwyler
Turn on MQ by default and set sane values for the upper limit on hw queues for the scsi host, and number of hw scsi channels to request from the partner VIOS. Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.h | 6 +++--- 1 file changed, 3 insertions(+), 3

Re: [PATCH v2 17/17] ibmvfc: provide modules parameters for MQ settings

2020-12-02 Thread Tyrel Datwyler
On 12/2/20 10:40 AM, Brian King wrote: > On 12/1/20 6:53 PM, Tyrel Datwyler wrote: >> +module_param_named(mig_channels_only, mig_channels_only, uint, S_IRUGO | >> S_IWUSR); >> +MODULE_PARM_DESC(mig_channels_only, "Prevent migration to non-channelized >> syst

[PATCH v3 06/18] ibmvfc: add handlers to drain and complete Sub-CRQ responses

2020-12-02 Thread Tyrel Datwyler
The logic for iterating over the Sub-CRQ responses is similiar to that of the primary CRQ. Add the necessary handlers for processing those responses. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 80 ++ 1 file changed, 80 insertions(+) diff

[PATCH v3 07/18] ibmvfc: define Sub-CRQ interrupt handler routine

2020-12-02 Thread Tyrel Datwyler
Simple handler that calls Sub-CRQ drain routine directly. Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index b61ae1df21e5

[PATCH v3 10/18] ibmvfc: advertise client support for using hardware channels

2020-12-02 Thread Tyrel Datwyler
ady in use during a subsequent NPIV Login. The later is required because channel support is only renegotiated after a CRQ pair is broken. Simple NPIV Logout/Logins require the client to continue to advertise the channel capability until the CRQ pair between the client is broken. Signed-off-by: Ty

[PATCH v3 13/18] ibmvfc: register Sub-CRQ handles with VIOS during channel setup

2020-12-02 Thread Tyrel Datwyler
the VIOS Sub-CRQ handle for each queue. This VIOS handle is needed as a parameter with h_send_sub_crq(). Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 32 +++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git

[PATCH v3 15/18] ibmvfc: send Cancel MAD down each hw scsi channel

2020-12-02 Thread Tyrel Datwyler
it as a subqueue by using a subqueue struct allocated on the stack. Wait for completion of each submitted cancel. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 104 ++--- drivers/scsi/ibmvscsi/ibmvfc.h | 38 ++-- 2 files changed, 90 insertions

[PATCH v3 17/18] ibmvfc: provide modules parameters for MQ settings

2020-12-02 Thread Tyrel Datwyler
Add the various module parameter toggles for adjusting the MQ characteristics at boot/load time as well as a device attribute for changing the client scsi channel request amount. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 76 +- 1 file

[PATCH v3 18/18] ibmvfc: drop host lock when completing commands in CRQ

2020-12-02 Thread Tyrel Datwyler
CRQ path when completing a command. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index e499599662ec..e2200bdff2be 100644 --- a/drivers

[PATCH v3 05/18] ibmvfc: add Sub-CRQ IRQ enable/disable routine

2020-12-02 Thread Tyrel Datwyler
Each Sub-CRQ has its own interrupt. A hypercall is required to toggle the IRQ state. Provide the necessary mechanism via a helper function. Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 20 1 file changed, 20 insertions(+) diff

[PATCH v3 01/18] ibmvfc: add vhost fields and defaults for MQ enablement

2020-12-02 Thread Tyrel Datwyler
Introduce several new vhost fields for managing MQ state of the adapter as well as initial defaults for MQ enablement. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 9 - drivers/scsi/ibmvscsi/ibmvfc.h | 13 +++-- 2 files changed, 19 insertions(+), 3

[PATCH v3 08/18] ibmvfc: map/request irq and register Sub-CRQ interrupt handler

2020-12-02 Thread Tyrel Datwyler
Create an irq mapping for the hw_irq number provided from phyp firmware. Request an irq assigned our Sub-CRQ interrupt handler. Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 22 ++ 1 file changed, 22 insertions(+) diff --git

[PATCH v3 11/18] ibmvfc: set and track hw queue in ibmvfc_event struct

2020-12-02 Thread Tyrel Datwyler
Extract the hwq id from a SCSI command and store it in the ibmvfc_event structure to identify which Sub-CRQ to send the command down when channels are being utilized. Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 5 + drivers/scsi/ibmvscsi

[PATCH v3 12/18] ibmvfc: send commands down HW Sub-CRQ when channelized

2020-12-02 Thread Tyrel Datwyler
When the client has negotiated the use of channels all vfcFrames are required to go down a Sub-CRQ channel or it is a protocoal violation. If the adapter state is channelized submit vfcFrames to the appropriate Sub-CRQ via the h_send_sub_crq() helper. Signed-off-by: Tyrel Datwyler Reviewed

Re: [PATCH v2 04/17] ibmvfc: add alloc/dealloc routines for SCSI Sub-CRQ Channels

2020-12-02 Thread Tyrel Datwyler
On 12/2/20 7:25 AM, Brian King wrote: > On 12/1/20 6:53 PM, Tyrel Datwyler wrote: >> +static int ibmvfc_register_scsi_channel(struct ibmvfc_host *vhost, >> + int index) >> +{ >> +struct device *dev = vhost->dev; >> +s

[PATCH v3 04/18] ibmvfc: add alloc/dealloc routines for SCSI Sub-CRQ Channels

2020-12-02 Thread Tyrel Datwyler
for sending handles for every queue it is hoping for. Also, provide deallocation cleanup routines. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 129 + drivers/scsi/ibmvscsi/ibmvfc.h | 1 + 2 files changed, 130 insertions(+) diff --git

[PATCH v3 02/18] ibmvfc: define hcall wrapper for registering a Sub-CRQ

2020-12-02 Thread Tyrel Datwyler
Sub-CRQs are registred with firmware via a hypercall. Abstract that interface into a simpler helper function. Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/scsi/ibmvscsi

Re: [PATCH v2 06/17] ibmvfc: add handlers to drain and complete Sub-CRQ responses

2020-12-02 Thread Tyrel Datwyler
On 12/2/20 7:46 AM, Brian King wrote: > On 12/1/20 6:53 PM, Tyrel Datwyler wrote: >> The logic for iterating over the Sub-CRQ responses is similiar to that >> of the primary CRQ. Add the necessary handlers for processing those >> responses. >> >> Signed-off-by: T

Re: [PATCH v2 01/17] ibmvfc: add vhost fields and defaults for MQ enablement

2020-12-02 Thread Tyrel Datwyler
On 12/2/20 7:14 AM, Brian King wrote: > On 12/1/20 6:53 PM, Tyrel Datwyler wrote: >> Introduce several new vhost fields for managing MQ state of the adapter >> as well as initial defaults for MQ enablement. >> >> Signed-off-by: Tyrel Datwyler >> --- >&g

Re: [PATCH 00/13] ibmvfc: initial MQ development

2020-12-02 Thread Tyrel Datwyler
On 12/2/20 4:03 AM, Hannes Reinecke wrote: > On 11/26/20 2:48 AM, 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

Re: [PATCH v2 15/17] ibmvfc: send Cancel MAD down each hw scsi channel

2020-12-02 Thread Tyrel Datwyler
On 12/2/20 10:27 AM, Brian King wrote: > On 12/1/20 6:53 PM, Tyrel Datwyler wrote: >> In general the client needs to send Cancel MADs and task management >> commands down the same channel as the command(s) intended to cancel or >> abort. The client assigns cancel keys per L

[PATCH 2/5] ibmvfc: make command event pool queue specific

2020-12-18 Thread Tyrel Datwyler
There is currently a single command event pool per host. In anticipation of providing multiple queues add a per-queue event pool definition and reimplement the existing CRQ to use its queue defined event pool for command submission and completion. Signed-off-by: Tyrel Datwyler Reviewed-by: Brian

[PATCH 3/5] ibmvfc: define per-queue state/list locks

2020-12-18 Thread Tyrel Datwyler
Define per-queue locks for protecting queue state and event pool sent/free lists. The evt list lock is initially redundant but it allows the driver to be modified in the follow-up patches to relax the queue locking around submissions and completions. Signed-off-by: Tyrel Datwyler Reviewed

[PATCH 1/5] ibmvfc: define generic queue structure for CRQs

2020-12-18 Thread Tyrel Datwyler
. This structure will further be leveraged in a followup patcheset that introduce Sub-CRQs. Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 135 + drivers/scsi/ibmvscsi/ibmvfc.h | 34 + 2 files changed, 107

[PATCH 5/5] ibmvfc: relax locking around ibmvfc_queuecommand

2020-12-18 Thread Tyrel Datwyler
lock, and previous patches have insured proper protection of moving ibmvfc_event objects between free and sent lists. Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers

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

2020-12-18 Thread Tyrel Datwyler
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. Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi

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

2020-12-18 Thread Tyrel Datwyler
contention while also relaxing locking for submissions and completions to simply the list lock of the queue in question. Tyrel Datwyler (5): ibmvfc: define generic queue structure for CRQs ibmvfc: make command event pool queue specific ibmvfc: define per-queue state/list locks ibmvfc

Re: [PATCH 3/3] ibmvfc: use correlation token to tag commands

2020-12-22 Thread Tyrel Datwyler
On 12/21/20 10:24 PM, Nathan Chancellor wrote: > On Tue, Nov 17, 2020 at 12:50:31PM -0600, Tyrel Datwyler wrote: >> The vfcFrame correlation field is 64bit handle that is intended to trace >> I/O operations through both the client stack and VIOS stack when the >> underlyin

Re: [PATCH] powerpc/pseries/hotplug-cpu: Fix memleak when cpus node not exist

2020-11-10 Thread Tyrel Datwyler
On 11/10/20 6:08 AM, Nathan Lynch wrote: > Zhang Xiaoxu writes: >> From: zhangxiaoxu >> >> If the cpus nodes not exist, we lost to free the 'cpu_drcs', which >> will leak memory. >> >> Fixes: a0ff72f9f5a7 ("powerpc/pseries/hotplug-cpu: Remove double free in >> error path") >> Reported-by: Hulk

[PATCH 2/6] ibmvfc: deduplicate common ibmvfc_cmd init code

2020-11-11 Thread Tyrel Datwyler
these commonally set fields into a initialization helper routine, namely ibmvfc_init_vfc_cmd(). Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 55 ++ 1 file changed, 23 insertions(+), 32 deletions(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b

[PATCH 3/6] ibmvfc: add new fields for version 2 of several MADs

2020-11-11 Thread Tyrel Datwyler
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. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 58 ++ drivers/scsi/ibmvscsi/ibmvfc.h | 28

[PATCH 5/6] ibmvfc: add support for targetWWPN field in v2 MADs and vfcFrame

2020-11-11 Thread Tyrel Datwyler
Several version 2 MADs and the version 2 vfcFrame structures introduced a new targetWWPN field for better identification of the target then simply the scsi_id. Set this field and MAD versioning fields when the VIOS advertises the IBMVFC_HANDLE_VF_WWPN capability. Signed-off-by: Tyrel Datwyler

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

2020-11-11 Thread Tyrel Datwyler
man readability. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 070cf516b98f..01fe65de9086 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c ++

[PATCH 6/6] ibmvfc: advertise client support for targetWWPN using v2 commands

2020-11-11 Thread Tyrel Datwyler
The previous patch added support for the targetWWPN field in version 2 MADs and vfcFrame structures. Set the IBMVFC_CAN_SEND_VF_WWPN bit in our capabailites flag during NPIV Login to inform the VIOS that this client supports this feature. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi

[PATCH 4/6] ibmvfc: add FC payload retrieval routines for versioned vfcFrames

2020-11-11 Thread Tyrel Datwyler
version and returning pointers to the proper iu or response structures within that ibmvfc_cmd. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 76 -- 1 file changed, 53 insertions(+), 23 deletions(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b

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

2020-11-13 Thread Tyrel Datwyler
On 11/12/20 1:37 AM, Christoph Hellwig wrote: > On Wed, Nov 11, 2020 at 07:04:37PM -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

[PATCH 3/3] ibmvfc: use correlation token to tag commands

2020-11-17 Thread Tyrel Datwyler
The vfcFrame correlation field is 64bit handle that is intended to trace I/O operations through both the client stack and VIOS stack when the underlying physical FC adapter supports tagging. Tag vfcFrames with the associated ibmvfc_event pointer handle. Signed-off-by: Tyrel Datwyler

[PATCH v2 3/6] ibmvfc: add helper for testing capability flags

2020-11-17 Thread Tyrel Datwyler
l need to regularly check for targetWWPN and channelization support. Add a helper to simplify checking various VIOS capabilities. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/ibmvscsi/ibmv

[PATCH v2 6/6] ibmvfc: advertise client support for targetWWPN using v2 commands

2020-11-17 Thread Tyrel Datwyler
The previous patch added support for the targetWWPN field in version 2 MADs and vfcFrame structures. Set the IBMVFC_CAN_SEND_VF_WWPN bit in our capabailites flag during NPIV Login to inform the VIOS that this client supports this feature. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi

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

2020-11-17 Thread Tyrel Datwyler
man readability. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 070cf516b98f..01fe65de9086 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c ++

[PATCH v2 1/6] ibmvfc: deduplicate common ibmvfc_cmd init code

2020-11-17 Thread Tyrel Datwyler
these commonally set fields into a initialization helper routine, namely ibmvfc_init_vfc_cmd(). Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 56 +++--- 1 file changed, 24 insertions(+), 32 deletions(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b

[PATCH v2 5/6] ibmvfc: add support for targetWWPN field in v2 MADs and vfcFrame

2020-11-17 Thread Tyrel Datwyler
Several version 2 MADs and the version 2 vfcFrame structures introduced a new targetWWPN field for better identification of the target then simply the scsi_id. Set this field and MAD versioning fields when the VIOS advertises the IBMVFC_HANDLE_VF_WWPN capability. Signed-off-by: Tyrel Datwyler

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

2020-11-17 Thread Tyrel Datwyler
to separate patchset Fixed up checkpatch warnings Tyrel Datwyler (6): ibmvfc: deduplicate common ibmvfc_cmd init code ibmvfc: add new fields for version 2 of several MADs ibmvfc: add helper for testing capability flags ibmvfc: add FC payload retrieval routines for versioned vfcFrames ibmvfc

[PATCH v2 4/6] ibmvfc: add FC payload retrieval routines for versioned vfcFrames

2020-11-17 Thread Tyrel Datwyler
version and returning pointers to the proper iu or response structures within that ibmvfc_cmd. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 75 +++--- 1 file changed, 52 insertions(+), 23 deletions(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b

[PATCH v2 2/6] ibmvfc: add new fields for version 2 of several MADs

2020-11-17 Thread Tyrel Datwyler
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. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 58 ++ drivers/scsi/ibmvscsi/ibmvfc.h | 28

[PATCH 2/3] ibmvfc: remove trailing semicolon

2020-11-17 Thread Tyrel Datwyler
Remove a superfluous semicolon following a closing function block bracket. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 01fe65de9086

Re: [PATCH 4/6] ibmvfc: add FC payload retrieval routines for versioned vfcFrames

2020-11-17 Thread Tyrel Datwyler
On 11/17/20 2:14 PM, Brian King wrote: > On 11/11/20 7:04 PM, Tyrel Datwyler wrote: >> The FC iu and response payloads are located at different offsets >> depending on the ibmvfc_cmd version. This is a result of the version 2 >> vfcFrame definition adding an extra 64by

Re: [PATCH 4/6] ibmvfc: add FC payload retrieval routines for versioned vfcFrames

2020-11-17 Thread Tyrel Datwyler
On 11/17/20 2:21 PM, Brian King wrote: > On 11/17/20 4:14 PM, Brian King wrote: >> On 11/11/20 7:04 PM, Tyrel Datwyler wrote: >>> The FC iu and response payloads are located at different offsets >>> depending on the ibmvfc_cmd version. This is a result of the versio

[PATCH v3 3/6] ibmvfc: add helper for testing capability flags

2020-11-17 Thread Tyrel Datwyler
atches will need to regularly check for targetWWPN and channelization support. Add a helper to simplify checking various VIOS capabilities, namely ibmvfc_check_caps(). Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff

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

2020-11-17 Thread Tyrel Datwyler
bug fixes to separate patchset * Fixed up checkpatch warnings Tyrel Datwyler (6): ibmvfc: deduplicate common ibmvfc_cmd init code ibmvfc: add new fields for version 2 of several MADs ibmvfc: add helper for testing capability flags ibmvfc: add FC payload retrieval routines for versioned vfcFr

[PATCH v3 5/6] ibmvfc: add support for target_wwpn field in v2 MADs and vfcFrame

2020-11-17 Thread Tyrel Datwyler
Several version 2 MADs and the version 2 vfcFrame structures introduced a new targetWWPN field for better identification of a target over the scsi_id. Set this field and MAD versioning fields when the VIOS advertises the IBMVFC_HANDLE_VF_WWPN capability. Signed-off-by: Tyrel Datwyler

[PATCH v3 1/6] ibmvfc: deduplicate common ibmvfc_cmd init code

2020-11-17 Thread Tyrel Datwyler
these commonally set fields into a initialization helper routine, namely ibmvfc_init_vfc_cmd(). Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 56 +++--- 1 file changed, 24 insertions(+), 32 deletions(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c

[PATCH v3 2/6] ibmvfc: add new fields for version 2 of several MADs

2020-11-17 Thread Tyrel Datwyler
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. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 58 ++ drivers/scsi/ibmvscsi/ibmvfc.h | 28

[PATCH v3 6/6] ibmvfc: advertise client support for targetWWPN using v2 commands

2020-11-17 Thread Tyrel Datwyler
The previous patch added support for the targetWWPN field in version 2 MADs and vfcFrame structures. Set the IBMVFC_CAN_SEND_VF_WWPN bit in our capabailites flag during NPIV Login to inform the VIOS that this client supports the feature. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi

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

2020-11-17 Thread Tyrel Datwyler
On 11/17/20 2:06 PM, Brian King wrote: > On 11/11/20 7:04 PM, Tyrel Datwyler wrote: >> @@ -211,7 +214,9 @@ struct ibmvfc_npiv_login_resp { >> __be64 capabilities; >> #define IBMVFC_CAN_FLUSH_ON_HALT0x08 >> #define IBMVFC_CAN_SUPPRESS_ABTS0x10 >> -#d

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

2020-11-17 Thread Tyrel Datwyler
On 11/17/20 11:16 AM, Tyrel Datwyler wrote: > Several Management Datagrams (MADs) have been reversioned to add a targetWWPN > field that is intended to better identify a target over a scsi_id. Further, a > couple new MADs have been introduced to the protocol to be used for >

[PATCH v3 4/6] ibmvfc: add FC payload retrieval routines for versioned vfcFrames

2020-11-17 Thread Tyrel Datwyler
version and return a pointer to the proper iu or response structure within that ibmvfc_cmd. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 77 -- 1 file changed, 54 insertions(+), 23 deletions(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers

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

2020-10-28 Thread Tyrel Datwyler
On 10/27/20 10:21 PM, Michael Ellerman wrote: > Tyrel Datwyler writes: >> 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. The request li

Re: [PATCH 4/5 v2] ibmvfc: relax locking around ibmvfc_queuecommand

2021-01-04 Thread Tyrel Datwyler
On 1/4/21 2:17 PM, Tyrel Datwyler wrote: > The drivers queuecommand routine is still wrapped to hold the host lock > for the duration of the call. This will become problematic when moving > to multiple queues due to the lock contention preventing asynchronous > submissions to mul

[PATCH 4/5 v2] ibmvfc: relax locking around ibmvfc_queuecommand

2021-01-04 Thread Tyrel Datwyler
lock, and previous patches have insured proper protection of moving ibmvfc_event objects between free and sent lists. Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers

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

2021-01-04 Thread Tyrel Datwyler
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. Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- Changes in v2: * Changed

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

2021-01-06 Thread Tyrel Datwyler
On 1/5/21 8:42 PM, Martin K. Petersen wrote: > > 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

Re: [PATCH 1/3] tty: hvcs: Drop unnecessary if block

2021-01-20 Thread Tyrel Datwyler
an just go away. > > Signed-off-by: Uwe Kleine-König Reviewed-by: Tyrel Datwyler > --- > drivers/tty/hvc/hvcs.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c > index 509d1042825a..3e0461285c34 100644 > --- a/driv

[PATCH v5 16/21] ibmvfc: register Sub-CRQ handles with VIOS during channel setup

2021-01-14 Thread Tyrel Datwyler
the VIOS Sub-CRQ handle for each queue. This VIOS handle is needed as a parameter with h_send_sub_crq(). Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 32 +++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git

[PATCH v5 20/21] ibmvfc: enable MQ and set reasonable defaults

2021-01-14 Thread Tyrel Datwyler
Turn on MQ by default and set sane values for the upper limit on hw queues for the scsi host, and number of hw scsi channels to request from the partner VIOS. Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.h | 6 +++--- 1 file changed, 3 insertions(+), 3

[PATCH v5 17/21] ibmvfc: add cancel mad initialization helper

2021-01-14 Thread Tyrel Datwyler
Add a helper routine for initializing a Cancel MAD. This will be useful for a channelized client that needs to send Cancel commands down every channel commands were sent for a particular LUN. Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 68

[PATCH v5 02/21] ibmvfc: move event pool init/free routines

2021-01-14 Thread Tyrel Datwyler
allocation code. No functional change. Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 151 + 1 file changed, 76 insertions(+), 75 deletions(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index

[PATCH v5 07/21] ibmvfc: add alloc/dealloc routines for SCSI Sub-CRQ Channels

2021-01-14 Thread Tyrel Datwyler
for sending handles for every queue it is hoping for. Also, provide deallocation cleanup routines. Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 125 + drivers/scsi/ibmvscsi/ibmvfc.h | 1 + 2 files changed, 126

[PATCH v5 13/21] ibmvfc: advertise client support for using hardware channels

2021-01-14 Thread Tyrel Datwyler
off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index a00f38558613..0653d52d4ea0 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvs

[PATCH v5 21/21] ibmvfc: provide modules parameters for MQ settings

2021-01-14 Thread Tyrel Datwyler
Add the various module parameter toggles for adjusting the MQ characteristics at boot/load time as well as a device attribute for changing the client scsi channel request amount. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 75 ++ drivers

[PATCH v5 05/21] ibmvfc: define hcall wrapper for registering a Sub-CRQ

2021-01-14 Thread Tyrel Datwyler
Sub-CRQs are registred with firmware via a hypercall. Abstract that interface into a simpler helper function. Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/scsi/ibmvscsi

[PATCH v5 18/21] ibmvfc: send Cancel MAD down each hw scsi channel

2021-01-14 Thread Tyrel Datwyler
and wait for the completion of each submitted cancel. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 109 + drivers/scsi/ibmvscsi/ibmvfc.h | 3 + 2 files changed, 100 insertions(+), 12 deletions(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b

[PATCH v5 03/21] ibmvfc: init/free event pool during queue allocation/free

2021-01-14 Thread Tyrel Datwyler
has been successfully purged since releasing the queue will also free the event pool. Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b

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

2021-01-14 Thread Tyrel Datwyler
for cancel command with MQ * added parameter toggles for MQ settings Tyrel Datwyler (21): ibmvfc: add vhost fields and defaults for MQ enablement ibmvfc: move event pool init/free routines ibmvfc: init/free event pool during queue allocation/free ibmvfc: add size parameter to ibmvfc_init_

[PATCH v5 04/21] ibmvfc: add size parameter to ibmvfc_init_event_pool

2021-01-14 Thread Tyrel Datwyler
With the upcoming addition of Sub-CRQs the event pool size may vary per-queue. Add a size parameter to ibmvfc_init_event_pool such that different size event pools can be requested by ibmvfc_alloc_queue. Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c

[PATCH v5 09/21] ibmvfc: add handlers to drain and complete Sub-CRQ responses

2021-01-14 Thread Tyrel Datwyler
The logic for iterating over the Sub-CRQ responses is similiar to that of the primary CRQ. Add the necessary handlers for processing those responses. Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 86 ++ 1 file changed

[PATCH v5 12/21] ibmvfc: implement channel enquiry and setup commands

2021-01-14 Thread Tyrel Datwyler
NPIV login where the VIOS has set the SUPPORT_CHANNELS capability bit in the NPIV Login response. Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King --- drivers/scsi/ibmvscsi/ibmvfc.c | 135 - drivers/scsi/ibmvscsi/ibmvfc.h | 3 + 2 files changed, 136

<    1   2   3   4   5   6   7   >