All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] qla4xxx: 5.04.00-k6: Updates for scsi "misc" branch
@ 2014-04-10  1:12 vikas.chaudhary
  2014-04-10  1:12 ` [PATCH 1/6] qla4xxx: Disable INTx interrupt for ISP82XX vikas.chaudhary
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: vikas.chaudhary @ 2014-04-10  1:12 UTC (permalink / raw)
  To: jbottomley, michaelc; +Cc: linux-scsi, vikas.chaudhary, giridhar.malavali

From: Vikas Chaudhary <vikas.chaudhary@qlogic.com>

James,

Please apply the following patches to the scsi tree at your earliest convenience.

Adheer Chandravanshi (2):
      qla4xxx: Fix smatch warning in func qla4xxx_get_ep_param
      qla4xxx: Fix smatch warning in func qla4xxx_conn_get_param

Nilesh Javali (2):
      qla4xxx: Export sysfs DDBs from DPC handler
      qla4xxx: Fix memory leak for ha->saved_acb

Tej Parkash (1):
      qla4xxx: Disable INTx interrupt for ISP82XX

Vikas Chaudhary (1):
      qla4xxx: Update driver version to 5.04.00-k6

Thanks,
Vikas.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/6] qla4xxx: Disable INTx interrupt for ISP82XX
  2014-04-10  1:12 [PATCH 0/6] qla4xxx: 5.04.00-k6: Updates for scsi "misc" branch vikas.chaudhary
@ 2014-04-10  1:12 ` vikas.chaudhary
  2014-04-10  1:12 ` [PATCH 2/6] qla4xxx: Export sysfs DDBs from DPC handler vikas.chaudhary
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: vikas.chaudhary @ 2014-04-10  1:12 UTC (permalink / raw)
  To: jbottomley, michaelc
  Cc: linux-scsi, vikas.chaudhary, giridhar.malavali, Tej Parkash

From: Tej Parkash <tej.parkash@qlogic.com>

Signed-off-by: Tej Parkash <tej.parkash@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
---
 drivers/scsi/qla4xxx/ql4_isr.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/scsi/qla4xxx/ql4_isr.c b/drivers/scsi/qla4xxx/ql4_isr.c
index b1925d1..081b6b7 100644
--- a/drivers/scsi/qla4xxx/ql4_isr.c
+++ b/drivers/scsi/qla4xxx/ql4_isr.c
@@ -1526,7 +1526,7 @@ void qla4xxx_process_aen(struct scsi_qla_host * ha, uint8_t process_aen)
 
 int qla4xxx_request_irqs(struct scsi_qla_host *ha)
 {
-	int ret;
+	int ret = 0;
 	int rval = QLA_ERROR;
 
 	if (is_qla40XX(ha))
@@ -1580,15 +1580,13 @@ try_msi:
 		}
 	}
 
-	/*
-	 * Prevent interrupts from falling back to INTx mode in cases where
-	 * interrupts cannot get acquired through MSI-X or MSI mode.
-	 */
+try_intx:
 	if (is_qla8022(ha)) {
-		ql4_printk(KERN_WARNING, ha, "IRQ not attached -- %d.\n", ret);
+		ql4_printk(KERN_WARNING, ha, "%s: ISP82xx Legacy interrupt not supported\n",
+			   __func__);
 		goto irq_not_attached;
 	}
-try_intx:
+
 	/* Trying INTx */
 	ret = request_irq(ha->pdev->irq, ha->isp_ops->intr_handler,
 	    IRQF_SHARED, DRIVER_NAME, ha);
-- 
1.8.2.GIT


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/6] qla4xxx: Export sysfs DDBs from DPC handler
  2014-04-10  1:12 [PATCH 0/6] qla4xxx: 5.04.00-k6: Updates for scsi "misc" branch vikas.chaudhary
  2014-04-10  1:12 ` [PATCH 1/6] qla4xxx: Disable INTx interrupt for ISP82XX vikas.chaudhary
