Home Home > GIT Browse > openSUSE-42.3
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2018-12-14 14:00:35 -0500
committerMichal Koutný <mkoutny@suse.com>2019-01-14 19:22:09 +0100
commit7b31876a0aa11a781015f455cbbb3e3e47b54f41 (patch)
tree55c6350a5246fab8f019ae49dfb4d7bed7e41e25
parent515b604ea81ae5bdf46205e9242391e0b0d48070 (diff)
housekeeping: fold fix into patches.fixes/fc_rport-PRLI-fixes.patch.
There were bugs in the initial patch prior to upstreaming that were discovered and fixed.
-rw-r--r--patches.fixes/fc_rport-PRLI-fixes.patch79
-rw-r--r--patches.fixes/libfc-Debug-PRLI-failures.patch74
-rw-r--r--patches.fixes/libfc-Fix-PRLI-response-handling-yet-again.patch42
-rw-r--r--series.conf2
4 files changed, 58 insertions, 139 deletions
diff --git a/patches.fixes/fc_rport-PRLI-fixes.patch b/patches.fixes/fc_rport-PRLI-fixes.patch
index 5277842d3c..cf153323a0 100644
--- a/patches.fixes/fc_rport-PRLI-fixes.patch
+++ b/patches.fixes/fc_rport-PRLI-fixes.patch
@@ -16,14 +16,12 @@ target for us and we need to disable target functionality.
Signed-off-by: Hannes Reinecke <hare@suse.com>
---
- drivers/scsi/libfc/fc_rport.c | 41 +++++++++++++++++++++++++++++------------
- 1 file changed, 29 insertions(+), 12 deletions(-)
+ drivers/scsi/libfc/fc_rport.c | 56 ++++++++++++++++++++++++++++--------------
+ 1 file changed, 38 insertions(+), 18 deletions(-)
-diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
-index 14666f1..47c3f54 100644
--- a/drivers/scsi/libfc/fc_rport.c
+++ b/drivers/scsi/libfc/fc_rport.c
-@@ -1120,7 +1120,7 @@ static void fc_rport_prli_resp(struct fc_seq *sp, struct fc_frame *fp,
+@@ -1120,7 +1120,7 @@ static void fc_rport_prli_resp(struct fc
u32 roles = FC_RPORT_ROLE_UNKNOWN;
u32 fcp_parm = 0;
u8 op;
@@ -32,7 +30,18 @@ index 14666f1..47c3f54 100644
mutex_lock(&rdata->rp_mutex);
-@@ -1168,13 +1168,28 @@ static void fc_rport_prli_resp(struct fc_seq *sp, struct fc_frame *fp,
+@@ -1149,8 +1149,8 @@ static void fc_rport_prli_resp(struct fc
+ goto out;
+
+ resp_code = (pp->spp.spp_flags & FC_SPP_RESP_MASK);
+- FC_RPORT_DBG(rdata, "PRLI spp_flags = 0x%x\n",
+- pp->spp.spp_flags);
++ FC_RPORT_DBG(rdata, "PRLI spp_flags = 0x%x spp_type 0x%x\n",
++ pp->spp.spp_flags, pp->spp.spp_type);
+ rdata->spp_type = pp->spp.spp_type;
+ if (resp_code != FC_SPP_RESP_ACK) {
+ if (resp_code == FC_SPP_RESP_CONF)
+@@ -1168,13 +1168,26 @@ static void fc_rport_prli_resp(struct fc
if (fcp_parm & FCP_SPPF_CONF_COMPL)
rdata->flags |= FC_RP_FLAGS_CONF_REQ;
@@ -43,29 +52,25 @@ index 14666f1..47c3f54 100644
+ prov = fc_passive_prov[rdata->spp_type];
if (prov) {
memset(&temp_spp, 0, sizeof(temp_spp));
-- prov->prli(rdata, pp->prli.prli_spp_len,
-- &pp->spp, &temp_spp);
-+ resp_code = prov->prli(rdata, pp->prli.prli_spp_len,
-+ &pp->spp, &temp_spp);
-+ } else {
-+ memcpy(&temp_spp, &pp->spp, sizeof(temp_spp));
-+ }
+ prov->prli(rdata, pp->prli.prli_spp_len,
+ &pp->spp, &temp_spp);
+ }
+-
+ /*
+ * Check if the image pair could be established
+ */
+ if (rdata->spp_type != FC_TYPE_FCP ||
+ resp_code != FC_SPP_RESP_ACK ||
-+ !(temp_spp.spp_flags & FC_SPP_EST_IMG_PAIR)) {
++ !(pp->spp.spp_flags & FC_SPP_EST_IMG_PAIR)) {
+ /*
+ * Nope; we can't use this port as a target.
+ */
+ fcp_parm &= ~FCP_SPPF_TARG_FCN;
- }
--
++ }
rdata->supported_classes = FC_COS_CLASS3;
if (fcp_parm & FCP_SPPF_INIT_FCN)
roles |= FC_RPORT_ROLE_FCP_INITIATOR;
-@@ -1226,6 +1241,15 @@ static void fc_rport_enter_prli(struct fc_rport_priv *rdata)
+@@ -1226,6 +1239,15 @@ static void fc_rport_enter_prli(struct f
return;
}
@@ -81,7 +86,42 @@ index 14666f1..47c3f54 100644
FC_RPORT_DBG(rdata, "Port entered PRLI state from %s state\n",
fc_rport_state(rdata));
-@@ -1988,13 +2012,6 @@ static void fc_rport_recv_prli_req(struct fc_rport_priv *rdata,
+@@ -1904,7 +1926,6 @@ static void fc_rport_recv_prli_req(struc
+ unsigned int len;
+ unsigned int plen;
+ enum fc_els_spp_resp resp;
+- enum fc_els_spp_resp passive;
+ struct fc_seq_els_data rjt_data;
+ struct fc4_prov *prov;
+
+@@ -1954,15 +1975,21 @@ static void fc_rport_recv_prli_req(struc
+ resp = 0;
+
+ if (rspp->spp_type < FC_FC4_PROV_SIZE) {
++ enum fc_els_spp_resp active = 0, passive = 0;
++
+ prov = fc_active_prov[rspp->spp_type];
+ if (prov)
+- resp = prov->prli(rdata, plen, rspp, spp);
++ active = prov->prli(rdata, plen, rspp, spp);
+ prov = fc_passive_prov[rspp->spp_type];
+- if (prov) {
++ if (prov)
+ passive = prov->prli(rdata, plen, rspp, spp);
+- if (!resp || passive == FC_SPP_RESP_ACK)
+- resp = passive;
+- }
++ if (!active || passive == FC_SPP_RESP_ACK)
++ resp = passive;
++ else
++ resp = active;
++ FC_RPORT_DBG(rdata, "PRLI rspp type %x "
++ "active %x passive %x\n",
++ rspp->spp_type, active, passive);
+ }
+ if (!resp) {
+ if (spp->spp_flags & FC_SPP_EST_IMG_PAIR)
+@@ -1983,13 +2010,6 @@ static void fc_rport_recv_prli_req(struc
fc_fill_reply_hdr(fp, rx_fp, FC_RCTL_ELS_REP, 0);
lport->tt.frame_send(lport, fp);
@@ -95,6 +135,3 @@ index 14666f1..47c3f54 100644
goto drop;
reject_len:
---
-1.8.5.6
-
diff --git a/patches.fixes/libfc-Debug-PRLI-failures.patch b/patches.fixes/libfc-Debug-PRLI-failures.patch
deleted file mode 100644
index 676b6d67f7..0000000000
--- a/patches.fixes/libfc-Debug-PRLI-failures.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From a597bf0810b0f2bdc9cf2d1e22f6cff747885b41 Mon Sep 17 00:00:00 2001
-From: Hannes Reinecke <hare@suse.de>
-Date: Mon, 25 Jul 2016 12:08:26 +0200
-Subject: [PATCH 06/22] libfc: Debug PRLI failures
-References: bnc#990245
-Patch-Mainline: submitted linux-scsi 2016/08/03
-
-The initial PRLI is errored out with these messages:
-[ 5424.530686] host8: rport 001a1e: Received a PRLI accept
-[ 5424.530687] host8: rport 001a1e: PRLI spp_flags = 0x0
-[ 5424.530688] host8: rport 001a1e: Error -131938289606656 in state PRLI, retrying
-
-'spp_flags=0' is decidedly dodgy, as we should always return a valid PRLI
-state here.
-
-Signed-off-by: Hannes Reinecke <hare@suse.com>
-Acked-by: Hannes Reinecke <hare@suse.de>
----
- drivers/scsi/libfc/fc_rport.c | 21 +++++++++++++--------
- 1 file changed, 13 insertions(+), 8 deletions(-)
-
-diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
-index 8dd656e..1f22c2e 100644
---- a/drivers/scsi/libfc/fc_rport.c
-+++ b/drivers/scsi/libfc/fc_rport.c
-@@ -1094,8 +1094,8 @@ static void fc_rport_prli_resp(struct fc_seq *sp, struct fc_frame *fp,
- goto out;
-
- resp_code = (pp->spp.spp_flags & FC_SPP_RESP_MASK);
-- FC_RPORT_DBG(rdata, "PRLI spp_flags = 0x%x\n",
-- pp->spp.spp_flags);
-+ FC_RPORT_DBG(rdata, "PRLI spp_flags = 0x%x spp_type 0x%x\n",
-+ pp->spp.spp_flags, pp->spp.spp_type);
- rdata->spp_type = pp->spp.spp_type;
- if (resp_code != FC_SPP_RESP_ACK) {
- if (resp_code == FC_SPP_RESP_CONF)
-@@ -1805,7 +1805,6 @@ static void fc_rport_recv_prli_req(struct fc_rport_priv *rdata,
- unsigned int len;
- unsigned int plen;
- enum fc_els_spp_resp resp;
-- enum fc_els_spp_resp passive;
- struct fc_seq_els_data rjt_data;
- struct fc4_prov *prov;
-
-@@ -1855,15 +1854,21 @@ static void fc_rport_recv_prli_req(struct fc_rport_priv *rdata,
- resp = 0;
-
- if (rspp->spp_type < FC_FC4_PROV_SIZE) {
-+ enum fc_els_spp_resp active = 0, passive = 0;
-+
- prov = fc_active_prov[rspp->spp_type];
- if (prov)
-- resp = prov->prli(rdata, plen, rspp, spp);
-+ active = prov->prli(rdata, plen, rspp, spp);
- prov = fc_passive_prov[rspp->spp_type];
-- if (prov) {
-+ if (prov)
- passive = prov->prli(rdata, plen, rspp, spp);
-- if (!resp || passive == FC_SPP_RESP_ACK)
-- resp = passive;
-- }
-+ if (!active || passive == FC_SPP_RESP_ACK)
-+ resp = passive;
-+ else
-+ resp = active;
-+ FC_RPORT_DBG(rdata, "PRLI rspp type %x "
-+ "active %x passive %x\n",
-+ rspp->spp_type, active, passive);
- }
- if (!resp) {
- if (spp->spp_flags & FC_SPP_EST_IMG_PAIR)
---
-1.8.5.6
-
diff --git a/patches.fixes/libfc-Fix-PRLI-response-handling-yet-again.patch b/patches.fixes/libfc-Fix-PRLI-response-handling-yet-again.patch
deleted file mode 100644
index ede539f115..0000000000
--- a/patches.fixes/libfc-Fix-PRLI-response-handling-yet-again.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From fb841ede3d3752174fe07fd1130f672f1762989e Mon Sep 17 00:00:00 2001
-From: Hannes Reinecke <hare@suse.de>
-Date: Wed, 14 Sep 2016 15:09:34 +0200
-Subject: [PATCH] libfc: Fix PRLI response handling yet again
-Patch-Mainline: submitted linux-scsi 2016/09/12
-References: bsc#998385
-
-Even with the latest fixes we still don't handle everything
-correct; the service params are for the remote port, so we
-don't actually care if the ->prli callout works or not.
-
-Reported-by: Martin Wilck <martin.wilck@suse.com>
-Signed-off-by: Hannes Reinecke <hare@suse.com>
----
- drivers/scsi/libfc/fc_rport.c | 13 ++++---------
- 1 file changed, 4 insertions(+), 9 deletions(-)
-
-diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
-index e94a56e..d1e95ef 100644
---- a/drivers/scsi/libfc/fc_rport.c
-+++ b/drivers/scsi/libfc/fc_rport.c
-@@ -1181,17 +1181,15 @@ static void fc_rport_prli_resp(struct fc_seq *sp, struct fc_frame *fp,
- prov = fc_passive_prov[rdata->spp_type];
- if (prov) {
- memset(&temp_spp, 0, sizeof(temp_spp));
-- resp_code = prov->prli(rdata, pp->prli.prli_spp_len,
-- &pp->spp, &temp_spp);
-- } else {
-- memcpy(&temp_spp, &pp->spp, sizeof(temp_spp));
-+ prov->prli(rdata, pp->prli.prli_spp_len,
-+ &pp->spp, &temp_spp);
- }
- /*
- * Check if the image pair could be established
- */
- if (rdata->spp_type != FC_TYPE_FCP ||
- resp_code != FC_SPP_RESP_ACK ||
-- !(temp_spp.spp_flags & FC_SPP_EST_IMG_PAIR)) {
-+ !(pp->spp.spp_flags & FC_SPP_EST_IMG_PAIR)) {
- /*
- * Nope; we can't use this port as a target.
- */
diff --git a/series.conf b/series.conf
index c3ece780d5..becdff3098 100644
--- a/series.conf
+++ b/series.conf
@@ -3368,7 +3368,6 @@
patches.fixes/fcoe-FIP-debugging.patch
patches.fixes/libfc-spurious-I-O-error-under-high-load.patch
patches.fixes/libfc-Do-not-attempt-to-login-if-the-port-is-already.patch
- patches.fixes/libfc-Debug-PRLI-failures.patch
patches.fixes/fcoe-filter-out-frames-from-invalid-vlans.patch
patches.fixes/fcoe-make-R_A_TOV-and-E_D_TOV-configurable.patch
patches.fixes/libfc-use-configured-lport-R_A_TOV-when-sending-exch.patch
@@ -3405,7 +3404,6 @@
patches.fixes/libfc-Clarify-ramp-down-messages.patch
patches.fixes/libfc-Correctly-set-E_D_TOV-and-R_A_TOV-values-in-RT.patch
patches.fixes/libfc-Do-not-take-rdata-rp_mutex-when-processing-a-F.patch
- patches.fixes/libfc-Fix-PRLI-response-handling-yet-again.patch
patches.drivers/scsi_transport_fc-return-EBUSY-for-deleted-vport.patch
patches.fixes/scsi-Add-STARGET_CREATE_REMOVE-state-to-scsi_target.patch
patches.kabi/scsi-kABI-fix-for-new-state-STARGET_CREATED_REMOVE.patch