Re: [RFC PATCH 2/9] powerpc/pseries: fix bad drc_index_start value parsing of drc-info entry

2019-10-30 Thread Tyrel Datwyler
On 10/10/19 12:04 PM, Nathan Lynch wrote: > Tyrel Datwyler writes: >> The ibm,drc-info property is an array property that contains drc-info >> entries such that each entry is made up of 2 string encoded elements >> followed by 5 int encoded elements. The of_read_drc_info_cell

Re: [RFC PATCH 1/9] powerpc/pseries: add cpu DLPAR support for drc-info property

2019-10-30 Thread Tyrel Datwyler
On 10/10/19 11:56 AM, Nathan Lynch wrote: > Hi Tyrel, > > Tyrel Datwyler writes: >> +static bool valid_cpu_drc_index(struct device_node *parent, u32 drc_index) >> +{ >> +const __be32 *indexes; >> +int i; >> + >> +if (

Re: [PATCH] powerpc/powernv: Disable native PCIe port management

2019-11-13 Thread Tyrel Datwyler
Nothing but pedantic spelling and grammar nits of the commit log follow. -Tyrel On 11/13/19 1:40 AM, Oliver O'Halloran wrote: > On PowerNV the PCIe topology is (currently) managed the powernv platform s/the powernv/by the powernv > code in cooperation with firmware. The PCIe-native service

[PATCH 5/9] PCI: rpaphp: Don't rely on firmware feature to imply drc-info support

2019-11-05 Thread Tyrel Datwyler
for the ibm,drc-info property, and falling back to the older ibm,drc-* properties if it doesn't exist. Signed-off-by: Tyrel Datwyler --- drivers/pci/hotplug/rpaphp_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/hotplug/rpaphp_core.c b/drivers/pci/hotplug

[PATCH 3/9] powerpc/pseries: Add cpu DLPAR support for drc-info property

2019-11-05 Thread Tyrel Datwyler
From: Tyrel Datwyler Older firmwares provided information about Dynamic Reconfig Connectors (DRC) through several device tree properties, namely ibm,drc-types, ibm,drc-indexes, ibm,drc-names, and ibm,drc-power-domains. New firmwares have the ability to present this same information in a much

[PATCH 6/9] PCI: rpaphp: Add drc-info support for hotplug slot registration

2019-11-05 Thread Tyrel Datwyler
Split physical PCI slot registration scanning into seperate routines that support the old ibm,drc-* properties and one that supports the new compressed ibm,drc-info property. Signed-off-by: Tyrel Datwyler --- drivers/pci/hotplug/rpaphp_core.c | 89 ++- 1 file

[PATCH 8/9] PCI: rpaphp: Correctly match ibm, my-drc-index to drc-name when using drc-info

2019-11-05 Thread Tyrel Datwyler
-start-index. Signed-off-by: Tyrel Datwyler --- drivers/pci/hotplug/rpaphp_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/pci/hotplug/rpaphp_core.c b/drivers/pci/hotplug/rpaphp_core.c index eabc0c51..5327606 100644 --- a/drivers/pci/hotplug/rpaphp_core.c

[PATCH 0/9] Fixes and Enablement of ibm,drc-info property

2019-11-05 Thread Tyrel Datwyler
partitions with 24TB+ of possible memory this property is required to perform platform migration. This serious fixs the short comings of the previous submission in the areas of general implementation, cpu hotplug, and IOA hotplug. Tyrel Datwyler (9): powerpc/pseries: Fix bad drc_index_start

[PATCH 1/9] powerpc/pseries: Fix bad drc_index_start value parsing of drc-info entry

2019-11-05 Thread Tyrel Datwyler
() passes over the current int encoded value and actually stores the next one wrongly. Simply endian swap the current value in place after reading the first two string values. The remaining int encoded values can then be read correctly using of_prop_next_u32(). Signed-off-by: Tyrel Datwyler --- arch

[PATCH 4/9] PCI: rpaphp: Fix up pointer to first drc-info entry

2019-11-05 Thread Tyrel Datwyler
e pointing at the first element of an entry. Fix up by incrementing the "value" pointer to point at the first element of the first drc-info entry prior. Signed-off-by: Tyrel Datwyler --- drivers/pci/hotplug/rpaphp_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a

[PATCH 9/9] powerpc/pseries: Enable support for ibm, drc-info property

2019-11-05 Thread Tyrel Datwyler
Advertise client support for the PAPR architected ibm,drc-info device tree property during CAS handshake. Signed-off-by: Tyrel Datwyler --- arch/powerpc/kernel/prom_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel

[PATCH 2/9] powerpc/pseries: Fix drc-info mappings of logical cpus to drc-index

2019-11-05 Thread Tyrel Datwyler
nd instead testing directly for ibm,drc-info, and then falling back to the old style ibm,drc-indexes in the case it doesn't exit. Fix the second by incrementing value to the next element prior to parsing drc-info entries. Signed-off-by: Tyrel Datwyler --- arch/powerpc/platforms/pseries/pserie

Re: [PATCH] of: unittest: fix memory leak in attach_node_and_children

2019-11-20 Thread Tyrel Datwyler
rtner Michael provided instructions about what needs to be done with a v2 spin of your patch to get it upstream. Please feel free to include my reviewed-by as well. Reviewed-by: Tyrel Datwyler > --- > drivers/of/unittest.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) &

Re: [PATCH] powerpc/pseries: remove variable 'status' set but not used

2019-11-20 Thread Tyrel Datwyler
On 11/18/19 9:53 PM, Michael Ellerman wrote: > Chen Wandun writes: >> Fixes gcc '-Wunused-but-set-variable' warning: >> >> arch/powerpc/platforms/pseries/ras.c: In function ras_epow_interrupt: >> arch/powerpc/platforms/pseries/ras.c:319:6: warning: variable status set but >> not used

Re: [PATCH 2/2] pseries/makefile: Remove CONFIG_PPC_PSERIES check

2020-01-30 Thread Tyrel Datwyler
ies makefile is pointless. > > Signed-off-by: Oliver O'Halloran Reviewed-by: Tyrel Datwyler

Re: [PATCH 1/2] pseries/vio: Remove stray #ifdef CONFIG_PPC_PSERIES

2020-01-30 Thread Tyrel Datwyler
On 1/29/20 10:31 PM, Oliver O'Halloran wrote: > vio.c requires CONFIG_IBMVIO which in turn depends on PPC_PSERIES. > In other words, this ifdef is pointless. At a guess it's a carry-over > from pre-history. > > Signed-off-by: Oliver O'Halloran Reviewed-by: Tyrel Datwyler

Re: [PATCH v2] Fix display of Maximum Memory

2020-01-15 Thread Tyrel Datwyler
therwise, Reviewed-by: Tyrel Datwyler > Signed-off-by: Michael Bringmann > --- > arch/powerpc/platforms/pseries/lparcfg.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/arch/powerpc/platforms/pseries/lparcfg.c > b/arch/powerpc/platforms/ps

[PATCH] powerpc/pseries/vio: Fix iommu_table use-after-free refcount warning

2020-01-20 Thread Tyrel Datwyler
From: Tyrel Datwyler Commit e5afdf9dd515 ("powerpc/vfio_spapr_tce: Add reference counting to iommu_table") missed an iommu_table allocation in the pseries vio code. The iommu_table is allocated with kzalloc and as a result the associated kref gets a value of zero. This has the s

[PATCH] powerpc/pseries: fix of_read_drc_info_cell() to point at next record

2020-03-06 Thread Tyrel Datwyler
at drc_type string of next record. Fixes: a29396653b8bf ("pseries/drc-info: Search DRC properties for CPU indexes") Signed-off-by: Tyrel Datwyler --- arch/powerpc/platforms/pseries/of_helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platfor

Re: [PATCH -next] PCI: rpaphp: remove set but not used variable 'value'

2020-03-12 Thread Tyrel Datwyler
On 3/12/20 7:41 AM, Bjorn Helgaas wrote: > On Thu, Mar 12, 2020 at 09:38:02AM -0500, Bjorn Helgaas wrote: >> On Thu, Mar 12, 2020 at 10:04:12PM +0800, Chen Zhou wrote: >>> Fixes gcc '-Wunused-but-set-variable' warning: >>> >>> drivers/pci/hotplug/rpaphp_core.c: In function is_php_type: >>>

Re: [PATCH] powerpc/pseries: fix of_read_drc_info_cell() to point at next record

2020-03-12 Thread Tyrel Datwyler
On 3/11/20 10:43 PM, Michael Ellerman wrote: > Tyrel Datwyler writes: >> On 3/10/20 10:25 AM, Nathan Lynch wrote: >>> Tyrel Datwyler writes: >>>> The expectation is that when calling of_read_drc_info_cell() >>>> repeatedly to parse multiple drc-info rec

Re: [PATCH] powerpc/pseries: fix of_read_drc_info_cell() to point at next record

2020-03-10 Thread Tyrel Datwyler
On 3/10/20 10:25 AM, Nathan Lynch wrote: > Tyrel Datwyler writes: >> The expectation is that when calling of_read_drc_info_cell() >> repeatedly to parse multiple drc-info records that the in/out curval >> parameter points at the start of the next record on return. However, &g

Re: [PATCH] powerpc/pseries: Make vio and ibmebus initcalls pseries specific

2020-04-17 Thread Tyrel Datwyler
s machine. > > Signed-off-by: Oliver O'Halloran > --- Reviewed-by: Tyrel Datwyler

Re: [PATCH v5 0/5] Track and expose idle PURR and SPURR ticks

2020-04-20 Thread Tyrel Datwyler
> Documentation/ABI/testing/sysfs-devices-system-cpu | 39 + > arch/powerpc/include/asm/idle.h| 93 > ++ > arch/powerpc/kernel/sysfs.c| 82 ++++++- > arch/powerpc/platforms/pseries/setup.c

[PATCH] ibmvscsi: fix WARN_ON during event pool release

2020-04-27 Thread Tyrel Datwyler
ranoid anyways to be holding the host lock. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvscsi.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c index 7f66a77..126b242 100644 --- a/drivers/scsi/ibmvscsi/ibmvscsi.c

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

2020-04-27 Thread Tyrel Datwyler
pt to send an Implicit Logout if the client adapter is not logged in yet. Fixes: Commit ed830385a2b1 ("scsi: ibmvfc: Avoid loss of all paths during SVC node reboot") Signed-off-by: Brian King Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 5 + 1 file changed, 5

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

2020-08-31 Thread Tyrel Datwyler
Datagrams (MADs) for channelization support negotiation as well as the FPIN asynchronous event and FPIN status flags. Follow up work is required to plumb the ibmvfc client driver to use these new interfaces. Signed-off-by: Tyrel Datwyler --- v1 -> v2: Fixup complier errors from neglected com

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

2020-09-09 Thread Tyrel Datwyler
On 9/7/20 1:39 AM, Jing Xiangfeng wrote: > Fix to return error code PTR_ERR() from the error handling case instead > of 0. > > Signed-off-by: Jing Xiangfeng Acked-by: Tyrel Datwyler > --- > drivers/scsi/ibmvscsi/ibmvfc.c | 1 + > 1 file changed, 1 insertion(+) > >

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

2020-09-02 Thread Tyrel Datwyler
On 9/2/20 7:11 PM, Martin K. Petersen wrote: > > Tyrel, > >> Fixup complier errors from neglected commit --amend > > Bunch of formatting-related checkpatch warnings. Please fix. > > Thanks! > So, I stuck to the existing style already in that header. If I'm going to fixup to make

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

2020-08-31 Thread Tyrel Datwyler
Datagrams (MADs) for channelization support negotiation as well as the FPIN asynchronous event and FPIN status flags. Follow up work is required to plumb the ibmvfc client driver to use these new interfaces. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.h | 66

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

2020-09-04 Thread Tyrel Datwyler
Update ibmvfc.h structs to use the preferred __packed and __aligned() attribute macros defined in include/linux/compiler_attributes.h in place of __attribute__(). Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.h | 56 +- 1 file changed, 28

[PATCH v3 2/2] scsi: ibmvfc: interface updates for future FPIN and MQ support

2020-09-04 Thread Tyrel Datwyler
Datagrams (MADs) for channelization support negotiation as well as the FPIN asynchronous event and FPIN status flags. Follow up work is required to plumb the ibmvfc client driver to use these new interfaces. Signed-off-by: Tyrel Datwyler --- v2 -> v3: Fixup checkpatch warnings about us

Re: [PATCH] powerpc/pseries: Do not initiate shutdown when system is running on UPS

2020-08-18 Thread Tyrel Datwyler
On 8/18/20 3:54 AM, Vasant Hegde wrote: > As per PAPR specification whenever system is running on UPS we have to > wait for predefined time (default 10mins) before initiating shutdown. The wording in PAPR seems a little unclear. It states for an EPOW_SYSTEM_SHUTDOWN action code that an EPOW error

Re: [PATCH] tty: hvcs: Don't NULL tty->driver_data until hvcs_cleanup()

2020-08-21 Thread Tyrel Datwyler
On 8/20/20 4:46 PM, Tyrel Datwyler wrote: > The code currently NULLs tty->driver_data in hvcs_close() with the > intent of informing the next call to hvcs_open() that device needs to be > reconfigured. However, when hvcs_cleanup() is called we copy hvcsd from > tty->

[PATCH] tty: hvcs: Don't NULL tty->driver_data until hvcs_cleanup()

2020-08-20 Thread Tyrel Datwyler
v/hvcsX node in a future hvcs_probe() and we can eventually run out of /dev/hvcsX devices. Fix this by waiting to NULL tty->driver_data in hvcs_cleanup(). Signed-off-by: Tyrel Datwyler --- drivers/tty/hvc/hvcs.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/

Re: [PATCH] rpadlpar_io:Add MODULE_DESCRIPTION entries to kernel modules

2020-09-28 Thread Tyrel Datwyler
On 9/23/20 11:41 PM, Oliver O'Halloran wrote: > On Thu, Sep 24, 2020 at 3:15 PM Mamatha Inamdar > wrote: >> >> This patch adds a brief MODULE_DESCRIPTION to rpadlpar_io kernel modules >> (descriptions taken from Kconfig file) >> >> Signed-off-by: Mamatha Inamdar >> --- >>

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

2020-10-27 Thread Tyrel Datwyler
On 10/26/20 6:56 PM, Martin K. Petersen wrote: > > 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

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

2020-10-24 Thread Tyrel Datwyler
to an SRP Login resulting in a protocol violation. Fix this race by protecting request_limit with the host lock when changing the value via atomic_set() to indicate no transport. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvscsi.c | 36 +++- 1 file changed

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

2020-10-25 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.h | 22 -- 1 file changed, 16 insertions(+), 6 deletions

Re: [PATCH v2] powerpc/pseries: explicitly reschedule during drmem_lmb list traversal

2020-08-12 Thread Tyrel Datwyler
On 8/11/20 6:20 PM, Nathan Lynch wrote: > The drmem lmb list can have hundreds of thousands of entries, and > unfortunately lookups take the form of linear searches. As long as > this is the case, traversals have the potential to monopolize the CPU > and provoke lockup reports, workqueue stalls,

Re: [PATCH][next] dmaengine: Use fallthrough pseudo-keyword

2020-08-05 Thread Tyrel Datwyler
On 8/5/20 6:19 AM, Vinod Koul wrote: > On 27-07-20, 15:34, Gustavo A. R. Silva wrote: > >> diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c >> index 2c508ee672b9..9b69716172a4 100644 >> --- a/drivers/dma/pl330.c >> +++ b/drivers/dma/pl330.c >> @@ -1061,16 +1061,16 @@ static bool

Re: [PATCH v2 2/2] powerpc/pseries: new lparcfg key/value pair: partition_affinity_score

2020-08-05 Thread Tyrel Datwyler
to the lparcfg procfile > under a new 'partition_affinity_score' key. > > Signed-off-by: Scott Cheloha I was hoping Michael would chime in the first time around on this patch series about adding another key/value pair to lparcfg. So, barring a NACK from mpe: Reviewed-by: Tyrel Datwyler > ---

Re: [PATCH v2 1/2] powerpc/perf: consolidate GPCI hcall structs into asm/hvcall.h

2020-08-05 Thread Tyrel Datwyler
On 7/27/20 11:46 AM, Scott Cheloha wrote: > The H_GetPerformanceCounterInfo (GPCI) hypercall input/output structs are > useful to modules outside of perf/, so move them into asm/hvcall.h to live > alongside the other powerpc hypercall structs. > > Leave the perf-specific GPCI stuff in

Re: [PATCH] powerpc/numa: Restrict possible nodes based on platform

2020-07-06 Thread Tyrel Datwyler
On 7/5/20 11:40 PM, Srikar Dronamraju wrote: > As per PAPR, there are 2 device tree property > ibm,max-associativity-domains (which defines the maximum number of > domains that the firmware i.e PowerVM can support) and > ibm,current-associativity-domains (which defines the maximum number of >

Re: [PATCH] powerpc/pseries: new lparcfg key/value pair: partition_affinity_score

2020-06-22 Thread Tyrel Datwyler
On 6/19/20 5:32 PM, Nathan Lynch wrote: > Hi Tyrel, > > Tyrel Datwyler writes: >> On 6/19/20 8:34 AM, Scott Cheloha wrote: >>> The H_GetPerformanceCounterInfo PHYP hypercall has a subcall, >>> Affinity_Domain_Info_By_Partition, which returns, among other things

Re: [PATCH] powerpc: Warn about use of smt_snooze_delay

2020-06-25 Thread Tyrel Datwyler
On 6/25/20 3:29 AM, Christophe Leroy wrote: > > > Le 25/06/2020 à 12:03, Joel Stanley a écrit : >> It's not done anything for a long time. Save the percpu variable, and >> emit a warning to remind users to not expect it to do anything. > > Why not just drop the file entirely  if it is useless ?

Re: [PATCH] powerpc/pseries: new lparcfg key/value pair: partition_affinity_score

2020-06-19 Thread Tyrel Datwyler
On 6/19/20 8:34 AM, Scott Cheloha wrote: > The H_GetPerformanceCounterInfo PHYP hypercall has a subcall, > Affinity_Domain_Info_By_Partition, which returns, among other things, > a "partition affinity score" for a given LPAR. This score, a value on > [0-100], represents the processor-memory

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

2020-06-03 Thread Tyrel Datwyler
-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvscsi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c index 59f0f1030c54..c5711c659b51 100644 --- a/drivers/scsi/ibmvscsi/ibmvscsi.c +++ b/drivers/scsi/ibmvscsi/ibmvscsi.c

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

2021-01-11 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 | 125 + drivers/scsi/ibmvscsi/ibmvfc.h | 1 + 2 files changed, 126 insertions(+) diff --git

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

2021-01-11 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 --- drivers/scsi/ibmvscsi/ibmvfc.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi

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

2021-01-11 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 --- drivers/scsi/ibmvscsi/ibmvfc.c | 25

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

2021-01-11 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 --- drivers/scsi/ibmvscsi/ibmvfc.c | 135 - drivers/scsi/ibmvscsi/ibmvfc.h | 3 + 2 files changed, 136 insertions(+), 2 deletions

[PATCH v4 10/21] ibmvfc: define Sub-CRQ interrupt handler routine

2021-01-11 Thread Tyrel Datwyler
Simple handler that calls Sub-CRQ drain routine directly. Signed-off-by: Tyrel Datwyler --- 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 f3cd092478ee..51bcafad9490 100644

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

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

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

2021-01-11 Thread Tyrel Datwyler
allocation code. No functional change. Signed-off-by: Tyrel Datwyler --- 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 9200fe49c57e

[PATCH v4 06/21] ibmvfc: add Subordinate CRQ definitions

2021-01-11 Thread Tyrel Datwyler
initially. Add definitions for the Sub CRQ command element and queue. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.h | 21 + 1 file changed, 21 insertions(+) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.h b/drivers/scsi/ibmvscsi/ibmvfc.h index dd6d89292867

[PATCH v4 00/21] ibmvfc: initial MQ development

2021-01-11 Thread Tyrel Datwyler
les 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_event_pool ibmvfc: define hcall wrapper for registe

[PATCH v4 01/21] ibmvfc: add vhost fields and defaults for MQ enablement

2021-01-11 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 | 8 drivers/scsi/ibmvscsi/ibmvfc.h | 9 + 2 files changed, 17 insertions(+) diff --git

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

2021-01-11 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 | 86 ++ 1 file changed, 86 insertions(+) diff

[PATCH v4 14/21] ibmvfc: set and track hw queue in ibmvfc_event struct

2021-01-11 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 --- drivers/scsi/ibmvscsi/ibmvfc.c | 5 + drivers/scsi/ibmvscsi/ibmvfc.h | 1 + 2 files

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

2021-01-11 Thread Tyrel Datwyler
off-by: Tyrel Datwyler --- 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/ibmvscsi/ibmvfc.c @@ -141

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

2021-01-11 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 --- drivers/scsi/ibmvscsi/ibmvfc.c | 68

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

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

[PATCH v4 15/21] ibmvfc: send commands down HW Sub-CRQ when channelized

2021-01-11 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 --- drivers

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

2021-01-11 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 --- drivers/scsi/ibmvscsi/ibmvfc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

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

2021-01-11 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 v4 11/21] ibmvfc: map/request irq and register Sub-CRQ interrupt handler

2021-01-11 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. Unmap these irqs at Sub-CRQ teardown. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 25 + 1 file changed, 25 insertions

[PATCH v4 08/21] ibmvfc: add Sub-CRQ IRQ enable/disable routine

2021-01-11 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 --- drivers/scsi/ibmvscsi/ibmvfc.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/scsi

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

2021-01-11 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 --- drivers/scsi/ibmvscsi/ibmvfc.c | 32 +++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/ibmvscsi

[PATCH v4 19/21] ibmvfc: purge scsi channels after transport loss/reset

2021-01-11 Thread Tyrel Datwyler
Grab the queue and list lock for each Sub-CRQ and add any uncompleted events to the host purge list. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi

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

2021-01-06 Thread Tyrel Datwyler
contention while also relaxing locking for submissions and completions to simply the list lock of the queue in question. changes in v2: * Patch 4: Made ibmvfc_locked_done() static fixing a no-prototype warning Tyrel Datwyler (5): ibmvfc: define generic queue structure for CRQs ibmvfc: make

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

2021-01-06 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 v2 2/5] ibmvfc: make command event pool queue specific