@ 2014-04-10  1:12 ` vikas.chaudhary
  2014-04-10  1:12 ` [PATCH 3/6] qla4xxx: Fix memory leak for ha->saved_acb vikas.chaudhary
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: vikas.chaudhary @ 2014-04-10  1:12 UTC (permalink / raw)
  To: jbottomley, michaelc
  Cc: linux-scsi, vikas.chaudhary, giridhar.malavali, Nilesh Javali

From: Nilesh Javali <nilesh.javali@qlogic.com>

Issue:
modprobe qla4xxx is killed by systemd due to timeout.

Solution:
The exporting of sysfs DDBs from qla4xxx_probe_adapter added delay of
approximately 15s due to which system-udevd killed the modprobe of the
driver. Added fix to export the sysfs DDBs from the DPC handler.

Signed-off-by: Nilesh Javali <nilesh.javali@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
---
 drivers/scsi/qla4xxx/ql4_def.h  |  1 +
 drivers/scsi/qla4xxx/ql4_glbl.h |  1 +
 drivers/scsi/qla4xxx/ql4_os.c   | 15 +++++++++------
 3 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h
index 73a5022..8f6d0fb 100644
--- a/drivers/scsi/qla4xxx/ql4_def.h
+++ b/drivers/scsi/qla4xxx/ql4_def.h
@@ -601,6 +601,7 @@ struct scsi_qla_host {
 #define DPC_HA_NEED_QUIESCENT		22 /* 0x00400000 ISP-82xx only*/
 #define DPC_POST_IDC_ACK		23 /* 0x00800000 */
 #define DPC_RESTORE_ACB			24 /* 0x01000000 */
+#define DPC_SYSFS_DDB_EXPORT		25 /* 0x02000000 */
 
 	struct Scsi_Host *host; /* pointer to host data */
 	uint32_t tot_ddbs;
diff --git a/drivers/scsi/qla4xxx/ql4_glbl.h b/drivers/scsi/qla4xxx/ql4_glbl.h
index 2035475..5f58b45 100644
--- a/drivers/scsi/qla4xxx/ql4_glbl.h
+++ b/drivers/scsi/qla4xxx/ql4_glbl.h
@@ -281,6 +281,7 @@ int qla4_83xx_get_port_config(struct scsi_qla_host *ha, uint32_t *config);
 int qla4_83xx_set_port_config(struct scsi_qla_host *ha, uint32_t *config);
 int qla4_8xxx_check_init_adapter_retry(struct scsi_qla_host *ha);
 int qla4_83xx_is_detached(struct scsi_qla_host *ha);
+int qla4xxx_sysfs_ddb_export(struct scsi_qla_host *ha);
 
 extern int ql4xextended_error_logging;
 extern int ql4xdontresethba;
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index bb16040..9be829b 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -4565,6 +4565,7 @@ static void qla4xxx_timer(struct scsi_qla_host *ha)
 	     test_bit(DPC_LINK_CHANGED, &ha->dpc_flags) ||
 	     test_bit(DPC_HA_UNRECOVERABLE, &ha->dpc_flags) ||
 	     test_bit(DPC_HA_NEED_QUIESCENT, &ha->dpc_flags) ||
+	     test_bit(DPC_SYSFS_DDB_EXPORT, &ha->dpc_flags) ||
 	     test_bit(DPC_AEN, &ha->dpc_flags)) {
 		DEBUG2(printk("scsi%ld: %s: scheduling dpc routine"
 			      " - dpc flags = 0x%lx\n",
@@ -5429,6 +5430,11 @@ dpc_post_reset_ha:
 				qla4xxx_relogin_all_devices(ha);
 		}
 	}
+	if (test_and_clear_bit(DPC_SYSFS_DDB_EXPORT, &ha->dpc_flags)) {
+		if (qla4xxx_sysfs_ddb_export(ha))
+			ql4_printk(KERN_ERR, ha, "%s: Error exporting ddb to sysfs\n",
+				   __func__);
+	}
 }
 
 /**
@@ -8406,7 +8412,7 @@ exit_ddb_del:
  *
  * Export the firmware DDB for all send targets and normal targets to sysfs.
  **/
