Home Home > GIT Browse > SLE12-SP4-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Thumshirn <jthumshirn@suse.de>2019-06-07 09:44:17 +0200
committerJohannes Thumshirn <jthumshirn@suse.de>2019-06-07 09:44:17 +0200
commit93dadb57ad65ab3db43587a977ce2bd6d6981137 (patch)
tree4a486efcb5525170426f1dac9bef6869b6f3f732
parent729c47082429c215e8149fbff759f5a82fae0518 (diff)
parent09b7c1c536bd248fdaa6066392a2006b1996646a (diff)
Merge remote-tracking branch 'origin/SLE15' into SLE12-SP4
-rw-r--r--patches.drivers/scsi-qla2xxx-Declare-local-functions-static.patch45
-rw-r--r--patches.drivers/scsi-qla2xxx-Fix-function-argument-descriptions.patch947
-rw-r--r--patches.drivers/scsi-qla2xxx-Fix-small-memory-leak-in-qla2x00_probe_.patch2
-rw-r--r--patches.drivers/scsi-qla2xxx-Improve-several-kernel-doc-headers.patch179
-rw-r--r--patches.drivers/scsi-qla2xxx-Introduce-a-switch-case-statement-in-ql.patch54
-rw-r--r--patches.drivers/scsi-qla2xxx-Make-qla2x00_sysfs_write_nvram-easier-t.patch36
-rw-r--r--patches.drivers/scsi-qla2xxx-Make-sure-that-qlafx00_ioctl_iosb_entry.patch37
-rw-r--r--patches.drivers/scsi-qla2xxx-NULL-check-before-some-freeing-function.patch88
-rw-r--r--patches.drivers/scsi-qla2xxx-Remove-a-set-but-not-used-variable.patch45
-rw-r--r--patches.drivers/scsi-qla2xxx-Remove-two-arguments-from-qlafx00_error.patch66
-rw-r--r--patches.drivers/scsi-qla2xxx-Remove-unused-symbols.patch36
-rw-r--r--patches.drivers/scsi-qla2xxx-Split-the-__qla2x00_abort_all_cmds-func.patch128
-rw-r--r--patches.drivers/scsi-qla2xxx-Timeouts-occur-on-surprise-removal-of-Q.patch26
-rw-r--r--patches.drivers/scsi-qla2xxx-Use-p-for-printing-pointers.patch36
-rw-r--r--patches.drivers/scsi-qla2xxx-fully-convert-to-the-generic-DMA-API.patch72
-rw-r--r--patches.drivers/scsi-qla2xxx-use-lower_32_bits-and-upper_32_bits-ins.patch70
-rw-r--r--patches.fixes/0001-of-fix-clang-Wunsequenced-for-be32_to_cpu.patch59
-rw-r--r--patches.fixes/indirect-call-wrappers-helpers-to-speed-up-indirect-.patch85
-rw-r--r--patches.fixes/mm-prevent-get_user_pages-from-overflowing-page-refcount.patch17
-rw-r--r--patches.fixes/net-unbreak-CONFIG_RETPOLINE-n-builds.patch37
-rw-r--r--patches.fixes/net-use-indirect-call-wrappers-at-GRO-network-layer.patch111
-rw-r--r--patches.fixes/net-use-indirect-call-wrappers-at-GRO-transport-laye.patch275
-rw-r--r--patches.fixes/scsi-qla2xxx-Fix-memory-corruption-during-hba-reset-.patch41
-rw-r--r--patches.fixes/scsi-qla2xxx-fix-driver-unload-by-shutting-down-chip.patch83
-rw-r--r--patches.fixes/scsi-qla2xxx-fix-error-message-on-qla2400.patch72
-rw-r--r--patches.fixes/scsi-qla2xxx-fix-spelling-mistake-existant-existent.patch32
-rw-r--r--patches.fixes/scsi-qla2xxx-fx00-copypaste-typo.patch36
-rw-r--r--patches.fixes/scsi-qla2xxx-remove-the-unused-tcm_qla2xxx_cmd_wq.patch55
-rw-r--r--patches.fixes/udp-use-indirect-call-wrappers-for-GRO-socket-lookup.patch52
-rw-r--r--series.conf25
30 files changed, 2803 insertions, 44 deletions
diff --git a/patches.drivers/scsi-qla2xxx-Declare-local-functions-static.patch b/patches.drivers/scsi-qla2xxx-Declare-local-functions-static.patch
new file mode 100644
index 0000000000..04af915d8c
--- /dev/null
+++ b/patches.drivers/scsi-qla2xxx-Declare-local-functions-static.patch
@@ -0,0 +1,45 @@
+From: Bart Van Assche <bvanassche@acm.org>
+Date: Thu, 18 Oct 2018 15:45:42 -0700
+Subject: [PATCH] scsi: qla2xxx: Declare local functions 'static'
+Git-commit: 8f9a214823c9806386760b9f8624a376bbcd5232
+Patch-mainline: v4.20-rc1
+References: bsc#1137444
+
+This patch avoids that the compiler complains about missing declarations
+when building with W=1.
+
+Cc: Himanshu Madhani <himanshu.madhani@cavium.com>
+Signed-off-by: Bart Van Assche <bvanassche@acm.org>
+Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Hannes Reinecke <hare@suse.com>
+---
+ drivers/scsi/qla2xxx/qla_init.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
+index 2ccf9f190c68..6fe20c27acc1 100644
+--- a/drivers/scsi/qla2xxx/qla_init.c
++++ b/drivers/scsi/qla2xxx/qla_init.c
+@@ -425,7 +425,7 @@ void qla24xx_handle_adisc_event(scsi_qla_host_t *vha, struct event_arg *ea)
+ __qla24xx_handle_gpdb_event(vha, ea);
+ }
+
+-int qla_post_els_plogi_work(struct scsi_qla_host *vha, fc_port_t *fcport)
++static int qla_post_els_plogi_work(struct scsi_qla_host *vha, fc_port_t *fcport)
+ {
+ struct qla_work_evt *e;
+
+@@ -1551,7 +1551,8 @@ void qla24xx_handle_relogin_event(scsi_qla_host_t *vha,
+ }
+
+
+-void qla_handle_els_plogi_done(scsi_qla_host_t *vha, struct event_arg *ea)
++static void qla_handle_els_plogi_done(scsi_qla_host_t *vha,
++ struct event_arg *ea)
+ {
+ ql_dbg(ql_dbg_disc, vha, 0x2118,
+ "%s %d %8phC post PRLI\n",
+--
+2.16.4
+
diff --git a/patches.drivers/scsi-qla2xxx-Fix-function-argument-descriptions.patch b/patches.drivers/scsi-qla2xxx-Fix-function-argument-descriptions.patch
new file mode 100644
index 0000000000..a0b437dc67
--- /dev/null
+++ b/patches.drivers/scsi-qla2xxx-Fix-function-argument-descriptions.patch
@@ -0,0 +1,947 @@
+From: Bart Van Assche <bart.vanassche@wdc.com>
+Date: Tue, 23 Jan 2018 16:33:51 -0800
+Subject: [PATCH] scsi: qla2xxx: Fix function argument descriptions
+Git-commit: 2db6228d9cd13bc3bb83bf3436998ea82b0d56ae
+Patch-mainline: v4.17-rc1
+References: bsc#1118139
+
+Bring the kernel-doc headers in sync with the function argument lists.
+
+Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
+Cc: Himanshu Madhani <himanshu.madhani@cavium.com>
+Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Hannes Reinecke <hare@suse.com>
+---
+ drivers/scsi/qla2xxx/qla_dbg.c | 4 +-
+ drivers/scsi/qla2xxx/qla_gs.c | 78 +++++++++++++++++++--------------------
+ drivers/scsi/qla2xxx/qla_init.c | 33 +++++++++--------
+ drivers/scsi/qla2xxx/qla_inline.h | 1 +
+ drivers/scsi/qla2xxx/qla_iocb.c | 15 ++++++--
+ drivers/scsi/qla2xxx/qla_isr.c | 23 +++++++-----
+ drivers/scsi/qla2xxx/qla_mbx.c | 5 ++-
+ drivers/scsi/qla2xxx/qla_mr.c | 36 ++++++++++--------
+ drivers/scsi/qla2xxx/qla_nx.c | 7 ++--
+ drivers/scsi/qla2xxx/qla_nx2.c | 19 +++++-----
+ drivers/scsi/qla2xxx/qla_sup.c | 1 +
+ drivers/scsi/qla2xxx/qla_target.c | 7 ++--
+ 12 files changed, 125 insertions(+), 104 deletions(-)
+
+diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
+index 3e9dc54b89a3..7e9d8f08b9d5 100644
+--- a/drivers/scsi/qla2xxx/qla_dbg.c
++++ b/drivers/scsi/qla2xxx/qla_dbg.c
+@@ -717,7 +717,7 @@ qla2xxx_dump_post_process(scsi_qla_host_t *vha, int rval)
+
+ /**
+ * qla2300_fw_dump() - Dumps binary data from the 2300 firmware.
+- * @ha: HA context
++ * @vha: HA context
+ * @hardware_locked: Called with the hardware_lock
+ */
+ void
+@@ -887,7 +887,7 @@ qla2300_fw_dump(scsi_qla_host_t *vha, int hardware_locked)
+
+ /**
+ * qla2100_fw_dump() - Dumps binary data from the 2100/2200 firmware.
+- * @ha: HA context
++ * @vha: HA context
+ * @hardware_locked: Called with the hardware_lock
+ */
+ void
+diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c
+index 5bf9a59432f6..e4d404c24506 100644
+--- a/drivers/scsi/qla2xxx/qla_gs.c
++++ b/drivers/scsi/qla2xxx/qla_gs.c
+@@ -21,11 +21,10 @@ static int qla_async_rsnn_nn(scsi_qla_host_t *);
+
+ /**
+ * qla2x00_prep_ms_iocb() - Prepare common MS/CT IOCB fields for SNS CT query.
+- * @ha: HA context
+- * @req_size: request size in bytes
+- * @rsp_size: response size in bytes
++ * @vha: HA context
++ * @arg: CT arguments
+ *
+- * Returns a pointer to the @ha's ms_iocb.
++ * Returns a pointer to the @vha's ms_iocb.
+ */
+ void *
+ qla2x00_prep_ms_iocb(scsi_qla_host_t *vha, struct ct_arg *arg)
+@@ -61,9 +60,8 @@ qla2x00_prep_ms_iocb(scsi_qla_host_t *vha, struct ct_arg *arg)
+
+ /**
+ * qla24xx_prep_ms_iocb() - Prepare common CT IOCB fields for SNS CT query.
+- * @ha: HA context
+- * @req_size: request size in bytes
+- * @rsp_size: response size in bytes
++ * @vha: HA context
++ * @arg: CT arguments
+ *
+ * Returns a pointer to the @ha's ms_iocb.
+ */
+@@ -101,7 +99,7 @@ qla24xx_prep_ms_iocb(scsi_qla_host_t *vha, struct ct_arg *arg)
+
+ /**
+ * qla2x00_prep_ct_req() - Prepare common CT request fields for SNS query.
+- * @ct_req: CT request buffer
++ * @p: CT request buffer
+ * @cmd: GS command
+ * @rsp_size: response size in bytes
+ *
+@@ -196,7 +194,7 @@ qla2x00_chk_ms_status(scsi_qla_host_t *vha, ms_iocb_entry_t *ms_pkt,
+
+ /**
+ * qla2x00_ga_nxt() - SNS scan for fabric devices via GA_NXT command.
+- * @ha: HA context
++ * @vha: HA context
+ * @fcport: fcport entry to updated
+ *
+ * Returns 0 on success.
+@@ -283,7 +281,7 @@ qla2x00_gid_pt_rsp_size(scsi_qla_host_t *vha)
+
+ /**
+ * qla2x00_gid_pt() - SNS scan for fabric devices via GID_PT command.
+- * @ha: HA context
++ * @vha: HA context
+ * @list: switch info entries to populate
+ *
+ * NOTE: Non-Nx_Ports are not requested.
+@@ -371,7 +369,7 @@ qla2x00_gid_pt(scsi_qla_host_t *vha, sw_info_t *list)
+
+ /**
+ * qla2x00_gpn_id() - SNS Get Port Name (GPN_ID) query.
+- * @ha: HA context
++ * @vha: HA context
+ * @list: switch info entries to populate
+ *
+ * Returns 0 on success.
+@@ -441,7 +439,7 @@ qla2x00_gpn_id(scsi_qla_host_t *vha, sw_info_t *list)
+
+ /**
+ * qla2x00_gnn_id() - SNS Get Node Name (GNN_ID) query.
+- * @ha: HA context
++ * @vha: HA context
+ * @list: switch info entries to populate
+ *
+ * Returns 0 on success.
+@@ -583,7 +581,7 @@ static void qla2x00_async_sns_sp_done(void *s, int rc)
+
+ /**
+ * qla2x00_rft_id() - SNS Register FC-4 TYPEs (RFT_ID) supported by the HBA.
+- * @ha: HA context
++ * @vha: HA context
+ *
+ * Returns 0 on success.
+ */
+@@ -675,7 +673,8 @@ static int qla_async_rftid(scsi_qla_host_t *vha, port_id_t *d_id)
+
+ /**
+ * qla2x00_rff_id() - SNS Register FC-4 Features (RFF_ID) supported by the HBA.
+- * @ha: HA context
++ * @vha: HA context
++ * @type: not used
+ *
+ * Returns 0 on success.
+ */
+@@ -769,7 +768,7 @@ static int qla_async_rffid(scsi_qla_host_t *vha, port_id_t *d_id,
+
+ /**
+ * qla2x00_rnn_id() - SNS Register Node Name (RNN_ID) of the HBA.
+- * @ha: HA context
++ * @vha: HA context
+ *
+ * Returns 0 on success.
+ */
+@@ -874,7 +873,7 @@ qla2x00_get_sym_node_name(scsi_qla_host_t *vha, uint8_t *snn, size_t size)
+
+ /**
+ * qla2x00_rsnn_nn() - SNS Register Symbolic Node Name (RSNN_NN) of the HBA.
+- * @ha: HA context
++ * @vha: HA context
+ *
+ * Returns 0 on success.
+ */
+@@ -970,7 +969,7 @@ static int qla_async_rsnn_nn(scsi_qla_host_t *vha)
+
+ /**
+ * qla2x00_prep_sns_cmd() - Prepare common SNS command request fields for query.
+- * @ha: HA context
++ * @vha: HA context
+ * @cmd: GS command
+ * @scmd_len: Subcommand length
+ * @data_size: response size in bytes
+@@ -1003,7 +1002,7 @@ qla2x00_prep_sns_cmd(scsi_qla_host_t *vha, uint16_t cmd, uint16_t scmd_len,
+
+ /**
+ * qla2x00_sns_ga_nxt() - SNS scan for fabric devices via GA_NXT command.
+- * @ha: HA context
++ * @vha: HA context
+ * @fcport: fcport entry to updated
+ *
+ * This command uses the old Exectute SNS Command mailbox routine.
+@@ -1067,7 +1066,7 @@ qla2x00_sns_ga_nxt(scsi_qla_host_t *vha, fc_port_t *fcport)
+
+ /**
+ * qla2x00_sns_gid_pt() - SNS scan for fabric devices via GID_PT command.
+- * @ha: HA context
++ * @vha: HA context
+ * @list: switch info entries to populate
+ *
+ * This command uses the old Exectute SNS Command mailbox routine.
+@@ -1140,7 +1139,7 @@ qla2x00_sns_gid_pt(scsi_qla_host_t *vha, sw_info_t *list)
+
+ /**
+ * qla2x00_sns_gpn_id() - SNS Get Port Name (GPN_ID) query.
+- * @ha: HA context
++ * @vha: HA context
+ * @list: switch info entries to populate
+ *
+ * This command uses the old Exectute SNS Command mailbox routine.
+@@ -1196,7 +1195,7 @@ qla2x00_sns_gpn_id(scsi_qla_host_t *vha, sw_info_t *list)
+
+ /**
+ * qla2x00_sns_gnn_id() - SNS Get Node Name (GNN_ID) query.
+- * @ha: HA context
++ * @vha: HA context
+ * @list: switch info entries to populate
+ *
+ * This command uses the old Exectute SNS Command mailbox routine.
+@@ -1259,7 +1258,7 @@ qla2x00_sns_gnn_id(scsi_qla_host_t *vha, sw_info_t *list)
+
+ /**
+ * qla2x00_snd_rft_id() - SNS Register FC-4 TYPEs (RFT_ID) supported by the HBA.
+- * @ha: HA context
++ * @vha: HA context
+ *
+ * This command uses the old Exectute SNS Command mailbox routine.
+ *
+@@ -1308,8 +1307,7 @@ qla2x00_sns_rft_id(scsi_qla_host_t *vha)
+
+ /**
+ * qla2x00_sns_rnn_id() - SNS Register Node Name (RNN_ID) of the HBA.
+- * HBA.
+- * @ha: HA context
++ * @vha: HA context
+ *
+ * This command uses the old Exectute SNS Command mailbox routine.
+ *
+@@ -1365,7 +1363,7 @@ qla2x00_sns_rnn_id(scsi_qla_host_t *vha)
+
+ /**
+ * qla2x00_mgmt_svr_login() - Login to fabric Management Service.
+- * @ha: HA context
++ * @vha: HA context
+ *
+ * Returns 0 on success.
+ */
+@@ -1401,7 +1399,7 @@ qla2x00_mgmt_svr_login(scsi_qla_host_t *vha)
+
+ /**
+ * qla2x00_prep_ms_fdmi_iocb() - Prepare common MS IOCB fields for FDMI query.
+- * @ha: HA context
++ * @vha: HA context
+ * @req_size: request size in bytes
+ * @rsp_size: response size in bytes
+ *
+@@ -1439,7 +1437,7 @@ qla2x00_prep_ms_fdmi_iocb(scsi_qla_host_t *vha, uint32_t req_size,
+
+ /**
+ * qla24xx_prep_ms_fdmi_iocb() - Prepare common MS IOCB fields for FDMI query.
+- * @ha: HA context
++ * @vha: HA context
+ * @req_size: request size in bytes
+ * @rsp_size: response size in bytes
+ *
+@@ -1496,7 +1494,7 @@ qla2x00_update_ms_fdmi_iocb(scsi_qla_host_t *vha, uint32_t req_size)
+
+ /**
+ * qla2x00_prep_ct_req() - Prepare common CT request fields for SNS query.
+- * @ct_req: CT request buffer
++ * @p: CT request buffer
+ * @cmd: GS command
+ * @rsp_size: response size in bytes
+ *
+@@ -1518,8 +1516,8 @@ qla2x00_prep_ct_fdmi_req(struct ct_sns_pkt *p, uint16_t cmd,
+ }
+
+ /**
+- * qla2x00_fdmi_rhba() -
+- * @ha: HA context
++ * qla2x00_fdmi_rhba() - perform RHBA FDMI registration
++ * @vha: HA context
+ *
+ * Returns 0 on success.
+ */
+@@ -1728,8 +1726,8 @@ qla2x00_fdmi_rhba(scsi_qla_host_t *vha)
+ }
+
+ /**
+- * qla2x00_fdmi_rpa() -
+- * @ha: HA context
++ * qla2x00_fdmi_rpa() - perform RPA registration
++ * @vha: HA context
+ *
+ * Returns 0 on success.
+ */
+@@ -1940,8 +1938,8 @@ qla2x00_fdmi_rpa(scsi_qla_host_t *vha)
+ }
+
+ /**
+- * qla2x00_fdmiv2_rhba() -
+- * @ha: HA context
++ * qla2x00_fdmiv2_rhba() - perform RHBA FDMI v2 registration
++ * @vha: HA context
+ *
+ * Returns 0 on success.
+ */
+@@ -2257,7 +2255,7 @@ qla2x00_fdmiv2_rhba(scsi_qla_host_t *vha)
+
+ /**
+ * qla2x00_fdmi_dhba() -
+- * @ha: HA context
++ * @vha: HA context
+ *
+ * Returns 0 on success.
+ */
+@@ -2305,7 +2303,7 @@ qla2x00_fdmi_dhba(scsi_qla_host_t *vha)
+
+ /**
+ * qla2x00_fdmiv2_rpa() -
+- * @ha: HA context
++ * @vha: HA context
+ *
+ * Returns 0 on success.
+ */
+@@ -2635,7 +2633,7 @@ qla2x00_fdmiv2_rpa(scsi_qla_host_t *vha)
+
+ /**
+ * qla2x00_fdmi_register() -
+- * @ha: HA context
++ * @vha: HA context
+ *
+ * Returns 0 on success.
+ */
+@@ -2693,7 +2691,7 @@ qla2x00_fdmi_register(scsi_qla_host_t *vha)
+
+ /**
+ * qla2x00_gfpn_id() - SNS Get Fabric Port Name (GFPN_ID) query.
+- * @ha: HA context
++ * @vha: HA context
+ * @list: switch info entries to populate
+ *
+ * Returns 0 on success.
+@@ -2778,7 +2776,7 @@ qla24xx_prep_ct_fm_req(struct ct_sns_pkt *p, uint16_t cmd,
+
+ /**
+ * qla2x00_gpsc() - FCS Get Port Speed Capabilities (GPSC) query.
+- * @ha: HA context
++ * @vha: HA context
+ * @list: switch info entries to populate
+ *
+ * Returns 0 on success.
+@@ -2892,7 +2890,7 @@ qla2x00_gpsc(scsi_qla_host_t *vha, sw_info_t *list)
+ /**
+ * qla2x00_gff_id() - SNS Get FC-4 Features (GFF_ID) query.
+ *
+- * @ha: HA context
++ * @vha: HA context
+ * @list: switch info entries to populate
+ *
+ */
+diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
+index 995579ea0f7f..590aa904fdef 100644
+--- a/drivers/scsi/qla2xxx/qla_init.c
++++ b/drivers/scsi/qla2xxx/qla_init.c
+@@ -2046,7 +2046,7 @@ qla2x00_initialize_adapter(scsi_qla_host_t *vha)
+
+ /**
+ * qla2100_pci_config() - Setup ISP21xx PCI configuration registers.
+- * @ha: HA context
++ * @vha: HA context
+ *
+ * Returns 0 on success.
+ */
+@@ -2077,7 +2077,7 @@ qla2100_pci_config(scsi_qla_host_t *vha)
+
+ /**
+ * qla2300_pci_config() - Setup ISP23xx PCI configuration registers.
+- * @ha: HA context
++ * @vha: HA context
+ *
+ * Returns 0 on success.
+ */
+@@ -2159,7 +2159,7 @@ qla2300_pci_config(scsi_qla_host_t *vha)
+
+ /**
+ * qla24xx_pci_config() - Setup ISP24xx PCI configuration registers.
+- * @ha: HA context
++ * @vha: HA context
+ *
+ * Returns 0 on success.
+ */
+@@ -2203,7 +2203,7 @@ qla24xx_pci_config(scsi_qla_host_t *vha)
+
+ /**
+ * qla25xx_pci_config() - Setup ISP25xx PCI configuration registers.
+- * @ha: HA context
++ * @vha: HA context
+ *
+ * Returns 0 on success.
+ */
+@@ -2234,7 +2234,7 @@ qla25xx_pci_config(scsi_qla_host_t *vha)
+
+ /**
+ * qla2x00_isp_firmware() - Choose firmware image.
+- * @ha: HA context
++ * @vha: HA context
+ *
+ * Returns 0 on success.
+ */
+@@ -2270,7 +2270,7 @@ qla2x00_isp_firmware(scsi_qla_host_t *vha)
+
+ /**
+ * qla2x00_reset_chip() - Reset ISP chip.
+- * @ha: HA context
++ * @vha: HA context
+ *
+ * Returns 0 on success.
+ */
+@@ -2414,6 +2414,7 @@ qla2x00_reset_chip(scsi_qla_host_t *vha)
+
+ /**
+ * qla81xx_reset_mpi() - Reset's MPI FW via Write MPI Register MBC.
++ * @vha: HA context
+ *
+ * Returns 0 on success.
+ */
+@@ -2430,7 +2431,7 @@ qla81xx_reset_mpi(scsi_qla_host_t *vha)
+
+ /**
+ * qla24xx_reset_risc() - Perform full reset of ISP24xx RISC.
+- * @ha: HA context
++ * @vha: HA context
+ *
+ * Returns 0 on success.
+ */
+@@ -2645,7 +2646,7 @@ qla25xx_manipulate_risc_semaphore(scsi_qla_host_t *vha)
+
+ /**
+ * qla24xx_reset_chip() - Reset ISP24xx chip.
+- * @ha: HA context
++ * @vha: HA context
+ *
+ * Returns 0 on success.
+ */
+@@ -2669,7 +2670,7 @@ qla24xx_reset_chip(scsi_qla_host_t *vha)
+
+ /**
+ * qla2x00_chip_diag() - Test chip for proper operation.
+- * @ha: HA context
++ * @vha: HA context
+ *
+ * Returns 0 on success.
+ */
+@@ -2793,7 +2794,7 @@ qla2x00_chip_diag(scsi_qla_host_t *vha)
+
+ /**
+ * qla24xx_chip_diag() - Test ISP24xx for proper operation.
+- * @ha: HA context
++ * @vha: HA context
+ *
+ * Returns 0 on success.
+ */
+@@ -3261,7 +3262,7 @@ qla24xx_detect_sfp(scsi_qla_host_t *vha)
+
+ /**
+ * qla2x00_setup_chip() - Load and start RISC firmware.
+- * @ha: HA context
++ * @vha: HA context
+ *
+ * Returns 0 on success.
+ */
+@@ -3416,7 +3417,7 @@ qla2x00_setup_chip(scsi_qla_host_t *vha)
+
+ /**
+ * qla2x00_init_response_q_entries() - Initializes response queue entries.
+- * @ha: HA context
++ * @rsp: response queue
+ *
+ * Beginning of request ring has initialization control block already built
+ * by nvram config routine.
+@@ -3441,7 +3442,7 @@ qla2x00_init_response_q_entries(struct rsp_que *rsp)
+
+ /**
+ * qla2x00_update_fw_options() - Read and process firmware options.
+- * @ha: HA context
++ * @vha: HA context
+ *
+ * Returns 0 on success.
+ */
+@@ -3704,7 +3705,7 @@ qla24xx_config_rings(struct scsi_qla_host *vha)
+
+ /**
+ * qla2x00_init_rings() - Initializes firmware.
+- * @ha: HA context
++ * @vha: HA context
+ *
+ * Beginning of request ring has initialization control block already built
+ * by nvram config routine.
+@@ -3812,7 +3813,7 @@ qla2x00_init_rings(scsi_qla_host_t *vha)
+
+ /**
+ * qla2x00_fw_ready() - Waits for firmware ready.
+- * @ha: HA context
++ * @vha: HA context
+ *
+ * Returns 0 on success.
+ */
+@@ -4480,7 +4481,7 @@ qla2x00_rport_del(void *data)
+
+ /**
+ * qla2x00_alloc_fcport() - Allocate a generic fcport.
+- * @ha: HA context
++ * @vha: HA context
+ * @flags: allocation flags
+ *
+ * Returns a pointer to the allocated fcport, or NULL, if none available.
+diff --git a/drivers/scsi/qla2xxx/qla_inline.h b/drivers/scsi/qla2xxx/qla_inline.h
+index 4d32426393c7..b7a05aebf065 100644
+--- a/drivers/scsi/qla2xxx/qla_inline.h
++++ b/drivers/scsi/qla2xxx/qla_inline.h
+@@ -10,6 +10,7 @@
+ * qla24xx_calc_iocbs() - Determine number of Command Type 3 and
+ * Continuation Type 1 IOCBs to allocate.
+ *
++ * @vha: HA context
+ * @dsds: number of data segment decriptors needed
+ *
+ * Returns the number of IOCB entries needed to store @dsds.
+diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c
+index 1b62e943ec49..e62ccd931853 100644
+--- a/drivers/scsi/qla2xxx/qla_iocb.c
++++ b/drivers/scsi/qla2xxx/qla_iocb.c
+@@ -14,7 +14,7 @@
+
+ /**
+ * qla2x00_get_cmd_direction() - Determine control_flag data direction.
+- * @cmd: SCSI command
++ * @sp: SCSI command
+ *
+ * Returns the proper CF_* direction based on CDB.
+ */
+@@ -86,7 +86,7 @@ qla2x00_calc_iocbs_64(uint16_t dsds)
+
+ /**
+ * qla2x00_prep_cont_type0_iocb() - Initialize a Continuation Type 0 IOCB.
+- * @ha: HA context
++ * @vha: HA context
+ *
+ * Returns a pointer to the Continuation Type 0 IOCB packet.
+ */
+@@ -114,7 +114,8 @@ qla2x00_prep_cont_type0_iocb(struct scsi_qla_host *vha)
+
+ /**
+ * qla2x00_prep_cont_type1_iocb() - Initialize a Continuation Type 1 IOCB.
+- * @ha: HA context
++ * @vha: HA context
++ * @req: request queue
+ *
+ * Returns a pointer to the continuation type 1 IOCB packet.
+ */
+@@ -445,6 +446,8 @@ qla2x00_start_scsi(srb_t *sp)
+
+ /**
+ * qla2x00_start_iocbs() - Execute the IOCB command
++ * @vha: HA context
++ * @req: request queue
+ */
+ void
+ qla2x00_start_iocbs(struct scsi_qla_host *vha, struct req_que *req)
+@@ -486,7 +489,9 @@ qla2x00_start_iocbs(struct scsi_qla_host *vha, struct req_que *req)
+
+ /**
+ * qla2x00_marker() - Send a marker IOCB to the firmware.
+- * @ha: HA context
++ * @vha: HA context
++ * @req: request queue
++ * @rsp: response queue
+ * @loop_id: loop ID
+ * @lun: LUN
+ * @type: marker modifier
+@@ -1190,6 +1195,8 @@ qla24xx_walk_and_build_prot_sglist(struct qla_hw_data *ha, srb_t *sp,
+ * @sp: SRB command to process
+ * @cmd_pkt: Command type 3 IOCB
+ * @tot_dsds: Total number of segments to transfer
++ * @tot_prot_dsds:
++ * @fw_prot_opts:
+ */
+ inline int
+ qla24xx_build_scsi_crc_2_iocbs(srb_t *sp, struct cmd_type_crc_2 *cmd_pkt,
+diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
+index 14109d86c3f6..16c43bd9bb83 100644
+--- a/drivers/scsi/qla2xxx/qla_isr.c
++++ b/drivers/scsi/qla2xxx/qla_isr.c
+@@ -259,7 +259,7 @@ qla2300_intr_handler(int irq, void *dev_id)
+
+ /**
+ * qla2x00_mbx_completion() - Process mailbox command completions.
+- * @ha: SCSI driver HA context
++ * @vha: SCSI driver HA context
+ * @mb0: Mailbox0 register
+ */
+ static void
+@@ -612,7 +612,8 @@ qla2x00_find_fcport_by_nportid(scsi_qla_host_t *vha, port_id_t *id,
+
+ /**
+ * qla2x00_async_event() - Process aynchronous events.
+- * @ha: SCSI driver HA context
++ * @vha: SCSI driver HA context
++ * @rsp: response queue
+ * @mb: Mailbox registers (0 - 3)
+ */
+ void
+@@ -1255,7 +1256,8 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb)
+
+ /**
+ * qla2x00_process_completed_request() - Process a Fast Post response.
+- * @ha: SCSI driver HA context
++ * @vha: SCSI driver HA context
++ * @req: request queue
+ * @index: SRB index
+ */
+ void
+@@ -1969,7 +1971,7 @@ static void qla_ctrlvp_completed(scsi_qla_host_t *vha, struct req_que *req,
+
+ /**
+ * qla2x00_process_response_queue() - Process response queue entries.
+- * @ha: SCSI driver HA context
++ * @rsp: response queue
+ */
+ void
+ qla2x00_process_response_queue(struct rsp_que *rsp)
+@@ -2373,7 +2375,8 @@ qla25xx_process_bidir_status_iocb(scsi_qla_host_t *vha, void *pkt,
+
+ /**
+ * qla2x00_status_entry() - Process a Status IOCB entry.
+- * @ha: SCSI driver HA context
++ * @vha: SCSI driver HA context
++ * @rsp: response queue
+ * @pkt: Entry pointer
+ */
+ static void
+@@ -2750,7 +2753,7 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
+
+ /**
+ * qla2x00_status_cont_entry() - Process a Status Continuations entry.
+- * @ha: SCSI driver HA context
++ * @rsp: response queue
+ * @pkt: Entry pointer
+ *
+ * Extended sense data.
+@@ -2808,7 +2811,8 @@ qla2x00_status_cont_entry(struct rsp_que *rsp, sts_cont_entry_t *pkt)
+
+ /**
+ * qla2x00_error_entry() - Process an error entry.
+- * @ha: SCSI driver HA context
++ * @vha: SCSI driver HA context
++ * @rsp: response queue
+ * @pkt: Entry pointer
+ * return : 1=allow further error analysis. 0=no additional error analysis.
+ */
+@@ -2867,7 +2871,7 @@ qla2x00_error_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, sts_entry_t *pkt)
+
+ /**
+ * qla24xx_mbx_completion() - Process mailbox command completions.
+- * @ha: SCSI driver HA context
++ * @vha: SCSI driver HA context
+ * @mb0: Mailbox0 register
+ */
+ static void
+@@ -2935,7 +2939,8 @@ void qla24xx_nvme_ls4_iocb(struct scsi_qla_host *vha,
+
+ /**
+ * qla24xx_process_response_queue() - Process response queue entries.
+- * @ha: SCSI driver HA context
++ * @vha: SCSI driver HA context
++ * @rsp: response queue
+ */
+ void qla24xx_process_response_queue(struct scsi_qla_host *vha,
+ struct rsp_que *rsp)
+diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
+index 7397aeddd96c..41b0ee47c6a1 100644
+--- a/drivers/scsi/qla2xxx/qla_mbx.c
++++ b/drivers/scsi/qla2xxx/qla_mbx.c
+@@ -3385,7 +3385,10 @@ qla8044_read_serdes_word(scsi_qla_host_t *vha, uint32_t addr, uint32_t *data)
+
+ /**
+ * qla2x00_set_serdes_params() -
+- * @ha: HA context
++ * @vha: HA context
++ * @sw_em_1g:
++ * @sw_em_2g:
++ * @sw_em_4g:
+ *
+ * Returns
+ */
+diff --git a/drivers/scsi/qla2xxx/qla_mr.c b/drivers/scsi/qla2xxx/qla_mr.c
+index d5da3981cefe..7113acf42ff3 100644
+--- a/drivers/scsi/qla2xxx/qla_mr.c
++++ b/drivers/scsi/qla2xxx/qla_mr.c
+@@ -490,7 +490,7 @@ qlafx00_mbx_reg_test(scsi_qla_host_t *vha)
+
+ /**
+ * qlafx00_pci_config() - Setup ISPFx00 PCI configuration registers.
+- * @ha: HA context
++ * @vha: HA context
+ *
+ * Returns 0 on success.
+ */
+@@ -519,9 +519,9 @@ qlafx00_pci_config(scsi_qla_host_t *vha)
+
+ /**
+ * qlafx00_warm_reset() - Perform warm reset of iSA(CPUs being reset on SOC).
+- * @ha: HA context
++ * @vha: HA context
+ *
+- */
++ */
+ static inline void
+ qlafx00_soc_cpu_reset(scsi_qla_host_t *vha)
+ {
+@@ -625,7 +625,7 @@ qlafx00_soc_cpu_reset(scsi_qla_host_t *vha)
+
+ /**
+ * qlafx00_soft_reset() - Soft Reset ISPFx00.
+- * @ha: HA context
++ * @vha: HA context
+ *
+ * Returns 0 on success.
+ */
+@@ -644,7 +644,7 @@ qlafx00_soft_reset(scsi_qla_host_t *vha)
+
+ /**
+ * qlafx00_chip_diag() - Test ISPFx00 for proper operation.
+- * @ha: HA context
++ * @vha: HA context
+ *
+ * Returns 0 on success.
+ */
+@@ -1408,7 +1408,7 @@ qlafx00_abort_isp_cleanup(scsi_qla_host_t *vha, bool critemp)
+
+ /**
+ * qlafx00_init_response_q_entries() - Initializes response queue entries.
+- * @ha: HA context
++ * @rsp: response queue
+ *
+ * Beginning of request ring has initialization control block already built
+ * by nvram config routine.
+@@ -2269,7 +2269,8 @@ qlafx00_ioctl_iosb_entry(scsi_qla_host_t *vha, struct req_que *req,
+
+ /**
+ * qlafx00_status_entry() - Process a Status IOCB entry.
+- * @ha: SCSI driver HA context
++ * @vha: SCSI driver HA context
++ * @rsp: response queue
+ * @pkt: Entry pointer
+ */
+ static void
+@@ -2542,7 +2543,7 @@ qlafx00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
+
+ /**
+ * qlafx00_status_cont_entry() - Process a Status Continuations entry.
+- * @ha: SCSI driver HA context
++ * @rsp: response queue
+ * @pkt: Entry pointer
+ *
+ * Extended sense data.
+@@ -2620,7 +2621,9 @@ qlafx00_status_cont_entry(struct rsp_que *rsp, sts_cont_entry_t *pkt)
+
+ /**
+ * qlafx00_multistatus_entry() - Process Multi response queue entries.
+- * @ha: SCSI driver HA context
++ * @vha: SCSI driver HA context
++ * @rsp: response queue
++ * @pkt:
+ */
+ static void
+ qlafx00_multistatus_entry(struct scsi_qla_host *vha,
+@@ -2674,8 +2677,11 @@ qlafx00_multistatus_entry(struct scsi_qla_host *vha,
+
+ /**
+ * qlafx00_error_entry() - Process an error entry.
+- * @ha: SCSI driver HA context
++ * @vha: SCSI driver HA context
++ * @rsp: response queue
+ * @pkt: Entry pointer
++ * @estatus:
++ * @etype:
+ */
+ static void
+ qlafx00_error_entry(scsi_qla_host_t *vha, struct rsp_que *rsp,
+@@ -2705,7 +2711,8 @@ qlafx00_error_entry(scsi_qla_host_t *vha, struct rsp_que *rsp,
+
+ /**
+ * qlafx00_process_response_queue() - Process response queue entries.
+- * @ha: SCSI driver HA context
++ * @vha: SCSI driver HA context
++ * @rsp: response queue
+ */
+ static void
+ qlafx00_process_response_queue(struct scsi_qla_host *vha,
+@@ -2781,7 +2788,7 @@ qlafx00_process_response_queue(struct scsi_qla_host *vha,
+
+ /**
+ * qlafx00_async_event() - Process aynchronous events.
+- * @ha: SCSI driver HA context
++ * @vha: SCSI driver HA context
+ */
+ static void
+ qlafx00_async_event(scsi_qla_host_t *vha)
+@@ -2857,10 +2864,9 @@ qlafx00_async_event(scsi_qla_host_t *vha)
+ }
+
+ /**
+- *
+ * qlafx00x_mbx_completion() - Process mailbox command completions.
+- * @ha: SCSI driver HA context
+- * @mb16: Mailbox16 register
++ * @vha: SCSI driver HA context
++ * @mb0:
+ */
+ static void
+ qlafx00_mbx_completion(scsi_qla_host_t *vha, uint32_t mb0)
+diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c
+index a77c33987703..872d66dd79cd 100644
+--- a/drivers/scsi/qla2xxx/qla_nx.c
++++ b/drivers/scsi/qla2xxx/qla_nx.c
+@@ -1732,7 +1732,7 @@ qla82xx_iospace_config(struct qla_hw_data *ha)
+
+ /**
+ * qla82xx_pci_config() - Setup ISP82xx PCI configuration registers.
+- * @ha: HA context
++ * @vha: HA context
+ *
+ * Returns 0 on success.
+ */
+@@ -1753,7 +1753,7 @@ qla82xx_pci_config(scsi_qla_host_t *vha)
+
+ /**
+ * qla82xx_reset_chip() - Setup ISP82xx PCI configuration registers.
+- * @ha: HA context
++ * @vha: HA context
+ *
+ * Returns 0 on success.
+ */
+@@ -2008,11 +2008,10 @@ qla82xx_mbx_completion(scsi_qla_host_t *vha, uint16_t mb0)
+ "MBX pointer ERROR.\n");
+ }
+
+-/*
++/**
+ * qla82xx_intr_handler() - Process interrupts for the ISP23xx and ISP63xx.
+ * @irq:
+ * @dev_id: SCSI driver HA context
+- * @regs:
+ *
+ * Called by system whenever the host adapter generates an interrupt.
+ *
+diff --git a/drivers/scsi/qla2xxx/qla_nx2.c b/drivers/scsi/qla2xxx/qla_nx2.c
+index 525ac35a757b..3a2b0282df14 100644
+--- a/drivers/scsi/qla2xxx/qla_nx2.c
++++ b/drivers/scsi/qla2xxx/qla_nx2.c
+@@ -280,9 +280,8 @@ qla8044_clear_qsnt_ready(struct scsi_qla_host *vha)
+ }
+
+ /**
+- *
+ * qla8044_lock_recovery - Recovers the idc_lock.
+- * @ha : Pointer to adapter structure
++ * @vha : Pointer to adapter structure
+ *
+ * Lock Recovery Register
+ * 5-2 Lock recovery owner: Function ID of driver doing lock recovery,
+@@ -1639,10 +1638,10 @@ qla8044_set_rst_ready(struct scsi_qla_host *vha)
+
+ /**
+ * qla8044_need_reset_handler - Code to start reset sequence
+- * @ha: pointer to adapter structure
++ * @vha: pointer to adapter structure
+ *
+ * Note: IDC lock must be held upon entry
+- **/
++ */
+ static void
+ qla8044_need_reset_handler(struct scsi_qla_host *vha)
+ {
+@@ -1859,8 +1858,8 @@ qla8044_update_idc_reg(struct scsi_qla_host *vha)
+
+ /**
+ * qla8044_need_qsnt_handler - Code to start qsnt
+- * @ha: pointer to adapter structure
+- **/
++ * @vha: pointer to adapter structure
++ */
+ static void
+ qla8044_need_qsnt_handler(struct scsi_qla_host *vha)
+ {
+@@ -2031,10 +2030,10 @@ qla8044_device_state_handler(struct scsi_qla_host *vha)
+
+ /**
+ * qla4_8xxx_check_temp - Check the ISP82XX temperature.
+- * @ha: adapter block pointer.
++ * @vha: adapter block pointer.
+ *
+ * Note: The caller should not hold the idc lock.
+- **/
++ */
+ static int
+ qla8044_check_temp(struct scsi_qla_host *vha)
+ {
+@@ -2071,10 +2070,10 @@ int qla8044_read_temperature(scsi_qla_host_t *vha)
+
+ /**
+ * qla8044_check_fw_alive - Check firmware health
+- * @ha: Pointer to host adapter structure.
++ * @vha: Pointer to host adapter structure.
+ *
+ * Context: Interrupt
+- **/
++ */
+ int
+ qla8044_check_fw_alive(struct scsi_qla_host *vha)
+ {
+diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c
+index d2db86ea06b2..04458eb19d38 100644
+--- a/drivers/scsi/qla2xxx/qla_sup.c
++++ b/drivers/scsi/qla2xxx/qla_sup.c
+@@ -2226,6 +2226,7 @@ qla2x00_erase_flash_sector(struct qla_hw_data *ha, uint32_t addr,
+
+ /**
+ * qla2x00_get_flash_manufacturer() - Read manufacturer ID from flash chip.
++ * @ha:
+ * @man_id: Flash manufacturer ID
+ * @flash_id: Flash ID
+ */
+diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
+index fc89af8fe256..3735ebd83012 100644
+--- a/drivers/scsi/qla2xxx/qla_target.c
++++ b/drivers/scsi/qla2xxx/qla_target.c
+@@ -6299,10 +6299,11 @@ static void qlt_lport_dump(struct scsi_qla_host *vha, u64 wwpn,
+ /**
+ * qla_tgt_lport_register - register lport with external module
+ *
+- * @qla_tgt_ops: Pointer for tcm_qla2xxx qla_tgt_ops
+- * @wwpn: Passwd FC target WWPN
+- * @callback: lport initialization callback for tcm_qla2xxx code
+ * @target_lport_ptr: pointer for tcm_qla2xxx specific lport data
++ * @phys_wwpn:
++ * @npiv_wwpn:
++ * @npiv_wwnn:
++ * @callback: lport initialization callback for tcm_qla2xxx code
+ */
+ int qlt_lport_register(void *target_lport_ptr, u64 phys_wwpn,
+ u64 npiv_wwpn, u64 npiv_wwnn,
+--
+2.12.3
+
diff --git a/patches.drivers/scsi-qla2xxx-Fix-small-memory-leak-in-qla2x00_probe_.patch b/patches.drivers/scsi-qla2xxx-Fix-small-memory-leak-in-qla2x00_probe_.patch
index 22bc78f1b0..c6a1f6acd7 100644
--- a/patches.drivers/scsi-qla2xxx-Fix-small-memory-leak-in-qla2x00_probe_.patch
+++ b/patches.drivers/scsi-qla2xxx-Fix-small-memory-leak-in-qla2x00_probe_.patch
@@ -151,7 +151,7 @@ Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
- return;
-
if (IS_QLAFX00(ha)) {
- if (rsp && rsp->ring)
+ if (rsp && rsp->ring_fx00)
dma_free_coherent(&ha->pdev->dev,
@@ -507,8 +501,7 @@ static void qla2x00_free_rsp_que(struct
(rsp->length + 1) * sizeof(response_t),
diff --git a/patches.drivers/scsi-qla2xxx-Improve-several-kernel-doc-headers.patch b/patches.drivers/scsi-qla2xxx-Improve-several-kernel-doc-headers.patch
new file mode 100644
index 0000000000..ce1ced2add
--- /dev/null
+++ b/patches.drivers/scsi-qla2xxx-Improve-several-kernel-doc-headers.patch
@@ -0,0 +1,179 @@
+From: Bart Van Assche <bvanassche@acm.org>
+Date: Thu, 18 Oct 2018 15:45:41 -0700
+Subject: [PATCH] scsi: qla2xxx: Improve several kernel-doc headers
+Git-commit: 807eb90703e78c0fb853d8e5b90c9947d7a95cba
+Patch-mainline: v4.20-rc1
+References: bsc#1137444
+
+This patch avoids that complaints about kernel-doc headers are reported
+when building with W=1.
+
+Cc: Himanshu Madhani <himanshu.madhani@cavium.com>
+Signed-off-by: Bart Van Assche <bvanassche@acm.org>
+Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Hannes Reinecke <hare@suse.com>
+---
+ drivers/scsi/qla2xxx/qla_iocb.c | 4 ++--
+ drivers/scsi/qla2xxx/qla_isr.c | 6 +++---
+ drivers/scsi/qla2xxx/qla_mbx.c | 6 +++---
+ drivers/scsi/qla2xxx/qla_mr.c | 6 +++---
+ drivers/scsi/qla2xxx/qla_nx.c | 2 +-
+ drivers/scsi/qla2xxx/qla_nx2.c | 2 +-
+ drivers/scsi/qla2xxx/qla_sup.c | 2 +-
+ drivers/scsi/qla2xxx/qla_target.c | 6 +++---
+ 8 files changed, 17 insertions(+), 17 deletions(-)
+
+diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c
+index 86fb8b21aa71..032635321ad6 100644
+--- a/drivers/scsi/qla2xxx/qla_iocb.c
++++ b/drivers/scsi/qla2xxx/qla_iocb.c
+@@ -1195,8 +1195,8 @@ qla24xx_walk_and_build_prot_sglist(struct qla_hw_data *ha, srb_t *sp,
+ * @sp: SRB command to process
+ * @cmd_pkt: Command type 3 IOCB
+ * @tot_dsds: Total number of segments to transfer
+- * @tot_prot_dsds:
+- * @fw_prot_opts:
++ * @tot_prot_dsds: Total number of segments with protection information
++ * @fw_prot_opts: Protection options to be passed to firmware
+ */
+ inline int
+ qla24xx_build_scsi_crc_2_iocbs(srb_t *sp, struct cmd_type_crc_2 *cmd_pkt,
+diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
+index d73b04e40590..30d3090842f8 100644
+--- a/drivers/scsi/qla2xxx/qla_isr.c
++++ b/drivers/scsi/qla2xxx/qla_isr.c
+@@ -25,7 +25,7 @@ static int qla2x00_error_entry(scsi_qla_host_t *, struct rsp_que *,
+
+ /**
+ * qla2100_intr_handler() - Process interrupts for the ISP2100 and ISP2200.
+- * @irq:
++ * @irq: interrupt number
+ * @dev_id: SCSI driver HA context
+ *
+ * Called by system whenever the host adapter generates an interrupt.
+@@ -144,7 +144,7 @@ qla2x00_check_reg16_for_disconnect(scsi_qla_host_t *vha, uint16_t reg)
+
+ /**
+ * qla2300_intr_handler() - Process interrupts for the ISP23xx and ISP63xx.
+- * @irq:
++ * @irq: interrupt number
+ * @dev_id: SCSI driver HA context
+ *
+ * Called by system whenever the host adapter generates an interrupt.
+@@ -3109,7 +3109,7 @@ qla2xxx_check_risc_status(scsi_qla_host_t *vha)
+
+ /**
+ * qla24xx_intr_handler() - Process interrupts for the ISP23xx and ISP24xx.
+- * @irq:
++ * @irq: interrupt number
+ * @dev_id: SCSI driver HA context
+ *
+ * Called by system whenever the host adapter generates an interrupt.
+diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
+index 2f3e5075ae76..191b6b7c8747 100644
+--- a/drivers/scsi/qla2xxx/qla_mbx.c
++++ b/drivers/scsi/qla2xxx/qla_mbx.c
+@@ -3478,9 +3478,9 @@ qla8044_read_serdes_word(scsi_qla_host_t *vha, uint32_t addr, uint32_t *data)
+ /**
+ * qla2x00_set_serdes_params() -
+ * @vha: HA context
+- * @sw_em_1g:
+- * @sw_em_2g:
+- * @sw_em_4g:
++ * @sw_em_1g: serial link options
++ * @sw_em_2g: serial link options
++ * @sw_em_4g: serial link options
+ *
+ * Returns
+ */
+diff --git a/drivers/scsi/qla2xxx/qla_mr.c b/drivers/scsi/qla2xxx/qla_mr.c
+index 521a51370554..2d96f3b7e3e3 100644
+--- a/drivers/scsi/qla2xxx/qla_mr.c
++++ b/drivers/scsi/qla2xxx/qla_mr.c
+@@ -2624,7 +2624,7 @@ qlafx00_status_cont_entry(struct rsp_que *rsp, sts_cont_entry_t *pkt)
+ * qlafx00_multistatus_entry() - Process Multi response queue entries.
+ * @vha: SCSI driver HA context
+ * @rsp: response queue
+- * @pkt:
++ * @pkt: received packet
+ */
+ static void
+ qlafx00_multistatus_entry(struct scsi_qla_host *vha,
+@@ -2867,7 +2867,7 @@ qlafx00_async_event(scsi_qla_host_t *vha)
+ /**
+ * qlafx00x_mbx_completion() - Process mailbox command completions.
+ * @vha: SCSI driver HA context
+- * @mb0:
++ * @mb0: value to be written into mailbox register 0
+ */
+ static void
+ qlafx00_mbx_completion(scsi_qla_host_t *vha, uint32_t mb0)
+@@ -2893,7 +2893,7 @@ qlafx00_mbx_completion(scsi_qla_host_t *vha, uint32_t mb0)
+
+ /**
+ * qlafx00_intr_handler() - Process interrupts for the ISPFX00.
+- * @irq:
++ * @irq: interrupt number
+ * @dev_id: SCSI driver HA context
+ *
+ * Called by system whenever the host adapter generates an interrupt.
+diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c
+index 121e18b3b9f8..f2f54806f4da 100644
+--- a/drivers/scsi/qla2xxx/qla_nx.c
++++ b/drivers/scsi/qla2xxx/qla_nx.c
+@@ -2010,7 +2010,7 @@ qla82xx_mbx_completion(scsi_qla_host_t *vha, uint16_t mb0)
+
+ /**
+ * qla82xx_intr_handler() - Process interrupts for the ISP23xx and ISP63xx.
+- * @irq:
++ * @irq: interrupt number
+ * @dev_id: SCSI driver HA context
+ *
+ * Called by system whenever the host adapter generates an interrupt.
+diff --git a/drivers/scsi/qla2xxx/qla_nx2.c b/drivers/scsi/qla2xxx/qla_nx2.c
+index 3a2b0282df14..fe856b602e03 100644
+--- a/drivers/scsi/qla2xxx/qla_nx2.c
++++ b/drivers/scsi/qla2xxx/qla_nx2.c
+@@ -3878,7 +3878,7 @@ qla8044_write_optrom_data(struct scsi_qla_host *vha, uint8_t *buf,
+ #define PF_BITS_MASK (0xF << 16)
+ /**
+ * qla8044_intr_handler() - Process interrupts for the ISP8044
+- * @irq:
++ * @irq: interrupt number
+ * @dev_id: SCSI driver HA context
+ *
+ * Called by system whenever the host adapter generates an interrupt.
+diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c
+index 4499c787165f..2a3055c799fb 100644
+--- a/drivers/scsi/qla2xxx/qla_sup.c
++++ b/drivers/scsi/qla2xxx/qla_sup.c
+@@ -2229,7 +2229,7 @@ qla2x00_erase_flash_sector(struct qla_hw_data *ha, uint32_t addr,
+
+ /**
+ * qla2x00_get_flash_manufacturer() - Read manufacturer ID from flash chip.
+- * @ha:
++ * @ha: host adapter
+ * @man_id: Flash manufacturer ID
+ * @flash_id: Flash ID
+ */
+diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
+index 78dfece2e89d..c4504740f0e2 100644
+--- a/drivers/scsi/qla2xxx/qla_target.c
++++ b/drivers/scsi/qla2xxx/qla_target.c
+@@ -6598,9 +6598,9 @@ static void qlt_lport_dump(struct scsi_qla_host *vha, u64 wwpn,
+ * qla_tgt_lport_register - register lport with external module
+ *
+ * @target_lport_ptr: pointer for tcm_qla2xxx specific lport data
+- * @phys_wwpn:
+- * @npiv_wwpn:
+- * @npiv_wwnn:
++ * @phys_wwpn: physical port WWPN
++ * @npiv_wwpn: NPIV WWPN
++ * @npiv_wwnn: NPIV WWNN
+ * @callback: lport initialization callback for tcm_qla2xxx code
+ */
+ int qlt_lport_register(void *target_lport_ptr, u64 phys_wwpn,
+--
+2.16.4
+
diff --git a/patches.drivers/scsi-qla2xxx-Introduce-a-switch-case-statement-in-ql.patch b/patches.drivers/scsi-qla2xxx-Introduce-a-switch-case-statement-in-ql.patch
new file mode 100644
index 0000000000..5e555b21c2
--- /dev/null
+++ b/patches.drivers/scsi-qla2xxx-Introduce-a-switch-case-statement-in-ql.patch
@@ -0,0 +1,54 @@
+From: Bart Van Assche <bvanassche@acm.org>
+Date: Tue, 27 Nov 2018 15:04:54 -0800
+Subject: [PATCH] scsi: qla2xxx: Introduce a switch/case statement in
+ qlt_xmit_tm_rsp()
+Git-commit: 8837aa8bc093b29bd52ba55f98ad206d5418d240
+Patch-mainline: v5.0-rc1
+References: bsc#1137444
+
+This patch improves code readability but does not change any functionality.
+
+Cc: Himanshu Madhani <himanshu.madhani@cavium.com>
+Signed-off-by: Bart Van Assche <bvanassche@acm.org>
+Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Hannes Reinecke <hare@suse.com>
+---
+ drivers/scsi/qla2xxx/qla_target.c | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
+index bceb8e882e7f..510337eac106 100644
+--- a/drivers/scsi/qla2xxx/qla_target.c
++++ b/drivers/scsi/qla2xxx/qla_target.c
+@@ -2379,20 +2379,20 @@ void qlt_xmit_tm_rsp(struct qla_tgt_mgmt_cmd *mcmd)
+ }
+
+ if (mcmd->flags == QLA24XX_MGMT_SEND_NACK) {
+- if (mcmd->orig_iocb.imm_ntfy.u.isp24.status_subcode ==
+- ELS_LOGO ||
+- mcmd->orig_iocb.imm_ntfy.u.isp24.status_subcode ==
+- ELS_PRLO ||
+- mcmd->orig_iocb.imm_ntfy.u.isp24.status_subcode ==
+- ELS_TPRLO) {
++ switch (mcmd->orig_iocb.imm_ntfy.u.isp24.status_subcode) {
++ case ELS_LOGO:
++ case ELS_PRLO:
++ case ELS_TPRLO:
+ ql_dbg(ql_dbg_disc, vha, 0x2106,
+ "TM response logo %phC status %#x state %#x",
+ mcmd->sess->port_name, mcmd->fc_tm_rsp,
+ mcmd->flags);
+ qlt_schedule_sess_for_deletion(mcmd->sess);
+- } else {
++ break;
++ default:
+ qlt_send_notify_ack(vha->hw->base_qpair,
+ &mcmd->orig_iocb.imm_ntfy, 0, 0, 0, 0, 0, 0);
++ break;
+ }
+ } else {
+ if (mcmd->orig_iocb.atio.u.raw.entry_type == ABTS_RECV_24XX) {
+--
+2.16.4
+
diff --git a/patches.drivers/scsi-qla2xxx-Make-qla2x00_sysfs_write_nvram-easier-t.patch b/patches.drivers/scsi-qla2xxx-Make-qla2x00_sysfs_write_nvram-easier-t.patch
new file mode 100644
index 0000000000..f177f76606
--- /dev/null
+++ b/patches.drivers/scsi-qla2xxx-Make-qla2x00_sysfs_write_nvram-easier-t.patch
@@ -0,0 +1,36 @@
+From: Bart Van Assche <bvanassche@acm.org>
+Date: Thu, 18 Oct 2018 15:45:43 -0700
+Subject: [PATCH] scsi: qla2xxx: Make qla2x00_sysfs_write_nvram() easier to
+ analyze
+Git-commit: 109a5987d9ead316523647d6310d609dc95bdaa2
+Patch-mainline: v4.20-rc1
+References: bsc#1137444
+
+Modify the unlock statement such that it becomes easier for static
+analyzers to analyze it. This patch does not change any functionality.
+
+Cc: Himanshu Madhani <himanshu.madhani@cavium.com>
+Signed-off-by: Bart Van Assche <bvanassche@acm.org>
+Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Hannes Reinecke <hare@suse.com>
+---
+ drivers/scsi/qla2xxx/qla_attr.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
+index b28f159fdaee..0bb9ac6ece92 100644
+--- a/drivers/scsi/qla2xxx/qla_attr.c
++++ b/drivers/scsi/qla2xxx/qla_attr.c
+@@ -218,7 +218,7 @@ qla2x00_sysfs_write_nvram(struct file *filp, struct kobject *kobj,
+
+ mutex_lock(&ha->optrom_mutex);
+ if (qla2x00_chip_is_down(vha)) {
+- mutex_unlock(&vha->hw->optrom_mutex);
++ mutex_unlock(&ha->optrom_mutex);
+ return -EAGAIN;
+ }
+
+--
+2.16.4
+
diff --git a/patches.drivers/scsi-qla2xxx-Make-sure-that-qlafx00_ioctl_iosb_entry.patch b/patches.drivers/scsi-qla2xxx-Make-sure-that-qlafx00_ioctl_iosb_entry.patch
new file mode 100644
index 0000000000..7ed6986903
--- /dev/null
+++ b/patches.drivers/scsi-qla2xxx-Make-sure-that-qlafx00_ioctl_iosb_entry.patch
@@ -0,0 +1,37 @@
+From: Bart Van Assche <bvanassche@acm.org>
+Date: Thu, 18 Oct 2018 15:45:45 -0700
+Subject: [PATCH] scsi: qla2xxx: Make sure that qlafx00_ioctl_iosb_entry()
+ initializes 'res'
+Git-commit: 5b0af4777b1bf397787f03336f0db34f185ca565
+Patch-mainline: v4.20-rc1
+References: bsc#1137444
+
+Only one of the two code paths in qlafx00_ioctl_iosb_entry() initializes
+the variable 'res'. Make sure that 'res' is initialized before
+sp->done(sp, res) is called.
+
+Cc: Himanshu Madhani <himanshu.madhani@cavium.com>
+Signed-off-by: Bart Van Assche <bvanassche@acm.org>
+Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Hannes Reinecke <hare@suse.com>
+---
+ drivers/scsi/qla2xxx/qla_mr.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/scsi/qla2xxx/qla_mr.c b/drivers/scsi/qla2xxx/qla_mr.c
+index 2d96f3b7e3e3..b8f967e61891 100644
+--- a/drivers/scsi/qla2xxx/qla_mr.c
++++ b/drivers/scsi/qla2xxx/qla_mr.c
+@@ -2212,7 +2212,7 @@ qlafx00_ioctl_iosb_entry(scsi_qla_host_t *vha, struct req_que *req,
+ struct bsg_job *bsg_job;
+ struct fc_bsg_reply *bsg_reply;
+ struct srb_iocb *iocb_job;
+- int res;
++ int res = 0;
+ struct qla_mt_iocb_rsp_fx00 fstatus;
+ uint8_t *fw_sts_ptr;
+
+--
+2.16.4
+
diff --git a/patches.drivers/scsi-qla2xxx-NULL-check-before-some-freeing-function.patch b/patches.drivers/scsi-qla2xxx-NULL-check-before-some-freeing-function.patch
new file mode 100644
index 0000000000..9faa6b6b1b
--- /dev/null
+++ b/patches.drivers/scsi-qla2xxx-NULL-check-before-some-freeing-function.patch
@@ -0,0 +1,88 @@
+From: Thomas Meyer <thomas@m3y3r.de>
+Date: Sun, 2 Dec 2018 21:52:11 +0100
+Subject: [PATCH] scsi: qla2xxx: NULL check before some freeing functions is
+ not needed
+Git-commit: 75c1d48a338bdf3ce850166be527598017e0ebca
+Patch-mainline: v5.0-rc1
+References: bsc#1137444
+
+NULL check before some freeing functions is not needed.
+
+Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
+Acked-by: Himanshu Madhani <hmadhani@marvell.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Hannes Reinecke <hare@suse.com>
+---
+ drivers/scsi/qla2xxx/qla_os.c | 24 ++++++++----------------
+ 1 file changed, 8 insertions(+), 16 deletions(-)
+
+diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
+index 4a75e0572121..643cd7c0efc1 100644
+--- a/drivers/scsi/qla2xxx/qla_os.c
++++ b/drivers/scsi/qla2xxx/qla_os.c
+@@ -4183,12 +4183,10 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len,
+ kfree(ha->nvram);
+ ha->nvram = NULL;
+ fail_free_ctx_mempool:
+- if (ha->ctx_mempool)
+- mempool_destroy(ha->ctx_mempool);
++ mempool_destroy(ha->ctx_mempool);
+ ha->ctx_mempool = NULL;
+ fail_free_srb_mempool:
+- if (ha->srb_mempool)
+- mempool_destroy(ha->srb_mempool);
++ mempool_destroy(ha->srb_mempool);
+ ha->srb_mempool = NULL;
+ fail_free_gid_list:
+ dma_free_coherent(&ha->pdev->dev, qla2x00_gid_list_size(ha),
+@@ -4490,8 +4488,7 @@ qla2x00_mem_free(struct qla_hw_data *ha)
+ dma_free_coherent(&ha->pdev->dev, MCTP_DUMP_SIZE, ha->mctp_dump,
+ ha->mctp_dump_dma);
+
+- if (ha->srb_mempool)
+- mempool_destroy(ha->srb_mempool);
++ mempool_destroy(ha->srb_mempool);
+
+ if (ha->dcbx_tlv)
+ dma_free_coherent(&ha->pdev->dev, DCBX_TLV_DATA_SIZE,
+@@ -4523,8 +4520,7 @@ qla2x00_mem_free(struct qla_hw_data *ha)
+ if (ha->async_pd)
+ dma_pool_free(ha->s_dma_pool, ha->async_pd, ha->async_pd_dma);
+
+- if (ha->s_dma_pool)
+- dma_pool_destroy(ha->s_dma_pool);
++ dma_pool_destroy(ha->s_dma_pool);
+
+ if (ha->gid_list)
+ dma_free_coherent(&ha->pdev->dev, qla2x00_gid_list_size(ha),
+@@ -4545,14 +4541,11 @@ qla2x00_mem_free(struct qla_hw_data *ha)
+ }
+ }
+
+- if (ha->dl_dma_pool)
+- dma_pool_destroy(ha->dl_dma_pool);
++ dma_pool_destroy(ha->dl_dma_pool);
+
+- if (ha->fcp_cmnd_dma_pool)
+- dma_pool_destroy(ha->fcp_cmnd_dma_pool);
++ dma_pool_destroy(ha->fcp_cmnd_dma_pool);
+
+- if (ha->ctx_mempool)
+- mempool_destroy(ha->ctx_mempool);
++ mempool_destroy(ha->ctx_mempool);
+
+ qlt_mem_free(ha);
+
+@@ -7098,8 +7091,7 @@ qla2x00_module_exit(void)
+ qla2x00_release_firmware();
+ kmem_cache_destroy(srb_cachep);
+ qlt_exit();
+- if (ctx_cachep)
+- kmem_cache_destroy(ctx_cachep);
++ kmem_cache_destroy(ctx_cachep);
+ fc_release_transport(qla2xxx_transport_template);
+ fc_release_transport(qla2xxx_transport_vport_template);
+ }
+--
+2.16.4
+
diff --git a/patches.drivers/scsi-qla2xxx-Remove-a-set-but-not-used-variable.patch b/patches.drivers/scsi-qla2xxx-Remove-a-set-but-not-used-variable.patch
new file mode 100644
index 0000000000..b01af0c612
--- /dev/null
+++ b/patches.drivers/scsi-qla2xxx-Remove-a-set-but-not-used-variable.patch
@@ -0,0 +1,45 @@
+From: Bart Van Assche <bvanassche@acm.org>
+Date: Thu, 18 Oct 2018 15:45:44 -0700
+Subject: [PATCH] scsi: qla2xxx: Remove a set-but-not-used variable
+Git-commit: eb023220f4eac1703e22e48ed62310a6565b3a1f
+Patch-mainline: v4.20-rc1
+References: bsc#1137444
+
+This patch does not change any functionality.
+
+Cc: Himanshu Madhani <himanshu.madhani@cavium.com>
+Signed-off-by: Bart Van Assche <bvanassche@acm.org>
+Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Hannes Reinecke <hare@suse.com>
+---
+ drivers/scsi/qla2xxx/qla_os.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
+index dba672f87cb2..01607d2f2c34 100644
+--- a/drivers/scsi/qla2xxx/qla_os.c
++++ b/drivers/scsi/qla2xxx/qla_os.c
+@@ -1749,7 +1749,7 @@ qla2x00_loop_reset(scsi_qla_host_t *vha)
+ static void
+ __qla2x00_abort_all_cmds(struct qla_qpair *qp, int res)
+ {
+- int cnt, status;
++ int cnt;
+ unsigned long flags;
+ srb_t *sp;
+ scsi_qla_host_t *vha = qp->vha;
+@@ -1799,8 +1799,8 @@ __qla2x00_abort_all_cmds(struct qla_qpair *qp, int res)
+ if (!sp_get(sp)) {
+ spin_unlock_irqrestore
+ (qp->qp_lock_ptr, flags);
+- status = qla2xxx_eh_abort(
+- GET_CMD_SP(sp));
++ qla2xxx_eh_abort(
++ GET_CMD_SP(sp));
+ spin_lock_irqsave
+ (qp->qp_lock_ptr, flags);
+ }
+--
+2.16.4
+
diff --git a/patches.drivers/scsi-qla2xxx-Remove-two-arguments-from-qlafx00_error.patch b/patches.drivers/scsi-qla2xxx-Remove-two-arguments-from-qlafx00_error.patch
new file mode 100644
index 0000000000..9b8d879774
--- /dev/null
+++ b/patches.drivers/scsi-qla2xxx-Remove-two-arguments-from-qlafx00_error.patch
@@ -0,0 +1,66 @@
+From: Bart Van Assche <bvanassche@acm.org>
+Date: Thu, 18 Oct 2018 15:45:46 -0700
+Subject: [PATCH] scsi: qla2xxx: Remove two arguments from
+ qlafx00_error_entry()
+Git-commit: 2c309aeed62c25661eb2c7d4e4510613a1c7ffc2
+Patch-mainline: v4.20-rc1
+References: bsc#1137444
+
+Move a debug statement from qlafx00_error_entry() into its caller. Remove
+one unused argument from that function. This patch does not change the
+behavior of the qla2xxx driver.
+
+Cc: Himanshu Madhani <himanshu.madhani@cavium.com>
+Signed-off-by: Bart Van Assche <bvanassche@acm.org>
+Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Hannes Reinecke <hare@suse.com>
+---
+ drivers/scsi/qla2xxx/qla_mr.c | 13 +++++--------
+ 1 file changed, 5 insertions(+), 8 deletions(-)
+
+diff --git a/drivers/scsi/qla2xxx/qla_mr.c b/drivers/scsi/qla2xxx/qla_mr.c
+index b8f967e61891..60f964c53c01 100644
+--- a/drivers/scsi/qla2xxx/qla_mr.c
++++ b/drivers/scsi/qla2xxx/qla_mr.c
+@@ -2681,12 +2681,10 @@ qlafx00_multistatus_entry(struct scsi_qla_host *vha,
+ * @vha: SCSI driver HA context
+ * @rsp: response queue
+ * @pkt: Entry pointer
+- * @estatus:
+- * @etype:
+ */
+ static void
+ qlafx00_error_entry(scsi_qla_host_t *vha, struct rsp_que *rsp,
+- struct sts_entry_fx00 *pkt, uint8_t estatus, uint8_t etype)
++ struct sts_entry_fx00 *pkt)
+ {
+ srb_t *sp;
+ struct qla_hw_data *ha = vha->hw;
+@@ -2695,9 +2693,6 @@ qlafx00_error_entry(scsi_qla_host_t *vha, struct rsp_que *rsp,
+ struct req_que *req = NULL;
+ int res = DID_ERROR << 16;
+
+- ql_dbg(ql_dbg_async, vha, 0x507f,
+- "type of error status in response: 0x%x\n", estatus);
+-
+ req = ha->req_q_map[que];
+
+ sp = qla2x00_get_sp_from_handle(vha, func, req, pkt);
+@@ -2745,9 +2740,11 @@ qlafx00_process_response_queue(struct scsi_qla_host *vha,
+
+ if (pkt->entry_status != 0 &&
+ pkt->entry_type != IOCTL_IOSB_TYPE_FX00) {
++ ql_dbg(ql_dbg_async, vha, 0x507f,
++ "type of error status in response: 0x%x\n",
++ pkt->entry_status);
+ qlafx00_error_entry(vha, rsp,
+- (struct sts_entry_fx00 *)pkt, pkt->entry_status,
+- pkt->entry_type);
++ (struct sts_entry_fx00 *)pkt);
+ continue;
+ }
+
+--
+2.16.4
+
diff --git a/patches.drivers/scsi-qla2xxx-Remove-unused-symbols.patch b/patches.drivers/scsi-qla2xxx-Remove-unused-symbols.patch
new file mode 100644
index 0000000000..78b58eb045
--- /dev/null
+++ b/patches.drivers/scsi-qla2xxx-Remove-unused-symbols.patch
@@ -0,0 +1,36 @@
+From: Bart Van Assche <bart.vanassche@wdc.com>
+Date: Tue, 23 Jan 2018 16:33:48 -0800
+Subject: [PATCH] scsi: qla2xxx: Remove unused symbols
+Git-commit: 7843327a236c4cf103a8b1d5da2b27e7bace0260
+Patch-mainline: v4.17-rc1
+References: bsc#1118139
+
+Remove a few preprocessor macros that are not used anywhere.
+
+Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
+Cc: Himanshu Madhani <himanshu.madhani@cavium.com>
+Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Hannes Reinecke <hare@suse.com>
+---
+ drivers/scsi/qla2xxx/qla_nx2.h | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/drivers/scsi/qla2xxx/qla_nx2.h b/drivers/scsi/qla2xxx/qla_nx2.h
+index 83c1b7e17c80..8ba7c1db07c3 100644
+--- a/drivers/scsi/qla2xxx/qla_nx2.h
++++ b/drivers/scsi/qla2xxx/qla_nx2.h
+@@ -23,10 +23,6 @@
+ #define MD_MIU_TEST_AGT_WRDATA_HI 0x410000A4
+ #define MD_MIU_TEST_AGT_WRDATA_ULO 0x410000B0
+ #define MD_MIU_TEST_AGT_WRDATA_UHI 0x410000B4
+-#define MD_MIU_TEST_AGT_RDDATA_LO 0x410000A8
+-#define MD_MIU_TEST_AGT_RDDATA_HI 0x410000AC
+-#define MD_MIU_TEST_AGT_RDDATA_ULO 0x410000B8
+-#define MD_MIU_TEST_AGT_RDDATA_UHI 0x410000BC
+
+ /* MIU_TEST_AGT_CTRL flags. work for SIU as well */
+ #define MIU_TA_CTL_WRITE_ENABLE (MIU_TA_CTL_WRITE | MIU_TA_CTL_ENABLE)
+--
+2.12.3
+
diff --git a/patches.drivers/scsi-qla2xxx-Split-the-__qla2x00_abort_all_cmds-func.patch b/patches.drivers/scsi-qla2xxx-Split-the-__qla2x00_abort_all_cmds-func.patch
new file mode 100644
index 0000000000..c7855fe074
--- /dev/null
+++ b/patches.drivers/scsi-qla2xxx-Split-the-__qla2x00_abort_all_cmds-func.patch
@@ -0,0 +1,128 @@
+From: Bart Van Assche <bvanassche@acm.org>
+Date: Thu, 29 Nov 2018 10:25:11 -0800
+Subject: [PATCH] scsi: qla2xxx: Split the __qla2x00_abort_all_cmds() function
+Git-commit: c4e521b654e15e372a6429e269e7e907b4698224
+Patch-mainline: v5.0-rc1
+References: bsc#1137444
+
+Nesting in __qla2x00_abort_all_cmds() is way too deep. Reduce the nesting
+level by introducing a helper function. This patch does not change any
+functionality.
+
+[hare: resolved merge conflict manually]
+
+Reviewed-by: Laurence Oberman <loberman@redhat.com>
+Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
+Signed-off-by: Bart Van Assche <bvanassche@acm.org>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Hannes Reinecke <hare@suse.com>
+---
+ drivers/scsi/qla2xxx/qla_os.c | 82 +++++++++++++++++++------------------------
+ 1 file changed, 37 insertions(+), 45 deletions(-)
+
+diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
+index b658b9a5eb1e..5f78f14e84db 100644
+--- a/drivers/scsi/qla2xxx/qla_os.c
++++ b/drivers/scsi/qla2xxx/qla_os.c
+@@ -1746,10 +1746,45 @@ qla2x00_loop_reset(scsi_qla_host_t *vha)
+ return QLA_SUCCESS;
+ }
+
++static void qla2x00_abort_srb(struct qla_qpair *qp, srb_t *sp, const int res,
++ unsigned long *flags)
++ __releases(qp->qp_lock_ptr)
++ __acquires(qp->qp_lock_ptr)
++{
++ scsi_qla_host_t *vha = qp->vha;
++ struct qla_hw_data *ha = vha->hw;
++
++ if (sp->type == SRB_NVME_CMD || sp->type == SRB_NVME_LS) {
++ if (!sp_get(sp)) {
++ /* got sp */
++ spin_unlock_irqrestore(qp->qp_lock_ptr, *flags);
++ qla_nvme_abort(ha, sp, res);
++ spin_lock_irqsave(qp->qp_lock_ptr, *flags);
++ }
++ } else if (GET_CMD_SP(sp) && !ha->flags.eeh_busy &&
++ !test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) &&
++ !qla2x00_isp_reg_stat(ha) && sp->type == SRB_SCSI_CMD) {
++ /*
++ * Don't abort commands in adapter during EEH recovery as it's
++ * not accessible/responding.
++ *
++ * Get a reference to the sp and drop the lock. The reference
++ * ensures this sp->done() call and not the call in
++ * qla2xxx_eh_abort() ends the SCSI cmd (with result 'res').
++ */
++ if (!sp_get(sp)) {
++ spin_unlock_irqrestore(qp->qp_lock_ptr, *flags);
++ qla2xxx_eh_abort(GET_CMD_SP(sp));
++ spin_lock_irqsave(qp->qp_lock_ptr, *flags);
++ }
++ }
++ sp->done(sp, res);
++}
++
+ static void
+ __qla2x00_abort_all_cmds(struct qla_qpair *qp, int res)
+ {
+- int cnt, status;
++ int cnt;
+ unsigned long flags;
+ srb_t *sp;
+ scsi_qla_host_t *vha = qp->vha;
+@@ -1768,50 +1803,7 @@ __qla2x00_abort_all_cmds(struct qla_qpair *qp, int res)
+ req->outstanding_cmds[cnt] = NULL;
+ switch (sp->cmd_type) {
+ case TYPE_SRB:
+- if (sp->type == SRB_NVME_CMD ||
+- sp->type == SRB_NVME_LS) {
+- if (!sp_get(sp)) {
+- /* got sp */
+- spin_unlock_irqrestore
+- (qp->qp_lock_ptr,
+- flags);
+- qla_nvme_abort(ha, sp, res);
+- spin_lock_irqsave
+- (qp->qp_lock_ptr, flags);
+- }
+- } else if (GET_CMD_SP(sp) &&
+- !ha->flags.eeh_busy &&
+- (!test_bit(ABORT_ISP_ACTIVE,
+- &vha->dpc_flags)) &&
+- !qla2x00_isp_reg_stat(ha) &&
+- (sp->type == SRB_SCSI_CMD)) {
+- /*
+- * Don't abort commands in adapter
+- * during EEH recovery as it's not
+- * accessible/responding.
+- *
+- * Get a reference to the sp and drop
+- * the lock. The reference ensures this
+- * sp->done() call and not the call in
+- * qla2xxx_eh_abort() ends the SCSI cmd
+- * (with result 'res').
+- */
+- if (!sp_get(sp)) {
+- spin_unlock_irqrestore
+- (qp->qp_lock_ptr, flags);
+- status = qla2xxx_eh_abort(
+- GET_CMD_SP(sp));
+- spin_lock_irqsave
+- (qp->qp_lock_ptr, flags);
+- /*
+- * Get rid of extra reference caused
+- * by early exit from qla2xxx_eh_abort
+- */
+- if (status == FAST_IO_FAIL)
+- atomic_dec(&sp->ref_count);
+- }
+- }
+- sp->done(sp, res);
++ qla2x00_abort_srb(qp, sp, res, &flags);
+ break;
+ case TYPE_TGT_CMD:
+ if (!vha->hw->tgt.tgt_ops || !tgt ||
+--
+2.16.4
+
diff --git a/patches.drivers/scsi-qla2xxx-Timeouts-occur-on-surprise-removal-of-Q.patch b/patches.drivers/scsi-qla2xxx-Timeouts-occur-on-surprise-removal-of-Q.patch
index 0a3aca96bd..3ccedfc9b0 100644
--- a/patches.drivers/scsi-qla2xxx-Timeouts-occur-on-surprise-removal-of-Q.patch
+++ b/patches.drivers/scsi-qla2xxx-Timeouts-occur-on-surprise-removal-of-Q.patch
@@ -17,13 +17,29 @@ Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
---
- drivers/scsi/qla2xxx/qla_os.c | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
+ drivers/scsi/qla2xxx/qla_os.c | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
+index 20c85eed1a75..b658b9a5eb1e 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
-@@ -1805,6 +1805,12 @@ __qla2x00_abort_all_cmds(struct qla_qpai
- GET_CMD_SP(sp));
+@@ -1749,7 +1749,7 @@ qla2x00_loop_reset(scsi_qla_host_t *vha)
+ static void
+ __qla2x00_abort_all_cmds(struct qla_qpair *qp, int res)
+ {
+- int cnt;
++ int cnt, status;
+ unsigned long flags;
+ srb_t *sp;
+ scsi_qla_host_t *vha = qp->vha;
+@@ -1799,10 +1799,16 @@ __qla2x00_abort_all_cmds(struct qla_qpair *qp, int res)
+ if (!sp_get(sp)) {
+ spin_unlock_irqrestore
+ (qp->qp_lock_ptr, flags);
+- qla2xxx_eh_abort(
++ status = qla2xxx_eh_abort(
+ GET_CMD_SP(sp));
spin_lock_irqsave
(qp->qp_lock_ptr, flags);
+ /*
@@ -35,4 +51,6 @@ Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
}
}
sp->done(sp, res);
+--
+2.16.4
diff --git a/patches.drivers/scsi-qla2xxx-Use-p-for-printing-pointers.patch b/patches.drivers/scsi-qla2xxx-Use-p-for-printing-pointers.patch
new file mode 100644
index 0000000000..dae8264c5c
--- /dev/null
+++ b/patches.drivers/scsi-qla2xxx-Use-p-for-printing-pointers.patch
@@ -0,0 +1,36 @@
+From: Bart Van Assche <bart.vanassche@wdc.com>
+Date: Tue, 23 Jan 2018 16:33:47 -0800
+Subject: [PATCH] scsi: qla2xxx: Use %p for printing pointers
+Git-commit: da4704d941766ef61f125d57162eee4ba7f2deda
+Patch-mainline: v4.17-rc1
+References: bsc#1118139
+
+Using %p instead of %lx to print a pointer allows to remove a cast.
+
+Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
+Cc: Himanshu Madhani <himanshu.madhani@cavium.com>
+Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Hannes Reinecke <hare@suse.com>
+---
+ drivers/scsi/qla2xxx/qla_init.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
+index aececf664654..995579ea0f7f 100644
+--- a/drivers/scsi/qla2xxx/qla_init.c
++++ b/drivers/scsi/qla2xxx/qla_init.c
+@@ -2688,8 +2688,8 @@ qla2x00_chip_diag(scsi_qla_host_t *vha)
+ /* Assume a failed state */
+ rval = QLA_FUNCTION_FAILED;
+
+- ql_dbg(ql_dbg_init, vha, 0x007b,
+- "Testing device at %lx.\n", (u_long)&reg->flash_address);
++ ql_dbg(ql_dbg_init, vha, 0x007b, "Testing device at %p.\n",
++ &reg->flash_address);
+
+ spin_lock_irqsave(&ha->hardware_lock, flags);
+
+--
+2.12.3
+
diff --git a/patches.drivers/scsi-qla2xxx-fully-convert-to-the-generic-DMA-API.patch b/patches.drivers/scsi-qla2xxx-fully-convert-to-the-generic-DMA-API.patch
new file mode 100644
index 0000000000..24149a9f3e
--- /dev/null
+++ b/patches.drivers/scsi-qla2xxx-fully-convert-to-the-generic-DMA-API.patch
@@ -0,0 +1,72 @@
+From: Christoph Hellwig <hch@lst.de>
+Date: Thu, 11 Oct 2018 09:42:07 +0200
+Subject: [PATCH] scsi: qla2xxx: fully convert to the generic DMA API
+Git-commit: e7d0bb774699be4542ec09e903a9cce38cea33d4
+Patch-mainline: v4.20-rc1
+References: bsc#1137444
+
+The driver is currently using an odd mix of legacy PCI DMA API and
+generic DMA API calls, switch it over to the generic API entirely.
+
+Signed-off-by: Christoph Hellwig <hch@lst.de>
+Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Hannes Reinecke <hare@suse.com>
+---
+ drivers/scsi/qla2xxx/qla_target.c | 8 ++++----
+ drivers/scsi/qla2xxx/tcm_qla2xxx.c | 2 +-
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
+index 3015f1bbcf1a..39828207bc1d 100644
+--- a/drivers/scsi/qla2xxx/qla_target.c
++++ b/drivers/scsi/qla2xxx/qla_target.c
+@@ -2425,7 +2425,7 @@ static int qlt_pci_map_calc_cnt(struct qla_tgt_prm *prm)
+ BUG_ON(cmd->sg_cnt == 0);
+
+ prm->sg = (struct scatterlist *)cmd->sg;
+- prm->seg_cnt = pci_map_sg(cmd->qpair->pdev, cmd->sg,
++ prm->seg_cnt = dma_map_sg(&cmd->qpair->pdev->dev, cmd->sg,
+ cmd->sg_cnt, cmd->dma_data_direction);
+ if (unlikely(prm->seg_cnt == 0))
+ goto out_err;
+@@ -2452,7 +2452,7 @@ static int qlt_pci_map_calc_cnt(struct qla_tgt_prm *prm)
+
+ if (cmd->prot_sg_cnt) {
+ prm->prot_sg = cmd->prot_sg;
+- prm->prot_seg_cnt = pci_map_sg(cmd->qpair->pdev,
++ prm->prot_seg_cnt = dma_map_sg(&cmd->qpair->pdev->dev,
+ cmd->prot_sg, cmd->prot_sg_cnt,
+ cmd->dma_data_direction);
+ if (unlikely(prm->prot_seg_cnt == 0))
+@@ -2487,12 +2487,12 @@ static void qlt_unmap_sg(struct scsi_qla_host *vha, struct qla_tgt_cmd *cmd)
+
+ qpair = cmd->qpair;
+
+- pci_unmap_sg(qpair->pdev, cmd->sg, cmd->sg_cnt,
++ dma_unmap_sg(&qpair->pdev->dev, cmd->sg, cmd->sg_cnt,
+ cmd->dma_data_direction);
+ cmd->sg_mapped = 0;
+
+ if (cmd->prot_sg_cnt)
+- pci_unmap_sg(qpair->pdev, cmd->prot_sg, cmd->prot_sg_cnt,
++ dma_unmap_sg(&qpair->pdev->dev, cmd->prot_sg, cmd->prot_sg_cnt,
+ cmd->dma_data_direction);
+
+ if (!cmd->ctx)
+diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
+index 731a094d2386..65053c066680 100644
+--- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
++++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
+@@ -424,7 +424,7 @@ static int tcm_qla2xxx_write_pending(struct se_cmd *se_cmd)
+ se_cmd->pi_err = 0;
+
+ /*
+- * qla_target.c:qlt_rdy_to_xfer() will call pci_map_sg() to setup
++ * qla_target.c:qlt_rdy_to_xfer() will call dma_map_sg() to setup
+ * the SGL mappings into PCIe memory for incoming FCP WRITE data.
+ */
+ return qlt_rdy_to_xfer(cmd);
+--
+2.16.4
+
diff --git a/patches.drivers/scsi-qla2xxx-use-lower_32_bits-and-upper_32_bits-ins.patch b/patches.drivers/scsi-qla2xxx-use-lower_32_bits-and-upper_32_bits-ins.patch
new file mode 100644
index 0000000000..3abc19b803
--- /dev/null
+++ b/patches.drivers/scsi-qla2xxx-use-lower_32_bits-and-upper_32_bits-ins.patch
@@ -0,0 +1,70 @@
+From: Christoph Hellwig <hch@lst.de>
+Date: Thu, 18 Oct 2018 15:03:37 +0200
+Subject: [PATCH] scsi: qla2xxx: use lower_32_bits and upper_32_bits instead of
+ reinventing them
+Git-commit: 3d5ca1e6fdfeb4bc9d0b2eb4e35717198af03d78
+Patch-mainline: v5.0-rc1
+References: bsc#1137444
+
+This also moves the optimization for builds with 32-bit dma_addr_t to
+the compiler (where it belongs) instead of opencoding it based on
+incorrect assumptions.
+
+Signed-off-by: Christoph Hellwig <hch@lst.de>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Hannes Reinecke <hare@suse.com>
+---
+ drivers/scsi/qla2xxx/qla_target.c | 8 ++++----
+ drivers/scsi/qla2xxx/qla_target.h | 8 --------
+ 2 files changed, 4 insertions(+), 12 deletions(-)
+
+diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
+index c4504740f0e2..bceb8e882e7f 100644
+--- a/drivers/scsi/qla2xxx/qla_target.c
++++ b/drivers/scsi/qla2xxx/qla_target.c
+@@ -2660,9 +2660,9 @@ static void qlt_load_cont_data_segments(struct qla_tgt_prm *prm)
+ cnt < QLA_TGT_DATASEGS_PER_CONT_24XX && prm->seg_cnt;
+ cnt++, prm->seg_cnt--) {
+ *dword_ptr++ =
+- cpu_to_le32(pci_dma_lo32
++ cpu_to_le32(lower_32_bits
+ (sg_dma_address(prm->sg)));
+- *dword_ptr++ = cpu_to_le32(pci_dma_hi32
++ *dword_ptr++ = cpu_to_le32(upper_32_bits
+ (sg_dma_address(prm->sg)));
+ *dword_ptr++ = cpu_to_le32(sg_dma_len(prm->sg));
+
+@@ -2704,9 +2704,9 @@ static void qlt_load_data_segments(struct qla_tgt_prm *prm)
+ (cnt < QLA_TGT_DATASEGS_PER_CMD_24XX) && prm->seg_cnt;
+ cnt++, prm->seg_cnt--) {
+ *dword_ptr++ =
+- cpu_to_le32(pci_dma_lo32(sg_dma_address(prm->sg)));
++ cpu_to_le32(lower_32_bits(sg_dma_address(prm->sg)));
+
+- *dword_ptr++ = cpu_to_le32(pci_dma_hi32(
++ *dword_ptr++ = cpu_to_le32(upper_32_bits(
+ sg_dma_address(prm->sg)));
+
+ *dword_ptr++ = cpu_to_le32(sg_dma_len(prm->sg));
+diff --git a/drivers/scsi/qla2xxx/qla_target.h b/drivers/scsi/qla2xxx/qla_target.h
+index 721da593b1bc..577e1786a3f1 100644
+--- a/drivers/scsi/qla2xxx/qla_target.h
++++ b/drivers/scsi/qla2xxx/qla_target.h
+@@ -771,14 +771,6 @@ int qla2x00_wait_for_hba_online(struct scsi_qla_host *);
+ #define FC_TM_REJECT 4
+ #define FC_TM_FAILED 5
+
+-#if (BITS_PER_LONG > 32) || defined(CONFIG_HIGHMEM64G)
+-#define pci_dma_lo32(a) (a & 0xffffffff)
+-#define pci_dma_hi32(a) ((((a) >> 16)>>16) & 0xffffffff)
+-#else
+-#define pci_dma_lo32(a) (a & 0xffffffff)
+-#define pci_dma_hi32(a) 0
+-#endif
+-
+ #define QLA_TGT_SENSE_VALID(sense) ((sense != NULL) && \
+ (((const uint8_t *)(sense))[0] & 0x70) == 0x70)
+
+--
+2.16.4
+
diff --git a/patches.fixes/0001-of-fix-clang-Wunsequenced-for-be32_to_cpu.patch b/patches.fixes/0001-of-fix-clang-Wunsequenced-for-be32_to_cpu.patch
new file mode 100644
index 0000000000..504c50247a
--- /dev/null
+++ b/patches.fixes/0001-of-fix-clang-Wunsequenced-for-be32_to_cpu.patch
@@ -0,0 +1,59 @@
+From 440868661f36071886ed360d91de83bd67c73b4f Mon Sep 17 00:00:00 2001
+From: Phong Tran <tranmanphong@gmail.com>
+Date: Tue, 30 Apr 2019 21:56:24 +0700
+Subject: [PATCH] of: fix clang -Wunsequenced for be32_to_cpu()
+Git-commit: 440868661f36071886ed360d91de83bd67c73b4f
+Patch-mainline: v5.2-rc1
+References: bsc#1135642
+
+Now, make the loop explicit to avoid clang warning.
+
+./include/linux/of.h:238:37: warning: multiple unsequenced modifications
+to 'cell' [-Wunsequenced]
+ r = (r << 32) | be32_to_cpu(*(cell++));
+ ^~
+./include/linux/byteorder/generic.h:95:21: note: expanded from macro
+'be32_to_cpu'
+ ^
+./include/uapi/linux/byteorder/little_endian.h:40:59: note: expanded
+from macro '__be32_to_cpu'
+ ^
+./include/uapi/linux/swab.h:118:21: note: expanded from macro '__swab32'
+ ___constant_swab32(x) : \
+ ^
+./include/uapi/linux/swab.h:18:12: note: expanded from macro
+'___constant_swab32'
+ (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \
+ ^
+
+Signed-off-by: Phong Tran <tranmanphong@gmail.com>
+Reported-by: Nick Desaulniers <ndesaulniers@google.com>
+Link: https://github.com/ClangBuiltLinux/linux/issues/460
+Suggested-by: David Laight <David.Laight@ACULAB.COM>
+Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
+Cc: stable@vger.kernel.org
+[robh: fix up whitespace]
+Signed-off-by: Rob Herring <robh@kernel.org>
+Reviewed-by: Fabian Baumanis <fabian.baumanis@suse.com>
+---
+ include/linux/of.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/include/linux/of.h b/include/linux/of.h
+index 28797e1a9982..0cf857012f11 100644
+--- a/include/linux/of.h
++++ b/include/linux/of.h
+@@ -234,8 +234,8 @@ extern struct device_node *of_find_all_nodes(struct device_node *prev);
+ static inline u64 of_read_number(const __be32 *cell, int size)
+ {
+ u64 r = 0;
+- while (size--)
+- r = (r << 32) | be32_to_cpu(*(cell++));
++ for (; size--; cell++)
++ r = (r << 32) | be32_to_cpu(*cell);
+ return r;
+ }
+
+--
+2.16.4
+
diff --git a/patches.fixes/indirect-call-wrappers-helpers-to-speed-up-indirect-.patch b/patches.fixes/indirect-call-wrappers-helpers-to-speed-up-indirect-.patch
new file mode 100644
index 0000000000..a152ebecc1
--- /dev/null
+++ b/patches.fixes/indirect-call-wrappers-helpers-to-speed-up-indirect-.patch
@@ -0,0 +1,85 @@
+From: Paolo Abeni <pabeni@redhat.com>
+Date: Fri, 14 Dec 2018 11:51:57 +0100
+Subject: indirect call wrappers: helpers to speed-up indirect calls of builtin
+Patch-mainline: v5.0-rc1
+Git-commit: 283c16a2dfd332bf5610c874f7b9f9c8b601ce53
+References: bsc#1124503
+
+This header define a bunch of helpers that allow avoiding the
+retpoline overhead when calling builtin functions via function pointers.
+It boils down to explicitly comparing the function pointers to
+known builtin functions and eventually invoke directly the latter.
+
+The macros defined here implement the boilerplate for the above schema
+and will be used by the next patches.
+
+rfc -> v1:
+ - use branch prediction hint, as suggested by Eric
+v1 -> v2:
+ - list explicitly the builtin function names in INDIRECT_CALL_*(),
+ as suggested by Ed Cree
+
+Suggested-by: Eric Dumazet <edumazet@google.com>
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Michal Kubecek <mkubecek@suse.cz>
+
+---
+ include/linux/indirect_call_wrapper.h | 51 +++++++++++++++++++++++++++
+ 1 file changed, 51 insertions(+)
+ create mode 100644 include/linux/indirect_call_wrapper.h
+
+--- /dev/null
++++ b/include/linux/indirect_call_wrapper.h
+@@ -0,0 +1,51 @@
++/* SPDX-License-Identifier: GPL-2.0 */
++#ifndef _LINUX_INDIRECT_CALL_WRAPPER_H
++#define _LINUX_INDIRECT_CALL_WRAPPER_H
++
++#ifdef CONFIG_RETPOLINE
++
++/*
++ * INDIRECT_CALL_$NR - wrapper for indirect calls with $NR known builtin
++ * @f: function pointer
++ * @f$NR: builtin functions names, up to $NR of them
++ * @__VA_ARGS__: arguments for @f
++ *
++ * Avoid retpoline overhead for known builtin, checking @f vs each of them and
++ * eventually invoking directly the builtin function. The functions are check
++ * in the given order. Fallback to the indirect call.
++ */
++#define INDIRECT_CALL_1(f, f1, ...) \
++ ({ \
++ likely(f == f1) ? f1(__VA_ARGS__) : f(__VA_ARGS__); \
++ })
++#define INDIRECT_CALL_2(f, f2, f1, ...) \
++ ({ \
++ likely(f == f2) ? f2(__VA_ARGS__) : \
++ INDIRECT_CALL_1(f, f1, __VA_ARGS__); \
++ })
++
++#define INDIRECT_CALLABLE_DECLARE(f) f
++#define INDIRECT_CALLABLE_SCOPE
++
++#else
++#define INDIRECT_CALL_1(f, name, ...) f(__VA_ARGS__)
++#define INDIRECT_CALL_2(f, name, ...) f(__VA_ARGS__)
++#define INDIRECT_CALLABLE_DECLARE(f)
++#define INDIRECT_CALLABLE_SCOPE static
++#endif
++
++/*
++ * We can use INDIRECT_CALL_$NR for ipv6 related functions only if ipv6 is
++ * builtin, this macro simplify dealing with indirect calls with only ipv4/ipv6
++ * alternatives
++ */
++#if IS_BUILTIN(CONFIG_IPV6)
++#define INDIRECT_CALL_INET(f, f2, f1, ...) \
++ INDIRECT_CALL_2(f, f2, f1, __VA_ARGS__)
++#elif IS_ENABLED(CONFIG_INET)
++#define INDIRECT_CALL_INET(f, f2, f1, ...) INDIRECT_CALL_1(f, f1, __VA_ARGS__)
++#else
++#define INDIRECT_CALL_INET(f, f2, f1, ...) f(__VA_ARGS__)
++#endif
++
++#endif
diff --git a/patches.fixes/mm-prevent-get_user_pages-from-overflowing-page-refcount.patch b/patches.fixes/mm-prevent-get_user_pages-from-overflowing-page-refcount.patch
index 1cd97df253..456da3e810 100644
--- a/patches.fixes/mm-prevent-get_user_pages-from-overflowing-page-refcount.patch
+++ b/patches.fixes/mm-prevent-get_user_pages-from-overflowing-page-refcount.patch
@@ -22,10 +22,10 @@ Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
---
arch/s390/mm/gup.c | 9 ++++++---
- arch/x86/mm/gup.c | 12 ++++++++++--
+ arch/x86/mm/gup.c | 14 ++++++++++++--
mm/gup.c | 46 +++++++++++++++++++++++++++++++++++-----------
mm/hugetlb.c | 13 +++++++++++++
- 4 files changed, 64 insertions(+), 16 deletions(-)
+ 4 files changed, 66 insertions(+), 16 deletions(-)
--- a/arch/s390/mm/gup.c
+++ b/arch/s390/mm/gup.c
@@ -34,8 +34,8 @@ Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
page = pte_page(pte);
head = compound_head(page);
- if (!page_cache_get_speculative(head))
-+ if (unlikely(WARN_ON_ONCE(page_ref_count(head) < 0
-+ || !page_cache_get_speculative(head))))
++ if (unlikely(WARN_ON_ONCE(page_ref_count(head) < 0)
++ || !page_cache_get_speculative(head)))
return 0;
if (unlikely(pte_val(pte) != pte_val(*ptep))) {
put_page(head);
@@ -96,6 +96,15 @@ Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
page = head + ((addr & ~PMD_MASK) >> PAGE_SHIFT);
do {
VM_BUG_ON_PAGE(compound_head(page) != head, page);
+@@ -282,6 +290,8 @@ static noinline int gup_huge_pud(pud_t p
+
+ refs = 0;
+ head = pud_page(pud);
++ if (WARN_ON_ONCE(page_ref_count(head) <= 0))
++ return 0;
+ page = head + ((addr & ~PUD_MASK) >> PAGE_SHIFT);
+ do {
+ VM_BUG_ON_PAGE(compound_head(page) != head, page);
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -153,7 +153,11 @@ retry:
diff --git a/patches.fixes/net-unbreak-CONFIG_RETPOLINE-n-builds.patch b/patches.fixes/net-unbreak-CONFIG_RETPOLINE-n-builds.patch
new file mode 100644
index 0000000000..7e1646f316
--- /dev/null
+++ b/patches.fixes/net-unbreak-CONFIG_RETPOLINE-n-builds.patch
@@ -0,0 +1,37 @@
+From: Paolo Abeni <pabeni@redhat.com>
+Date: Mon, 17 Dec 2018 12:39:02 +0100
+Subject: net: unbreak CONFIG_RETPOLINE=n builds
+Patch-mainline: v5.0-rc1
+Git-commit: c03b0358ab60504151b35587c88205c7b7fe22be
+References: bsc#1124503
+
+The kbuild bot reported a build breakage with CONFIG_RETPOLINE=n
+due to commit aaa5d90b395a ("net: use indirect call wrappers at
+GRO network layer").
+I screwed the wrapper implementation for such config.
+Fix the issue properly ignoring the builtin symbols arguments,
+when retpoline is not enabled.
+
+Reported-by: kbuild test robot <lkp@intel.com>
+Fixes: aaa5d90b395a ("net: use indirect call wrappers at GRO network layer")
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Michal Kubecek <mkubecek@suse.cz>
+
+---
+ include/linux/indirect_call_wrapper.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/include/linux/indirect_call_wrapper.h
++++ b/include/linux/indirect_call_wrapper.h
+@@ -28,8 +28,8 @@
+ #define INDIRECT_CALLABLE_SCOPE
+
+ #else
+-#define INDIRECT_CALL_1(f, name, ...) f(__VA_ARGS__)
+-#define INDIRECT_CALL_2(f, name, ...) f(__VA_ARGS__)
++#define INDIRECT_CALL_1(f, f1, ...) f(__VA_ARGS__)
++#define INDIRECT_CALL_2(f, f2, f1, ...) f(__VA_ARGS__)
+ #define INDIRECT_CALLABLE_DECLARE(f)
+ #define INDIRECT_CALLABLE_SCOPE static
+ #endif
diff --git a/patches.fixes/net-use-indirect-call-wrappers-at-GRO-network-layer.patch b/patches.fixes/net-use-indirect-call-wrappers-at-GRO-network-layer.patch
new file mode 100644
index 0000000000..a6fefb0c16
--- /dev/null
+++ b/patches.fixes/net-use-indirect-call-wrappers-at-GRO-network-layer.patch
@@ -0,0 +1,111 @@
+From: Paolo Abeni <pabeni@redhat.com>
+Date: Fri, 14 Dec 2018 11:51:58 +0100
+Subject: net: use indirect call wrappers at GRO network layer
+Patch-mainline: v5.0-rc1
+Git-commit: aaa5d90b395a72faff797b00d815165ee0e664c0
+References: bsc#1124503
+
+This avoids an indirect calls for L3 GRO receive path, both
+for ipv4 and ipv6, if the latter is not compiled as a module.
+
+Note that when IPv6 is compiled as builtin, it will be checked first,
+so we have a single additional compare for the more common path.
+
+v1 -> v2:
+ - adapted to INDIRECT_CALL_ changes
+
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Michal Kubecek <mkubecek@suse.cz>
+
+---
+ include/net/inet_common.h | 2 ++
+ net/core/dev.c | 15 +++++++++++++--
+ net/ipv6/ip6_offload.c | 6 +++---
+ 3 files changed, 18 insertions(+), 5 deletions(-)
+
+--- a/include/net/inet_common.h
++++ b/include/net/inet_common.h
+@@ -1,6 +1,8 @@
+ #ifndef _INET_COMMON_H
+ #define _INET_COMMON_H
+
++#include <linux/indirect_call_wrapper.h>
++
+ extern const struct proto_ops inet_stream_ops;
+ extern const struct proto_ops inet_dgram_ops;
+
+--- a/net/core/dev.c
++++ b/net/core/dev.c
+@@ -144,6 +144,7 @@
+ #include <linux/netfilter_ingress.h>
+ #include <linux/crash_dump.h>
+ #include <linux/sctp.h>
++#include <linux/indirect_call_wrapper.h>
+
+ #include "net-sysfs.h"
+
+@@ -4616,6 +4617,8 @@ static void flush_all_backlogs(void)
+ put_online_cpus();
+ }
+
++INDIRECT_CALLABLE_DECLARE(int inet_gro_complete(struct sk_buff *, int));
++INDIRECT_CALLABLE_DECLARE(int ipv6_gro_complete(struct sk_buff *, int));
+ static int napi_gro_complete(struct sk_buff *skb)
+ {
+ struct packet_offload *ptype;
+@@ -4635,7 +4638,9 @@ static int napi_gro_complete(struct sk_buff *skb)
+ if (ptype->type != type || !ptype->callbacks.gro_complete)
+ continue;
+
+- err = ptype->callbacks.gro_complete(skb, 0);
++ err = INDIRECT_CALL_INET(ptype->callbacks.gro_complete,
++ ipv6_gro_complete, inet_gro_complete,
++ skb, 0);
+ break;
+ }
+ rcu_read_unlock();
+@@ -4749,6 +4754,10 @@ static void gro_pull_from_frag0(struct sk_buff *skb, int grow)
+ }
+ }
+
++INDIRECT_CALLABLE_DECLARE(struct sk_buff **inet_gro_receive(struct sk_buff **,
++ struct sk_buff *));
++INDIRECT_CALLABLE_DECLARE(struct sk_buff **ipv6_gro_receive(struct sk_buff **,
++ struct sk_buff *));
+ static enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk_buff *skb)
+ {
+ struct sk_buff **pp = NULL;
+@@ -4796,7 +4805,9 @@ static enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk_buff
+ NAPI_GRO_CB(skb)->csum_valid = 0;
+ }
+
+- pp = ptype->callbacks.gro_receive(&napi->gro_list, skb);
++ pp = INDIRECT_CALL_INET(ptype->callbacks.gro_receive,
++ ipv6_gro_receive, inet_gro_receive,
++ &napi->gro_list, skb);
+ break;
+ }
+ rcu_read_unlock();
+--- a/net/ipv6/ip6_offload.c
++++ b/net/ipv6/ip6_offload.c
+@@ -162,8 +162,8 @@ static int ipv6_exthdrs_len(struct ipv6hdr *iph,
+ return len;
+ }
+
+-static struct sk_buff **ipv6_gro_receive(struct sk_buff **head,
+- struct sk_buff *skb)
++INDIRECT_CALLABLE_SCOPE
++struct sk_buff **ipv6_gro_receive(struct sk_buff **head, struct sk_buff *skb)
+ {
+ const struct net_offload *ops;
+ struct sk_buff **pp = NULL;
+@@ -292,7 +292,7 @@ static struct sk_buff **ip4ip6_gro_receive(struct sk_buff **head,
+ return inet_gro_receive(head, skb);
+ }
+
+-static int ipv6_gro_complete(struct sk_buff *skb, int nhoff)
++INDIRECT_CALLABLE_SCOPE int ipv6_gro_complete(struct sk_buff *skb, int nhoff)
+ {
+ const struct net_offload *ops;
+ struct ipv6hdr *iph = (struct ipv6hdr *)(skb->data + nhoff);
diff --git a/patches.fixes/net-use-indirect-call-wrappers-at-GRO-transport-laye.patch b/patches.fixes/net-use-indirect-call-wrappers-at-GRO-transport-laye.patch
new file mode 100644
index 0000000000..e3b3a0833e
--- /dev/null
+++ b/patches.fixes/net-use-indirect-call-wrappers-at-GRO-transport-laye.patch
@@ -0,0 +1,275 @@
+From: Paolo Abeni <pabeni@redhat.com>
+Date: Fri, 14 Dec 2018 11:51:59 +0100
+Subject: net: use indirect call wrappers at GRO transport layer
+Patch-mainline: v5.0-rc1
+Git-commit: 028e0a4766844e7eeb31b93479ea6dd40cfc2895
+References: bsc#1124503
+
+This avoids an indirect call in the receive path for TCP and UDP
+packets. TCP takes precedence on UDP, so that we have a single
+additional conditional in the common case.
+
+When IPV6 is build as module, all gro symbols except UDPv6 are
+builtin, while the latter belong to the ipv6 module, so we
+need some special care.
+
+v1 -> v2:
+ - adapted to INDIRECT_CALL_ changes
+v2 -> v3:
+ - fix build issue with CONFIG_IPV6=m
+
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Michal Kubecek <mkubecek@suse.cz>
+
+---
+ include/net/inet_common.h | 7 +++++++
+ net/ipv4/af_inet.c | 13 +++++++++++--
+ net/ipv4/tcp_offload.c | 6 ++++--
+ net/ipv4/udp_offload.c | 7 ++++---
+ net/ipv6/ip6_offload.c | 29 +++++++++++++++++++++++++++--
+ net/ipv6/tcpv6_offload.c | 7 ++++---
+ net/ipv6/udp_offload.c | 7 ++++---
+ 7 files changed, 61 insertions(+), 15 deletions(-)
+
+--- a/include/net/inet_common.h
++++ b/include/net/inet_common.h
+@@ -53,4 +53,11 @@ static inline void inet_ctl_sock_destroy(struct sock *sk)
+ sock_release(sk->sk_socket);
+ }
+
++#define indirect_call_gro_receive(f2, f1, cb, head, skb) \
++({ \
++ unlikely(gro_recursion_inc_test(skb)) ? \
++ NAPI_GRO_CB(skb)->flush |= 1, NULL : \
++ INDIRECT_CALL_2(cb, f2, f1, head, skb); \
++})
++
+ #endif
+--- a/net/ipv4/af_inet.c
++++ b/net/ipv4/af_inet.c
+@@ -1313,6 +1313,10 @@ struct sk_buff *inet_gso_segment(struct sk_buff *skb,
+ }
+ EXPORT_SYMBOL(inet_gso_segment);
+
++INDIRECT_CALLABLE_DECLARE(struct sk_buff **tcp4_gro_receive(struct sk_buff **,
++ struct sk_buff *));
++INDIRECT_CALLABLE_DECLARE(struct sk_buff **udp4_gro_receive(struct sk_buff **,
++ struct sk_buff *));
+ struct sk_buff **inet_gro_receive(struct sk_buff **head, struct sk_buff *skb)
+ {
+ const struct net_offload *ops;
+@@ -1422,7 +1426,8 @@ struct sk_buff **inet_gro_receive(struct sk_buff **head, struct sk_buff *skb)
+ skb_gro_pull(skb, sizeof(*iph));
+ skb_set_transport_header(skb, skb_gro_offset(skb));
+
+- pp = call_gro_receive(ops->callbacks.gro_receive, head, skb);
++ pp = indirect_call_gro_receive(tcp4_gro_receive, udp4_gro_receive,
++ ops->callbacks.gro_receive, head, skb);
+
+ out_unlock:
+ rcu_read_unlock();
+@@ -1484,6 +1489,8 @@ int inet_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len)
+ return -EINVAL;
+ }
+
++INDIRECT_CALLABLE_DECLARE(int tcp4_gro_complete(struct sk_buff *, int));
++INDIRECT_CALLABLE_DECLARE(int udp4_gro_complete(struct sk_buff *, int));
+ int inet_gro_complete(struct sk_buff *skb, int nhoff)
+ {
+ __be16 newlen = htons(skb->len - nhoff);
+@@ -1509,7 +1516,9 @@ int inet_gro_complete(struct sk_buff *skb, int nhoff)
+ * because any hdr with option will have been flushed in
+ * inet_gro_receive().
+ */
+- err = ops->callbacks.gro_complete(skb, nhoff + sizeof(*iph));
++ err = INDIRECT_CALL_2(ops->callbacks.gro_complete,
++ tcp4_gro_complete, udp4_gro_complete,
++ skb, nhoff + sizeof(*iph));
+
+ out_unlock:
+ rcu_read_unlock();
+--- a/net/ipv4/tcp_offload.c
++++ b/net/ipv4/tcp_offload.c
+@@ -10,6 +10,7 @@
+ * TCPv4 GSO/GRO support
+ */
+
++#include <linux/indirect_call_wrapper.h>
+ #include <linux/skbuff.h>
+ #include <net/tcp.h>
+ #include <net/protocol.h>
+@@ -296,7 +297,8 @@ int tcp_gro_complete(struct sk_buff *skb)
+ }
+ EXPORT_SYMBOL(tcp_gro_complete);
+
+-static struct sk_buff **tcp4_gro_receive(struct sk_buff **head, struct sk_buff *skb)
++INDIRECT_CALLABLE_SCOPE
++struct sk_buff **tcp4_gro_receive(struct sk_buff **head, struct sk_buff *skb)
+ {
+ /* Don't bother verifying checksum if we're going to flush anyway. */
+ if (!NAPI_GRO_CB(skb)->flush &&
+@@ -309,7 +311,7 @@ static struct sk_buff **tcp4_gro_receive(struct sk_buff **head, struct sk_buff *
+ return tcp_gro_receive(head, skb);
+ }
+
+-static int tcp4_gro_complete(struct sk_buff *skb, int thoff)
++INDIRECT_CALLABLE_SCOPE int tcp4_gro_complete(struct sk_buff *skb, int thoff)
+ {
+ const struct iphdr *iph = ip_hdr(skb);
+ struct tcphdr *th = tcp_hdr(skb);
+--- a/net/ipv4/udp_offload.c
++++ b/net/ipv4/udp_offload.c
+@@ -13,6 +13,7 @@
+ #include <linux/skbuff.h>
+ #include <net/udp.h>
+ #include <net/protocol.h>
++#include <net/inet_common.h>
+
+ static struct sk_buff *__skb_udp_tunnel_segment(struct sk_buff *skb,
+ netdev_features_t features,
+@@ -300,8 +301,8 @@ struct sk_buff **udp_gro_receive(struct sk_buff **head, struct sk_buff *skb,
+ }
+ EXPORT_SYMBOL(udp_gro_receive);
+
+-static struct sk_buff **udp4_gro_receive(struct sk_buff **head,
+- struct sk_buff *skb)
++INDIRECT_CALLABLE_SCOPE
++struct sk_buff **udp4_gro_receive(struct sk_buff **head, struct sk_buff *skb)
+ {
+ struct udphdr *uh = udp_gro_udphdr(skb);
+
+@@ -356,7 +357,7 @@ int udp_gro_complete(struct sk_buff *skb, int nhoff,
+ }
+ EXPORT_SYMBOL(udp_gro_complete);
+
+-static int udp4_gro_complete(struct sk_buff *skb, int nhoff)
++INDIRECT_CALLABLE_SCOPE int udp4_gro_complete(struct sk_buff *skb, int nhoff)
+ {
+ const struct iphdr *iph = ip_hdr(skb);
+ struct udphdr *uh = (struct udphdr *)(skb->data + nhoff);
+--- a/net/ipv6/ip6_offload.c
++++ b/net/ipv6/ip6_offload.c
+@@ -20,6 +20,23 @@
+
+ #include "ip6_offload.h"
+
++/* All GRO functions are always builtin, except UDP over ipv6, which lays in
++ * ipv6 module, as it depends on UDPv6 lookup function, so we need special care
++ * when ipv6 is built as a module
++ */
++#if IS_BUILTIN(CONFIG_IPV6)
++#define INDIRECT_CALL_L4(f, f2, f1, ...) INDIRECT_CALL_2(f, f2, f1, __VA_ARGS__)
++#else
++#define INDIRECT_CALL_L4(f, f2, f1, ...) INDIRECT_CALL_1(f, f2, __VA_ARGS__)
++#endif
++
++#define indirect_call_gro_receive_l4(f2, f1, cb, head, skb) \
++({ \
++ unlikely(gro_recursion_inc_test(skb)) ? \
++ NAPI_GRO_CB(skb)->flush |= 1, NULL : \
++ INDIRECT_CALL_L4(cb, f2, f1, head, skb); \
++})
++
+ static int ipv6_gso_pull_exthdrs(struct sk_buff *skb, int proto)
+ {
+ const struct net_offload *ops = NULL;
+@@ -162,6 +179,10 @@ static int ipv6_exthdrs_len(struct ipv6hdr *iph,
+ return len;
+ }
+
++INDIRECT_CALLABLE_DECLARE(struct sk_buff **tcp6_gro_receive(struct sk_buff **,
++ struct sk_buff *));
++INDIRECT_CALLABLE_DECLARE(struct sk_buff **udp6_gro_receive(struct sk_buff **,
++ struct sk_buff *));
+ INDIRECT_CALLABLE_SCOPE
+ struct sk_buff **ipv6_gro_receive(struct sk_buff **head, struct sk_buff *skb)
+ {
+@@ -251,7 +272,8 @@ struct sk_buff **ipv6_gro_receive(struct sk_buff **head, struct sk_buff *skb)
+
+ skb_gro_postpull_rcsum(skb, iph, nlen);
+
+- pp = call_gro_receive(ops->callbacks.gro_receive, head, skb);
++ pp = indirect_call_gro_receive_l4(tcp6_gro_receive, udp6_gro_receive,
++ ops->callbacks.gro_receive, head, skb);
+
+ out_unlock:
+ rcu_read_unlock();
+@@ -292,6 +314,8 @@ static struct sk_buff **ip4ip6_gro_receive(struct sk_buff **head,
+ return inet_gro_receive(head, skb);
+ }
+
++INDIRECT_CALLABLE_DECLARE(int tcp6_gro_complete(struct sk_buff *, int));
++INDIRECT_CALLABLE_DECLARE(int udp6_gro_complete(struct sk_buff *, int));
+ INDIRECT_CALLABLE_SCOPE int ipv6_gro_complete(struct sk_buff *skb, int nhoff)
+ {
+ const struct net_offload *ops;
+@@ -311,7 +335,8 @@ INDIRECT_CALLABLE_SCOPE int ipv6_gro_complete(struct sk_buff *skb, int nhoff)
+ if (WARN_ON(!ops || !ops->callbacks.gro_complete))
+ goto out_unlock;
+
+- err = ops->callbacks.gro_complete(skb, nhoff);
++ err = INDIRECT_CALL_L4(ops->callbacks.gro_complete, tcp6_gro_complete,
++ udp6_gro_complete, skb, nhoff);
+
+ out_unlock:
+ rcu_read_unlock();
+--- a/net/ipv6/tcpv6_offload.c
++++ b/net/ipv6/tcpv6_offload.c
+@@ -9,14 +9,15 @@
+ *
+ * TCPv6 GSO/GRO support
+ */
++#include <linux/indirect_call_wrapper.h>
+ #include <linux/skbuff.h>
+ #include <net/protocol.h>
+ #include <net/tcp.h>
+ #include <net/ip6_checksum.h>
+ #include "ip6_offload.h"
+
+-static struct sk_buff **tcp6_gro_receive(struct sk_buff **head,
+- struct sk_buff *skb)
++INDIRECT_CALLABLE_SCOPE
++struct sk_buff **tcp6_gro_receive(struct sk_buff **head, struct sk_buff *skb)
+ {
+ /* Don't bother verifying checksum if we're going to flush anyway. */
+ if (!NAPI_GRO_CB(skb)->flush &&
+@@ -29,7 +30,7 @@ static struct sk_buff **tcp6_gro_receive(struct sk_buff **head,
+ return tcp_gro_receive(head, skb);
+ }
+
+-static int tcp6_gro_complete(struct sk_buff *skb, int thoff)
++INDIRECT_CALLABLE_SCOPE int tcp6_gro_complete(struct sk_buff *skb, int thoff)
+ {
+ const struct ipv6hdr *iph = ipv6_hdr(skb);
+ struct tcphdr *th = tcp_hdr(skb);
+--- a/net/ipv6/udp_offload.c
++++ b/net/ipv6/udp_offload.c
+@@ -11,6 +11,7 @@
+ */
+ #include <linux/skbuff.h>
+ #include <linux/netdevice.h>
++#include <linux/indirect_call_wrapper.h>
+ #include <net/protocol.h>
+ #include <net/ipv6.h>
+ #include <net/udp.h>
+@@ -111,8 +112,8 @@ static struct sk_buff *udp6_ufo_fragment(struct sk_buff *skb,
+ return segs;
+ }
+
+-static struct sk_buff **udp6_gro_receive(struct sk_buff **head,
+- struct sk_buff *skb)
++INDIRECT_CALLABLE_SCOPE
++struct sk_buff **udp6_gro_receive(struct sk_buff **head, struct sk_buff *skb)
+ {
+ struct udphdr *uh = udp_gro_udphdr(skb);
+
+@@ -139,7 +140,7 @@ static struct sk_buff **udp6_gro_receive(struct sk_buff **head,
+ return NULL;
+ }
+
+-static int udp6_gro_complete(struct sk_buff *skb, int nhoff)
++INDIRECT_CALLABLE_SCOPE int udp6_gro_complete(struct sk_buff *skb, int nhoff)
+ {
+ const struct ipv6hdr *ipv6h = ipv6_hdr(skb);
+ struct udphdr *uh = (struct udphdr *)(skb->data + nhoff);
diff --git a/patches.fixes/scsi-qla2xxx-Fix-memory-corruption-during-hba-reset-.patch b/patches.fixes/scsi-qla2xxx-Fix-memory-corruption-during-hba-reset-.patch
new file mode 100644
index 0000000000..2b94971d10
--- /dev/null
+++ b/patches.fixes/scsi-qla2xxx-Fix-memory-corruption-during-hba-reset-.patch
@@ -0,0 +1,41 @@
+From: Quinn Tran <quinn.tran@cavium.com>
+Date: Tue, 23 Jan 2018 11:05:21 -0800
+Subject: [PATCH] scsi: qla2xxx: Fix memory corruption during hba reset test
+Git-commit: 2ce87cc5b269510de9ca1185ca8a6e10ec78c069
+Patch-mainline: v4.16-rc3
+References: bsc#1118139
+
+This patch fixes memory corrpution while performing HBA Reset test.
+
+Following stack trace is seen:
+
+[ 466.397219] BUG: unable to handle kernel NULL pointer dereference at 0000000000000020
+[ 466.433669] IP: [<ffffffffc06f5dd0>] qlt_free_session_done+0x260/0x5f0 [qla2xxx]
+[ 466.467731] PGD 0
+[ 466.476718] Oops: 0000 [#1] SMP
+
+Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
+Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
+Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Hannes Reinecke <hare@suse.com>
+---
+ drivers/scsi/qla2xxx/qla_os.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
+index 12ee6e02d146..afcb5567998a 100644
+--- a/drivers/scsi/qla2xxx/qla_os.c
++++ b/drivers/scsi/qla2xxx/qla_os.c
+@@ -3625,6 +3625,8 @@ qla2x00_remove_one(struct pci_dev *pdev)
+ }
+ qla2x00_wait_for_hba_ready(base_vha);
+
++ qla2x00_wait_for_sess_deletion(base_vha);
++
+ /*
+ * if UNLOAD flag is already set, then continue unload,
+ * where it was set first.
+--
+2.12.3
+
diff --git a/patches.fixes/scsi-qla2xxx-fix-driver-unload-by-shutting-down-chip.patch b/patches.fixes/scsi-qla2xxx-fix-driver-unload-by-shutting-down-chip.patch
index 6a896e2f57..511843e975 100644
--- a/patches.fixes/scsi-qla2xxx-fix-driver-unload-by-shutting-down-chip.patch
+++ b/patches.fixes/scsi-qla2xxx-fix-driver-unload-by-shutting-down-chip.patch
@@ -16,16 +16,18 @@ Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
---
- drivers/scsi/qla2xxx/qla_isr.c | 3 ++
- drivers/scsi/qla2xxx/qla_mbx.c | 6 +++++
- drivers/scsi/qla2xxx/qla_mid.c | 6 +++--
- drivers/scsi/qla2xxx/qla_os.c | 43 +++++++++++++++++------------------------
- drivers/scsi/qla2xxx/qla_sup.c | 3 ++
+ drivers/scsi/qla2xxx/qla_isr.c | 3 +++
+ drivers/scsi/qla2xxx/qla_mbx.c | 6 ++++++
+ drivers/scsi/qla2xxx/qla_mid.c | 6 ++++--
+ drivers/scsi/qla2xxx/qla_os.c | 43 ++++++++++++++++++------------------------
+ drivers/scsi/qla2xxx/qla_sup.c | 3 +++
5 files changed, 34 insertions(+), 27 deletions(-)
+diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
+index 91f235d109db..d5f896812a2b 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
-@@ -630,6 +630,9 @@ qla2x00_async_event(scsi_qla_host_t *vha
+@@ -630,6 +630,9 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb)
unsigned long flags;
fc_port_t *fcport = NULL;
@@ -35,9 +37,11 @@ Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
/* Setup to process RIO completion. */
handle_cnt = 0;
if (IS_CNA_CAPABLE(ha))
+diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
+index d9515e734cb9..2b4e7a3ff7c2 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
-@@ -4201,6 +4201,9 @@ qla25xx_init_req_que(struct scsi_qla_hos
+@@ -4201,6 +4201,9 @@ qla25xx_init_req_que(struct scsi_qla_host *vha, struct req_que *req)
mbx_cmd_t *mcp = &mc;
struct qla_hw_data *ha = vha->hw;
@@ -47,7 +51,7 @@ Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x10d3,
"Entered %s.\n", __func__);
-@@ -4270,6 +4273,9 @@ qla25xx_init_rsp_que(struct scsi_qla_hos
+@@ -4270,6 +4273,9 @@ qla25xx_init_rsp_que(struct scsi_qla_host *vha, struct rsp_que *rsp)
mbx_cmd_t *mcp = &mc;
struct qla_hw_data *ha = vha->hw;
@@ -57,6 +61,8 @@ Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x10d6,
"Entered %s.\n", __func__);
+diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c
+index a55c91b6c8c7..bbbbaf470b6a 100644
--- a/drivers/scsi/qla2xxx/qla_mid.c
+++ b/drivers/scsi/qla2xxx/qla_mid.c
@@ -152,10 +152,12 @@ int
@@ -74,9 +80,11 @@ Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
atomic_set(&vha->loop_state, LOOP_DOWN);
atomic_set(&vha->loop_down_timer, LOOP_DOWN_TIME);
list_for_each_entry(fcport, &vha->vp_fcports, list)
+diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
+index eb246be7cda1..99e287b11b0b 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
-@@ -303,6 +303,7 @@ static void qla2x00_free_device(scsi_qla
+@@ -299,6 +299,7 @@ static void qla2x00_free_device(scsi_qla_host_t *);
static int qla2xxx_map_queues(struct Scsi_Host *shost);
static void qla2x00_destroy_deferred_work(struct qla_hw_data *);
@@ -84,7 +92,7 @@ Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
struct scsi_host_template qla2xxx_driver_template = {
.module = THIS_MODULE,
.name = QLA2XXX_DRIVER_NAME,
-@@ -3605,6 +3606,8 @@ qla2x00_remove_one(struct pci_dev *pdev)
+@@ -3601,6 +3602,8 @@ qla2x00_remove_one(struct pci_dev *pdev)
base_vha = pci_get_drvdata(pdev);
ha = base_vha->hw;
@@ -93,7 +101,29 @@ Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
/* Indicate device removal to prevent future board_disable and wait
* until any pending board_disable has completed. */
-@@ -3648,14 +3651,6 @@ qla2x00_remove_one(struct pci_dev *pdev)
+@@ -3625,6 +3628,21 @@ qla2x00_remove_one(struct pci_dev *pdev)
+
+ qla2x00_wait_for_sess_deletion(base_vha);
+
++ if (IS_QLA25XX(ha) || IS_QLA2031(ha) || IS_QLA27XX(ha)) {
++ if (ha->flags.fw_started)
++ qla2x00_abort_isp_cleanup(base_vha);
++ } else if (!IS_QLAFX00(ha)) {
++ if (IS_QLA8031(ha)) {
++ ql_dbg(ql_dbg_p3p, base_vha, 0xb07e,
++ "Clearing fcoe driver presence.\n");
++ if (qla83xx_clear_drv_presence(base_vha) != QLA_SUCCESS)
++ ql_dbg(ql_dbg_p3p, base_vha, 0xb079,
++ "Error while clearing DRV-Presence.\n");
++ }
++
++ qla2x00_try_to_stop_firmware(base_vha);
++ }
++
+ /*
+ * if UNLOAD flag is already set, then continue unload,
+ * where it was set first.
+@@ -3646,14 +3664,6 @@ qla2x00_remove_one(struct pci_dev *pdev)
qla2x00_delete_all_vps(ha, base_vha);
@@ -108,7 +138,7 @@ Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
qla2x00_abort_all_cmds(base_vha, DID_NO_CONNECT << 16);
qla2x00_dfs_remove(base_vha);
-@@ -3716,23 +3711,6 @@ qla2x00_free_device(scsi_qla_host_t *vha
+@@ -3714,23 +3724,6 @@ qla2x00_free_device(scsi_qla_host_t *vha)
qla25xx_delete_queues(vha);
@@ -132,31 +162,11 @@ Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
vha->flags.online = 0;
/* turn-off interrupts on the card */
-@@ -5819,6 +5797,21 @@ qla2x00_disable_board_on_pci_error(struc
- return;
- }
-
-+ if (IS_QLA25XX(ha) || IS_QLA2031(ha) || IS_QLA27XX(ha)) {
-+ if (ha->flags.fw_started)
-+ qla2x00_abort_isp_cleanup(base_vha);
-+ } else if (!IS_QLAFX00(ha)) {
-+ if (IS_QLA8031(ha)) {
-+ ql_dbg(ql_dbg_p3p, base_vha, 0xb07e,
-+ "Clearing fcoe driver presence.\n");
-+ if (qla83xx_clear_drv_presence(base_vha) != QLA_SUCCESS)
-+ ql_dbg(ql_dbg_p3p, base_vha, 0xb079,
-+ "Error while clearing DRV-Presence.\n");
-+ }
-+
-+ qla2x00_try_to_stop_firmware(base_vha);
-+ }
-+
- qla2x00_wait_for_sess_deletion(base_vha);
-
- set_bit(UNLOADING, &base_vha->dpc_flags);
+diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c
+index d2db86ea06b2..d9649b3afc51 100644
--- a/drivers/scsi/qla2xxx/qla_sup.c
+++ b/drivers/scsi/qla2xxx/qla_sup.c
-@@ -1880,6 +1880,9 @@ qla24xx_beacon_off(struct scsi_qla_host
+@@ -1880,6 +1880,9 @@ qla24xx_beacon_off(struct scsi_qla_host *vha)
if (IS_P3P_TYPE(ha))
return QLA_SUCCESS;
@@ -166,3 +176,6 @@ Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
ha->beacon_blink_led = 0;
if (IS_QLA2031(ha) || IS_QLA27XX(ha))
+--
+2.16.4
+
diff --git a/patches.fixes/scsi-qla2xxx-fix-error-message-on-qla2400.patch b/patches.fixes/scsi-qla2xxx-fix-error-message-on-qla2400.patch
new file mode 100644
index 0000000000..f26259962d
--- /dev/null
+++ b/patches.fixes/scsi-qla2xxx-fix-error-message-on-qla2400.patch
@@ -0,0 +1,72 @@
+From: Meelis Roos <mroos@linux.ee>
+Date: Thu, 8 Mar 2018 15:44:07 +0200
+Subject: [PATCH] scsi: qla2xxx: fix error message on <qla2400
+Git-commit: f7e59e994fc69ace89f828686d82d528529ea025
+Patch-mainline: v4.17-rc1
+References: bsc#1118139
+
+This patch fixes IO traps caught by hardware when mailbox command fails
+on qla2200. The error handler assumes newer firmware that is available
+on 2400 and newer HBA-s.
+
+This causes ugly crashes on sparc64.
+
+Fix it with separate debug prints on different firmware generations like
+most other places do.
+
+[mkp: updated based on feedback from Himanshu]
+
+Signed-off-by: Meelis Roos <mroos@linux.ee>
+Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Hannes Reinecke <hare@suse.com>
+---
+ drivers/scsi/qla2xxx/qla_dbg.c | 2 +-
+ drivers/scsi/qla2xxx/qla_mbx.c | 18 +++++++++++++-----
+ 2 files changed, 14 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
+index 3e9dc54b89a3..d52ee990707d 100644
+--- a/drivers/scsi/qla2xxx/qla_dbg.c
++++ b/drivers/scsi/qla2xxx/qla_dbg.c
+@@ -14,7 +14,7 @@
+ * | Module Init and Probe | 0x0193 | 0x0146 |
+ * | | | 0x015b-0x0160 |
+ * | | | 0x016e |
+- * | Mailbox commands | 0x1205 | 0x11a2-0x11ff |
++ * | Mailbox commands | 0x1206 | 0x11a2-0x11ff |
+ * | Device Discovery | 0x2134 | 0x210e-0x2116 |
+ * | | | 0x211a |
+ * | | | 0x211c-0x2128 |
+diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
+index 7397aeddd96c..9a97f2ceffba 100644
+--- a/drivers/scsi/qla2xxx/qla_mbx.c
++++ b/drivers/scsi/qla2xxx/qla_mbx.c
+@@ -503,11 +503,19 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
+ }
+ pr_warn(" cmd=%x ****\n", command);
+ }
+- ql_dbg(ql_dbg_mbx, vha, 0x1198,
+- "host_status=%#x intr_ctrl=%#x intr_status=%#x\n",
+- RD_REG_DWORD(&reg->isp24.host_status),
+- RD_REG_DWORD(&reg->isp24.ictrl),
+- RD_REG_DWORD(&reg->isp24.istatus));
++ if (IS_FWI2_CAPABLE(ha) && !(IS_P3P_TYPE(ha))) {
++ ql_dbg(ql_dbg_mbx, vha, 0x1198,
++ "host_status=%#x intr_ctrl=%#x intr_status=%#x\n",
++ RD_REG_DWORD(&reg->isp24.host_status),
++ RD_REG_DWORD(&reg->isp24.ictrl),
++ RD_REG_DWORD(&reg->isp24.istatus));
++ } else {
++ ql_dbg(ql_dbg_mbx, vha, 0x1206,
++ "ctrl_status=%#x ictrl=%#x istatus=%#x\n",
++ RD_REG_WORD(&reg->isp.ctrl_status),
++ RD_REG_WORD(&reg->isp.ictrl),
++ RD_REG_WORD(&reg->isp.istatus));
++ }
+ } else {
+ ql_dbg(ql_dbg_mbx, base_vha, 0x1021, "Done %s.\n", __func__);
+ }
+--
+2.12.3
+
diff --git a/patches.fixes/scsi-qla2xxx-fix-spelling-mistake-existant-existent.patch b/patches.fixes/scsi-qla2xxx-fix-spelling-mistake-existant-existent.patch
new file mode 100644
index 0000000000..20def1021a
--- /dev/null
+++ b/patches.fixes/scsi-qla2xxx-fix-spelling-mistake-existant-existent.patch
@@ -0,0 +1,32 @@
+From: Colin Ian King <colin.king@canonical.com>
+Date: Mon, 19 Mar 2018 10:53:41 +0000
+Subject: [PATCH] scsi: qla2xxx: fix spelling mistake: "existant" -> "existent"
+Git-commit: 03fea736c0d0f102b604ba410e45c76e7616a077
+Patch-mainline: v4.17-rc1
+References: bsc#1118139
+
+Trivial fix to spelling mistake in debug message text
+
+Signed-off-by: Colin Ian King <colin.king@canonical.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Hannes Reinecke <hare@suse.com>
+---
+ drivers/scsi/qla2xxx/qla_target.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
+index 755d7a2a3eea..41863a056c9a 100644
+--- a/drivers/scsi/qla2xxx/qla_target.c
++++ b/drivers/scsi/qla2xxx/qla_target.c
+@@ -2028,7 +2028,7 @@ static void qlt_24xx_handle_abts(struct scsi_qla_host *vha,
+ sess = ha->tgt.tgt_ops->find_sess_by_s_id(vha, s_id);
+ if (!sess) {
+ ql_dbg(ql_dbg_tgt_mgt, vha, 0xf012,
+- "qla_target(%d): task abort for non-existant session\n",
++ "qla_target(%d): task abort for non-existent session\n",
+ vha->vp_idx);
+ spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
+
+--
+2.12.3
+
diff --git a/patches.fixes/scsi-qla2xxx-fx00-copypaste-typo.patch b/patches.fixes/scsi-qla2xxx-fx00-copypaste-typo.patch
new file mode 100644
index 0000000000..d39e7e95b5
--- /dev/null
+++ b/patches.fixes/scsi-qla2xxx-fx00-copypaste-typo.patch
@@ -0,0 +1,36 @@
+From: Meelis Roos <mroos@linux.ee>
+Date: Thu, 8 Mar 2018 15:44:37 +0200
+Subject: [PATCH] scsi: qla2xxx: fx00 copypaste typo
+Git-commit: 3f6c9be27ae1932410d0af044b074fd2c27945c4
+Patch-mainline: v4.17-rc1
+References: bsc#1118139
+
+Fix an obvious copy-paste error in freeing QLAFX00 response queue - the
+code checked for rsp->ring but freed rsp->ring_fx00.
+
+[mkp: applied by hand]
+
+Signed-off-by: Meelis Roos <mroos@linux.ee>
+Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Hannes Reinecke <hare@suse.com>
+---
+ drivers/scsi/qla2xxx/qla_os.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
+index 5c5dcca4d1da..b12fea6367b5 100644
+--- a/drivers/scsi/qla2xxx/qla_os.c
++++ b/drivers/scsi/qla2xxx/qla_os.c
+@@ -496,7 +496,7 @@ static void qla2x00_free_rsp_que(struct qla_hw_data *ha, struct rsp_que *rsp)
+ return;
+
+ if (IS_QLAFX00(ha)) {
+- if (rsp && rsp->ring)
++ if (rsp && rsp->ring_fx00)
+ dma_free_coherent(&ha->pdev->dev,
+ (rsp->length_fx00 + 1) * sizeof(request_t),
+ rsp->ring_fx00, rsp->dma_fx00);
+--
+2.12.3
+
diff --git a/patches.fixes/scsi-qla2xxx-remove-the-unused-tcm_qla2xxx_cmd_wq.patch b/patches.fixes/scsi-qla2xxx-remove-the-unused-tcm_qla2xxx_cmd_wq.patch
new file mode 100644
index 0000000000..7951642be8
--- /dev/null
+++ b/patches.fixes/scsi-qla2xxx-remove-the-unused-tcm_qla2xxx_cmd_wq.patch
@@ -0,0 +1,55 @@
+From: Andrei Vagin <avagin@openvz.org>
+Date: Wed, 2 May 2018 13:31:13 -0700
+Subject: [PATCH] scsi: qla2xxx: remove the unused tcm_qla2xxx_cmd_wq
+Git-commit: 4b83cb8b06bc1faf70573a18b080976aa9aed0fb
+Patch-mainline: v4.18-rc1
+References: bsc#1118139
+
+Signed-off-by: Andrei Vagin <avagin@openvz.org>
+Reviewed-by: Laurence Oberman <loberman@redhat.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Hannes Reinecke <hare@suse.com>
+---
+ drivers/scsi/qla2xxx/tcm_qla2xxx.c | 10 ----------
+ 1 file changed, 10 deletions(-)
+
+diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
+index 34ea4a8f98d2..0c2e82af9c0a 100644
+--- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
++++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
+@@ -48,7 +48,6 @@
+ #include "tcm_qla2xxx.h"
+
+ static struct workqueue_struct *tcm_qla2xxx_free_wq;
+-static struct workqueue_struct *tcm_qla2xxx_cmd_wq;
+
+ /*
+ * Parse WWN.
+@@ -2003,16 +2002,8 @@ static int tcm_qla2xxx_register_configfs(void)
+ goto out_fabric_npiv;
+ }
+
+- tcm_qla2xxx_cmd_wq = alloc_workqueue("tcm_qla2xxx_cmd", 0, 0);
+- if (!tcm_qla2xxx_cmd_wq) {
+- ret = -ENOMEM;
+- goto out_free_wq;
+- }
+-
+ return 0;
+
+-out_free_wq:
+- destroy_workqueue(tcm_qla2xxx_free_wq);
+ out_fabric_npiv:
+ target_unregister_template(&tcm_qla2xxx_npiv_ops);
+ out_fabric:
+@@ -2022,7 +2013,6 @@ static int tcm_qla2xxx_register_configfs(void)
+
+ static void tcm_qla2xxx_deregister_configfs(void)
+ {
+- destroy_workqueue(tcm_qla2xxx_cmd_wq);
+ destroy_workqueue(tcm_qla2xxx_free_wq);
+
+ target_unregister_template(&tcm_qla2xxx_ops);
+--
+2.12.3
+
diff --git a/patches.fixes/udp-use-indirect-call-wrappers-for-GRO-socket-lookup.patch b/patches.fixes/udp-use-indirect-call-wrappers-for-GRO-socket-lookup.patch
new file mode 100644
index 0000000000..9d0dd3e1f2
--- /dev/null
+++ b/patches.fixes/udp-use-indirect-call-wrappers-for-GRO-socket-lookup.patch
@@ -0,0 +1,52 @@
+From: Paolo Abeni <pabeni@redhat.com>
+Date: Fri, 14 Dec 2018 11:52:00 +0100
+Subject: udp: use indirect call wrappers for GRO socket lookup
+Patch-mainline: v5.0-rc1
+Git-commit: 4f24ed77dec9b067d08f7958a287cbf48665f35e
+References: bsc#1124503
+
+This avoids another indirect call for UDP GRO. Again, the test
+for the IPv6 variant is performed first.
+
+v1 -> v2:
+ - adapted to INDIRECT_CALL_ changes
+
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Michal Kubecek <mkubecek@suse.cz>
+
+---
+ net/ipv4/udp_offload.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/net/ipv4/udp_offload.c
++++ b/net/ipv4/udp_offload.c
+@@ -245,6 +245,8 @@ static struct sk_buff *udp4_ufo_fragment(struct sk_buff *skb,
+ return segs;
+ }
+
++INDIRECT_CALLABLE_DECLARE(struct sock *udp6_lib_lookup_skb(struct sk_buff *skb,
++ __be16 sport, __be16 dport));
+ struct sk_buff **udp_gro_receive(struct sk_buff **head, struct sk_buff *skb,
+ struct udphdr *uh, udp_lookup_t lookup)
+ {
+@@ -264,7 +266,8 @@ struct sk_buff **udp_gro_receive(struct sk_buff **head, struct sk_buff *skb,
+ NAPI_GRO_CB(skb)->encap_mark = 1;
+
+ rcu_read_lock();
+- sk = (*lookup)(skb, uh->source, uh->dest);
++ sk = INDIRECT_CALL_INET(lookup, udp6_lib_lookup_skb,
++ udp4_lib_lookup_skb, skb, uh->source, uh->dest);
+
+ if (sk && udp_sk(sk)->gro_receive)
+ goto unflush;
+@@ -344,7 +347,8 @@ int udp_gro_complete(struct sk_buff *skb, int nhoff,
+ skb->encapsulation = 1;
+
+ rcu_read_lock();
+- sk = (*lookup)(skb, uh->source, uh->dest);
++ sk = INDIRECT_CALL_INET(lookup, udp6_lib_lookup_skb,
++ udp4_lib_lookup_skb, skb, uh->source, uh->dest);
+ if (sk && udp_sk(sk)->gro_complete)
+ err = udp_sk(sk)->gro_complete(sk, skb,
+ nhoff + sizeof(struct udphdr));
diff --git a/series.conf b/series.conf
index eeb67100d1..51df838de2 100644
--- a/series.conf
+++ b/series.conf
@@ -13891,6 +13891,7 @@
patches.drivers/gpu-ipu-v3-pre-fix-device-node-leak-in-ipu_pre_looku
patches.drivers/gpu-ipu-v3-prg-fix-device-node-leak-in-ipu_prg_looku
patches.drivers/scsi-mpt3sas-fix-an-out-of-bound-write.patch
+ patches.fixes/scsi-qla2xxx-Fix-memory-corruption-during-hba-reset-.patch
patches.drivers/scsi-ibmvfc-fix-misdefined-reserved-field-in.patch
patches.drivers/scsi-qla2xxx-Avoid-triggering-undefined-behavior-in-.patch
patches.drivers/scsi-qla2xxx-Fix-a-locking-imbalance-in-qlt_24xx_han.patch
@@ -15244,8 +15245,11 @@
patches.drivers/scsi-lpfc-Fix-nonrecovery-of-NVME-controller-after-c.patch
patches.drivers/scsi-lpfc-update-driver-version-to-11.4.0.7.patch
patches.drivers/scsi-lpfc-Update-11.4.0.7-modified-files-for-2018-Co.patch
+ patches.drivers/scsi-qla2xxx-Use-p-for-printing-pointers.patch
+ patches.drivers/scsi-qla2xxx-Remove-unused-symbols.patch
patches.drivers/0003-scsi-qla4xxx-remove-unused-symbols
patches.drivers/0004-scsi-qla4xxx-move-an-array-from-a-h-into-a-c-file
+ patches.drivers/scsi-qla2xxx-Fix-function-argument-descriptions.patch
patches.suse/0163-scsi-raid_class-Add-JBOD-RAID-level.patch
patches.drivers/scsi-qedi-fix-building-with-lto
patches.drivers/0001-scsi-qedf-remove-redundant-initialization-of-fcport
@@ -15300,6 +15304,7 @@
patches.drivers/scsi-hisi_sas-add-v3-hw-module_device_table.patch
patches.drivers/scsi-lpfc-make-several-unions-static-fix-non-ansi.patch
patches.drivers/scsi-csiostor-add-support-for-32-bit-port-capabiliti.patch
+ patches.fixes/scsi-qla2xxx-fix-spelling-mistake-existant-existent.patch
patches.drivers/scsi-hisi_sas-remove-depends-on-has_dma-in-case-of-platform-dependency.patch
patches.drivers/qla2xxx-Restore-ZIO-threshold-setting.patch
patches.drivers/qla2xxx-Remove-unneeded-message-and-minor-cleanup-fo.patch
@@ -15316,6 +15321,8 @@
patches.drivers/qla2xxx-Update-driver-version-to-10.00.00.06-k.patch
patches.drivers/scsi-smartpqi-workaround-fw-bug-for-oq-deletion.patch
patches.drivers/scsi-smartpqi-update-driver-version.patch
+ patches.fixes/scsi-qla2xxx-fix-error-message-on-qla2400.patch
+ patches.fixes/scsi-qla2xxx-fx00-copypaste-typo.patch
patches.fixes/f2fs-fix-heap-mode-to-reset-it-back.patch
patches.fixes/f2fs-fix-to-clear-CP_TRIMMED_FLAG.patch
patches.fixes/sunrpc-remove-incorrect-HMAC-request-initialization.patch
@@ -17443,6 +17450,7 @@
patches.drivers/scsi-hisi_sas-remove-redundant-handling-to-event95-for-v3.patch
patches.drivers/scsi-hisi_sas-add-readl-poll-timeout-helper-wrappers.patch
patches.drivers/scsi-hisi_sas-workaround-a-v3-hw-hilink-bug.patch
+ patches.fixes/scsi-qla2xxx-remove-the-unused-tcm_qla2xxx_cmd_wq.patch
patches.drivers/scsi-lpfc-fix-spelling-mistakes-mabilbox-and-maibox.patch
patches.drivers/scsi-ipr-new-IOASC-update.patch
patches.drivers/scsi-hisi_sas-relocate-smp-sg-map.patch
@@ -19950,6 +19958,7 @@
patches.drivers/scsi-qla2xxx-Remove-unnecessary-self-assignment.patch
patches.drivers/scsi-qla2xxx-Simplify-conditional-check.patch
patches.drivers/scsi-mpt3sas-switch-to-generic-dma-api
+ patches.drivers/scsi-qla2xxx-fully-convert-to-the-generic-DMA-API.patch
patches.drivers/ALSA-hda-fix-unused-variable-warning.patch
patches.drivers/ALSA-usb-audio-update-quirk-for-B-W-PX-to-remove-mic.patch
patches.drivers/ALSA-hda-Add-quirk-for-ASUS-G751-laptop.patch
@@ -20190,6 +20199,12 @@
patches.fixes/ocfs2-fix-a-misuse-a-of-brelse-after-failing-ocfs2_c.patch
patches.fixes/0001-memory_hotplug-cond_resched-in-__remove_pages.patch
patches.drivers/scsi-qla2xxx-Modify-fall-through-annotations.patch
+ patches.drivers/scsi-qla2xxx-Improve-several-kernel-doc-headers.patch
+ patches.drivers/scsi-qla2xxx-Declare-local-functions-static.patch
+ patches.drivers/scsi-qla2xxx-Make-qla2x00_sysfs_write_nvram-easier-t.patch
+ patches.drivers/scsi-qla2xxx-Remove-a-set-but-not-used-variable.patch
+ patches.drivers/scsi-qla2xxx-Make-sure-that-qlafx00_ioctl_iosb_entry.patch
+ patches.drivers/scsi-qla2xxx-Remove-two-arguments-from-qlafx00_error.patch
patches.fixes/cifs-fix-return-value-for-cifs_listxattr.patch
patches.fixes/smb3-on-kerberos-mount-if-server-doesn-t-specify-aut.patch
patches.fixes/cifs-don-t-dereference-smb_file_target-before-null-c.patch
@@ -20847,6 +20862,11 @@
patches.fixes/0001-net-mlx5-Release-resource-on-error-flow.patch
patches.fixes/0001-net-mlx5-Return-success-for-PAGE_FAULT_RESUME-in-int.patch
patches.fixes/0001-net-mlx5-Use-multi-threaded-workqueue-for-page-fault.patch
+ patches.fixes/indirect-call-wrappers-helpers-to-speed-up-indirect-.patch
+ patches.fixes/net-use-indirect-call-wrappers-at-GRO-network-layer.patch
+ patches.fixes/net-use-indirect-call-wrappers-at-GRO-transport-laye.patch
+ patches.fixes/udp-use-indirect-call-wrappers-for-GRO-socket-lookup.patch
+ patches.fixes/net-unbreak-CONFIG_RETPOLINE-n-builds.patch
patches.fixes/mac80211-fix-radiotap-vendor-presence-bitmap-handlin.patch
patches.drivers/Bluetooth-Fix-unnecessary-error-message-for-HCI-requ.patch
patches.fixes/igb-Fix-an-issue-that-PME-is-not-enabled-during-runt.patch
@@ -20906,9 +20926,13 @@
patches.drivers/scsi-lpfc-Implement-GID_PT-on-Nameserver-query-to-su.patch
patches.drivers/scsi-lpfc-add-Trunking-support.patch
patches.drivers/scsi-lpfc-update-driver-version-to-12.0.0.8.patch
+ patches.drivers/scsi-qla2xxx-use-lower_32_bits-and-upper_32_bits-ins.patch
patches.fixes/scsi-target-add-emulate_pr-backstore-attr-to-toggle-.patch
patches.fixes/scsi-target-drop-unused-pi_prot_format-attribute-sto.patch
+ patches.drivers/scsi-qla2xxx-Introduce-a-switch-case-statement-in-ql.patch
patches.drivers/scsi-csiostor-remove-flush_scheduled_work
+ patches.drivers/scsi-qla2xxx-Split-the-__qla2x00_abort_all_cmds-func.patch
+ patches.drivers/scsi-qla2xxx-NULL-check-before-some-freeing-function.patch
patches.arch/s390-scsi-zfcp-fix-posting-too-many-status-read-buffers.patch
patches.drivers/scsi-lpfc-Fix-panic-when-FW-log-buffsize-is-not-init.patch
patches.drivers/scsi-lpfc-update-manufacturer-attribute-to-reflect-B.patch
@@ -22339,6 +22363,7 @@
patches.fixes/ext4-fix-use-after-free-race-with-debug_want_extra_i.patch
patches.fixes/ext4-actually-request-zeroing-of-inode-table-after-g.patch
patches.fixes/ext4-fix-ext4_show_options-for-file-systems-w-o-jour.patch
+ patches.fixes/0001-of-fix-clang-Wunsequenced-for-be32_to_cpu.patch
patches.drivers/ibmvnic-Report-actual-backing-device-speed-and-duple.patch
patches.fixes/openvswitch-add-seqadj-extension-when-NAT-is-used.patch
patches.drivers/net-hns3-remove-resetting-check-in-hclgevf_reset_tas.patch