Blame SOURCES/0075-scsi-scsi-qla2xxx-Move-qla2x00_set_fcport_state-from.patch

3c6e85
From ac5fafff15ce5f5ea5481365220165dabdf9cc9c Mon Sep 17 00:00:00 2001
3c6e85
From: Himanshu Madhani <hmadhani@redhat.com>
3c6e85
Date: Thu, 1 Aug 2019 15:55:35 -0400
3c6e85
Subject: [PATCH 075/124] [scsi] scsi: qla2xxx: Move qla2x00_set_fcport_state()
3c6e85
 from a .h into a .c file
3c6e85
3c6e85
Message-id: <20190801155618.12650-76-hmadhani@redhat.com>
3c6e85
Patchwork-id: 267854
3c6e85
O-Subject: [RHEL 7.8 e-stor PATCH 075/118] scsi: qla2xxx: Move qla2x00_set_fcport_state() from a .h into a .c file
3c6e85
Bugzilla: 1729270
3c6e85
RH-Acked-by: Jarod Wilson <jarod@redhat.com>
3c6e85
RH-Acked-by: Tony Camuso <tcamuso@redhat.com>
3c6e85
3c6e85
From: Bart Van Assche <bvanassche@acm.org>
3c6e85
3c6e85
Bugzilla 1729270
3c6e85
3c6e85
The qla2x00_set_fcport_state() function is not in the hot path so move its
3c6e85
definition from a .h into a .c file.
3c6e85
3c6e85
Cc: Himanshu Madhani <hmadhani@marvell.com>
3c6e85
Cc: Giridhar Malavali <gmalavali@marvell.com>
3c6e85
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
3c6e85
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
3c6e85
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
3c6e85
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3c6e85
(cherry picked from commit a630bdc54f6d41a525694766168ddb9b8ffe8392)
3c6e85
Signed-off-by: Himanshu Madhani <hmadhani@redhat.com>
3c6e85
Signed-off-by: Jan Stancek <jstancek@redhat.com>
3c6e85
---
3c6e85
 drivers/scsi/qla2xxx/qla_gbl.h    |  1 +
3c6e85
 drivers/scsi/qla2xxx/qla_init.c   | 17 +++++++++++++++++
3c6e85
 drivers/scsi/qla2xxx/qla_inline.h | 19 -------------------
3c6e85
 3 files changed, 18 insertions(+), 19 deletions(-)
3c6e85
3c6e85
diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h
3c6e85
index 7254b5d8fbc1..b98ec6d92720 100644
3c6e85
--- a/drivers/scsi/qla2xxx/qla_gbl.h
3c6e85
+++ b/drivers/scsi/qla2xxx/qla_gbl.h
3c6e85
@@ -80,6 +80,7 @@ int qla2x00_post_work(struct scsi_qla_host *vha, struct qla_work_evt *e);
3c6e85
 extern void *qla2x00_alloc_iocbs_ready(struct qla_qpair *, srb_t *);
3c6e85
 extern int qla24xx_update_fcport_fcp_prio(scsi_qla_host_t *, fc_port_t *);
3c6e85
 
3c6e85
+extern void qla2x00_set_fcport_state(fc_port_t *fcport, int state);
3c6e85
 extern fc_port_t *
3c6e85
 qla2x00_alloc_fcport(scsi_qla_host_t *, gfp_t );
3c6e85
 
3c6e85
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
3c6e85
index a47d09583375..15085251f59f 100644
3c6e85
--- a/drivers/scsi/qla2xxx/qla_init.c
3c6e85
+++ b/drivers/scsi/qla2xxx/qla_init.c
3c6e85
@@ -4771,6 +4771,23 @@ qla2x00_rport_del(void *data)
3c6e85
 	}
3c6e85
 }
3c6e85
 
3c6e85
+void qla2x00_set_fcport_state(fc_port_t *fcport, int state)
3c6e85
+{
3c6e85
+	int old_state;
3c6e85
+
3c6e85
+	old_state = atomic_read(&fcport->state);
3c6e85
+	atomic_set(&fcport->state, state);
3c6e85
+
3c6e85
+	/* Don't print state transitions during initial allocation of fcport */
3c6e85
+	if (old_state && old_state != state) {
3c6e85
+		ql_dbg(ql_dbg_disc, fcport->vha, 0x207d,
3c6e85
+		       "FCPort %8phC state transitioned from %s to %s - portid=%02x%02x%02x.\n",
3c6e85
+		       fcport->port_name, port_state_str[old_state],
3c6e85
+		       port_state_str[state], fcport->d_id.b.domain,
3c6e85
+		       fcport->d_id.b.area, fcport->d_id.b.al_pa);
3c6e85
+	}
3c6e85
+}
3c6e85
+
3c6e85
 /**
3c6e85
  * qla2x00_alloc_fcport() - Allocate a generic fcport.
3c6e85
  * @vha: HA context
3c6e85
diff --git a/drivers/scsi/qla2xxx/qla_inline.h b/drivers/scsi/qla2xxx/qla_inline.h
3c6e85
index 98f544fe8788..f3c3ddc94eec 100644
3c6e85
--- a/drivers/scsi/qla2xxx/qla_inline.h
3c6e85
+++ b/drivers/scsi/qla2xxx/qla_inline.h
3c6e85
@@ -142,25 +142,6 @@ qla2x00_clean_dsd_pool(struct qla_hw_data *ha, struct crc_context *ctx)
3c6e85
 	INIT_LIST_HEAD(&ctx->dsd_list);
3c6e85
 }
3c6e85
 
3c6e85
-static inline void
3c6e85
-qla2x00_set_fcport_state(fc_port_t *fcport, int state)
3c6e85
-{
3c6e85
-	int old_state;
3c6e85
-
3c6e85
-	old_state = atomic_read(&fcport->state);
3c6e85
-	atomic_set(&fcport->state, state);
3c6e85
-
3c6e85
-	/* Don't print state transitions during initial allocation of fcport */
3c6e85
-	if (old_state && old_state != state) {
3c6e85
-		ql_dbg(ql_dbg_disc, fcport->vha, 0x207d,
3c6e85
-		    "FCPort %8phC state transitioned from %s to %s - "
3c6e85
-			"portid=%02x%02x%02x.\n", fcport->port_name,
3c6e85
-		    port_state_str[old_state], port_state_str[state],
3c6e85
-		    fcport->d_id.b.domain, fcport->d_id.b.area,
3c6e85
-		    fcport->d_id.b.al_pa);
3c6e85
-	}
3c6e85
-}
3c6e85
-
3c6e85
 static inline int
3c6e85
 qla2x00_hba_err_chk_enabled(srb_t *sp)
3c6e85
 {
3c6e85
-- 
3c6e85
2.13.6
3c6e85