-static int qla4xxx_sysfs_ddb_export(struct scsi_qla_host *ha)
+int qla4xxx_sysfs_ddb_export(struct scsi_qla_host *ha)
 {
 	struct dev_db_entry *fw_ddb_entry = NULL;
 	dma_addr_t fw_ddb_entry_dma;
@@ -8844,11 +8850,8 @@ skip_retry_init:
 		ql4_printk(KERN_ERR, ha,
 			   "%s: No iSCSI boot target configured\n", __func__);
 
-	if (qla4xxx_sysfs_ddb_export(ha))
-		ql4_printk(KERN_ERR, ha,
-			   "%s: Error exporting ddb to sysfs\n", __func__);
-
-		/* Perform the build ddb list and login to each */
+	set_bit(DPC_SYSFS_DDB_EXPORT, &ha->dpc_flags);
+	/* Perform the build ddb list and login to each */
 	qla4xxx_build_ddb_list(ha, INIT_ADAPTER);
 	iscsi_host_for_each_session(ha->host, qla4xxx_login_flash_ddb);
 	qla4xxx_wait_login_resp_boot_tgt(ha);
-- 
1.8.2.GIT


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/6] qla4xxx: Fix memory leak for ha->saved_acb
  2014-04-10  1:12 [PATCH 0/6] qla4xxx: 5.04.00-k6: Updates for scsi "misc" branch vikas.chaudhary
  2014-04-10  1:12 ` [PATCH 1/6] qla4xxx: Disable INTx interrupt for ISP82XX vikas.chaudhary
  2014-04-10  1:12 ` [PATCH 2/6] qla4xxx: Export sysfs DDBs from DPC handler vikas.chaudhary
@ 2014-04-10  1:12 ` vikas.chaudhary
  2014-04-10  1:12 ` [PATCH 4/6] qla4xxx: Fix smatch warning in func qla4xxx_get_ep_param vikas.chaudhary
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: vikas.chaudhary @ 2014-04-10  1:12 UTC (permalink / raw)
  To: jbottomley, michaelc
  Cc: linux-scsi, vikas.chaudhary, giridhar.malavali, Nilesh Javali

From: Nilesh Javali <nilesh.javali@qlogic.com>

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
---
 drivers/scsi/qla4xxx/ql4_mbx.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/qla4xxx/ql4_mbx.c b/drivers/scsi/qla4xxx/ql4_mbx.c
index 1345c0e..0a3312c 100644
--- a/drivers/scsi/qla4xxx/ql4_mbx.c
+++ b/drivers/scsi/qla4xxx/ql4_mbx.c
@@ -2395,8 +2395,6 @@ int qla4_84xx_config_acb(struct scsi_qla_host *ha, int acb_config)
 		}
 
 		memcpy(acb, ha->saved_acb, acb_len);
-		kfree(ha->saved_acb);
-		ha->saved_acb = NULL;
 
 		rval = qla4xxx_set_acb(ha, &mbox_cmd[0], &mbox_sts[0], acb_dma);
 		if (rval != QLA_SUCCESS)
@@ -2412,6 +2410,10 @@ exit_free_acb:
 	dma_free_coherent(&ha->pdev->dev, sizeof(struct addr_ctrl_blk), acb,
 			  acb_dma);
 exit_config_acb:
+	if ((acb_config == ACB_CONFIG_SET) && ha->saved_acb) {
+		kfree(ha->saved_acb);
+		ha->saved_acb = NULL;
+	}
 	DEBUG2(ql4_printk(KERN_INFO, ha,
 			  "%s %s\n", __func__,
 			  rval == QLA_SUCCESS ? "SUCCEEDED" : "FAILED"));
-- 
1.8.2.GIT


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/6] qla4xxx: Fix smatch warning in func qla4xxx_get_ep_param
  2014-04-10  1:12 [PATCH 0/6] qla4xxx: 5.04.00-k6: Updates for scsi "misc" branch vikas.chaudhary
                   ` (2 preceding siblings ...)
  2014-04-10  1:12 ` [PATCH 3/6] qla4xxx: Fix memory leak for ha->saved_acb vikas.chaudhary