2021-01-06 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 v2 1/5] ibmvfc: define generic queue structure for CRQs

2021-01-06 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 v2 5/5] ibmvfc: relax locking around ibmvfc_queuecommand

2021-01-06 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-06 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] ibmvfc: fix missing cast of ibmvfc_event pointer to u64 handle

2021-01-06 Thread Tyrel Datwyler
casts when assigning an ibmvfc_event as a correlation token. Fixes: Commit 2aa0102c6688 ("scsi: ibmvfc: Use correlation token to tag commands") Reported-by: kernel test robot Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 4 ++-- 1 file changed, 2 insertions(+),

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

2020-11-25 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 06/13] ibmvfc: add handlers to drain and complete Sub-CRQ responses

2020-11-25 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 | 72 ++ 1 file changed, 72 insertions(+) diff

[PATCH 03/13] ibmvfc: add Subordinate CRQ definitions

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

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

2020-11-25 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 --- drivers/scsi/ibmvscsi/ibmvfc.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/scsi/ibmvscsi

[PATCH 00/13] ibmvfc: initial MQ development

2020-11-25 Thread Tyrel Datwyler
and locking still leverages the legacy single queue implementation, and as such lock contention is problematic when increasing the number of queues. However, this initial work demonstrates a 1.2x factor increase in IOPs when configured with two HW queues despite lock contention. Tyrel Datwyler (13

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

2020-11-25 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 --- drivers/scsi/ibmvscsi/ibmvfc.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/scsi

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

2020-11-25 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 --- drivers

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

2020-11-25 Thread Tyrel Datwyler
Simple handler that calls Sub-CRQ drain routine directly. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvfc.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index a8730522920e..4fb782fa2c66 100644

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

2020-11-25 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 | 7 +++ drivers/scsi/ibmvscsi/ibmvfc.h | 9 + 2 files changed, 16 insertions(+) diff --git

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

2020-11-25 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 --- drivers/scsi/ibmvscsi/ibmvfc.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi

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

2020-11-25 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 --- drivers/scsi/ibmvscsi/ibmvfc.c | 135 - drivers/scsi/ibmvscsi/ibmvfc.h | 3 + 2 files changed, 136 insertions(+), 2 deletions

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

2020-11-25 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 --- drivers/scsi/ibmvscsi/ibmvfc.c | 5 + drivers/scsi/ibmvscsi/ibmvfc.h | 1 + 2 files

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

2020-11-25 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 | 115 + drivers/scsi/ibmvscsi/ibmvfc.h | 1 + 2 files changed, 116 insertions(+) diff --git

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

2020-11-25 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 --- drivers/scsi/ibmvscsi/ibmvfc.c | 32 +++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/ibmvscsi

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

2020-12-01 Thread Tyrel Datwyler
wait for those cancel completions prior to submitting a LUN RESET or ABORT TASK SET. Allocate event pointers for each possible scsi channel and assign an event for each channel that requires a cancel. Wait for completion each submitted cancel. Signed-off-by: Tyrel Datwyler --- drivers/scsi

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

2020-12-01 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 | 128 + drivers/scsi/ibmvscsi/ibmvfc.h | 1 + 2 files changed, 129 insertions(+) diff --git

[PATCH v2 07/17] ibmvfc: define Sub-CRQ interrupt handler routine

2020-12-01 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 e9da3f60c793

[PATCH v2 14/17] ibmvfc: add cancel mad initialization helper

2020-12-01 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 --- drivers/scsi/ibmvscsi/ibmvfc.c | 67

[PATCH v2 09/17] ibmvfc: implement channel enquiry and setup commands

2020-12-01 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 --- drivers/scsi/ibmvscsi/ibmvfc.c | 135 - drivers/scsi/ibmvscsi/ibmvfc.h | 3 + 2 files changed, 136 insertions(+), 2 deletions

[PATCH v2 16/17] ibmvfc: enable MQ and set reasonable defaults

2020-12-01 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 --- drivers/scsi/ibmvscsi/ibmvfc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

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

2020-12-01 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 v2 03/17] ibmvfc: add Subordinate CRQ definitions

2020-12-01 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 v2 06/17] ibmvfc: add handlers to drain and complete Sub-CRQ responses

2020-12-01 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 | 77 ++ 1 file changed, 77 insertions(+) diff

<    1   2   3   4   5   6   7   >