Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2017-11-06 09:38:11 +0100
committerJiri Kosina <jkosina@suse.cz>2017-11-06 09:38:11 +0100
commite4edfa9f8086270fd2d5660bb8b2569a374770e7 (patch)
treeffd13d3ff39f33bb3416ad683751af5c48b22a02
parentbeb410487446e5e4b6d148c0cbda02baa0fe3a2c (diff)
parent1073c8c3243b5d38477be68e8d5270f999e3144c (diff)
Merge remote-tracking branch 'origin/users/msuchanek/SLE15/for-next' into SLE15
-rw-r--r--patches.arch/powerpc-dlpar-017-pseries-Check-memory-device-state-before-onl.patch145
-rw-r--r--patches.arch/powerpc-dlpar-018-pseries-Don-t-attempt-to-acquire-drc-during-.patch53
-rw-r--r--patches.arch/powerpc-perf-Factor-out-PPMU_ONLY_COUNT_RUN-check-code-from-power8.patch160
-rw-r--r--patches.arch/powerpc-powernv-Increase-memory-block-size-to-1GB-on.patch52
-rw-r--r--patches.arch/powerpc-xmon-Fix-display-of-SPRs.patch106
-rw-r--r--patches.drivers/ibmvnic-114-Fix-calculation-of-number-of-TX-header-descr.patch71
-rw-r--r--patches.drivers/ibmvnic-115-Enable-scatter-gather-support.patch68
-rw-r--r--patches.drivers/ibmvnic-116-Enable-TSO-support.patch173
-rw-r--r--patches.drivers/ibmvnic-117-Let-users-change-net-device-features.patch33
-rw-r--r--patches.drivers/ibmvnic-118-Update-reset-infrastructure-to-support-tunab.patch460
-rw-r--r--patches.drivers/ibmvnic-119-Fix-failover-error-path-for-non-fatal-resets.patch62
-rw-r--r--patches.drivers/scsi-ipr-Fix-scsi-mq-lockdep-issue.patch141
-rw-r--r--patches.drivers/scsi-ipr-Set-no_report_opcodes-for-RAID-arrays.patch35
-rw-r--r--series.conf16
14 files changed, 1575 insertions, 0 deletions
diff --git a/patches.arch/powerpc-dlpar-017-pseries-Check-memory-device-state-before-onl.patch b/patches.arch/powerpc-dlpar-017-pseries-Check-memory-device-state-before-onl.patch
new file mode 100644
index 0000000000..d0349a0fff
--- /dev/null
+++ b/patches.arch/powerpc-dlpar-017-pseries-Check-memory-device-state-before-onl.patch
@@ -0,0 +1,145 @@
+From 1a367063ca0c1c6f6f54b5abd7b4836b0866a07b Mon Sep 17 00:00:00 2001
+From: Nathan Fontenot <nfont@linux.vnet.ibm.com>
+Date: Wed, 2 Aug 2017 14:03:22 -0400
+Subject: [PATCH] powerpc/pseries: Check memory device state before
+ onlining/offlining
+
+References: FATE#322022, bsc#1065729
+Patch-mainline: v4.14-rc1
+Git-commit: 1a367063ca0c1c6f6f54b5abd7b4836b0866a07b
+
+When DLPAR adding or removing memory we need to check the device
+offline status before trying to online/offline the memory. This is
+needed because calls to device_online() and device_offline() will
+return non-zero for memory that is already online and offline
+respectively.
+
+This update resolves two scenarios. First, for a kernel built with
+auto-online memory enabled (CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=y),
+memory will be onlined as part of calls to add_memory(). After adding
+the memory the pseries DLPAR code tries to online it and fails since
+the memory is already online. The DLPAR code then tries to remove the
+memory which produces the oops message below because the memory is not
+offline.
+
+The second scenario occurs when removing memory that is already
+offline, i.e. marking memory offline (via sysfs) and then trying to
+remove that memory. This doesn't work because offlining the already
+offline memory does not succeed and the DLPAR code then fails the
+DLPAR remove operation.
+
+The fix for both scenarios is to check the device.offline status
+before making the calls to device_online() or device_offline().
+
+ kernel BUG at mm/memory_hotplug.c:1936!
+ ...
+ NIP [c0000000002ca428] .remove_memory+0xb8/0xc0
+ LR [c0000000002ca3cc] .remove_memory+0x5c/0xc0
+ Call Trace:
+ .remove_memory+0x5c/0xc0 (unreliable)
+ .dlpar_add_lmb+0x384/0x400
+ .dlpar_memory+0x5dc/0xca0
+ .handle_dlpar_errorlog+0x74/0xe0
+ .pseries_hp_work_fn+0x2c/0x90
+ .process_one_work+0x17c/0x460
+ .worker_thread+0x88/0x500
+ .kthread+0x15c/0x1a0
+ .ret_from_kernel_thread+0x58/0xc0
+
+Fixes: 943db62c316c ("powerpc/pseries: Revert 'Auto-online hotplugged memory'")
+Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
+[mpe: Use bool, add explicit rc=0 case, change log typos & formatting]
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ arch/powerpc/platforms/pseries/hotplug-memory.c | 53 +++++++++++++++----------
+ 1 file changed, 32 insertions(+), 21 deletions(-)
+
+diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c
+index ca9b2f4aaa22..9e3afd238d34 100644
+--- a/arch/powerpc/platforms/pseries/hotplug-memory.c
++++ b/arch/powerpc/platforms/pseries/hotplug-memory.c
+@@ -336,7 +336,38 @@ static struct memory_block *lmb_to_memblock(struct of_drconf_cell *lmb)
+ return mem_block;
+ }
+
++static int dlpar_change_lmb_state(struct of_drconf_cell *lmb, bool online)
++{
++ struct memory_block *mem_block;
++ int rc;
++
++ mem_block = lmb_to_memblock(lmb);
++ if (!mem_block)
++ return -EINVAL;
++
++ if (online && mem_block->dev.offline)
++ rc = device_online(&mem_block->dev);
++ else if (!online && !mem_block->dev.offline)
++ rc = device_offline(&mem_block->dev);
++ else
++ rc = 0;
++
++ put_device(&mem_block->dev);
++
++ return rc;
++}
++
++static int dlpar_online_lmb(struct of_drconf_cell *lmb)
++{
++ return dlpar_change_lmb_state(lmb, true);
++}
++
+ #ifdef CONFIG_MEMORY_HOTREMOVE
++static int dlpar_offline_lmb(struct of_drconf_cell *lmb)
++{
++ return dlpar_change_lmb_state(lmb, false);
++}
++
+ static int pseries_remove_memblock(unsigned long base, unsigned int memblock_size)
+ {
+ unsigned long block_sz, start_pfn;
+@@ -431,19 +462,13 @@ static int dlpar_add_lmb(struct of_drconf_cell *);
+
+ static int dlpar_remove_lmb(struct of_drconf_cell *lmb)
+ {
+- struct memory_block *mem_block;
+ unsigned long block_sz;
+ int nid, rc;
+
+ if (!lmb_is_removable(lmb))
+ return -EINVAL;
+
+- mem_block = lmb_to_memblock(lmb);
+- if (!mem_block)
+- return -EINVAL;
+-
+- rc = device_offline(&mem_block->dev);
+- put_device(&mem_block->dev);
++ rc = dlpar_offline_lmb(lmb);
+ if (rc)
+ return rc;
+
+@@ -737,20 +762,6 @@ static int dlpar_memory_remove_by_ic(u32 lmbs_to_remove, u32 drc_index,
+ }
+ #endif /* CONFIG_MEMORY_HOTREMOVE */
+
+-static int dlpar_online_lmb(struct of_drconf_cell *lmb)
+-{
+- struct memory_block *mem_block;
+- int rc;
+-
+- mem_block = lmb_to_memblock(lmb);
+- if (!mem_block)
+- return -EINVAL;
+-
+- rc = device_online(&mem_block->dev);
+- put_device(&mem_block->dev);
+- return rc;
+-}
+-
+ static int dlpar_add_lmb(struct of_drconf_cell *lmb)
+ {
+ unsigned long block_sz;
+--
+2.10.2
+
diff --git a/patches.arch/powerpc-dlpar-018-pseries-Don-t-attempt-to-acquire-drc-during-.patch b/patches.arch/powerpc-dlpar-018-pseries-Don-t-attempt-to-acquire-drc-during-.patch
new file mode 100644
index 0000000000..625481dca3
--- /dev/null
+++ b/patches.arch/powerpc-dlpar-018-pseries-Don-t-attempt-to-acquire-drc-during-.patch
@@ -0,0 +1,53 @@
+From afb5519fdb346201728040cab4e08ce53e7ff4fd Mon Sep 17 00:00:00 2001
+From: John Allen <jallen@linux.vnet.ibm.com>
+Date: Wed, 23 Aug 2017 12:18:43 -0500
+Subject: [PATCH] powerpc/pseries: Don't attempt to acquire drc during memory
+ hot add for assigned lmbs
+
+References: FATE#322022, bsc#1065729
+Patch-mainline: v4.14-rc1
+Git-commit: afb5519fdb346201728040cab4e08ce53e7ff4fd
+
+Check if an LMB is assigned before attempting to call dlpar_acquire_drc
+in order to avoid any unnecessary rtas calls. This substantially
+reduces the running time of memory hot add on lpars with large amounts
+of memory.
+
+[mpe: We need to explicitly set rc to 0 in the success case, otherwise
+ the compiler might think we use rc without initialising it.]
+
+Fixes: c21f515c7436 ("powerpc/pseries: Make the acquire/release of the drc for memory a seperate step")
+Cc: stable@vger.kernel.org # v4.11+
+Signed-off-by: John Allen <jallen@linux.vnet.ibm.com>
+Reviewed-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ arch/powerpc/platforms/pseries/hotplug-memory.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c
+index 9e3afd238d34..1d48ab424bd9 100644
+--- a/arch/powerpc/platforms/pseries/hotplug-memory.c
++++ b/arch/powerpc/platforms/pseries/hotplug-memory.c
+@@ -828,6 +828,9 @@ static int dlpar_memory_add_by_count(u32 lmbs_to_add, struct property *prop)
+ return -EINVAL;
+
+ for (i = 0; i < num_lmbs && lmbs_to_add != lmbs_added; i++) {
++ if (lmbs[i].flags & DRCONF_MEM_ASSIGNED)
++ continue;
++
+ rc = dlpar_acquire_drc(lmbs[i].drc_index);
+ if (rc)
+ continue;
+@@ -870,6 +873,7 @@ static int dlpar_memory_add_by_count(u32 lmbs_to_add, struct property *prop)
+ lmbs[i].base_addr, lmbs[i].drc_index);
+ lmbs[i].reserved = 0;
+ }
++ rc = 0;
+ }
+
+ return rc;
+--
+2.10.2
+
diff --git a/patches.arch/powerpc-perf-Factor-out-PPMU_ONLY_COUNT_RUN-check-code-from-power8.patch b/patches.arch/powerpc-perf-Factor-out-PPMU_ONLY_COUNT_RUN-check-code-from-power8.patch
new file mode 100644
index 0000000000..312d5507e3
--- /dev/null
+++ b/patches.arch/powerpc-perf-Factor-out-PPMU_ONLY_COUNT_RUN-check-code-from-power8.patch
@@ -0,0 +1,160 @@
+From 70a7e720998d5beaf0c8abd945234e065a49336b Mon Sep 17 00:00:00 2001
+From: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
+Date: Mon, 31 Jul 2017 13:32:41 +0530
+Subject: [PATCH] powerpc/perf: Factor out PPMU_ONLY_COUNT_RUN check code from
+ power8
+
+References: fate#321438, git-fixes efe881afdd999, bsc#1056686
+Patch-mainline: v4.14-rc1
+Git-commit: 70a7e720998d5beaf0c8abd945234e065a49336b
+
+There are some hardware events on Power systems which only count when
+the processor is not idle, and there are some fixed-function counters
+which count such events. For example, the "run cycles" event counts
+cycles when the processor is not idle. If the user asks to count
+cycles, we can use "run cycles" if this is a per-task event, since the
+processor is running when the task is running, by definition. We can't
+use "run cycles" if the user asks for "cycles" on a system-wide
+counter.
+
+Currently in power8 this check is done using PPMU_ONLY_COUNT_RUN flag
+in power8_get_alternatives() function. Based on the flag, events are
+switched if needed. This function should also be enabled in power9, so
+factor out the code to isa207_get_alternatives().
+
+Fixes: efe881afdd999 ('powerpc/perf: Factor out event_alternative function')
+Reported-by: Anton Blanchard <anton@samba.org>
+Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ arch/powerpc/perf/isa207-common.c | 29 +++++++++++++++++++++++++++--
+ arch/powerpc/perf/isa207-common.h | 4 ++--
+ arch/powerpc/perf/power8-pmu.c | 33 +++++----------------------------
+ arch/powerpc/perf/power9-pmu.c | 5 +++--
+ 4 files changed, 37 insertions(+), 34 deletions(-)
+
+diff --git a/arch/powerpc/perf/isa207-common.c b/arch/powerpc/perf/isa207-common.c
+index 582ed2c9bc56..2efee3f196f5 100644
+--- a/arch/powerpc/perf/isa207-common.c
++++ b/arch/powerpc/perf/isa207-common.c
+@@ -488,8 +488,8 @@ static int find_alternative(u64 event, const unsigned int ev_alt[][MAX_ALT], int
+ return -1;
+ }
+
+-int isa207_get_alternatives(u64 event, u64 alt[],
+- const unsigned int ev_alt[][MAX_ALT], int size)
++int isa207_get_alternatives(u64 event, u64 alt[], int size, unsigned int flags,
++ const unsigned int ev_alt[][MAX_ALT])
+ {
+ int i, j, num_alt = 0;
+ u64 alt_event;
+@@ -505,5 +505,30 @@ int isa207_get_alternatives(u64 event, u64 alt[],
+ }
+ }
+
++ if (flags & PPMU_ONLY_COUNT_RUN) {
++ /*
++ * We're only counting in RUN state, so PM_CYC is equivalent to
++ * PM_RUN_CYC and PM_INST_CMPL === PM_RUN_INST_CMPL.
++ */
++ j = num_alt;
++ for (i = 0; i < num_alt; ++i) {
++ switch (alt[i]) {
++ case 0x1e: /* PMC_CYC */
++ alt[j++] = 0x600f4; /* PM_RUN_CYC */
++ break;
++ case 0x600f4:
++ alt[j++] = 0x1e;
++ break;
++ case 0x2: /* PM_INST_CMPL */
++ alt[j++] = 0x500fa; /* PM_RUN_INST_CMPL */
++ break;
++ case 0x500fa:
++ alt[j++] = 0x2;
++ break;
++ }
++ }
++ num_alt = j;
++ }
++
+ return num_alt;
+ }
+diff --git a/arch/powerpc/perf/isa207-common.h b/arch/powerpc/perf/isa207-common.h
+index 7a0228bf283c..6c737d675792 100644
+--- a/arch/powerpc/perf/isa207-common.h
++++ b/arch/powerpc/perf/isa207-common.h
+@@ -288,8 +288,8 @@ int isa207_compute_mmcr(u64 event[], int n_ev,
+ unsigned int hwc[], unsigned long mmcr[],
+ struct perf_event *pevents[]);
+ void isa207_disable_pmc(unsigned int pmc, unsigned long mmcr[]);
+-int isa207_get_alternatives(u64 event, u64 alt[],
+- const unsigned int ev_alt[][MAX_ALT], int size);
++int isa207_get_alternatives(u64 event, u64 alt[], int size, unsigned int flags,
++ const unsigned int ev_alt[][MAX_ALT]);
+ void isa207_get_mem_data_src(union perf_mem_data_src *dsrc, u32 flags,
+ struct pt_regs *regs);
+ void isa207_get_mem_weight(u64 *weight);
+diff --git a/arch/powerpc/perf/power8-pmu.c b/arch/powerpc/perf/power8-pmu.c
+index 5463516e369b..c9356955cab4 100644
+--- a/arch/powerpc/perf/power8-pmu.c
++++ b/arch/powerpc/perf/power8-pmu.c
+@@ -50,34 +50,11 @@ static const unsigned int event_alternatives[][MAX_ALT] = {
+
+ static int power8_get_alternatives(u64 event, unsigned int flags, u64 alt[])
+ {
+- int i, j, num_alt = 0;
+-
+- num_alt = isa207_get_alternatives(event, alt, event_alternatives,
+- (int)ARRAY_SIZE(event_alternatives));
+- if (flags & PPMU_ONLY_COUNT_RUN) {
+- /*
+- * We're only counting in RUN state, so PM_CYC is equivalent to
+- * PM_RUN_CYC and PM_INST_CMPL === PM_RUN_INST_CMPL.
+- */
+- j = num_alt;
+- for (i = 0; i < num_alt; ++i) {
+- switch (alt[i]) {
+- case PM_CYC:
+- alt[j++] = PM_RUN_CYC;
+- break;
+- case PM_RUN_CYC:
+- alt[j++] = PM_CYC;
+- break;
+- case PM_INST_CMPL:
+- alt[j++] = PM_RUN_INST_CMPL;
+- break;
+- case PM_RUN_INST_CMPL:
+- alt[j++] = PM_INST_CMPL;
+- break;
+- }
+- }
+- num_alt = j;
+- }
++ int num_alt = 0;
++
++ num_alt = isa207_get_alternatives(event, alt,
++ ARRAY_SIZE(event_alternatives), flags,
++ event_alternatives);
+
+ return num_alt;
+ }
+diff --git a/arch/powerpc/perf/power9-pmu.c b/arch/powerpc/perf/power9-pmu.c
+index 2280cf87ff9c..d83aa24b77d4 100644
+--- a/arch/powerpc/perf/power9-pmu.c
++++ b/arch/powerpc/perf/power9-pmu.c
+@@ -115,8 +115,9 @@ static int power9_get_alternatives(u64 event, unsigned int flags, u64 alt[])
+ {
+ int num_alt = 0;
+
+- num_alt = isa207_get_alternatives(event, alt, power9_event_alternatives,
+- (int)ARRAY_SIZE(power9_event_alternatives));
++ num_alt = isa207_get_alternatives(event, alt,
++ ARRAY_SIZE(power9_event_alternatives), flags,
++ power9_event_alternatives);
+
+ return num_alt;
+ }
+--
+2.13.6
+
diff --git a/patches.arch/powerpc-powernv-Increase-memory-block-size-to-1GB-on.patch b/patches.arch/powerpc-powernv-Increase-memory-block-size-to-1GB-on.patch
new file mode 100644
index 0000000000..4cf6ce3156
--- /dev/null
+++ b/patches.arch/powerpc-powernv-Increase-memory-block-size-to-1GB-on.patch
@@ -0,0 +1,52 @@
+From 53ecde0b9126ff140abe3aefd7f0ec64d6fa36b0 Mon Sep 17 00:00:00 2001
+From: Anton Blanchard <anton@samba.org>
+Date: Thu, 7 Sep 2017 15:05:51 +1000
+Subject: [PATCH] powerpc/powernv: Increase memory block size to 1GB on radix
+
+References: bsc#1065729
+Patch-mainline: v4.14-rc4
+Git-commit: 53ecde0b9126ff140abe3aefd7f0ec64d6fa36b0
+
+Memory hot unplug on PowerNV radix hosts is broken. Our memory block
+size is 256MB but since we map the linear region with very large
+pages, each pte we tear down maps 1GB.
+
+A hot unplug of one 256MB memory block results in 768MB of memory
+getting unintentionally unmapped. At this point we are likely to oops.
+
+Fix this by increasing our memory block size to 1GB on PowerNV radix
+hosts.
+
+Fixes: 4b5d62ca17a1 ("powerpc/mm: add radix__remove_section_mapping()")
+Cc: stable@vger.kernel.org # v4.11+
+Signed-off-by: Anton Blanchard <anton@samba.org>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ arch/powerpc/platforms/powernv/setup.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms/powernv/setup.c
+index 897aa1400eb8..bbb73aa0eb8f 100644
+--- a/arch/powerpc/platforms/powernv/setup.c
++++ b/arch/powerpc/platforms/powernv/setup.c
+@@ -272,7 +272,15 @@ static void pnv_kexec_cpu_down(int crash_shutdown, int secondary)
+ #ifdef CONFIG_MEMORY_HOTPLUG_SPARSE
+ static unsigned long pnv_memory_block_size(void)
+ {
+- return 256UL * 1024 * 1024;
++ /*
++ * We map the kernel linear region with 1GB large pages on radix. For
++ * memory hot unplug to work our memory block size must be at least
++ * this size.
++ */
++ if (radix_enabled())
++ return 1UL * 1024 * 1024 * 1024;
++ else
++ return 256UL * 1024 * 1024;
+ }
+ #endif
+
+--
+2.13.6
+
diff --git a/patches.arch/powerpc-xmon-Fix-display-of-SPRs.patch b/patches.arch/powerpc-xmon-Fix-display-of-SPRs.patch
new file mode 100644
index 0000000000..91645b4cd5
--- /dev/null
+++ b/patches.arch/powerpc-xmon-Fix-display-of-SPRs.patch
@@ -0,0 +1,106 @@
+From c47a94031e81bd497704a535d60d0262a3155dbf Mon Sep 17 00:00:00 2001
+From: Balbir Singh <bsingharora@gmail.com>
+Date: Tue, 29 Aug 2017 17:22:36 +1000
+Subject: [PATCH] powerpc/xmon: Fix display of SPRs
+
+References: bsc#1065729
+Patch-mainline: v4.14-rc1
+Git-commit: c47a94031e81bd497704a535d60d0262a3155dbf
+
+Convert 0.16x to 0.16lx. Otherwise we lose the top 8 nibbles and
+effectively print only the last 32 bits.
+
+Fixes: 1846193b178d ("powerpc/xmon: Dump ISA 2.06 SPRs")
+Signed-off-by: Balbir Singh <bsingharora@gmail.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ arch/powerpc/xmon/xmon.c | 32 ++++++++++++++++----------------
+ 1 file changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
+index d038e7db44c4..9e68f1dca568 100644
+--- a/arch/powerpc/xmon/xmon.c
++++ b/arch/powerpc/xmon/xmon.c
+@@ -1739,23 +1739,23 @@ static void dump_206_sprs(void)
+
+ /* Actually some of these pre-date 2.06, but whatevs */
+
+- printf("srr0 = %.16x srr1 = %.16x dsisr = %.8x\n",
++ printf("srr0 = %.16lx srr1 = %.16lx dsisr = %.8x\n",
+ mfspr(SPRN_SRR0), mfspr(SPRN_SRR1), mfspr(SPRN_DSISR));
+- printf("dscr = %.16x ppr = %.16x pir = %.8x\n",
++ printf("dscr = %.16lx ppr = %.16lx pir = %.8x\n",
+ mfspr(SPRN_DSCR), mfspr(SPRN_PPR), mfspr(SPRN_PIR));
+
+ if (!(mfmsr() & MSR_HV))
+ return;
+
+- printf("sdr1 = %.16x hdar = %.16x hdsisr = %.8x\n",
++ printf("sdr1 = %.16lx hdar = %.16lx hdsisr = %.8x\n",
+ mfspr(SPRN_SDR1), mfspr(SPRN_HDAR), mfspr(SPRN_HDSISR));
+- printf("hsrr0 = %.16x hsrr1 = %.16x hdec = %.8x\n",
++ printf("hsrr0 = %.16lx hsrr1 = %.16lx hdec = %.8x\n",
+ mfspr(SPRN_HSRR0), mfspr(SPRN_HSRR1), mfspr(SPRN_HDEC));
+- printf("lpcr = %.16x pcr = %.16x lpidr = %.8x\n",
++ printf("lpcr = %.16lx pcr = %.16lx lpidr = %.8x\n",
+ mfspr(SPRN_LPCR), mfspr(SPRN_PCR), mfspr(SPRN_LPID));
+- printf("hsprg0 = %.16x hsprg1 = %.16x\n",
++ printf("hsprg0 = %.16lx hsprg1 = %.16lx\n",
+ mfspr(SPRN_HSPRG0), mfspr(SPRN_HSPRG1));
+- printf("dabr = %.16x dabrx = %.16x\n",
++ printf("dabr = %.16lx dabrx = %.16lx\n",
+ mfspr(SPRN_DABR), mfspr(SPRN_DABRX));
+ #endif
+ }
+@@ -1768,38 +1768,38 @@ static void dump_207_sprs(void)
+ if (!cpu_has_feature(CPU_FTR_ARCH_207S))
+ return;
+
+- printf("dpdes = %.16x tir = %.16x cir = %.8x\n",
++ printf("dpdes = %.16lx tir = %.16lx cir = %.8x\n",
+ mfspr(SPRN_DPDES), mfspr(SPRN_TIR), mfspr(SPRN_CIR));
+
+- printf("fscr = %.16x tar = %.16x pspb = %.8x\n",
++ printf("fscr = %.16lx tar = %.16lx pspb = %.8x\n",
+ mfspr(SPRN_FSCR), mfspr(SPRN_TAR), mfspr(SPRN_PSPB));
+
+ msr = mfmsr();
+ if (msr & MSR_TM) {
+ /* Only if TM has been enabled in the kernel */
+- printf("tfhar = %.16x tfiar = %.16x texasr = %.16x\n",
++ printf("tfhar = %.16lx tfiar = %.16lx texasr = %.16lx\n",
+ mfspr(SPRN_TFHAR), mfspr(SPRN_TFIAR),
+ mfspr(SPRN_TEXASR));
+ }
+
+- printf("mmcr0 = %.16x mmcr1 = %.16x mmcr2 = %.16x\n",
++ printf("mmcr0 = %.16lx mmcr1 = %.16lx mmcr2 = %.16lx\n",
+ mfspr(SPRN_MMCR0), mfspr(SPRN_MMCR1), mfspr(SPRN_MMCR2));
+ printf("pmc1 = %.8x pmc2 = %.8x pmc3 = %.8x pmc4 = %.8x\n",
+ mfspr(SPRN_PMC1), mfspr(SPRN_PMC2),
+ mfspr(SPRN_PMC3), mfspr(SPRN_PMC4));
+- printf("mmcra = %.16x siar = %.16x pmc5 = %.8x\n",
++ printf("mmcra = %.16lx siar = %.16lx pmc5 = %.8x\n",
+ mfspr(SPRN_MMCRA), mfspr(SPRN_SIAR), mfspr(SPRN_PMC5));
+- printf("sdar = %.16x sier = %.16x pmc6 = %.8x\n",
++ printf("sdar = %.16lx sier = %.16lx pmc6 = %.8x\n",
+ mfspr(SPRN_SDAR), mfspr(SPRN_SIER), mfspr(SPRN_PMC6));
+- printf("ebbhr = %.16x ebbrr = %.16x bescr = %.16x\n",
++ printf("ebbhr = %.16lx ebbrr = %.16lx bescr = %.16lx\n",
+ mfspr(SPRN_EBBHR), mfspr(SPRN_EBBRR), mfspr(SPRN_BESCR));
+
+ if (!(msr & MSR_HV))
+ return;
+
+- printf("hfscr = %.16x dhdes = %.16x rpr = %.16x\n",
++ printf("hfscr = %.16lx dhdes = %.16lx rpr = %.16lx\n",
+ mfspr(SPRN_HFSCR), mfspr(SPRN_DHDES), mfspr(SPRN_RPR));
+- printf("dawr = %.16x dawrx = %.16x ciabr = %.16x\n",
++ printf("dawr = %.16lx dawrx = %.16lx ciabr = %.16lx\n",
+ mfspr(SPRN_DAWR), mfspr(SPRN_DAWRX), mfspr(SPRN_CIABR));
+ #endif
+ }
+--
+2.13.6
+
diff --git a/patches.drivers/ibmvnic-114-Fix-calculation-of-number-of-TX-header-descr.patch b/patches.drivers/ibmvnic-114-Fix-calculation-of-number-of-TX-header-descr.patch
new file mode 100644
index 0000000000..d87f2ad09f
--- /dev/null
+++ b/patches.drivers/ibmvnic-114-Fix-calculation-of-number-of-TX-header-descr.patch
@@ -0,0 +1,71 @@
+From 2de09681e4ce8b1caa79d2e4482b72d8ef41c550 Mon Sep 17 00:00:00 2001
+From: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
+Date: Mon, 16 Oct 2017 10:02:11 -0500
+Subject: [PATCH] ibmvnic: Fix calculation of number of TX header descriptors
+
+References: bsc#1066382
+Patch-mainline: v4.14-rc6
+Git-commit: 2de09681e4ce8b1caa79d2e4482b72d8ef41c550
+
+This patch correctly sets the number of additional header descriptors
+that will be sent in an indirect SCRQ entry.
+
+Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ drivers/net/ethernet/ibm/ibmvnic.c | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
+index cb8182f4fdfa..c66abd476023 100644
+--- a/drivers/net/ethernet/ibm/ibmvnic.c
++++ b/drivers/net/ethernet/ibm/ibmvnic.c
+@@ -1093,11 +1093,12 @@ static int build_hdr_data(u8 hdr_field, struct sk_buff *skb,
+ * places them in a descriptor array, scrq_arr
+ */
+
+-static void create_hdr_descs(u8 hdr_field, u8 *hdr_data, int len, int *hdr_len,
+- union sub_crq *scrq_arr)
++static int create_hdr_descs(u8 hdr_field, u8 *hdr_data, int len, int *hdr_len,
++ union sub_crq *scrq_arr)
+ {
+ union sub_crq hdr_desc;
+ int tmp_len = len;
++ int num_descs = 0;
+ u8 *data, *cur;
+ int tmp;
+
+@@ -1126,7 +1127,10 @@ static void create_hdr_descs(u8 hdr_field, u8 *hdr_data, int len, int *hdr_len,
+ tmp_len -= tmp;
+ *scrq_arr = hdr_desc;
+ scrq_arr++;
++ num_descs++;
+ }
++
++ return num_descs;
+ }
+
+ /**
+@@ -1144,16 +1148,12 @@ static void build_hdr_descs_arr(struct ibmvnic_tx_buff *txbuff,
+ int *num_entries, u8 hdr_field)
+ {
+ int hdr_len[3] = {0, 0, 0};
+- int tot_len, len;
++ int tot_len;
+ u8 *hdr_data = txbuff->hdr_data;
+
+ tot_len = build_hdr_data(hdr_field, txbuff->skb, hdr_len,
+ txbuff->hdr_data);
+- len = tot_len;
+- len -= 24;
+- if (len > 0)
+- num_entries += len % 29 ? len / 29 + 1 : len / 29;
+- create_hdr_descs(hdr_field, hdr_data, tot_len, hdr_len,
++ *num_entries += create_hdr_descs(hdr_field, hdr_data, tot_len, hdr_len,
+ txbuff->indir_arr + 1);
+ }
+
+--
+2.13.6
+
diff --git a/patches.drivers/ibmvnic-115-Enable-scatter-gather-support.patch b/patches.drivers/ibmvnic-115-Enable-scatter-gather-support.patch
new file mode 100644
index 0000000000..98ae413b6b
--- /dev/null
+++ b/patches.drivers/ibmvnic-115-Enable-scatter-gather-support.patch
@@ -0,0 +1,68 @@
+From 154820563dd4621c78e03e98e70216e832422f8e Mon Sep 17 00:00:00 2001
+From: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
+Date: Tue, 17 Oct 2017 12:36:54 -0500
+Subject: [PATCH] ibmvnic: Enable scatter-gather support
+
+Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+References: bsc#1066382
+Patch-mainline: queued, net-next
+Git-commit: 154820563dd4621c78e03e98e70216e832422f8e
+
+This patch enables scatter gather support. Since there is no
+HW/FW scatter-gather support at this time, the driver needs to
+loop through each fragment and copy it to a contiguous, pre-mapped
+buffer entry.
+
+Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ drivers/net/ethernet/ibm/ibmvnic.c | 23 +++++++++++++++++++++--
+ 1 file changed, 21 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
+index 4bc14a901571..b508877397e1 100644
+--- a/drivers/net/ethernet/ibm/ibmvnic.c
++++ b/drivers/net/ethernet/ibm/ibmvnic.c
+@@ -1204,9 +1204,28 @@ static int ibmvnic_xmit(struct sk_buff *skb, struct net_device *netdev)
+ offset = index * adapter->req_mtu;
+ dst = tx_pool->long_term_buff.buff + offset;
+ memset(dst, 0, adapter->req_mtu);
+- skb_copy_from_linear_data(skb, dst, skb->len);
+ data_dma_addr = tx_pool->long_term_buff.addr + offset;
+
++ if (skb_shinfo(skb)->nr_frags) {
++ int cur, i;
++
++ /* Copy the head */
++ skb_copy_from_linear_data(skb, dst, skb_headlen(skb));
++ cur = skb_headlen(skb);
++
++ /* Copy the frags */
++ for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
++ const skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
++
++ memcpy(dst + cur,
++ page_address(skb_frag_page(frag)) +
++ frag->page_offset, skb_frag_size(frag));
++ cur += skb_frag_size(frag);
++ }
++ } else {
++ skb_copy_from_linear_data(skb, dst, skb->len);
++ }
++
+ tx_pool->consumer_index =
+ (tx_pool->consumer_index + 1) %
+ adapter->req_tx_entries_per_subcrq;
+@@ -2948,7 +2967,7 @@ static void handle_query_ip_offload_rsp(struct ibmvnic_adapter *adapter)
+ adapter->ip_offload_ctrl.large_rx_ipv4 = 0;
+ adapter->ip_offload_ctrl.large_rx_ipv6 = 0;
+
+- adapter->netdev->features = NETIF_F_GSO;
++ adapter->netdev->features = NETIF_F_SG | NETIF_F_GSO;
+
+ if (buf->tcp_ipv4_chksum || buf->udp_ipv4_chksum)
+ adapter->netdev->features |= NETIF_F_IP_CSUM;
+--
+2.13.6
+
diff --git a/patches.drivers/ibmvnic-116-Enable-TSO-support.patch b/patches.drivers/ibmvnic-116-Enable-TSO-support.patch
new file mode 100644
index 0000000000..94aead28a9
--- /dev/null
+++ b/patches.drivers/ibmvnic-116-Enable-TSO-support.patch
@@ -0,0 +1,173 @@
+From fdb061056f57e849a05cac072a4998c7f33d797e Mon Sep 17 00:00:00 2001
+From: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
+Date: Tue, 17 Oct 2017 12:36:55 -0500
+Subject: [PATCH] ibmvnic: Enable TSO support
+
+Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+References: bsc#1066382
+Patch-mainline: queued, net-next
+Git-commit: fdb061056f57e849a05cac072a4998c7f33d797e
+
+This patch enables TSO support. It includes additional
+buffers reserved exclusively for large packets. Throughput
+is greatly increased with TSO enabled, from about 1 Gb/s to
+9 Gb/s on our test systems.
+
+Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ drivers/net/ethernet/ibm/ibmvnic.c | 56 ++++++++++++++++++++++++++++++++------
+ drivers/net/ethernet/ibm/ibmvnic.h | 5 ++++
+ 2 files changed, 53 insertions(+), 8 deletions(-)
+
+diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
+index b508877397e1..aedb81c230a6 100644
+--- a/drivers/net/ethernet/ibm/ibmvnic.c
++++ b/drivers/net/ethernet/ibm/ibmvnic.c
+@@ -553,6 +553,10 @@ static int reset_tx_pools(struct ibmvnic_adapter *adapter)
+ if (rc)
+ return rc;
+
++ rc = reset_long_term_buff(adapter, &tx_pool->tso_ltb);
++ if (rc)
++ return rc;
++
+ memset(tx_pool->tx_buff, 0,
+ adapter->req_tx_entries_per_subcrq *
+ sizeof(struct ibmvnic_tx_buff));
+@@ -562,6 +566,7 @@ static int reset_tx_pools(struct ibmvnic_adapter *adapter)
+
+ tx_pool->consumer_index = 0;
+ tx_pool->producer_index = 0;
++ tx_pool->tso_index = 0;
+ }
+
+ return 0;
+@@ -581,6 +586,7 @@ static void release_tx_pools(struct ibmvnic_adapter *adapter)
+ tx_pool = &adapter->tx_pool[i];
+ kfree(tx_pool->tx_buff);
+ free_long_term_buff(adapter, &tx_pool->long_term_buff);
++ free_long_term_buff(adapter, &tx_pool->tso_ltb);
+ kfree(tx_pool->free_map);
+ }
+
+@@ -625,6 +631,16 @@ static int init_tx_pools(struct net_device *netdev)
+ return -1;
+ }
+
++ /* alloc TSO ltb */
++ if (alloc_long_term_buff(adapter, &tx_pool->tso_ltb,
++ IBMVNIC_TSO_BUFS *
++ IBMVNIC_TSO_BUF_SZ)) {
++ release_tx_pools(adapter);
++ return -1;
++ }
++
++ tx_pool->tso_index = 0;
++
+ tx_pool->free_map = kcalloc(adapter->req_tx_entries_per_subcrq,
+ sizeof(int), GFP_KERNEL);
+ if (!tx_pool->free_map) {
+@@ -1201,10 +1217,21 @@ static int ibmvnic_xmit(struct sk_buff *skb, struct net_device *netdev)
+ be32_to_cpu(adapter->login_rsp_buf->off_txsubm_subcrqs));
+
+ index = tx_pool->free_map[tx_pool->consumer_index];
+- offset = index * adapter->req_mtu;
+- dst = tx_pool->long_term_buff.buff + offset;
+- memset(dst, 0, adapter->req_mtu);
+- data_dma_addr = tx_pool->long_term_buff.addr + offset;
++
++ if (skb_is_gso(skb)) {
++ offset = tx_pool->tso_index * IBMVNIC_TSO_BUF_SZ;
++ dst = tx_pool->tso_ltb.buff + offset;
++ memset(dst, 0, IBMVNIC_TSO_BUF_SZ);
++ data_dma_addr = tx_pool->tso_ltb.addr + offset;
++ tx_pool->tso_index++;
++ if (tx_pool->tso_index == IBMVNIC_TSO_BUFS)
++ tx_pool->tso_index = 0;
++ } else {
++ offset = index * adapter->req_mtu;
++ dst = tx_pool->long_term_buff.buff + offset;
++ memset(dst, 0, adapter->req_mtu);
++ data_dma_addr = tx_pool->long_term_buff.addr + offset;
++ }
+
+ if (skb_shinfo(skb)->nr_frags) {
+ int cur, i;
+@@ -1245,7 +1272,10 @@ static int ibmvnic_xmit(struct sk_buff *skb, struct net_device *netdev)
+ tx_crq.v1.n_sge = 1;
+ tx_crq.v1.flags1 = IBMVNIC_TX_COMP_NEEDED;
+ tx_crq.v1.correlator = cpu_to_be32(index);
+- tx_crq.v1.dma_reg = cpu_to_be16(tx_pool->long_term_buff.map_id);
++ if (skb_is_gso(skb))
++ tx_crq.v1.dma_reg = cpu_to_be16(tx_pool->tso_ltb.map_id);
++ else
++ tx_crq.v1.dma_reg = cpu_to_be16(tx_pool->long_term_buff.map_id);
+ tx_crq.v1.sge_len = cpu_to_be32(skb->len);
+ tx_crq.v1.ioba = cpu_to_be64(data_dma_addr);
+
+@@ -1270,6 +1300,11 @@ static int ibmvnic_xmit(struct sk_buff *skb, struct net_device *netdev)
+ tx_crq.v1.flags1 |= IBMVNIC_TX_CHKSUM_OFFLOAD;
+ hdrs += 2;
+ }
++ if (skb_is_gso(skb)) {
++ tx_crq.v1.flags1 |= IBMVNIC_TX_LSO;
++ tx_crq.v1.mss = cpu_to_be16(skb_shinfo(skb)->gso_size);
++ hdrs += 2;
++ }
+ /* determine if l2/3/4 headers are sent to firmware */
+ if ((*hdrs >> 7) & 1 &&
+ (skb->protocol == htons(ETH_P_IP) ||
+@@ -2960,10 +2995,10 @@ static void handle_query_ip_offload_rsp(struct ibmvnic_adapter *adapter)
+ adapter->ip_offload_ctrl.udp_ipv4_chksum = buf->udp_ipv4_chksum;
+ adapter->ip_offload_ctrl.tcp_ipv6_chksum = buf->tcp_ipv6_chksum;
+ adapter->ip_offload_ctrl.udp_ipv6_chksum = buf->udp_ipv6_chksum;
++ adapter->ip_offload_ctrl.large_tx_ipv4 = buf->large_tx_ipv4;
++ adapter->ip_offload_ctrl.large_tx_ipv6 = buf->large_tx_ipv6;
+
+- /* large_tx/rx disabled for now, additional features needed */
+- adapter->ip_offload_ctrl.large_tx_ipv4 = 0;
+- adapter->ip_offload_ctrl.large_tx_ipv6 = 0;
++ /* large_rx disabled for now, additional features needed */
+ adapter->ip_offload_ctrl.large_rx_ipv4 = 0;
+ adapter->ip_offload_ctrl.large_rx_ipv6 = 0;
+
+@@ -2979,6 +3014,11 @@ static void handle_query_ip_offload_rsp(struct ibmvnic_adapter *adapter)
+ (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM)))
+ adapter->netdev->features |= NETIF_F_RXCSUM;
+
++ if (buf->large_tx_ipv4)
++ adapter->netdev->features |= NETIF_F_TSO;
++ if (buf->large_tx_ipv6)
++ adapter->netdev->features |= NETIF_F_TSO6;
++
+ memset(&crq, 0, sizeof(crq));
+ crq.control_ip_offload.first = IBMVNIC_CRQ_CMD;
+ crq.control_ip_offload.cmd = CONTROL_IP_OFFLOAD;
+diff --git a/drivers/net/ethernet/ibm/ibmvnic.h b/drivers/net/ethernet/ibm/ibmvnic.h
+index d02257ccc377..7aa347a21e78 100644
+--- a/drivers/net/ethernet/ibm/ibmvnic.h
++++ b/drivers/net/ethernet/ibm/ibmvnic.h
+@@ -39,6 +39,9 @@
+ #define IBMVNIC_BUFFS_PER_POOL 100
+ #define IBMVNIC_MAX_TX_QUEUES 5
+
++#define IBMVNIC_TSO_BUF_SZ 65536
++#define IBMVNIC_TSO_BUFS 64
++
+ struct ibmvnic_login_buffer {
+ __be32 len;
+ __be32 version;
+@@ -896,6 +899,8 @@ struct ibmvnic_tx_pool {
+ wait_queue_head_t ibmvnic_tx_comp_q;
+ struct task_struct *work_thread;
+ struct ibmvnic_long_term_buff long_term_buff;
++ struct ibmvnic_long_term_buff tso_ltb;
++ int tso_index;
+ };
+
+ struct ibmvnic_rx_buff {
+--
+2.13.6
+
diff --git a/patches.drivers/ibmvnic-117-Let-users-change-net-device-features.patch b/patches.drivers/ibmvnic-117-Let-users-change-net-device-features.patch
new file mode 100644
index 0000000000..9811df566e
--- /dev/null
+++ b/patches.drivers/ibmvnic-117-Let-users-change-net-device-features.patch
@@ -0,0 +1,33 @@
+From aa0bf8510dac901badc6889b208fc0e7d9225924 Mon Sep 17 00:00:00 2001
+From: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
+Date: Tue, 17 Oct 2017 12:36:56 -0500
+Subject: [PATCH] ibmvnic: Let users change net device features
+
+Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+References: bsc#1066382
+Patch-mainline: queued, net-next
+Git-commit: aa0bf8510dac901badc6889b208fc0e7d9225924
+
+Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ drivers/net/ethernet/ibm/ibmvnic.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
+index aedb81c230a6..b991703319f9 100644
+--- a/drivers/net/ethernet/ibm/ibmvnic.c
++++ b/drivers/net/ethernet/ibm/ibmvnic.c
+@@ -3019,6 +3019,8 @@ static void handle_query_ip_offload_rsp(struct ibmvnic_adapter *adapter)
+ if (buf->large_tx_ipv6)
+ adapter->netdev->features |= NETIF_F_TSO6;
+
++ adapter->netdev->hw_features |= adapter->netdev->features;
++
+ memset(&crq, 0, sizeof(crq));
+ crq.control_ip_offload.first = IBMVNIC_CRQ_CMD;
+ crq.control_ip_offload.cmd = CONTROL_IP_OFFLOAD;
+--
+2.13.6
+
diff --git a/patches.drivers/ibmvnic-118-Update-reset-infrastructure-to-support-tunab.patch b/patches.drivers/ibmvnic-118-Update-reset-infrastructure-to-support-tunab.patch
new file mode 100644
index 0000000000..e048b5c661
--- /dev/null
+++ b/patches.drivers/ibmvnic-118-Update-reset-infrastructure-to-support-tunab.patch
@@ -0,0 +1,460 @@
+From c26eba03e4073bd32ef6c0ea2ba2a3ff5eed11da Mon Sep 17 00:00:00 2001
+From: John Allen <jallen@linux.vnet.ibm.com>
+Date: Thu, 26 Oct 2017 16:23:25 -0500
+Subject: [PATCH] ibmvnic: Update reset infrastructure to support tunable
+ parameters
+
+Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+References: bsc#1066382
+Patch-mainline: queued, net-next
+Git-commit: c26eba03e4073bd32ef6c0ea2ba2a3ff5eed11da
+
+Update ibmvnic reset infrastructure to include a new reset option that will
+allow changing of tunable parameters. There currently is no way to request
+different capabilities from the vnic server on the fly so this patch
+achieves this by resetting the driver and attempting to log in with the
+requested changes. If the reset operation fails, the old values of the
+tunable parameters are stored in the "fallback" struct and we attempt to
+login with the fallback values.
+
+Signed-off-by: John Allen <jallen@linux.vnet.ibm.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ drivers/net/ethernet/ibm/ibmvnic.c | 213 ++++++++++++++++++++++++++++++++-----
+ drivers/net/ethernet/ibm/ibmvnic.h | 24 ++++-
+ 2 files changed, 209 insertions(+), 28 deletions(-)
+
+diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
+index 11eba8277132..3d0280196fdc 100644
+--- a/drivers/net/ethernet/ibm/ibmvnic.c
++++ b/drivers/net/ethernet/ibm/ibmvnic.c
+@@ -115,6 +115,7 @@ static int init_sub_crqs(struct ibmvnic_adapter *);
+ static int init_sub_crq_irqs(struct ibmvnic_adapter *adapter);
+ static int ibmvnic_init(struct ibmvnic_adapter *);
+ static void release_crq_queue(struct ibmvnic_adapter *);
++static int __ibmvnic_set_mac(struct net_device *netdev, struct sockaddr *p);
+
+ struct ibmvnic_stat {
+ char name[ETH_GSTRING_LEN];
+@@ -926,6 +927,11 @@ static int ibmvnic_open(struct net_device *netdev)
+
+ mutex_lock(&adapter->reset_lock);
+
++ if (adapter->mac_change_pending) {
++ __ibmvnic_set_mac(netdev, &adapter->desired.mac);
++ adapter->mac_change_pending = false;
++ }
++
+ if (adapter->state != VNIC_CLOSED) {
+ rc = ibmvnic_login(netdev);
+ if (rc) {
+@@ -1426,7 +1432,7 @@ static void ibmvnic_set_multi(struct net_device *netdev)
+ }
+ }
+
+-static int ibmvnic_set_mac(struct net_device *netdev, void *p)
++static int __ibmvnic_set_mac(struct net_device *netdev, struct sockaddr *p)
+ {
+ struct ibmvnic_adapter *adapter = netdev_priv(netdev);
+ struct sockaddr *addr = p;
+@@ -1444,6 +1450,22 @@ static int ibmvnic_set_mac(struct net_device *netdev, void *p)
+ return 0;
+ }
+
++static int ibmvnic_set_mac(struct net_device *netdev, void *p)
++{
++ struct ibmvnic_adapter *adapter = netdev_priv(netdev);
++ struct sockaddr *addr = p;
++
++ if (adapter->state != VNIC_OPEN) {
++ memcpy(&adapter->desired.mac, addr, sizeof(struct sockaddr));
++ adapter->mac_change_pending = true;
++ return 0;
++ }
++
++ __ibmvnic_set_mac(netdev, addr);
++
++ return 0;
++}
++
+ /**
+ * do_reset returns zero if we are able to keep processing reset events, or
+ * non-zero if we hit a fatal error and must halt.
+@@ -1470,6 +1492,13 @@ static int do_reset(struct ibmvnic_adapter *adapter,
+ if (rc)
+ return rc;
+
++ if (adapter->reset_reason == VNIC_RESET_CHANGE_PARAM ||
++ adapter->wait_for_reset) {
++ release_resources(adapter);
++ release_sub_crqs(adapter);
++ release_crq_queue(adapter);
++ }
++
+ if (adapter->reset_reason != VNIC_RESET_NON_FATAL) {
+ /* remove the closed state so when we call open it appears
+ * we are coming from the probed state.
+@@ -1492,16 +1521,23 @@ static int do_reset(struct ibmvnic_adapter *adapter,
+ return 0;
+ }
+
+- rc = reset_tx_pools(adapter);
+- if (rc)
+- return rc;
++ if (adapter->reset_reason == VNIC_RESET_CHANGE_PARAM ||
++ adapter->wait_for_reset) {
++ rc = init_resources(adapter);
++ if (rc)
++ return rc;
++ } else {
++ rc = reset_tx_pools(adapter);
++ if (rc)
++ return rc;
+
+- rc = reset_rx_pools(adapter);
+- if (rc)
+- return rc;
++ rc = reset_rx_pools(adapter);
++ if (rc)
++ return rc;
+
+- if (reset_state == VNIC_CLOSED)
+- return 0;
++ if (reset_state == VNIC_CLOSED)
++ return 0;
++ }
+ }
+
+ rc = __ibmvnic_open(netdev);
+@@ -1561,7 +1597,7 @@ static void __ibmvnic_reset(struct work_struct *work)
+ struct ibmvnic_adapter *adapter;
+ struct net_device *netdev;
+ u32 reset_state;
+- int rc;
++ int rc = 0;
+
+ adapter = container_of(work, struct ibmvnic_adapter, ibmvnic_reset);
+ netdev = adapter->netdev;
+@@ -1580,6 +1616,12 @@ static void __ibmvnic_reset(struct work_struct *work)
+ rwi = get_next_rwi(adapter);
+ }
+
++ if (adapter->wait_for_reset) {
++ adapter->wait_for_reset = false;
++ adapter->reset_done_rc = rc;
++ complete(&adapter->reset_done);
++ }
++
+ if (rc) {
+ netdev_dbg(adapter->netdev, "Reset failed\n");
+ free_all_rwi(adapter);
+@@ -1759,9 +1801,42 @@ static void ibmvnic_netpoll_controller(struct net_device *dev)
+ }
+ #endif
+
++static int wait_for_reset(struct ibmvnic_adapter *adapter)
++{
++ adapter->fallback.mtu = adapter->req_mtu;
++ adapter->fallback.rx_queues = adapter->req_rx_queues;
++ adapter->fallback.tx_queues = adapter->req_tx_queues;
++ adapter->fallback.rx_entries = adapter->req_rx_add_entries_per_subcrq;
++ adapter->fallback.tx_entries = adapter->req_tx_entries_per_subcrq;
++
++ init_completion(&adapter->reset_done);
++ ibmvnic_reset(adapter, VNIC_RESET_CHANGE_PARAM);
++ adapter->wait_for_reset = true;
++ wait_for_completion(&adapter->reset_done);
++
++ if (adapter->reset_done_rc) {
++ adapter->desired.mtu = adapter->fallback.mtu;
++ adapter->desired.rx_queues = adapter->fallback.rx_queues;
++ adapter->desired.tx_queues = adapter->fallback.tx_queues;
++ adapter->desired.rx_entries = adapter->fallback.rx_entries;
++ adapter->desired.tx_entries = adapter->fallback.tx_entries;
++
++ init_completion(&adapter->reset_done);
++ ibmvnic_reset(adapter, VNIC_RESET_CHANGE_PARAM);
++ wait_for_completion(&adapter->reset_done);
++ }
++ adapter->wait_for_reset = false;
++
++ return adapter->reset_done_rc;
++}
++
+ static int ibmvnic_change_mtu(struct net_device *netdev, int new_mtu)
+ {
+- return -EOPNOTSUPP;
++ struct ibmvnic_adapter *adapter = netdev_priv(netdev);
++
++ adapter->desired.mtu = new_mtu + ETH_HLEN;
++
++ return wait_for_reset(adapter);
+ }
+
+ static const struct net_device_ops ibmvnic_netdev_ops = {
+@@ -1849,6 +1924,27 @@ static void ibmvnic_get_ringparam(struct net_device *netdev,
+ ring->rx_jumbo_pending = 0;
+ }
+
++static int ibmvnic_set_ringparam(struct net_device *netdev,
++ struct ethtool_ringparam *ring)
++{
++ struct ibmvnic_adapter *adapter = netdev_priv(netdev);
++
++ if (ring->rx_pending > adapter->max_rx_add_entries_per_subcrq ||
++ ring->tx_pending > adapter->max_tx_entries_per_subcrq) {
++ netdev_err(netdev, "Invalid request.\n");
++ netdev_err(netdev, "Max tx buffers = %llu\n",
++ adapter->max_rx_add_entries_per_subcrq);
++ netdev_err(netdev, "Max rx buffers = %llu\n",
++ adapter->max_tx_entries_per_subcrq);
++ return -EINVAL;
++ }
++
++ adapter->desired.rx_entries = ring->rx_pending;
++ adapter->desired.tx_entries = ring->tx_pending;
++
++ return wait_for_reset(adapter);
++}
++
+ static void ibmvnic_get_channels(struct net_device *netdev,
+ struct ethtool_channels *channels)
+ {
+@@ -1864,6 +1960,17 @@ static void ibmvnic_get_channels(struct net_device *netdev,
+ channels->combined_count = 0;
+ }
+
++static int ibmvnic_set_channels(struct net_device *netdev,
++ struct ethtool_channels *channels)
++{
++ struct ibmvnic_adapter *adapter = netdev_priv(netdev);
++
++ adapter->desired.rx_queues = channels->rx_count;
++ adapter->desired.tx_queues = channels->tx_count;
++
++ return wait_for_reset(adapter);
++}
++
+ static void ibmvnic_get_strings(struct net_device *dev, u32 stringset, u8 *data)
+ {
+ struct ibmvnic_adapter *adapter = netdev_priv(dev);
+@@ -1960,7 +2067,9 @@ static const struct ethtool_ops ibmvnic_ethtool_ops = {
+ .set_msglevel = ibmvnic_set_msglevel,
+ .get_link = ibmvnic_get_link,
+ .get_ringparam = ibmvnic_get_ringparam,
++ .set_ringparam = ibmvnic_set_ringparam,
+ .get_channels = ibmvnic_get_channels,
++ .set_channels = ibmvnic_set_channels,
+ .get_strings = ibmvnic_get_strings,
+ .get_sset_count = ibmvnic_get_sset_count,
+ .get_ethtool_stats = ibmvnic_get_ethtool_stats,
+@@ -2426,6 +2535,7 @@ static void ibmvnic_send_req_caps(struct ibmvnic_adapter *adapter, int retry)
+ {
+ struct device *dev = &adapter->vdev->dev;
+ union ibmvnic_crq crq;
++ int max_entries;
+
+ if (!retry) {
+ /* Sub-CRQ entries are 32 byte long */
+@@ -2437,21 +2547,60 @@ static void ibmvnic_send_req_caps(struct ibmvnic_adapter *adapter, int retry)
+ return;
+ }
+
+- /* Get the minimum between the queried max and the entries
+- * that fit in our PAGE_SIZE
+- */
+- adapter->req_tx_entries_per_subcrq =
+- adapter->max_tx_entries_per_subcrq > entries_page ?
+- entries_page : adapter->max_tx_entries_per_subcrq;
+- adapter->req_rx_add_entries_per_subcrq =
+- adapter->max_rx_add_entries_per_subcrq > entries_page ?
+- entries_page : adapter->max_rx_add_entries_per_subcrq;
+-
+- adapter->req_tx_queues = adapter->opt_tx_comp_sub_queues;
+- adapter->req_rx_queues = adapter->opt_rx_comp_queues;
+- adapter->req_rx_add_queues = adapter->max_rx_add_queues;
++ if (adapter->desired.mtu)
++ adapter->req_mtu = adapter->desired.mtu;
++ else
++ adapter->req_mtu = adapter->netdev->mtu + ETH_HLEN;
++
++ if (!adapter->desired.tx_entries)
++ adapter->desired.tx_entries =
++ adapter->max_tx_entries_per_subcrq;
++ if (!adapter->desired.rx_entries)
++ adapter->desired.rx_entries =
++ adapter->max_rx_add_entries_per_subcrq;
++
++ max_entries = IBMVNIC_MAX_LTB_SIZE /
++ (adapter->req_mtu + IBMVNIC_BUFFER_HLEN);
++
++ if ((adapter->req_mtu + IBMVNIC_BUFFER_HLEN) *
++ adapter->desired.tx_entries > IBMVNIC_MAX_LTB_SIZE) {
++ adapter->desired.tx_entries = max_entries;
++ }
+
+- adapter->req_mtu = adapter->netdev->mtu + ETH_HLEN;
++ if ((adapter->req_mtu + IBMVNIC_BUFFER_HLEN) *
++ adapter->desired.rx_entries > IBMVNIC_MAX_LTB_SIZE) {
++ adapter->desired.rx_entries = max_entries;
++ }
++
++ if (adapter->desired.tx_entries)
++ adapter->req_tx_entries_per_subcrq =
++ adapter->desired.tx_entries;
++ else
++ adapter->req_tx_entries_per_subcrq =
++ adapter->max_tx_entries_per_subcrq;
++
++ if (adapter->desired.rx_entries)
++ adapter->req_rx_add_entries_per_subcrq =
++ adapter->desired.rx_entries;
++ else
++ adapter->req_rx_add_entries_per_subcrq =
++ adapter->max_rx_add_entries_per_subcrq;
++
++ if (adapter->desired.tx_queues)
++ adapter->req_tx_queues =
++ adapter->desired.tx_queues;
++ else
++ adapter->req_tx_queues =
++ adapter->opt_tx_comp_sub_queues;
++
++ if (adapter->desired.rx_queues)
++ adapter->req_rx_queues =
++ adapter->desired.rx_queues;
++ else
++ adapter->req_rx_queues =
++ adapter->opt_rx_comp_queues;
++
++ adapter->req_rx_add_queues = adapter->max_rx_add_queues;
+ }
+
+ memset(&crq, 0, sizeof(crq));
+@@ -3272,6 +3421,7 @@ static int handle_login_rsp(union ibmvnic_crq *login_rsp_crq,
+ struct ibmvnic_adapter *adapter)
+ {
+ struct device *dev = &adapter->vdev->dev;
++ struct net_device *netdev = adapter->netdev;
+ struct ibmvnic_login_rsp_buffer *login_rsp = adapter->login_rsp_buf;
+ struct ibmvnic_login_buffer *login = adapter->login_buf;
+ int i;
+@@ -3291,6 +3441,8 @@ static int handle_login_rsp(union ibmvnic_crq *login_rsp_crq,
+ return 0;
+ }
+
++ netdev->mtu = adapter->req_mtu - ETH_HLEN;
++
+ netdev_dbg(adapter->netdev, "Login Response Buffer:\n");
+ for (i = 0; i < (adapter->login_rsp_buf_sz - 1) / 8 + 1; i++) {
+ netdev_dbg(adapter->netdev, "%016lx\n",
+@@ -3846,7 +3998,7 @@ static int ibmvnic_init(struct ibmvnic_adapter *adapter)
+ unsigned long timeout = msecs_to_jiffies(30000);
+ int rc;
+
+- if (adapter->resetting) {
++ if (adapter->resetting && !adapter->wait_for_reset) {
+ rc = ibmvnic_reset_crq(adapter);
+ if (!rc)
+ rc = vio_enable_interrupts(adapter->vdev);
+@@ -3880,7 +4032,7 @@ static int ibmvnic_init(struct ibmvnic_adapter *adapter)
+ return -1;
+ }
+
+- if (adapter->resetting)
++ if (adapter->resetting && !adapter->wait_for_reset)
+ rc = reset_sub_crq_queues(adapter);
+ else
+ rc = init_sub_crqs(adapter);
+@@ -3949,6 +4101,8 @@ static int ibmvnic_probe(struct vio_dev *dev, const struct vio_device_id *id)
+ mutex_init(&adapter->rwi_lock);
+ adapter->resetting = false;
+
++ adapter->mac_change_pending = false;
++
+ do {
+ rc = ibmvnic_init(adapter);
+ if (rc && rc != EAGAIN)
+@@ -3956,6 +4110,8 @@ static int ibmvnic_probe(struct vio_dev *dev, const struct vio_device_id *id)
+ } while (rc == EAGAIN);
+
+ netdev->mtu = adapter->req_mtu - ETH_HLEN;
++ netdev->min_mtu = adapter->min_mtu - ETH_HLEN;
++ netdev->max_mtu = adapter->max_mtu - ETH_HLEN;
+
+ rc = device_create_file(&dev->dev, &dev_attr_failover);
+ if (rc)
+@@ -3970,6 +4126,9 @@ static int ibmvnic_probe(struct vio_dev *dev, const struct vio_device_id *id)
+ dev_info(&dev->dev, "ibmvnic registered\n");
+
+ adapter->state = VNIC_PROBED;
++
++ adapter->wait_for_reset = false;
++
+ return 0;
+
+ ibmvnic_register_fail:
+diff --git a/drivers/net/ethernet/ibm/ibmvnic.h b/drivers/net/ethernet/ibm/ibmvnic.h
+index 7aa347a21e78..27107f33755b 100644
+--- a/drivers/net/ethernet/ibm/ibmvnic.h
++++ b/drivers/net/ethernet/ibm/ibmvnic.h
+@@ -42,6 +42,9 @@
+ #define IBMVNIC_TSO_BUF_SZ 65536
+ #define IBMVNIC_TSO_BUFS 64
+
++#define IBMVNIC_MAX_LTB_SIZE ((1 << (MAX_ORDER - 1)) * PAGE_SIZE)
++#define IBMVNIC_BUFFER_HLEN 500
++
+ struct ibmvnic_login_buffer {
+ __be32 len;
+ __be32 version;
+@@ -945,13 +948,23 @@ enum ibmvnic_reset_reason {VNIC_RESET_FAILOVER = 1,
+ VNIC_RESET_MOBILITY,
+ VNIC_RESET_FATAL,
+ VNIC_RESET_NON_FATAL,
+- VNIC_RESET_TIMEOUT};
++ VNIC_RESET_TIMEOUT,
++ VNIC_RESET_CHANGE_PARAM};
+
+ struct ibmvnic_rwi {
+ enum ibmvnic_reset_reason reset_reason;
+ struct list_head list;
+ };
+
++struct ibmvnic_tunables {
++ u64 rx_queues;
++ u64 tx_queues;
++ u64 rx_entries;
++ u64 tx_entries;
++ u64 mtu;
++ struct sockaddr mac;
++};
++
+ struct ibmvnic_adapter {
+ struct vio_dev *vdev;
+ struct net_device *netdev;
+@@ -1012,6 +1025,10 @@ struct ibmvnic_adapter {
+ struct completion fw_done;
+ int fw_done_rc;
+
++ struct completion reset_done;
++ int reset_done_rc;
++ bool wait_for_reset;
++
+ /* partner capabilities */
+ u64 min_tx_queues;
+ u64 min_rx_queues;
+@@ -1056,4 +1073,9 @@ struct ibmvnic_adapter {
+ struct work_struct ibmvnic_reset;
+ bool resetting;
+ bool napi_enabled, from_passive_init;
++
++ bool mac_change_pending;
++
++ struct ibmvnic_tunables desired;
++ struct ibmvnic_tunables fallback;
+ };
+--
+2.13.6
+
diff --git a/patches.drivers/ibmvnic-119-Fix-failover-error-path-for-non-fatal-resets.patch b/patches.drivers/ibmvnic-119-Fix-failover-error-path-for-non-fatal-resets.patch
new file mode 100644
index 0000000000..7bc6f2e8ce
--- /dev/null
+++ b/patches.drivers/ibmvnic-119-Fix-failover-error-path-for-non-fatal-resets.patch
@@ -0,0 +1,62 @@
+From 2a1bf51111975846f412f47449edefdf6fa17ee4 Mon Sep 17 00:00:00 2001
+From: John Allen <jallen@linux.vnet.ibm.com>
+Date: Thu, 26 Oct 2017 16:24:15 -0500
+Subject: [PATCH] ibmvnic: Fix failover error path for non-fatal resets
+
+Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+References: bsc#1066382
+Patch-mainline: queued, net-next
+Git-commit: 2a1bf51111975846f412f47449edefdf6fa17ee4
+
+For all non-fatal reset conditions, the hypervisor will send a failover when
+we attempt to initialize the crq and the vnic client is expected to handle
+that failover instead of the existing non-fatal reset. To handle this, we
+need to return from init with a return code that indicates that we have hit
+this case.
+
+Signed-off-by: John Allen <jallen@linux.vnet.ibm.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ drivers/net/ethernet/ibm/ibmvnic.c | 4 ++--
+ drivers/net/ethernet/ibm/ibmvnic.h | 2 ++
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
+index 3d0280196fdc..d0cff2807d0b 100644
+--- a/drivers/net/ethernet/ibm/ibmvnic.c
++++ b/drivers/net/ethernet/ibm/ibmvnic.c
+@@ -1507,7 +1507,7 @@ static int do_reset(struct ibmvnic_adapter *adapter,
+
+ rc = ibmvnic_init(adapter);
+ if (rc)
+- return 0;
++ return IBMVNIC_INIT_FAILED;
+
+ /* If the adapter was in PROBE state prior to the reset,
+ * exit here.
+@@ -1610,7 +1610,7 @@ static void __ibmvnic_reset(struct work_struct *work)
+ while (rwi) {
+ rc = do_reset(adapter, rwi, reset_state);
+ kfree(rwi);
+- if (rc)
++ if (rc && rc != IBMVNIC_INIT_FAILED)
+ break;
+
+ rwi = get_next_rwi(adapter);
+diff --git a/drivers/net/ethernet/ibm/ibmvnic.h b/drivers/net/ethernet/ibm/ibmvnic.h
+index 27107f33755b..4670af80d612 100644
+--- a/drivers/net/ethernet/ibm/ibmvnic.h
++++ b/drivers/net/ethernet/ibm/ibmvnic.h
+@@ -30,6 +30,8 @@
+ #define IBMVNIC_DRIVER_VERSION "1.0.1"
+ #define IBMVNIC_INVALID_MAP -1
+ #define IBMVNIC_STATS_TIMEOUT 1
++#define IBMVNIC_INIT_FAILED 2
++
+ /* basic structures plus 100 2k buffers */
+ #define IBMVNIC_IO_ENTITLEMENT_DEFAULT 610305
+
+--
+2.13.6
+
diff --git a/patches.drivers/scsi-ipr-Fix-scsi-mq-lockdep-issue.patch b/patches.drivers/scsi-ipr-Fix-scsi-mq-lockdep-issue.patch
new file mode 100644
index 0000000000..dfcf2d94ef
--- /dev/null
+++ b/patches.drivers/scsi-ipr-Fix-scsi-mq-lockdep-issue.patch
@@ -0,0 +1,141 @@
+From b0e17a9b0df29590c45dfb296f541270a5941f41 Mon Sep 17 00:00:00 2001
+From: Brian King <brking@linux.vnet.ibm.com>
+Date: Tue, 1 Aug 2017 10:21:30 -0500
+Subject: [PATCH] scsi: ipr: Fix scsi-mq lockdep issue
+
+References: bsc#1066213
+Patch-mainline: v4.13-rc6
+Git-commit: b0e17a9b0df29590c45dfb296f541270a5941f41
+
+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.
+
+stack backtrace:
+CPU: 28 PID: 0 Comm: swapper/28 Not tainted 4.13.0-rc2-gcc6x-gf74c89b #1
+Call Trace:
+[c000001fffe97550] [c000000000b50818] dump_stack+0xe8/0x160 (unreliable)
+[c000001fffe97590] [c0000000001586d0] print_usage_bug+0x2d0/0x390
+[c000001fffe97640] [c000000000158f34] mark_lock+0x7a4/0x8e0
+[c000001fffe976f0] [c00000000015a000] __lock_acquire+0x6a0/0x1a70
+[c000001fffe97860] [c00000000015befc] lock_acquire+0xec/0x2e0
+[c000001fffe97930] [c000000000b71514] _raw_spin_lock+0x44/0x70
+[c000001fffe97960] [c0000000005b60f4] blk_mq_sched_dispatch_requests+0xa4/0x2a0
+[c000001fffe979c0] [c0000000005acac0] __blk_mq_run_hw_queue+0x100/0x2c0
+[c000001fffe97a00] [c0000000005ad478] __blk_mq_delay_run_hw_queue+0x118/0x130
+[c000001fffe97a40] [c0000000005ad61c] blk_mq_start_hw_queues+0x6c/0xa0
+[c000001fffe97a80] [c000000000797aac] scsi_kick_queue+0x2c/0x60
+[c000001fffe97aa0] [c000000000797cf0] scsi_run_queue+0x210/0x360
+[c000001fffe97b10] [c00000000079b888] scsi_run_host_queues+0x48/0x80
+[c000001fffe97b40] [c0000000007b6090] ipr_ioa_bringdown_done+0x70/0x1e0
+[c000001fffe97bc0] [c0000000007bc860] ipr_reset_ioa_job+0x80/0xf0
+[c000001fffe97bf0] [c0000000007b4d50] ipr_reset_timer_done+0xd0/0x100
+[c000001fffe97c30] [c0000000001937bc] call_timer_fn+0xdc/0x4b0
+[c000001fffe97cf0] [c000000000193d08] expire_timers+0x178/0x330
+[c000001fffe97d60] [c0000000001940c8] run_timer_softirq+0xb8/0x120
+[c000001fffe97de0] [c000000000b726a8] __do_softirq+0x168/0x6d8
+[c000001fffe97ef0] [c0000000000df2c8] irq_exit+0x108/0x150
+[c000001fffe97f10] [c000000000017bf4] __do_irq+0x2a4/0x4a0
+[c000001fffe97f90] [c00000000002da50] call_do_irq+0x14/0x24
+[c0000007fad93aa0] [c000000000017e8c] do_IRQ+0x9c/0x140
+[c0000007fad93af0] [c000000000008b98] hardware_interrupt_common+0x138/0x140
+
+Reported-by: Michael Ellerman <mpe@ellerman.id.au>
+Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ drivers/scsi/ipr.c | 33 +++++++++++++++++++--------------
+ drivers/scsi/ipr.h | 2 ++
+ 2 files changed, 21 insertions(+), 14 deletions(-)
+
+diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
+index b0c68d24db01..da5bdbdcce52 100644
+--- a/drivers/scsi/ipr.c
++++ b/drivers/scsi/ipr.c
+@@ -3351,6 +3351,16 @@ static void ipr_worker_thread(struct work_struct *work)
+ return;
+ }
+
++ if (ioa_cfg->scsi_unblock) {
++ ioa_cfg->scsi_unblock = 0;
++ ioa_cfg->scsi_blocked = 0;
++ spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
++ scsi_unblock_requests(ioa_cfg->host);
++ spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags);
++ if (ioa_cfg->scsi_blocked)
++ scsi_block_requests(ioa_cfg->host);
++ }
++
+ if (!ioa_cfg->scan_enabled) {
+ spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
+ return;
+@@ -7211,9 +7221,8 @@ static int ipr_ioa_bringdown_done(struct ipr_cmnd *ipr_cmd)
+ ENTER;
+ if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].removing_ioa) {
+ ipr_trace;
+- spin_unlock_irq(ioa_cfg->host->host_lock);
+- scsi_unblock_requests(ioa_cfg->host);
+- spin_lock_irq(ioa_cfg->host->host_lock);
++ ioa_cfg->scsi_unblock = 1;
++ schedule_work(&ioa_cfg->work_q);
+ }
+
+ ioa_cfg->in_reset_reload = 0;
+@@ -7287,13 +7296,7 @@ static int ipr_ioa_reset_done(struct ipr_cmnd *ipr_cmd)
+ list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
+ wake_up_all(&ioa_cfg->reset_wait_q);
+
+- spin_unlock(ioa_cfg->host->host_lock);
+- scsi_unblock_requests(ioa_cfg->host);
+- spin_lock(ioa_cfg->host->host_lock);
+-
+- if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].allow_cmds)
+- scsi_block_requests(ioa_cfg->host);
+-
++ ioa_cfg->scsi_unblock = 1;
+ schedule_work(&ioa_cfg->work_q);
+ LEAVE;
+ return IPR_RC_JOB_RETURN;
+@@ -9249,8 +9252,11 @@ static void _ipr_initiate_ioa_reset(struct ipr_ioa_cfg *ioa_cfg,
+ spin_unlock(&ioa_cfg->hrrq[i]._lock);
+ }
+ wmb();
+- if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].removing_ioa)
++ if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].removing_ioa) {
++ ioa_cfg->scsi_unblock = 0;
++ ioa_cfg->scsi_blocked = 1;
+ scsi_block_requests(ioa_cfg->host);
++ }
+
+ ipr_cmd = ipr_get_free_ipr_cmnd(ioa_cfg);
+ ioa_cfg->reset_cmd = ipr_cmd;
+@@ -9306,9 +9312,8 @@ static void ipr_initiate_ioa_reset(struct ipr_ioa_cfg *ioa_cfg,
+ wake_up_all(&ioa_cfg->reset_wait_q);
+
+ if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].removing_ioa) {
+- spin_unlock_irq(ioa_cfg->host->host_lock);
+- scsi_unblock_requests(ioa_cfg->host);
+- spin_lock_irq(ioa_cfg->host->host_lock);
++ ioa_cfg->scsi_unblock = 1;
++ schedule_work(&ioa_cfg->work_q);
+ }
+ return;
+ } else {
+diff --git a/drivers/scsi/ipr.h b/drivers/scsi/ipr.h
+index e98a87a65335..c7f0e9e3cd7d 100644
+--- a/drivers/scsi/ipr.h
++++ b/drivers/scsi/ipr.h
+@@ -1488,6 +1488,8 @@ struct ipr_ioa_cfg {
+ u8 cfg_locked:1;
+ u8 clear_isr:1;
+ u8 probe_done:1;
++ u8 scsi_unblock:1;
++ u8 scsi_blocked:1;
+
+ u8 revid;
+
+--
+2.13.6
+
diff --git a/patches.drivers/scsi-ipr-Set-no_report_opcodes-for-RAID-arrays.patch b/patches.drivers/scsi-ipr-Set-no_report_opcodes-for-RAID-arrays.patch
new file mode 100644
index 0000000000..34db8a09e4
--- /dev/null
+++ b/patches.drivers/scsi-ipr-Set-no_report_opcodes-for-RAID-arrays.patch
@@ -0,0 +1,35 @@
+From 723cd772fde2344a9810eeaf5106787d535ec4a4 Mon Sep 17 00:00:00 2001
+From: Brian King <brking@linux.vnet.ibm.com>
+Date: Fri, 18 Aug 2017 16:17:32 -0500
+Subject: [PATCH] scsi: ipr: Set no_report_opcodes for RAID arrays
+
+References: bsc#1066213
+Patch-mainline: v4.13
+Git-commit: 723cd772fde2344a9810eeaf5106787d535ec4a4
+
+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.
+
+Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ drivers/scsi/ipr.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
+index da5bdbdcce52..f838bd73befa 100644
+--- a/drivers/scsi/ipr.c
++++ b/drivers/scsi/ipr.c
+@@ -4945,6 +4945,7 @@ static int ipr_slave_configure(struct scsi_device *sdev)
+ }
+ if (ipr_is_vset_device(res)) {
+ sdev->scsi_level = SCSI_SPC_3;
++ sdev->no_report_opcodes = 1;
+ blk_queue_rq_timeout(sdev->request_queue,
+ IPR_VSET_RW_TIMEOUT);
+ blk_queue_max_hw_sectors(sdev->request_queue, IPR_VSET_MAX_SECTORS);
+--
+2.13.6
+
diff --git a/series.conf b/series.conf
index 9c0534976e..43226a8f81 100644
--- a/series.conf
+++ b/series.conf
@@ -1204,6 +1204,7 @@
########################################################
patches.arch/powerpc-perf-0026-Fix-branch-event-code-for-power9.patch
+ patches.arch/powerpc-perf-Factor-out-PPMU_ONLY_COUNT_RUN-check-code-from-power8.patch
patches.arch/powerpc-perf-Cleanup-of-PM_BR_CMPL-vs.-PM_BRU_CMPL-in-Power9-event-list.patch
patches.arch/powerpc-perf-Update-default-sdar_mode-value-for-power9.patch
patches.arch/cxl-Unlock-on-error-in-probe.patch
@@ -1335,6 +1336,15 @@
patches.arch/powerpc-pseries-Fix-parent_dn-reference-leak-in-add_.patch
patches.arch/powerpc-tm-Fix-illegal-TM-state-in-signal-handler.patch
patches.arch/powerpc-sysrq-Fix-oops-whem-ppmu-is-not-registered.patch
+ patches.arch/powerpc-powernv-Increase-memory-block-size-to-1GB-on.patch
+ patches.arch/powerpc-xmon-Fix-display-of-SPRs.patch
+
+ # bsc#1066213
+ patches.drivers/scsi-ipr-Fix-scsi-mq-lockdep-issue.patch
+ patches.drivers/scsi-ipr-Set-no_report_opcodes-for-RAID-arrays.patch
+
+ patches.arch/powerpc-dlpar-017-pseries-Check-memory-device-state-before-onl.patch
+ patches.arch/powerpc-dlpar-018-pseries-Don-t-attempt-to-acquire-drc-during-.patch
########################################################
# powerpc/little endian
@@ -4785,6 +4795,12 @@
patches.drivers/s390-qeth-add-VNICC-get-set-timeout-support.patch
patches.drivers/ibmvnic-113-Set-state-UP.patch
patches.drivers/i40e-add-private-flag-to-control-source-pruning.patch
+ patches.drivers/ibmvnic-114-Fix-calculation-of-number-of-TX-header-descr.patch
+ patches.drivers/ibmvnic-115-Enable-scatter-gather-support.patch
+ patches.drivers/ibmvnic-116-Enable-TSO-support.patch
+ patches.drivers/ibmvnic-117-Let-users-change-net-device-features.patch
+ patches.drivers/ibmvnic-118-Update-reset-infrastructure-to-support-tunab.patch
+ patches.drivers/ibmvnic-119-Fix-failover-error-path-for-non-fatal-resets.patch
# dledford/rdma k.o/for-next
patches.drivers/RDMA-qedr-Rename-the-qedr_cm-file-as-a-preparation-f.patch