@ 2014-04-10  1:12 ` vikas.chaudhary
  2014-04-10  1:12 ` [PATCH 5/6] qla4xxx: Fix smatch warning in func qla4xxx_conn_get_param vikas.chaudhary
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: vikas.chaudhary @ 2014-04-10  1:12 UTC (permalink / raw)
  To: jbottomley, michaelc
  Cc: linux-scsi, vikas.chaudhary, giridhar.malavali,
	Adheer Chandravanshi

From: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>

Fix following smatch warning:-
 drivers/scsi/qla4xxx/ql4_os.c:1752 qla4xxx_get_ep_param() warn: variable dereferenced before check 'qla_ep' (see line 1745)

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
---
 drivers/scsi/qla4xxx/ql4_os.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 9be829b..592f293 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -1742,6 +1742,9 @@ static int qla4xxx_get_ep_param(struct iscsi_endpoint *ep,
 	struct sockaddr *dst_addr;
 	struct scsi_qla_host *ha;
 
+	if (!qla_ep)
+		return -ENOTCONN;
+
 	ha = to_qla_host(qla_ep->host);
 	DEBUG2(ql4_printk(KERN_INFO, ha, "%s: host: %ld\n", __func__,
 			  ha->host_no));
@@ -1749,9 +1752,6 @@ static int qla4xxx_get_ep_param(struct iscsi_endpoint *ep,
 	switch (param) {
 	case ISCSI_PARAM_CONN_PORT:
 	case ISCSI_PARAM_CONN_ADDRESS:
-		if (!qla_ep)
-			return -ENOTCONN;
-
 		dst_addr = (struct sockaddr *)&qla_ep->dst_addr;
 		if (!dst_addr)
 			return -ENOTCONN;
-- 
1.8.2.GIT


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 5/6] qla4xxx: Fix smatch warning in func qla4xxx_conn_get_param
  2014-04-10  1:12 [PATCH 0/6] qla4xxx: 5.04.00-k6: Updates for scsi "misc" branch vikas.chaudhary
                   ` (3 preceding siblings ...)
  2014-04-10  1:12 ` [PATCH 4/6] qla4xxx: Fix smatch warning in func qla4xxx_get_ep_param vikas.chaudhary
@ 2014-04-10  1:12 ` vikas.chaudhary
  2014-04-10  1:12 ` [PATCH 6/6] qla4xxx: Update driver version to 5.04.00-k6 vikas.chaudhary
  2014-04-11 17:31 ` [PATCH 0/6] qla4xxx: 5.04.00-k6: Updates for scsi "misc" branch Mike Christie
  6 siblings, 0 replies; 8+ messages in thread
From: vikas.chaudhary @ 2014-04-10  1:12 UTC (permalink / raw)
  To: jbottomley, michaelc
  Cc: linux-scsi, vikas.chaudhary, giridhar.malavali,
	Adheer Chandravanshi

From: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
---
 drivers/scsi/qla4xxx/ql4_os.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 592f293..9eef7d4 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -2879,7 +2879,6 @@ static int qla4xxx_conn_get_param(struct iscsi_cls_conn *cls_conn,
 	struct iscsi_conn *conn;
 	struct qla_conn *qla_conn;
 	struct sockaddr *dst_addr;
-	int len = 0;
 
 	conn = cls_conn->dd_data;
 	qla_conn = conn->dd_data;
@@ -2893,9 +2892,6 @@ static int qla4xxx_conn_get_param(struct iscsi_cls_conn *cls_conn,
 	default:
 		return iscsi_conn_get_param(cls_conn, param, buf);
 	}
-
-	return len;
-
 }
 
 int qla4xxx_get_ddb_index(struct scsi_qla_host *ha, uint16_t *ddb_index)
-- 
1.8.2.GIT


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 6/6] qla4xxx: Update driver version to 5.04.00-k6
  2014-04-10  1:12 [PATCH 0/6] qla4xxx: 5.04.00-k6: Updates for scsi "misc" branch vikas.chaudhary
                   ` (4 preceding siblings ...)
  2014-04-10  1:12 ` [PATCH 5/6] qla4xxx: Fix smatch warning in func qla4xxx_conn_get_param vikas.chaudhary
@ 2014-04-10  1:12 ` vikas.chaudhary
  2014-04-11 17:31 ` [PATCH 0/6] qla4xxx: 5.04.00-k6: Updates for scsi "misc" branch Mike Christie
  6 siblings, 0 replies; 8+ messages in thread
From: vikas.chaudhary @ 2014-04-10  1:12 UTC (permalink / raw)
  To: jbottomley, michaelc; +Cc: linux-scsi, vikas.chaudhary, giridhar.malavali

From: Vikas Chaudhary <vikas.chaudhary@qlogic.com>

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
---
 drivers/scsi/qla4xxx/ql4_version.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qla4xxx/ql4_version.h b/drivers/scsi/qla4xxx/ql4_version.h
index bd78cb3..f11eaa7 100644
--- a/drivers/scsi/qla4xxx/ql4_version.h
+++ b/drivers/scsi/qla4xxx/ql4_version.h
@@ -5,4 +5,4 @@
  * See LICENSE.qla4xxx for copyright and licensing details.
  */
 
-#define QLA4XXX_DRIVER_VERSION	"5.04.00-k5"
+#define QLA4XXX_DRIVER_VERSION	"5.04.00-k6"
-- 
1.8.2.GIT


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/6] qla4xxx: 5.04.00-k6: Updates for scsi "misc" branch
  2014-04-10  1:12 [PATCH 0/6] qla4xxx: 5.04.00-k6: Updates for scsi "misc" branch vikas.chaudhary
                   ` (5 preceding siblings ...)
  2014-04-10  1:12 ` [PATCH 6/6] qla4xxx: Update driver version to 5.04.00-k6 vikas.chaudhary
@ 2014-04-11 17:31 ` Mike Christie
  6 siblings, 0 replies; 8+ messages in thread
From: Mike Christie @ 2014-04-11 17:31 UTC (permalink / raw)
  To: vikas.chaudhary; +Cc: jbottomley, linux-scsi, giridhar.malavali

On 04/09/2014 08:12 PM, vikas.chaudhary@qlogic.com wrote:
> From: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
> 
> James,
> 
> Please apply the following patches to the scsi tree at your earliest convenience.
> 
> Adheer Chandravanshi (2):
>       qla4xxx: Fix smatch warning in func qla4xxx_get_ep_param
>       qla4xxx: Fix smatch warning in func qla4xxx_conn_get_param
> 
> Nilesh Javali (2):
>       qla4xxx: Export sysfs DDBs from DPC handler
>       qla4xxx: Fix memory leak for ha->saved_acb
> 
> Tej Parkash (1):
>       qla4xxx: Disable INTx interrupt for ISP82XX
> 
> Vikas Chaudhary (1):
>       qla4xxx: Update driver version to 5.04.00-k6
> 

Looks ok.

Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-04-11 17:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-10  1:12 [PATCH 0/6] qla4xxx: 5.04.00-k6: Updates for scsi "misc" branch vikas.chaudhary
2014-04-10  1:12 ` [PATCH 1/6] qla4xxx: Disable INTx interrupt for ISP82XX vikas.chaudhary
2014-04-10  1:12 ` [PATCH 2/6] qla4xxx: Export sysfs DDBs from DPC handler vikas.chaudhary
2014-04-10  1:12 ` [PATCH 3/6] qla4xxx: Fix memory leak for ha->saved_acb vikas.chaudhary
2014-04-10  1:12 ` [PATCH 4/6] qla4xxx: Fix smatch warning in func qla4xxx_get_ep_param vikas.chaudhary
2014-04-10  1:12 ` [PATCH 5/6] qla4xxx: Fix smatch warning in func qla4xxx_conn_get_param vikas.chaudhary
2014-04-10  1:12 ` [PATCH 6/6] qla4xxx: Update driver version to 5.04.00-k6 vikas.chaudhary
2014-04-11 17:31 ` [PATCH 0/6] qla4xxx: 5.04.00-k6: Updates for scsi "misc" branch Mike Christie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.