All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/19] qla2xxx: Patches for scsi "misc" branch.
@ 2016-07-06 15:14 Himanshu Madhani
  2016-07-06 15:14 ` [PATCH 01/19] qla2xxx: Remove sysfs node fw_dump_template Himanshu Madhani
                   ` (19 more replies)
  0 siblings, 20 replies; 41+ messages in thread
From: Himanshu Madhani @ 2016-07-06 15:14 UTC (permalink / raw)
  To: James.Bottomley, martin.petersen
  Cc: giridhar.malavali, himanshu.madhani, linux-scsi

Hi James, Martin,

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

Thanks,
-Himanshu

Giridhar Malavali (1):
  qla2xxx: Set FLOGI retry in additional firmware options for P2P (N2N)
    mode.

Himanshu Madhani (1):
  qla2xxx: Update driver version to 8.07.00.38-k

Joe Carnuccio (12):
  qla2xxx: Remove sysfs node fw_dump_template.
  qla2xxx: Add ram area DDR for fwdump template entry T262.
  qla2xxx: Shutdown board on thermal shutdown aen.
  qla2xxx: Add module parameter alternate/short names.
  qla2xxx: Make debug buffer log easier to view.
  qla2xxx: Properly initialize IO statistics.
  qla2xxx: Properly reset firmware statistics.
  qla2xxx: Add bsg interface to support D_Port Diagnostics.
  qla2xxx: Let DPORT be enabled purely by nvram.
  qla2xxx: Add support to handle Loop Init error Asynchronus event.
  qla2xxx: Correction to function qla26xx_dport_diagnostics().
  qla2xxx: Separate ISP type bits out from device type.

Sawan Chandak (5):
  qla2xxx: Check for device state before unloading the driver.
  qla2xxx: Add bsg interface to support statistics counter reset.
  qla2xxx: Disable the adapter and skip error recovery in case of
    register disconnect.
  qla2xxx: Fix duplicate message id.
  qla2xxx: Fix BBCR offset

 drivers/scsi/qla2xxx/qla_attr.c    | 170 ++++++++++++-------------------------
 drivers/scsi/qla2xxx/qla_bsg.c     |  92 +++++++++++++++-----
 drivers/scsi/qla2xxx/qla_bsg.h     |  13 +++
 drivers/scsi/qla2xxx/qla_dbg.c     |  50 +++++------
 drivers/scsi/qla2xxx/qla_def.h     |  12 ++-
 drivers/scsi/qla2xxx/qla_fw.h      |   2 +-
 drivers/scsi/qla2xxx/qla_gbl.h     |   5 +-
 drivers/scsi/qla2xxx/qla_init.c    |  39 +++++++--
 drivers/scsi/qla2xxx/qla_isr.c     |  23 ++++-
 drivers/scsi/qla2xxx/qla_mbx.c     | 123 ++++++++++++++++++++++-----
 drivers/scsi/qla2xxx/qla_os.c      | 127 ++++++++++++++++++++++-----
 drivers/scsi/qla2xxx/qla_target.c  |  16 ++--
 drivers/scsi/qla2xxx/qla_tmpl.c    |   9 +-
 drivers/scsi/qla2xxx/qla_version.h |   2 +-
 14 files changed, 443 insertions(+), 240 deletions(-)

-- 
2.7.2


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

* [PATCH 01/19] qla2xxx: Remove sysfs node fw_dump_template.
  2016-07-06 15:14 [PATCH 00/19] qla2xxx: Patches for scsi "misc" branch Himanshu Madhani
@ 2016-07-06 15:14 ` Himanshu Madhani
  2016-07-15 12:49   ` Hannes Reinecke
  2016-07-06 15:14 ` [PATCH 02/19] qla2xxx: Add ram area DDR for fwdump template entry T262 Himanshu Madhani
                   ` (18 subsequent siblings)
  19 siblings, 1 reply; 41+ messages in thread
From: Himanshu Madhani @ 2016-07-06 15:14 UTC (permalink / raw)
  To: James.Bottomley, martin.petersen
  Cc: giridhar.malavali, himanshu.madhani, linux-scsi

From: Joe Carnuccio <joe.carnuccio@qlogic.com>

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_attr.c | 89 -----------------------------------------
 drivers/scsi/qla2xxx/qla_dbg.c  |  1 +
 2 files changed, 1 insertion(+), 89 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index 4dc06a13..c9bcd82 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -147,92 +147,6 @@ static struct bin_attribute sysfs_fw_dump_attr = {
 };
 
 static ssize_t
-qla2x00_sysfs_read_fw_dump_template(struct file *filp, struct kobject *kobj,
-			   struct bin_attribute *bin_attr,
-			   char *buf, loff_t off, size_t count)
-{
-	struct scsi_qla_host *vha = shost_priv(dev_to_shost(container_of(kobj,
-	    struct device, kobj)));
-	struct qla_hw_data *ha = vha->hw;
-
-	if (!ha->fw_dump_template || !ha->fw_dump_template_len)
-		return 0;
-
-	ql_dbg(ql_dbg_user, vha, 0x70e2,
-	    "chunk <- off=%llx count=%zx\n", off, count);
-	return memory_read_from_buffer(buf, count, &off,
-	    ha->fw_dump_template, ha->fw_dump_template_len);
-}
-
-static ssize_t
-qla2x00_sysfs_write_fw_dump_template(struct file *filp, struct kobject *kobj,
-			    struct bin_attribute *bin_attr,
-			    char *buf, loff_t off, size_t count)
-{
-	struct scsi_qla_host *vha = shost_priv(dev_to_shost(container_of(kobj,
-	    struct device, kobj)));
-	struct qla_hw_data *ha = vha->hw;
-	uint32_t size;
-
-	if (off == 0) {
-		if (ha->fw_dump)
-			vfree(ha->fw_dump);
-		if (ha->fw_dump_template)
-			vfree(ha->fw_dump_template);
-
-		ha->fw_dump = NULL;
-		ha->fw_dump_len = 0;
-		ha->fw_dump_template = NULL;
-		ha->fw_dump_template_len = 0;
-
-		size = qla27xx_fwdt_template_size(buf);
-		ql_dbg(ql_dbg_user, vha, 0x70d1,
-		    "-> allocating fwdt (%x bytes)...\n", size);
-		ha->fw_dump_template = vmalloc(size);
-		if (!ha->fw_dump_template) {
-			ql_log(ql_log_warn, vha, 0x70d2,
-			    "Failed allocate fwdt (%x bytes).\n", size);
-			return -ENOMEM;
-		}
-		ha->fw_dump_template_len = size;
-	}
-
-	if (off + count > ha->fw_dump_template_len) {
-		count = ha->fw_dump_template_len - off;
-		ql_dbg(ql_dbg_user, vha, 0x70d3,
-		    "chunk -> truncating to %zx bytes.\n", count);
-	}
-
-	ql_dbg(ql_dbg_user, vha, 0x70d4,
-	    "chunk -> off=%llx count=%zx\n", off, count);
-	memcpy(ha->fw_dump_template + off, buf, count);
-
-	if (off + count == ha->fw_dump_template_len) {
-		size = qla27xx_fwdt_calculate_dump_size(vha);
-		ql_dbg(ql_dbg_user, vha, 0x70d5,
-		    "-> allocating fwdump (%x bytes)...\n", size);
-		ha->fw_dump = vmalloc(size);
-		if (!ha->fw_dump) {
-			ql_log(ql_log_warn, vha, 0x70d6,
-			    "Failed allocate fwdump (%x bytes).\n", size);
-			return -ENOMEM;
-		}
-		ha->fw_dump_len = size;
-	}
-
-	return count;
-}
-static struct bin_attribute sysfs_fw_dump_template_attr = {
-	.attr = {
-		.name = "fw_dump_template",
-		.mode = S_IRUSR | S_IWUSR,
-	},
-	.size = 0,
-	.read = qla2x00_sysfs_read_fw_dump_template,
-	.write = qla2x00_sysfs_write_fw_dump_template,
-};
-
-static ssize_t
 qla2x00_sysfs_read_nvram(struct file *filp, struct kobject *kobj,
 			 struct bin_attribute *bin_attr,
 			 char *buf, loff_t off, size_t count)
@@ -973,7 +887,6 @@ static struct sysfs_entry {
 	int is4GBp_only;
 } bin_file_entries[] = {
 	{ "fw_dump", &sysfs_fw_dump_attr, },
-	{ "fw_dump_template", &sysfs_fw_dump_template_attr, 0x27 },
 	{ "nvram", &sysfs_nvram_attr, },
 	{ "optrom", &sysfs_optrom_attr, },
 	{ "optrom_ctl", &sysfs_optrom_ctl_attr, },
@@ -1000,8 +913,6 @@ qla2x00_alloc_sysfs_attr(scsi_qla_host_t *vha)
 			continue;
 		if (iter->is4GBp_only == 3 && !(IS_CNA_CAPABLE(vha->hw)))
 			continue;
-		if (iter->is4GBp_only == 0x27 && !IS_QLA27XX(vha->hw))
-			continue;
 
 		ret = sysfs_create_bin_file(&host->shost_gendev.kobj,
 		    iter->attr);
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
index b64c504..b985fcb 100644
--- a/drivers/scsi/qla2xxx/qla_dbg.c
+++ b/drivers/scsi/qla2xxx/qla_dbg.c
@@ -39,6 +39,7 @@
  * |                              |                    | 0x70a5-0x70a6  |
  * |                              |                    | 0x70a8,0x70ab  |
  * |                              |                    | 0x70ad-0x70ae  |
+ * |                              |                    | 0x70d0-0x70d6	|
  * |                              |                    | 0x70d7-0x70db  |
  * |                              |                    | 0x70de-0x70df  |
  * | Task Management              |       0x803d       | 0x8000,0x800b  |
-- 
2.7.2


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

* [PATCH 02/19] qla2xxx: Add ram area DDR for fwdump template entry T262.
  2016-07-06 15:14 [PATCH 00/19] qla2xxx: Patches for scsi "misc" branch Himanshu Madhani
  2016-07-06 15:14 ` [PATCH 01/19] qla2xxx: Remove sysfs node fw_dump_template Himanshu Madhani
@ 2016-07-06 15:14 ` Himanshu Madhani
  2016-07-15 12:49   ` Hannes Reinecke
  2016-07-06 15:14 ` [PATCH 03/19] qla2xxx: Shutdown board on thermal shutdown aen Himanshu Madhani
                   ` (17 subsequent siblings)
  19 siblings, 1 reply; 41+ messages in thread
From: Himanshu Madhani @ 2016-07-06 15:14 UTC (permalink / raw)
  To: James.Bottomley, martin.petersen
  Cc: giridhar.malavali, himanshu.madhani, linux-scsi

From: Joe Carnuccio <joe.carnuccio@qlogic.com>

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_def.h  | 2 ++
 drivers/scsi/qla2xxx/qla_mbx.c  | 7 +++++--
 drivers/scsi/qla2xxx/qla_tmpl.c | 9 ++++++++-
 3 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index 47f8b9b4..7f86147 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -3370,6 +3370,8 @@ struct qla_hw_data {
 
 	uint32_t	fw_shared_ram_start;
 	uint32_t	fw_shared_ram_end;
+	uint32_t	fw_ddr_ram_start;
+	uint32_t	fw_ddr_ram_end;
 
 	uint16_t	fw_options[16];         /* slots: 1,2,3,10,11 */
 	uint8_t		fw_seriallink_options[4];
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index 968b846..9673a0b 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -782,8 +782,9 @@ qla2x00_get_fw_version(scsi_qla_host_t *vha)
 	if (IS_FWI2_CAPABLE(ha))
 		mcp->in_mb |= MBX_17|MBX_16|MBX_15;
 	if (IS_QLA27XX(ha))
-		mcp->in_mb |= MBX_23 | MBX_22 | MBX_21 | MBX_20 | MBX_19 |
-		    MBX_18 | MBX_14 | MBX_13 | MBX_11 | MBX_10 | MBX_9 | MBX_8;
+		mcp->in_mb |=
+		    MBX_25|MBX_24|MBX_23|MBX_22|MBX_21|MBX_20|MBX_19|MBX_18|
+		    MBX_14|MBX_13|MBX_11|MBX_10|MBX_9|MBX_8;
 
 	mcp->flags = 0;
 	mcp->tov = MBX_TOV_SECONDS;
@@ -842,6 +843,8 @@ qla2x00_get_fw_version(scsi_qla_host_t *vha)
 		ha->pep_version[2] = mcp->mb[14] & 0xff;
 		ha->fw_shared_ram_start = (mcp->mb[19] << 16) | mcp->mb[18];
 		ha->fw_shared_ram_end = (mcp->mb[21] << 16) | mcp->mb[20];
+		ha->fw_ddr_ram_start = (mcp->mb[23] << 16) | mcp->mb[22];
+		ha->fw_ddr_ram_end = (mcp->mb[25] << 16) | mcp->mb[24];
 	}
 
 failed:
diff --git a/drivers/scsi/qla2xxx/qla_tmpl.c b/drivers/scsi/qla2xxx/qla_tmpl.c
index c3e6225..36935c9 100644
--- a/drivers/scsi/qla2xxx/qla_tmpl.c
+++ b/drivers/scsi/qla2xxx/qla_tmpl.c
@@ -357,6 +357,13 @@ qla27xx_fwdt_entry_t262(struct scsi_qla_host *vha,
 			ent->t262.start_addr = start;
 			ent->t262.end_addr = end;
 		}
+	} else if (ent->t262.ram_area == T262_RAM_AREA_DDR_RAM) {
+		start = vha->hw->fw_ddr_ram_start;
+		end = vha->hw->fw_ddr_ram_end;
+		if (buf) {
+			ent->t262.start_addr = start;
+			ent->t262.end_addr = end;
+		}
 	} else {
 		ql_dbg(ql_dbg_misc, vha, 0xd022,
 		    "%s: unknown area %x\n", __func__, ent->t262.ram_area);
@@ -364,7 +371,7 @@ qla27xx_fwdt_entry_t262(struct scsi_qla_host *vha,
 		goto done;
 	}
 
-	if (end < start || end == 0) {
+	if (end <= start || start == 0 || end == 0) {
 		ql_dbg(ql_dbg_misc, vha, 0xd023,
 		    "%s: unusable range (start=%x end=%x)\n", __func__,
 		    ent->t262.end_addr, ent->t262.start_addr);
-- 
2.7.2


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

* [PATCH 03/19] qla2xxx: Shutdown board on thermal shutdown aen.
  2016-07-06 15:14 [PATCH 00/19] qla2xxx: Patches for scsi "misc" branch Himanshu Madhani
  2016-07-06 15:14 ` [PATCH 01/19] qla2xxx: Remove sysfs node fw_dump_template Himanshu Madhani
  2016-07-06 15:14 ` [PATCH 02/19] qla2xxx: Add ram area DDR for fwdump template entry T262 Himanshu Madhani
@ 2016-07-06 15:14 ` Himanshu Madhani
  2016-07-15 12:50   ` Hannes Reinecke
  2016-07-06 15:14 ` [PATCH 04/19] qla2xxx: Set FLOGI retry in additional firmware options for P2P (N2N) mode Himanshu Madhani
                   ` (16 subsequent siblings)
  19 siblings, 1 reply; 41+ messages in thread
From: Himanshu Madhani @ 2016-07-06 15:14 UTC (permalink / raw)
  To: James.Bottomley, martin.petersen
  Cc: giridhar.malavali, himanshu.madhani, linux-scsi

From: Joe Carnuccio <joe.carnuccio@qlogic.com>

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_dbg.c |  2 +-
 drivers/scsi/qla2xxx/qla_def.h |  1 +
 drivers/scsi/qla2xxx/qla_isr.c |  7 +++++++
 drivers/scsi/qla2xxx/qla_os.c  | 10 ++++++++++
 4 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
index b985fcb..0671f07 100644
--- a/drivers/scsi/qla2xxx/qla_dbg.c
+++ b/drivers/scsi/qla2xxx/qla_dbg.c
@@ -27,7 +27,7 @@
  * |                              |                    | 0x303a		|
  * | DPC Thread                   |       0x4023       | 0x4002,0x4013  |
  * | Async Events                 |       0x5089       | 0x502b-0x502f  |
- * |                              |                    | 0x505e         |
+ * |				  | 		       | 0x5047         |
  * |                              |                    | 0x5084,0x5075	|
  * |                              |                    | 0x503d,0x5044  |
  * |                              |                    | 0x507b,0x505f	|
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index 7f86147..2b7e4f5 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -829,6 +829,7 @@ struct mbx_cmd_32 {
 #define MBA_FW_RESTART_CMPLT	0x8060	/* Firmware restart complete */
 #define MBA_INIT_REQUIRED	0x8061	/* Initialization required */
 #define MBA_SHUTDOWN_REQUESTED	0x8062	/* Shutdown Requested */
+#define MBA_TEMPERATURE_ALERT	0x8070	/* Temperature Alert */
 #define MBA_DPORT_DIAGNOSTICS	0x8080	/* D-port Diagnostics */
 #define MBA_FW_INIT_FAILURE	0x8401	/* Firmware initialization failure */
 #define MBA_MIRROR_LUN_CHANGE	0x8402	/* Mirror LUN State Change
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 5649c20..f1bfb42 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -1158,6 +1158,13 @@ global_port_update:
 		    mb[1] == 2 ? "done (error)" : "other");
 		break;
 
+	case MBA_TEMPERATURE_ALERT:
+		ql_dbg(ql_dbg_async, vha, 0x505e,
+		    "TEMPERATURE ALERT: %04x %04x %04x\n", mb[1], mb[2], mb[3]);
+		if (mb[1] == 0x12)
+			schedule_work(&ha->board_disable);
+		break;
+
 	default:
 		ql_dbg(ql_dbg_async, vha, 0x5057,
 		    "Unknown AEN:%04x %04x %04x %04x\n",
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 7c0b60c..dc608ce 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -2901,6 +2901,10 @@ skip_dpc:
 	qlt_add_target(ha, base_vha);
 
 	clear_bit(PFLG_DRIVER_PROBING, &base_vha->pci_flags);
+
+	if (test_bit(UNLOADING, &base_vha->dpc_flags))
+		return -ENODEV;
+
 	return 0;
 
 probe_init_failed:
@@ -2947,7 +2951,10 @@ iospace_config_failed:
 	ha = NULL;
 
 probe_out:
+	pci_disable_pcie_error_reporting(pdev);
 	pci_disable_device(pdev);
+	if (test_bit(UNLOADING, &base_vha->dpc_flags))
+		return -ENODEV;
 	return ret;
 }
 
@@ -5002,6 +5009,9 @@ qla2x00_do_dpc(void *data)
 		    "DPC handler waking up, dpc_flags=0x%lx.\n",
 		    base_vha->dpc_flags);
 
+		if (test_bit(UNLOADING, &base_vha->dpc_flags))
+			break;
+
 		qla2x00_do_work(base_vha);
 
 		if (IS_P3P_TYPE(ha)) {
-- 
2.7.2


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

* [PATCH 04/19] qla2xxx: Set FLOGI retry in additional firmware options for P2P (N2N) mode.
  2016-07-06 15:14 [PATCH 00/19] qla2xxx: Patches for scsi "misc" branch Himanshu Madhani
                   ` (2 preceding siblings ...)
  2016-07-06 15:14 ` [PATCH 03/19] qla2xxx: Shutdown board on thermal shutdown aen Himanshu Madhani
@ 2016-07-06 15:14 ` Himanshu Madhani
  2016-07-15 12:51   ` Hannes Reinecke
  2016-07-06 15:14 ` [PATCH 05/19] qla2xxx: Add module parameter alternate/short names Himanshu Madhani
                   ` (15 subsequent siblings)
  19 siblings, 1 reply; 41+ messages in thread
From: Himanshu Madhani @ 2016-07-06 15:14 UTC (permalink / raw)
  To: James.Bottomley, martin.petersen
  Cc: giridhar.malavali, himanshu.madhani, linux-scsi

From: Giridhar Malavali <giridhar.malavali@qlogic.com>

When VP decoupling enabled, there could be a window where, FLOGI from initiators
can be dropped before VP0 is enabled, causing link level recovery.
Retry FLOGI to avoid link level recovery.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_dbg.c  |  2 +-
 drivers/scsi/qla2xxx/qla_init.c | 24 ++++++++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
index 0671f07..907a7ac 100644
--- a/drivers/scsi/qla2xxx/qla_dbg.c
+++ b/drivers/scsi/qla2xxx/qla_dbg.c
@@ -16,7 +16,7 @@
  * |                              |                    | 0x016e-0x0170  |
  * | Mailbox commands             |       0x1192       |		|
  * |                              |                    |		|
- * | Device Discovery             |       0x2016       | 0x2020-0x2022, |
+ * | Device Discovery             |       0x2003       | 0x2016		|
  * |                              |                    | 0x2011-0x2012, |
  * |                              |                    | 0x2099-0x20a4  |
  * | Queue Command and IO tracing |       0x3074       | 0x300b         |
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index c56cdb3..a3685b6 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -2053,6 +2053,14 @@ qla2x00_update_fw_options(scsi_qla_host_t *vha)
 	if (IS_QLA6312(ha))
 		ha->fw_options[2] |= BIT_13;
 
+	/* Set Retry FLOGI in case of P2P connection */
+	if (ha->operating_mode == P2P) {
+		ha->fw_options[2] |= BIT_3;
+		ql_dbg(ql_dbg_disc, vha, 0x2100,
+		    "(%s): Setting FLOGI retry BIT in fw_options[2]: 0x%x\n",
+			__func__, ha->fw_options[2]);
+	}
+
 	/* Update firmware options. */
 	qla2x00_set_fw_options(vha, ha->fw_options);
 }
@@ -2070,6 +2078,14 @@ qla24xx_update_fw_options(scsi_qla_host_t *vha)
 	if (ql2xfwholdabts)
 		ha->fw_options[3] |= BIT_12;
 
+	/* Set Retry FLOGI in case of P2P connection */
+	if (ha->operating_mode == P2P) {
+		ha->fw_options[2] |= BIT_3;
+		ql_dbg(ql_dbg_disc, vha, 0x2101,
+		    "(%s): Setting FLOGI retry BIT in fw_options[2]: 0x%x\n",
+			__func__, ha->fw_options[2]);
+	}
+
 	/* Update Serial Link options. */
 	if ((le16_to_cpu(ha->fw_seriallink_options24[0]) & BIT_0) == 0)
 		return;
@@ -6513,6 +6529,14 @@ qla81xx_update_fw_options(scsi_qla_host_t *vha)
 	if (ql2xfwholdabts)
 		ha->fw_options[3] |= BIT_12;
 
+	/* Set Retry FLOGI in case of P2P connection */
+	if (ha->operating_mode == P2P) {
+		ha->fw_options[2] |= BIT_3;
+		ql_dbg(ql_dbg_disc, vha, 0x2103,
+		    "(%s): Setting FLOGI retry BIT in fw_options[2]: 0x%x\n",
+			__func__, ha->fw_options[2]);
+	}
+
 	if (!ql2xetsenable)
 		goto out;
 
-- 
2.7.2


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

* [PATCH 05/19] qla2xxx: Add module parameter alternate/short names.
  2016-07-06 15:14 [PATCH 00/19] qla2xxx: Patches for scsi "misc" branch Himanshu Madhani
                   ` (3 preceding siblings ...)
  2016-07-06 15:14 ` [PATCH 04/19] qla2xxx: Set FLOGI retry in additional firmware options for P2P (N2N) mode Himanshu Madhani
@ 2016-07-06 15:14 ` Himanshu Madhani
  2016-07-15 12:51   ` Hannes Reinecke
  2016-07-06 15:14 ` [PATCH 06/19] qla2xxx: Make debug buffer log easier to view Himanshu Madhani
                   ` (14 subsequent siblings)
  19 siblings, 1 reply; 41+ messages in thread
From: Himanshu Madhani @ 2016-07-06 15:14 UTC (permalink / raw)
  To: James.Bottomley, martin.petersen
  Cc: giridhar.malavali, himanshu.madhani, linux-scsi

From: Joe Carnuccio <joe.carnuccio@qlogic.com>

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_os.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index dc608ce..f1a2394 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -80,6 +80,7 @@ MODULE_PARM_DESC(ql2xallocfwdump,
 
 int ql2xextended_error_logging;
 module_param(ql2xextended_error_logging, int, S_IRUGO|S_IWUSR);
+module_param_named(logging, ql2xextended_error_logging, int, S_IRUGO|S_IWUSR);
 MODULE_PARM_DESC(ql2xextended_error_logging,
 		"Option to enable extended error logging,\n"
 		"\t\tDefault is 0 - no logging.  0x40000000 - Module Init & Probe.\n"
@@ -106,6 +107,7 @@ MODULE_PARM_DESC(ql2xshiftctondsd,
 
 int ql2xfdmienable=1;
 module_param(ql2xfdmienable, int, S_IRUGO|S_IWUSR);
+module_param_named(fdmi, ql2xfdmienable, int, S_IRUGO|S_IWUSR);
 MODULE_PARM_DESC(ql2xfdmienable,
 		"Enables FDMI registrations. "
 		"0 - no FDMI. Default is 1 - perform FDMI.");
@@ -157,6 +159,7 @@ MODULE_PARM_DESC(ql2xmultique_tag,
 
 int ql2xfwloadbin;
 module_param(ql2xfwloadbin, int, S_IRUGO|S_IWUSR);
+module_param_named(fwload, ql2xfwloadbin, int, S_IRUGO|S_IWUSR);
 MODULE_PARM_DESC(ql2xfwloadbin,
 		"Option to specify location from which to load ISP firmware:.\n"
 		" 2 -- load firmware via the request_firmware() (hotplug).\n"
-- 
2.7.2


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

* [PATCH 06/19] qla2xxx: Make debug buffer log easier to view.
  2016-07-06 15:14 [PATCH 00/19] qla2xxx: Patches for scsi "misc" branch Himanshu Madhani
                   ` (4 preceding siblings ...)
  2016-07-06 15:14 ` [PATCH 05/19] qla2xxx: Add module parameter alternate/short names Himanshu Madhani
@ 2016-07-06 15:14 ` Himanshu Madhani
  2016-07-15 12:52   ` Hannes Reinecke
  2016-07-06 15:14 ` [PATCH 07/19] qla2xxx: Properly initialize IO statistics Himanshu Madhani
                   ` (13 subsequent siblings)
  19 siblings, 1 reply; 41+ messages in thread
From: Himanshu Madhani @ 2016-07-06 15:14 UTC (permalink / raw)
  To: James.Bottomley, martin.petersen
  Cc: giridhar.malavali, himanshu.madhani, linux-scsi

From: Joe Carnuccio <joe.carnuccio@qlogic.com>

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_dbg.c | 33 ++++++++++++++-------------------
 1 file changed, 14 insertions(+), 19 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
index 907a7ac..589cd13 100644
--- a/drivers/scsi/qla2xxx/qla_dbg.c
+++ b/drivers/scsi/qla2xxx/qla_dbg.c
@@ -13,7 +13,7 @@
  * ----------------------------------------------------------------------
  * | Module Init and Probe        |       0x018f       | 0x0146         |
  * |                              |                    | 0x015b-0x0160	|
- * |                              |                    | 0x016e-0x0170  |
+ * |                              |                    | 0x016e		|
  * | Mailbox commands             |       0x1192       |		|
  * |                              |                    |		|
  * | Device Discovery             |       0x2003       | 0x2016		|
@@ -2698,29 +2698,24 @@ ql_dump_regs(uint32_t level, scsi_qla_host_t *vha, int32_t id)
 
 void
 ql_dump_buffer(uint32_t level, scsi_qla_host_t *vha, int32_t id,
-	uint8_t *b, uint32_t size)
+	uint8_t *buf, uint size)
 {
-	uint32_t cnt;
-	uint8_t c;
+	uint cnt;
 
 	if (!ql_mask_match(level))
 		return;
 
-	ql_dbg(level, vha, id, " 0   1   2   3   4   5   6   7   8   "
-	    "9  Ah  Bh  Ch  Dh  Eh  Fh\n");
-	ql_dbg(level, vha, id, "----------------------------------"
-	    "----------------------------\n");
-
-	ql_dbg(level, vha, id, " ");
-	for (cnt = 0; cnt < size;) {
-		c = *b++;
-		printk("%02x", (uint32_t) c);
-		cnt++;
-		if (!(cnt % 16))
+	ql_dbg(level, vha, id,
+	    "%-+5d  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F\n", size);
+	ql_dbg(level, vha, id,
+	    "----- -----------------------------------------------\n");
+	for (cnt = 0; cnt < size; cnt++, buf++) {
+		if (cnt % 16 == 0)
+			ql_dbg(level, vha, id, "%04x:", cnt & ~0xFU);
+		printk(" %02x", *buf);
+		if (cnt % 16 == 15)
 			printk("\n");
-		else
-			printk("  ");
 	}
-	if (cnt % 16)
-		ql_dbg(level, vha, id, "\n");
+	if (cnt % 16 != 0)
+		printk("\n");
 }
-- 
2.7.2


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

* [PATCH 07/19] qla2xxx: Properly initialize IO statistics.
  2016-07-06 15:14 [PATCH 00/19] qla2xxx: Patches for scsi "misc" branch Himanshu Madhani
                   ` (5 preceding siblings ...)
  2016-07-06 15:14 ` [PATCH 06/19] qla2xxx: Make debug buffer log easier to view Himanshu Madhani
@ 2016-07-06 15:14 ` Himanshu Madhani
  2016-07-15 12:52   ` Hannes Reinecke
  2016-07-06 15:14 ` [PATCH 08/19] qla2xxx: Properly reset firmware statistics Himanshu Madhani
                   ` (12 subsequent siblings)
  19 siblings, 1 reply; 41+ messages in thread
From: Himanshu Madhani @ 2016-07-06 15:14 UTC (permalink / raw)
  To: James.Bottomley, martin.petersen
  Cc: giridhar.malavali, himanshu.madhani, linux-scsi

From: Joe Carnuccio <joe.carnuccio@qlogic.com>

Properly initialize IO statistics to avoid initial 0xFFFFFFF (-1) values.

Cleanup/simplify usage of pointer to statistics structure.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_attr.c   | 50 +++++++++++++++++++--------------------
 drivers/scsi/qla2xxx/qla_def.h    |  1 -
 drivers/scsi/qla2xxx/qla_init.c   |  3 +++
 drivers/scsi/qla2xxx/qla_target.c | 16 ++++++-------
 4 files changed, 36 insertions(+), 34 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index c9bcd82..e0256a4 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -1811,10 +1811,9 @@ qla2x00_get_fc_host_stats(struct Scsi_Host *shost)
 	int rval;
 	struct link_statistics *stats;
 	dma_addr_t stats_dma;
-	struct fc_host_statistics *pfc_host_stat;
+	struct fc_host_statistics *p = &vha->fc_host_stat;
 
-	pfc_host_stat = &vha->fc_host_stat;
-	memset(pfc_host_stat, -1, sizeof(struct fc_host_statistics));
+	memset(p, -1, sizeof(*p));
 
 	if (IS_QLAFX00(vha->hw))
 		goto done;
@@ -1850,37 +1849,37 @@ qla2x00_get_fc_host_stats(struct Scsi_Host *shost)
 	if (rval != QLA_SUCCESS)
 		goto done_free;
 
-	pfc_host_stat->link_failure_count = stats->link_fail_cnt;
-	pfc_host_stat->loss_of_sync_count = stats->loss_sync_cnt;
-	pfc_host_stat->loss_of_signal_count = stats->loss_sig_cnt;
-	pfc_host_stat->prim_seq_protocol_err_count = stats->prim_seq_err_cnt;
-	pfc_host_stat->invalid_tx_word_count = stats->inval_xmit_word_cnt;
-	pfc_host_stat->invalid_crc_count = stats->inval_crc_cnt;
+	p->link_failure_count = stats->link_fail_cnt;
+	p->loss_of_sync_count = stats->loss_sync_cnt;
+	p->loss_of_signal_count = stats->loss_sig_cnt;
+	p->prim_seq_protocol_err_count = stats->prim_seq_err_cnt;
+	p->invalid_tx_word_count = stats->inval_xmit_word_cnt;
+	p->invalid_crc_count = stats->inval_crc_cnt;
 	if (IS_FWI2_CAPABLE(ha)) {
-		pfc_host_stat->lip_count = stats->lip_cnt;
-		pfc_host_stat->tx_frames = stats->tx_frames;
-		pfc_host_stat->rx_frames = stats->rx_frames;
-		pfc_host_stat->dumped_frames = stats->discarded_frames;
-		pfc_host_stat->nos_count = stats->nos_rcvd;
-		pfc_host_stat->error_frames =
+		p->lip_count = stats->lip_cnt;
+		p->tx_frames = stats->tx_frames;
+		p->rx_frames = stats->rx_frames;
+		p->dumped_frames = stats->discarded_frames;
+		p->nos_count = stats->nos_rcvd;
+		p->error_frames =
 			stats->dropped_frames + stats->discarded_frames;
-		pfc_host_stat->rx_words = vha->qla_stats.input_bytes;
-		pfc_host_stat->tx_words = vha->qla_stats.output_bytes;
+		p->rx_words = vha->qla_stats.input_bytes;
+		p->tx_words = vha->qla_stats.output_bytes;
 	}
-	pfc_host_stat->fcp_control_requests = vha->qla_stats.control_requests;
-	pfc_host_stat->fcp_input_requests = vha->qla_stats.input_requests;
-	pfc_host_stat->fcp_output_requests = vha->qla_stats.output_requests;
-	pfc_host_stat->fcp_input_megabytes = vha->qla_stats.input_bytes >> 20;
-	pfc_host_stat->fcp_output_megabytes = vha->qla_stats.output_bytes >> 20;
-	pfc_host_stat->seconds_since_last_reset =
+	p->fcp_control_requests = vha->qla_stats.control_requests;
+	p->fcp_input_requests = vha->qla_stats.input_requests;
+	p->fcp_output_requests = vha->qla_stats.output_requests;
+	p->fcp_input_megabytes = vha->qla_stats.input_bytes >> 20;
+	p->fcp_output_megabytes = vha->qla_stats.output_bytes >> 20;
+	p->seconds_since_last_reset =
 		get_jiffies_64() - vha->qla_stats.jiffies_at_last_reset;
-	do_div(pfc_host_stat->seconds_since_last_reset, HZ);
+	do_div(p->seconds_since_last_reset, HZ);
 
 done_free:
 	dma_free_coherent(&ha->pdev->dev, sizeof(struct link_statistics),
 	    stats, stats_dma);
 done:
-	return pfc_host_stat;
+	return p;
 }
 
 static void
@@ -1888,6 +1887,7 @@ qla2x00_reset_host_stats(struct Scsi_Host *shost)
 {
 	scsi_qla_host_t *vha = shost_priv(shost);
 
+	memset(&vha->qla_stats, 0, sizeof(vha->qla_stats));
 	memset(&vha->fc_host_stat, 0, sizeof(vha->fc_host_stat));
 
 	vha->qla_stats.jiffies_at_last_reset = get_jiffies_64();
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index 2b7e4f5..a73ecc7 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -3508,7 +3508,6 @@ struct qla_hw_data {
 	int             cur_vport_count;
 
 	struct qla_chip_state_84xx *cs84xx;
-	struct qla_statistics qla_stats;
 	struct isp_operations *isp_ops;
 	struct workqueue_struct *wq;
 	struct qlfc_fw fw_buf;
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index a3685b6..68e9309 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -624,6 +624,9 @@ qla2x00_initialize_adapter(scsi_qla_host_t *vha)
 	struct qla_hw_data *ha = vha->hw;
 	struct req_que *req = ha->req_q_map[0];
 
+	memset(&vha->qla_stats, 0, sizeof(vha->qla_stats));
+	memset(&vha->fc_host_stat, 0, sizeof(vha->fc_host_stat));
+
 	/* Clear adapter flags. */
 	vha->flags.online = 0;
 	ha->flags.chip_reset_done = 0;
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
index ca39deb..bff9689 100644
--- a/drivers/scsi/qla2xxx/qla_target.c
+++ b/drivers/scsi/qla2xxx/qla_target.c
@@ -215,8 +215,8 @@ static inline void qlt_incr_num_pend_cmds(struct scsi_qla_host *vha)
 	spin_lock_irqsave(&vha->hw->tgt.q_full_lock, flags);
 
 	vha->hw->tgt.num_pend_cmds++;
-	if (vha->hw->tgt.num_pend_cmds > vha->hw->qla_stats.stat_max_pend_cmds)
-		vha->hw->qla_stats.stat_max_pend_cmds =
+	if (vha->hw->tgt.num_pend_cmds > vha->qla_stats.stat_max_pend_cmds)
+		vha->qla_stats.stat_max_pend_cmds =
 			vha->hw->tgt.num_pend_cmds;
 	spin_unlock_irqrestore(&vha->hw->tgt.q_full_lock, flags);
 }
@@ -5231,8 +5231,8 @@ qlt_alloc_qfull_cmd(struct scsi_qla_host *vha,
 	if ((vha->hw->tgt.num_qfull_cmds_alloc + 1) > MAX_QFULL_CMDS_ALLOC) {
 		vha->hw->tgt.num_qfull_cmds_dropped++;
 		if (vha->hw->tgt.num_qfull_cmds_dropped >
-			vha->hw->qla_stats.stat_max_qfull_cmds_dropped)
-			vha->hw->qla_stats.stat_max_qfull_cmds_dropped =
+			vha->qla_stats.stat_max_qfull_cmds_dropped)
+			vha->qla_stats.stat_max_qfull_cmds_dropped =
 				vha->hw->tgt.num_qfull_cmds_dropped;
 
 		ql_dbg(ql_dbg_io, vha, 0x3068,
@@ -5263,8 +5263,8 @@ qlt_alloc_qfull_cmd(struct scsi_qla_host *vha,
 
 		vha->hw->tgt.num_qfull_cmds_dropped++;
 		if (vha->hw->tgt.num_qfull_cmds_dropped >
-			vha->hw->qla_stats.stat_max_qfull_cmds_dropped)
-			vha->hw->qla_stats.stat_max_qfull_cmds_dropped =
+			vha->qla_stats.stat_max_qfull_cmds_dropped)
+			vha->qla_stats.stat_max_qfull_cmds_dropped =
 				vha->hw->tgt.num_qfull_cmds_dropped;
 
 		qlt_chk_exch_leak_thresh_hold(vha);
@@ -5293,8 +5293,8 @@ qlt_alloc_qfull_cmd(struct scsi_qla_host *vha,
 
 	vha->hw->tgt.num_qfull_cmds_alloc++;
 	if (vha->hw->tgt.num_qfull_cmds_alloc >
-		vha->hw->qla_stats.stat_max_qfull_cmds_alloc)
-		vha->hw->qla_stats.stat_max_qfull_cmds_alloc =
+		vha->qla_stats.stat_max_qfull_cmds_alloc)
+		vha->qla_stats.stat_max_qfull_cmds_alloc =
 			vha->hw->tgt.num_qfull_cmds_alloc;
 }
 
-- 
2.7.2


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

* [PATCH 08/19] qla2xxx: Properly reset firmware statistics.
  2016-07-06 15:14 [PATCH 00/19] qla2xxx: Patches for scsi "misc" branch Himanshu Madhani
                   ` (6 preceding siblings ...)
  2016-07-06 15:14 ` [PATCH 07/19] qla2xxx: Properly initialize IO statistics Himanshu Madhani
@ 2016-07-06 15:14 ` Himanshu Madhani
  2016-07-15 12:53   ` Hannes Reinecke
  2016-07-06 15:14 ` [PATCH 09/19] qla2xxx: Check for device state before unloading the driver Himanshu Madhani
                   ` (11 subsequent siblings)
  19 siblings, 1 reply; 41+ messages in thread
From: Himanshu Madhani @ 2016-07-06 15:14 UTC (permalink / raw)
  To: James.Bottomley, martin.petersen
  Cc: giridhar.malavali, himanshu.madhani, linux-scsi

From: Joe Carnuccio <joe.carnuccio@qlogic.com>

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_attr.c | 28 ++++++++++++++++++++++++----
 drivers/scsi/qla2xxx/qla_bsg.c  |  2 +-
 drivers/scsi/qla2xxx/qla_dbg.c  |  2 +-
 drivers/scsi/qla2xxx/qla_gbl.h  |  2 +-
 drivers/scsi/qla2xxx/qla_mbx.c  | 18 ++++++++----------
 5 files changed, 35 insertions(+), 17 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index e0256a4..8b06ce8 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -1828,17 +1828,17 @@ qla2x00_get_fc_host_stats(struct Scsi_Host *shost)
 		goto done;
 
 	stats = dma_alloc_coherent(&ha->pdev->dev,
-	    sizeof(struct link_statistics), &stats_dma, GFP_KERNEL);
-	if (stats == NULL) {
+	    sizeof(*stats), &stats_dma, GFP_KERNEL);
+	if (!stats) {
 		ql_log(ql_log_warn, vha, 0x707d,
 		    "Failed to allocate memory for stats.\n");
 		goto done;
 	}
-	memset(stats, 0, DMA_POOL_SIZE);
+	memset(stats, 0, sizeof(*stats));
 
 	rval = QLA_FUNCTION_FAILED;
 	if (IS_FWI2_CAPABLE(ha)) {
-		rval = qla24xx_get_isp_stats(base_vha, stats, stats_dma);
+		rval = qla24xx_get_isp_stats(base_vha, stats, stats_dma, 0);
 	} else if (atomic_read(&base_vha->loop_state) == LOOP_READY &&
 	    !ha->dpc_active) {
 		/* Must be in a 'READY' state for statistics retrieval. */
@@ -1886,11 +1886,31 @@ static void
 qla2x00_reset_host_stats(struct Scsi_Host *shost)
 {
 	scsi_qla_host_t *vha = shost_priv(shost);
+	struct qla_hw_data *ha = vha->hw;
+	struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev);
+	struct link_statistics *stats;
+	dma_addr_t stats_dma;
 
 	memset(&vha->qla_stats, 0, sizeof(vha->qla_stats));
 	memset(&vha->fc_host_stat, 0, sizeof(vha->fc_host_stat));
 
 	vha->qla_stats.jiffies_at_last_reset = get_jiffies_64();
+
+	if (IS_FWI2_CAPABLE(ha)) {
+		stats = dma_alloc_coherent(&ha->pdev->dev,
+		    sizeof(*stats), &stats_dma, GFP_KERNEL);
+		if (!stats) {
+			ql_log(ql_log_warn, vha, 0x70d7,
+			    "Failed to allocate memory for stats.\n");
+			return;
+		}
+
+		/* reset firmware statistics */
+		qla24xx_get_isp_stats(base_vha, stats, stats_dma, BIT_0);
+
+		dma_free_coherent(&ha->pdev->dev, sizeof(*stats),
+		    stats, stats_dma);
+	}
 }
 
 static void
diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c
index 392c147..8cadc4d 100644
--- a/drivers/scsi/qla2xxx/qla_bsg.c
+++ b/drivers/scsi/qla2xxx/qla_bsg.c
@@ -2270,7 +2270,7 @@ qla2x00_get_priv_stats(struct fc_bsg_job *bsg_job)
 
 	memset(stats, 0, sizeof(struct link_statistics));
 
-	rval = qla24xx_get_isp_stats(base_vha, stats, stats_dma);
+	rval = qla24xx_get_isp_stats(base_vha, stats, stats_dma, 0);
 
 	if (rval != QLA_SUCCESS)
 		goto done_free;
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
index 589cd13..c6ccc8a 100644
--- a/drivers/scsi/qla2xxx/qla_dbg.c
+++ b/drivers/scsi/qla2xxx/qla_dbg.c
@@ -41,7 +41,7 @@
  * |                              |                    | 0x70ad-0x70ae  |
  * |                              |                    | 0x70d0-0x70d6	|
  * |                              |                    | 0x70d7-0x70db  |
- * |                              |                    | 0x70de-0x70df  |
+ * |                              |                    | 0x70db		|
  * | Task Management              |       0x803d       | 0x8000,0x800b  |
  * |                              |                    | 0x8019         |
  * |                              |                    | 0x8025,0x8026  |
diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h
index fe94377..be24e62 100644
--- a/drivers/scsi/qla2xxx/qla_gbl.h
+++ b/drivers/scsi/qla2xxx/qla_gbl.h
@@ -344,7 +344,7 @@ qla2x00_get_link_status(scsi_qla_host_t *, uint16_t, struct link_statistics *,
 
 extern int
 qla24xx_get_isp_stats(scsi_qla_host_t *, struct link_statistics *,
-    dma_addr_t);
+    dma_addr_t, uint);
 
 extern int qla24xx_abort_command(srb_t *);
 extern int qla24xx_async_abort_command(srb_t *);
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index 9673a0b..583ad62 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -2762,15 +2762,16 @@ qla2x00_get_link_status(scsi_qla_host_t *vha, uint16_t loop_id,
 	int rval;
 	mbx_cmd_t mc;
 	mbx_cmd_t *mcp = &mc;
-	uint32_t *iter, dwords;
+	uint32_t *iter = (void *)stats;
+	ushort dwords = offsetof(typeof(*stats), link_up_cnt)/sizeof(*iter);
 	struct qla_hw_data *ha = vha->hw;
 
 	ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1084,
 	    "Entered %s.\n", __func__);
 
 	mcp->mb[0] = MBC_GET_LINK_STATUS;
-	mcp->mb[2] = MSW(stats_dma);
-	mcp->mb[3] = LSW(stats_dma);
+	mcp->mb[2] = MSW(LSD(stats_dma));
+	mcp->mb[3] = LSW(LSD(stats_dma));
 	mcp->mb[6] = MSW(MSD(stats_dma));
 	mcp->mb[7] = LSW(MSD(stats_dma));
 	mcp->out_mb = MBX_7|MBX_6|MBX_3|MBX_2|MBX_0;
@@ -2799,12 +2800,9 @@ qla2x00_get_link_status(scsi_qla_host_t *vha, uint16_t loop_id,
 			    "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]);
 			rval = QLA_FUNCTION_FAILED;
 		} else {
-			/* Copy over data -- firmware data is LE. */
+			/* Re-endianize - firmware data is le32. */
 			ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1086,
 			    "Done %s.\n", __func__);
-			dwords = offsetof(struct link_statistics,
-					link_up_cnt) / 4;
-			iter = &stats->link_fail_cnt;
 			for ( ; dwords--; iter++)
 				le32_to_cpus(iter);
 		}
@@ -2818,7 +2816,7 @@ qla2x00_get_link_status(scsi_qla_host_t *vha, uint16_t loop_id,
 
 int
 qla24xx_get_isp_stats(scsi_qla_host_t *vha, struct link_statistics *stats,
-    dma_addr_t stats_dma)
+    dma_addr_t stats_dma, uint options)
 {
 	int rval;
 	mbx_cmd_t mc;
@@ -2835,7 +2833,7 @@ qla24xx_get_isp_stats(scsi_qla_host_t *vha, struct link_statistics *stats,
 	mcp->mb[7] = LSW(MSD(stats_dma));
 	mcp->mb[8] = sizeof(struct link_statistics) / 4;
 	mcp->mb[9] = vha->vp_idx;
-	mcp->mb[10] = 0;
+	mcp->mb[10] = options;
 	mcp->out_mb = MBX_10|MBX_9|MBX_8|MBX_7|MBX_6|MBX_3|MBX_2|MBX_0;
 	mcp->in_mb = MBX_2|MBX_1|MBX_0;
 	mcp->tov = MBX_TOV_SECONDS;
@@ -2850,7 +2848,7 @@ qla24xx_get_isp_stats(scsi_qla_host_t *vha, struct link_statistics *stats,
 		} else {
 			ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x108a,
 			    "Done %s.\n", __func__);
-			/* Copy over data -- firmware data is LE. */
+			/* Re-endianize - firmware data is le32. */
 			dwords = sizeof(struct link_statistics) / 4;
 			iter = &stats->link_fail_cnt;
 			for ( ; dwords--; iter++)
-- 
2.7.2


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

* [PATCH 09/19] qla2xxx: Check for device state before unloading the driver.
  2016-07-06 15:14 [PATCH 00/19] qla2xxx: Patches for scsi "misc" branch Himanshu Madhani
                   ` (7 preceding siblings ...)
  2016-07-06 15:14 ` [PATCH 08/19] qla2xxx: Properly reset firmware statistics Himanshu Madhani
@ 2016-07-06 15:14 ` Himanshu Madhani
  2016-07-15 12:54   ` Hannes Reinecke
  2016-07-06 15:14 ` [PATCH 10/19] qla2xxx: Add bsg interface to support D_Port Diagnostics Himanshu Madhani
                   ` (10 subsequent siblings)
  19 siblings, 1 reply; 41+ messages in thread
From: Himanshu Madhani @ 2016-07-06 15:14 UTC (permalink / raw)
  To: James.Bottomley, martin.petersen
  Cc: giridhar.malavali, himanshu.madhani, linux-scsi

From: Sawan Chandak <sawan.chandak@qlogic.com>

During hot swap of PCI device, there can be PCI error on device,
during normal driver unload. The race between normal driver unload and
driver unload due to PCI error, can lead to system crash.Fix is to check
if there is unload going on and allow that function to unload the driver.

Signed-off-by: Sawan Chandak <sawan.chandak@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_dbg.c |  2 +-
 drivers/scsi/qla2xxx/qla_def.h |  1 +
 drivers/scsi/qla2xxx/qla_mbx.c | 41 +++++++++++++++++++++++++++++++++--------
 drivers/scsi/qla2xxx/qla_os.c  | 21 +++++++++++++++++----
 4 files changed, 52 insertions(+), 13 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
index c6ccc8a..2790e5f 100644
--- a/drivers/scsi/qla2xxx/qla_dbg.c
+++ b/drivers/scsi/qla2xxx/qla_dbg.c
@@ -14,7 +14,7 @@
  * | Module Init and Probe        |       0x018f       | 0x0146         |
  * |                              |                    | 0x015b-0x0160	|
  * |                              |                    | 0x016e		|
- * | Mailbox commands             |       0x1192       |		|
+ * | Mailbox commands             |       0x1191       | 		|
  * |                              |                    |		|
  * | Device Discovery             |       0x2003       | 0x2016		|
  * |                              |                    | 0x2011-0x2012, |
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index a73ecc7..7d4bd7d 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -3658,6 +3658,7 @@ typedef struct scsi_qla_host {
 #define PFLG_DISCONNECTED	0	/* PCI device removed */
 #define PFLG_DRIVER_REMOVING	1	/* PCI driver .remove */
 #define PFLG_DRIVER_PROBING	2	/* PCI driver .probe */
+#define PCI_ERR			30
 
 	uint32_t	device_flags;
 #define SWITCH_FOUND		BIT_0
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index 583ad62..97099ce 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -64,6 +64,13 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
 		return QLA_FUNCTION_TIMEOUT;
 	}
 
+	 /* if PCI error, then avoid mbx processing.*/
+	 if (test_bit(PCI_ERR, &base_vha->dpc_flags)) {
+		ql_log(ql_log_warn, vha, 0x1191,
+		    "PCI error, exiting.\n");
+		return QLA_FUNCTION_TIMEOUT;
+	 }
+
 	reg = ha->iobase;
 	io_lock_on = base_vha->flags.init_done;
 
@@ -266,6 +273,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
 
 		uint16_t mb0;
 		uint32_t ictrl;
+		uint16_t        w;
 
 		if (IS_FWI2_CAPABLE(ha)) {
 			mb0 = RD_REG_WORD(&reg->isp24.mailbox0);
@@ -279,15 +287,32 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
 		    "mb[0]=0x%x\n", command, ictrl, jiffies, mb0);
 		ql_dump_regs(ql_dbg_mbx + ql_dbg_buffer, vha, 0x1019);
 
-		/*
-		 * Attempt to capture a firmware dump for further analysis
-		 * of the current firmware state.  We do not need to do this
-		 * if we are intentionally generating a dump.
-		 */
-		if (mcp->mb[0] != MBC_GEN_SYSTEM_ERROR)
-			ha->isp_ops->fw_dump(vha, 0);
+		/* Capture FW dump only, if PCI device active */
+		if (!pci_channel_offline(vha->hw->pdev)) {
+			pci_read_config_word(ha->pdev, PCI_VENDOR_ID, &w);
+			if (w == 0xffff || ictrl == 0xffffffff) {
+				/* This is special case if there is unload
+				 * of driver happening and if PCI device go
+				 * into bad state due to PCI error condition
+				 * then only PCI ERR flag would be set.
+				 * we will do premature exit for above case.
+				 */
+				if (test_bit(UNLOADING, &base_vha->dpc_flags))
+					set_bit(PCI_ERR, &base_vha->dpc_flags);
+				ha->flags.mbox_busy = 0;
+				rval = QLA_FUNCTION_TIMEOUT;
+				goto premature_exit;
+			}
 
-		rval = QLA_FUNCTION_TIMEOUT;
+			/* Attempt to capture firmware dump for further
+			 * anallysis of the current formware state. we do not
+			 * need to do this if we are intentionally generating
+			 * a dump
+			 */
+			if (mcp->mb[0] != MBC_GEN_SYSTEM_ERROR)
+				ha->isp_ops->fw_dump(vha, 0);
+			rval = QLA_FUNCTION_TIMEOUT;
+		 }
 	}
 
 	ha->flags.mbox_busy = 0;
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index f1a2394..fde7ee1 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -897,12 +897,16 @@ static void
 qla2x00_wait_for_hba_ready(scsi_qla_host_t *vha)
 {
 	struct qla_hw_data *ha = vha->hw;
+	scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev);
 
 	while (((qla2x00_reset_active(vha)) || ha->dpc_active ||
 	    ha->flags.mbox_busy) ||
 		test_bit(FX00_RESET_RECOVERY, &vha->dpc_flags) ||
-		test_bit(FX00_TARGET_SCAN, &vha->dpc_flags))
+		test_bit(FX00_TARGET_SCAN, &vha->dpc_flags)) {
+			if (test_bit(UNLOADING, &base_vha->dpc_flags))
+				break;
 		msleep(1000);
+	}
 }
 
 int
@@ -2954,10 +2958,7 @@ iospace_config_failed:
 	ha = NULL;
 
 probe_out:
-	pci_disable_pcie_error_reporting(pdev);
 	pci_disable_device(pdev);
-	if (test_bit(UNLOADING, &base_vha->dpc_flags))
-		return -ENODEV;
 	return ret;
 }
 
@@ -3138,6 +3139,12 @@ qla2x00_remove_one(struct pci_dev *pdev)
 
 	qla2x00_wait_for_hba_ready(base_vha);
 
+	/* if UNLOAD flag is already set, then continue unload,
+	 * where it was set first.
+	 */
+	if (test_bit(UNLOADING, &base_vha->dpc_flags))
+		return;
+
 	set_bit(UNLOADING, &base_vha->dpc_flags);
 
 	if (IS_QLAFX00(ha))
@@ -4917,6 +4924,12 @@ qla2x00_disable_board_on_pci_error(struct work_struct *work)
 	struct pci_dev *pdev = ha->pdev;
 	scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev);
 
+	/* if UNLOAD flag is already set, then continue unload,
+	 * where it was set first.
+	 */
+	if (test_bit(UNLOADING, &base_vha->dpc_flags))
+		return;
+
 	ql_log(ql_log_warn, base_vha, 0x015b,
 	    "Disabling adapter.\n");
 
-- 
2.7.2


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

* [PATCH 10/19] qla2xxx: Add bsg interface to support D_Port Diagnostics.
  2016-07-06 15:14 [PATCH 00/19] qla2xxx: Patches for scsi "misc" branch Himanshu Madhani
                   ` (8 preceding siblings ...)
  2016-07-06 15:14 ` [PATCH 09/19] qla2xxx: Check for device state before unloading the driver Himanshu Madhani
@ 2016-07-06 15:14 ` Himanshu Madhani
  2016-07-15 12:55   ` Hannes Reinecke
  2016-07-06 15:14 ` [PATCH 11/19] qla2xxx: Add bsg interface to support statistics counter reset Himanshu Madhani
                   ` (9 subsequent siblings)
  19 siblings, 1 reply; 41+ messages in thread
From: Himanshu Madhani @ 2016-07-06 15:14 UTC (permalink / raw)
  To: James.Bottomley, martin.petersen
  Cc: giridhar.malavali, himanshu.madhani, linux-scsi

From: Joe Carnuccio <joe.carnuccio@qlogic.com>

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_bsg.c | 44 ++++++++++++++++++++++++++++++++
 drivers/scsi/qla2xxx/qla_bsg.h | 12 +++++++++
 drivers/scsi/qla2xxx/qla_dbg.c |  3 +--
 drivers/scsi/qla2xxx/qla_gbl.h |  3 +++
 drivers/scsi/qla2xxx/qla_isr.c |  7 +++--
 drivers/scsi/qla2xxx/qla_mbx.c | 58 +++++++++++++++++++++++++++++++++++++++++-
 6 files changed, 122 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c
index 8cadc4d..592e924 100644
--- a/drivers/scsi/qla2xxx/qla_bsg.c
+++ b/drivers/scsi/qla2xxx/qla_bsg.c
@@ -2296,6 +2296,47 @@ done:
 }
 
 static int
+qla2x00_do_dport_diagnostics(struct fc_bsg_job *bsg_job)
+{
+	struct Scsi_Host *host = bsg_job->shost;
+	scsi_qla_host_t *vha = shost_priv(host);
+	int rval;
+	struct qla_dport_diag *dd;
+
+	if (!IS_QLA83XX(vha->hw) && !IS_QLA27XX(vha->hw))
+		return -EPERM;
+
+	dd = kmalloc(sizeof(*dd), GFP_KERNEL);
+	if (!dd) {
+		ql_log(ql_log_warn, vha, 0x70db,
+		    "Failed to allocate memory for dport.\n");
+		return -ENOMEM;
+	}
+
+	sg_copy_to_buffer(bsg_job->request_payload.sg_list,
+	    bsg_job->request_payload.sg_cnt, dd, sizeof(*dd));
+
+	rval = qla26xx_dport_diagnostics(
+	    vha, dd->buf, sizeof(dd->buf), dd->options);
+	if (rval == QLA_SUCCESS) {
+		sg_copy_from_buffer(bsg_job->reply_payload.sg_list,
+		    bsg_job->reply_payload.sg_cnt, dd, sizeof(*dd));
+	}
+
+	bsg_job->reply->reply_payload_rcv_len = sizeof(*dd);
+	bsg_job->reply->reply_data.vendor_reply.vendor_rsp[0] =
+	    rval ? EXT_STATUS_MAILBOX : EXT_STATUS_OK;
+
+	bsg_job->reply_len = sizeof(*bsg_job->reply);
+	bsg_job->reply->result = DID_OK << 16;
+	bsg_job->job_done(bsg_job);
+
+	kfree(dd);
+
+	return 0;
+}
+
+static int
 qla2x00_process_vendor_specific(struct fc_bsg_job *bsg_job)
 {
 	switch (bsg_job->request->rqst_data.h_vendor.vendor_cmd[0]) {
@@ -2362,6 +2403,9 @@ qla2x00_process_vendor_specific(struct fc_bsg_job *bsg_job)
 	case QL_VND_GET_PRIV_STATS:
 		return qla2x00_get_priv_stats(bsg_job);
 
+	case QL_VND_DPORT_DIAGNOSTICS:
+		return qla2x00_do_dport_diagnostics(bsg_job);
+
 	default:
 		return -ENOSYS;
 	}
diff --git a/drivers/scsi/qla2xxx/qla_bsg.h b/drivers/scsi/qla2xxx/qla_bsg.h
index c80192d..3b1045f 100644
--- a/drivers/scsi/qla2xxx/qla_bsg.h
+++ b/drivers/scsi/qla2xxx/qla_bsg.h
@@ -29,6 +29,7 @@
 #define QL_VND_SET_FLASH_UPDATE_CAPS    0x16
 #define QL_VND_GET_BBCR_DATA    0x17
 #define QL_VND_GET_PRIV_STATS	0x18
+#define QL_VND_DPORT_DIAGNOSTICS	0x19
 
 /* BSG Vendor specific subcode returns */
 #define EXT_STATUS_OK			0
@@ -266,4 +267,15 @@ struct  qla_bbcr_data {
 	uint16_t  mbx1;			/* Port state */
 	uint8_t   reserved[9];
 } __packed;
+
+struct qla_dport_diag {
+	uint16_t options;
+	uint32_t buf[16];
+	uint8_t  unused[62];
+} __packed;
+
+/* D_Port options */
+#define QLA_DPORT_RESULT	0x0
+#define QLA_DPORT_START		0x2
+
 #endif
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
index 2790e5f..2a1eb02 100644
--- a/drivers/scsi/qla2xxx/qla_dbg.c
+++ b/drivers/scsi/qla2xxx/qla_dbg.c
@@ -14,7 +14,7 @@
  * | Module Init and Probe        |       0x018f       | 0x0146         |
  * |                              |                    | 0x015b-0x0160	|
  * |                              |                    | 0x016e		|
- * | Mailbox commands             |       0x1191       | 		|
+ * | Mailbox commands             |       0x1196       |		|
  * |                              |                    |		|
  * | Device Discovery             |       0x2003       | 0x2016		|
  * |                              |                    | 0x2011-0x2012, |
@@ -41,7 +41,6 @@
  * |                              |                    | 0x70ad-0x70ae  |
  * |                              |                    | 0x70d0-0x70d6	|
  * |                              |                    | 0x70d7-0x70db  |
- * |                              |                    | 0x70db		|
  * | Task Management              |       0x803d       | 0x8000,0x800b  |
  * |                              |                    | 0x8019         |
  * |                              |                    | 0x8025,0x8026  |
diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h
index be24e62..6ca0081 100644
--- a/drivers/scsi/qla2xxx/qla_gbl.h
+++ b/drivers/scsi/qla2xxx/qla_gbl.h
@@ -445,6 +445,9 @@ qla2x00_port_logout(scsi_qla_host_t *, struct fc_port *);
 extern int
 qla2x00_dump_mctp_data(scsi_qla_host_t *, dma_addr_t, uint32_t, uint32_t);
 
+extern int
+qla26xx_dport_diagnostics(scsi_qla_host_t *, void *, uint, uint);
+
 /*
  * Global Function Prototypes in qla_isr.c source file.
  */
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index f1bfb42..b8d0b78a 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -1152,10 +1152,13 @@ global_port_update:
 
 	case MBA_DPORT_DIAGNOSTICS:
 		ql_dbg(ql_dbg_async, vha, 0x5052,
-		    "D-Port Diagnostics: %04x %04x=%s\n", mb[0], mb[1],
+		    "D-Port Diagnostics: %04x result=%s index=%u size=%u\n",
+		    mb[0],
 		    mb[1] == 0 ? "start" :
 		    mb[1] == 1 ? "done (ok)" :
-		    mb[1] == 2 ? "done (error)" : "other");
+		    mb[1] == 2 ? "done (error)" : "other",
+		    LSB(mb[2]),
+		    mb[3]);
 		break;
 
 	case MBA_TEMPERATURE_ALERT:
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index 97099ce..0f7b83a 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -1872,7 +1872,7 @@ qla2x00_get_firmware_state(scsi_qla_host_t *vha, uint16_t *states)
 	states[0] = mcp->mb[1];
 	if (IS_FWI2_CAPABLE(vha->hw)) {
 		states[1] = mcp->mb[2];
-		states[2] = mcp->mb[3];
+		states[2] = mcp->mb[3];  /* SFP info */
 		states[3] = mcp->mb[4];
 		states[4] = mcp->mb[5];
 		states[5] = mcp->mb[6];  /* DPORT status */
@@ -5748,3 +5748,59 @@ qla2x00_dump_mctp_data(scsi_qla_host_t *vha, dma_addr_t req_dma, uint32_t addr,
 
 	return rval;
 }
+
+int
+qla26xx_dport_diagnostics(scsi_qla_host_t *vha,
+	void *dd_buf, uint size, uint options)
+{
+	int rval;
+	mbx_cmd_t mc;
+	mbx_cmd_t *mcp = &mc;
+	dma_addr_t dd_dma;
+
+	if (!IS_QLA83XX(vha->hw) && !IS_QLA27XX(vha->hw))
+		return QLA_FUNCTION_FAILED;
+
+	ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1192,
+	    "Entered %s.\n", __func__);
+
+	if (size < 1024) {
+		ql_log(ql_log_warn, vha, 0x1193, "Failed insufficient size.\n");
+		return QLA_FUNCTION_PARAMETER_ERROR;
+	}
+
+	dd_dma = dma_map_single(&vha->hw->pdev->dev,
+	    dd_buf, size, DMA_FROM_DEVICE);
+	if (!dd_dma) {
+		ql_log(ql_log_warn, vha, 0x1194, "Failed to map dma buffer.\n");
+		return QLA_MEMORY_ALLOC_FAILED;
+	}
+
+	memset(dd_buf, 0, size);
+
+	mcp->mb[0] = MBC_DPORT_DIAGNOSTICS;
+	mcp->mb[1] = options;
+	mcp->mb[2] = MSW(LSD(dd_dma));
+	mcp->mb[3] = LSW(LSD(dd_dma));
+	mcp->mb[6] = MSW(MSD(dd_dma));
+	mcp->mb[7] = LSW(MSD(dd_dma));
+	mcp->mb[8] = size;
+	mcp->out_mb = MBX_8|MBX_7|MBX_6|MBX_3|MBX_2|MBX_1|MBX_0;
+	mcp->in_mb = MBX_3|MBX_2|MBX_1|MBX_0;
+	mcp->buf_size = size;
+	mcp->flags = MBX_DMA_IN;
+	mcp->tov = MBX_TOV_SECONDS * 4;
+	rval = qla2x00_mailbox_command(vha, mcp);
+
+	if (rval != QLA_SUCCESS) {
+		ql_dbg(ql_dbg_mbx, vha, 0x1195, "Failed=%x.\n", rval);
+	} else {
+		ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1196,
+		    "Done %s.\n", __func__);
+	}
+
+	dma_unmap_single(&vha->hw->pdev->dev, dd_dma,
+	    size, DMA_FROM_DEVICE);
+
+	return rval;
+}
-- 
2.7.2


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

* [PATCH 11/19] qla2xxx: Add bsg interface to support statistics counter reset.
  2016-07-06 15:14 [PATCH 00/19] qla2xxx: Patches for scsi "misc" branch Himanshu Madhani
                   ` (9 preceding siblings ...)
  2016-07-06 15:14 ` [PATCH 10/19] qla2xxx: Add bsg interface to support D_Port Diagnostics Himanshu Madhani
@ 2016-07-06 15:14 ` Himanshu Madhani
  2016-07-06 16:36   ` kbuild test robot
  2016-07-15 12:56   ` Hannes Reinecke
  2016-07-06 15:14 ` [PATCH 12/19] qla2xxx: Let DPORT be enabled purely by nvram Himanshu Madhani
                   ` (8 subsequent siblings)
  19 siblings, 2 replies; 41+ messages in thread
From: Himanshu Madhani @ 2016-07-06 15:14 UTC (permalink / raw)
  To: James.Bottomley, martin.petersen
  Cc: giridhar.malavali, himanshu.madhani, linux-scsi

From: Sawan Chandak <sawan.chandak@qlogic.com>

Signed-off-by: Sawan Chandak <sawan.chandak@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_bsg.c | 48 ++++++++++++++++++++++--------------------
 drivers/scsi/qla2xxx/qla_bsg.h |  1 +
 2 files changed, 26 insertions(+), 23 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c
index 592e924..8a953aa 100644
--- a/drivers/scsi/qla2xxx/qla_bsg.c
+++ b/drivers/scsi/qla2xxx/qla_bsg.c
@@ -2246,53 +2246,54 @@ qla2x00_get_priv_stats(struct fc_bsg_job *bsg_job)
 	struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev);
 	struct link_statistics *stats = NULL;
 	dma_addr_t stats_dma;
-	int rval = QLA_FUNCTION_FAILED;
+	int rval;
+	uint32_t *cmd = bsg_job->request->rqst_data.h_vendor.vendor_cmd;
+	uint options = cmd[0] == QL_VND_GET_PRIV_STATS_EX ? cmd[1] : 0;
 
 	if (test_bit(UNLOADING, &vha->dpc_flags))
-		goto done;
+		return -ENODEV;
 
 	if (unlikely(pci_channel_offline(ha->pdev)))
-		goto done;
+		return -ENODEV;
 
 	if (qla2x00_reset_active(vha))
-		goto done;
+		return -EBUSY;
 
 	if (!IS_FWI2_CAPABLE(ha))
-		goto done;
+		return -EPERM;
 
 	stats = dma_alloc_coherent(&ha->pdev->dev,
-		sizeof(struct link_statistics), &stats_dma, GFP_KERNEL);
+		sizeof(*stats), &stats_dma, GFP_KERNEL);
 	if (!stats) {
 		ql_log(ql_log_warn, vha, 0x70e2,
-		"Failed to allocate memory for stats.\n");
-		goto done;
+		    "Failed to allocate memory for stats.\n");
+		return -ENOMEM;
 	}
 
-	memset(stats, 0, sizeof(struct link_statistics));
-
-	rval = qla24xx_get_isp_stats(base_vha, stats, stats_dma, 0);
-
-	if (rval != QLA_SUCCESS)
-		goto done_free;
+	memset(stats, 0, sizeof(*stats));
 
-	ql_dump_buffer(ql_dbg_user + ql_dbg_verbose, vha, 0x70e3,
-	    (uint8_t *)stats, sizeof(struct link_statistics));
+	rval = qla24xx_get_isp_stats(base_vha, stats, stats_dma, options);
 
-	sg_copy_from_buffer(bsg_job->reply_payload.sg_list,
-	bsg_job->reply_payload.sg_cnt, stats, sizeof(struct link_statistics));
-	bsg_job->reply->reply_payload_rcv_len = sizeof(struct link_statistics);
+	if (rval == QLA_SUCCESS) {
+		ql_dump_buffer(ql_dbg_user + ql_dbg_verbose, vha, 0x70e3,
+		    (uint8_t *)stats, sizeof(*stats));
+		sg_copy_from_buffer(bsg_job->reply_payload.sg_list,
+			bsg_job->reply_payload.sg_cnt, stats, sizeof(*stats));
+	}
 
-	bsg_job->reply->reply_data.vendor_reply.vendor_rsp[0] = EXT_STATUS_OK;
+	bsg_job->reply->reply_payload_rcv_len = sizeof(*stats);
+	bsg_job->reply->reply_data.vendor_reply.vendor_rsp[0] =
+	    rval ? EXT_STATUS_MAILBOX : EXT_STATUS_OK;
 
-	bsg_job->reply_len = sizeof(struct fc_bsg_reply);
+	bsg_job->reply_len = sizeof(*bsg_job->reply);
 	bsg_job->reply->result = DID_OK << 16;
 	bsg_job->job_done(bsg_job);
 
 done_free:
-	dma_free_coherent(&ha->pdev->dev, sizeof(struct link_statistics),
+	dma_free_coherent(&ha->pdev->dev, sizeof(*stats),
 		stats, stats_dma);
 done:
-	return rval;
+	return 0;
 }
 
 static int
@@ -2401,6 +2402,7 @@ qla2x00_process_vendor_specific(struct fc_bsg_job *bsg_job)
 		return qla27xx_get_bbcr_data(bsg_job);
 
 	case QL_VND_GET_PRIV_STATS:
+	case QL_VND_GET_PRIV_STATS_EX:
 		return qla2x00_get_priv_stats(bsg_job);
 
 	case QL_VND_DPORT_DIAGNOSTICS:
diff --git a/drivers/scsi/qla2xxx/qla_bsg.h b/drivers/scsi/qla2xxx/qla_bsg.h
index 3b1045f..d97dfd5 100644
--- a/drivers/scsi/qla2xxx/qla_bsg.h
+++ b/drivers/scsi/qla2xxx/qla_bsg.h
@@ -30,6 +30,7 @@
 #define QL_VND_GET_BBCR_DATA    0x17
 #define QL_VND_GET_PRIV_STATS	0x18
 #define QL_VND_DPORT_DIAGNOSTICS	0x19
+#define QL_VND_GET_PRIV_STATS_EX	0x1A
 
 /* BSG Vendor specific subcode returns */
 #define EXT_STATUS_OK			0
-- 
2.7.2


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

* [PATCH 12/19] qla2xxx: Let DPORT be enabled purely by nvram.
  2016-07-06 15:14 [PATCH 00/19] qla2xxx: Patches for scsi "misc" branch Himanshu Madhani
                   ` (10 preceding siblings ...)
  2016-07-06 15:14 ` [PATCH 11/19] qla2xxx: Add bsg interface to support statistics counter reset Himanshu Madhani
@ 2016-07-06 15:14 ` Himanshu Madhani
  2016-07-15 12:57   ` Hannes Reinecke
  2016-07-06 15:14 ` [PATCH 13/19] qla2xxx: Add support to handle Loop Init error Asynchronus event Himanshu Madhani
                   ` (7 subsequent siblings)
  19 siblings, 1 reply; 41+ messages in thread
From: Himanshu Madhani @ 2016-07-06 15:14 UTC (permalink / raw)
  To: James.Bottomley, martin.petersen
  Cc: giridhar.malavali, himanshu.madhani, linux-scsi

From: Joe Carnuccio <joe.carnuccio@qlogic.com>

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_dbg.c  |  2 +-
 drivers/scsi/qla2xxx/qla_def.h  |  1 +
 drivers/scsi/qla2xxx/qla_init.c | 12 ++++++------
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
index 2a1eb02..eebd1a58 100644
--- a/drivers/scsi/qla2xxx/qla_dbg.c
+++ b/drivers/scsi/qla2xxx/qla_dbg.c
@@ -11,7 +11,7 @@
  * ----------------------------------------------------------------------
  * |             Level            |   Last Value Used  |     Holes	|
  * ----------------------------------------------------------------------
- * | Module Init and Probe        |       0x018f       | 0x0146         |
+ * | Module Init and Probe        |       0x0191       | 0x0146         |
  * |                              |                    | 0x015b-0x0160	|
  * |                              |                    | 0x016e		|
  * | Mailbox commands             |       0x1196       |		|
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index 7d4bd7d..c04d83e 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -3029,6 +3029,7 @@ struct qla_hw_data {
 		uint32_t        mr_reset_hdlr_active:1;
 		uint32_t        mr_intr_valid:1;
 
+		uint32_t        dport_enabled:1;
 		uint32_t	fawwpn_enabled:1;
 		uint32_t	exlogins_enabled:1;
 		uint32_t	exchoffld_enabled:1;
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 68e9309..5b09296 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -2288,13 +2288,13 @@ qla2x00_init_rings(scsi_qla_host_t *vha)
 		mid_init_cb->options = cpu_to_le16(BIT_1);
 		mid_init_cb->init_cb.execution_throttle =
 		    cpu_to_le16(ha->cur_fw_xcb_count);
-		/* D-Port Status */
-		if (IS_DPORT_CAPABLE(ha))
-			mid_init_cb->init_cb.firmware_options_1 |=
-			    cpu_to_le16(BIT_7);
-		/* Enable FA-WWPN */
+		ha->flags.dport_enabled =
+		    (mid_init_cb->init_cb.firmware_options_1 & BIT_7) != 0;
+		ql_dbg(ql_dbg_init, vha, 0x0191, "DPORT Support: %s.\n",
+		    (ha->flags.dport_enabled) ? "enabled" : "disabled");
+		/* FA-WWPN Status */
 		ha->flags.fawwpn_enabled =
-		    (mid_init_cb->init_cb.firmware_options_1 & BIT_6) ? 1 : 0;
+		    (mid_init_cb->init_cb.firmware_options_1 & BIT_6) != 0;
 		ql_dbg(ql_dbg_init, vha, 0x0141, "FA-WWPN Support: %s.\n",
 		    (ha->flags.fawwpn_enabled) ? "enabled" : "disabled");
 	}
-- 
2.7.2


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

* [PATCH 13/19] qla2xxx: Add support to handle Loop Init error Asynchronus event.
  2016-07-06 15:14 [PATCH 00/19] qla2xxx: Patches for scsi "misc" branch Himanshu Madhani
                   ` (11 preceding siblings ...)
  2016-07-06 15:14 ` [PATCH 12/19] qla2xxx: Let DPORT be enabled purely by nvram Himanshu Madhani
@ 2016-07-06 15:14 ` Himanshu Madhani
  2016-07-15 12:58   ` Hannes Reinecke
  2016-07-06 15:14 ` [PATCH 14/19] qla2xxx: Correction to function qla26xx_dport_diagnostics() Himanshu Madhani
                   ` (6 subsequent siblings)
  19 siblings, 1 reply; 41+ messages in thread
From: Himanshu Madhani @ 2016-07-06 15:14 UTC (permalink / raw)
  To: James.Bottomley, martin.petersen
  Cc: giridhar.malavali, himanshu.madhani, linux-scsi

From: Joe Carnuccio <joe.carnuccio@qlogic.com>

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_dbg.c |  2 +-
 drivers/scsi/qla2xxx/qla_isr.c | 11 +++++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
index eebd1a58..288338d 100644
--- a/drivers/scsi/qla2xxx/qla_dbg.c
+++ b/drivers/scsi/qla2xxx/qla_dbg.c
@@ -30,7 +30,7 @@
  * |				  | 		       | 0x5047         |
  * |                              |                    | 0x5084,0x5075	|
  * |                              |                    | 0x503d,0x5044  |
- * |                              |                    | 0x507b,0x505f	|
+ * |                              |                    | 0x505f		|
  * | Timer Routines               |       0x6012       |                |
  * | User Space Interactions      |       0x70e3       | 0x7018,0x702e  |
  * |				  |		       | 0x7020,0x7024  |
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index b8d0b78a..134ad2f 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -710,16 +710,23 @@ skip_rio:
 
 	case MBA_RSP_TRANSFER_ERR:	/* Response Transfer Error */
 		ql_log(ql_log_warn, vha, 0x5007,
-		    "ISP Response Transfer Error.\n");
+		    "ISP Response Transfer Error (%x).\n", mb[1]);
 
 		set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
 		break;
 
 	case MBA_WAKEUP_THRES:		/* Request Queue Wake-up */
 		ql_dbg(ql_dbg_async, vha, 0x5008,
-		    "Asynchronous WAKEUP_THRES.\n");
+		    "Asynchronous WAKEUP_THRES (%x).\n", mb[1]);
+		break;
 
+	case MBA_LOOP_INIT_ERR:
+		ql_log(ql_log_warn, vha, 0x507b,
+		    "LOOP INIT ERROR (%x).\n", mb[1]);
+		ha->isp_ops->fw_dump(vha, 1);
+		set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
 		break;
+
 	case MBA_LIP_OCCURRED:		/* Loop Initialization Procedure */
 		ql_dbg(ql_dbg_async, vha, 0x5009,
 		    "LIP occurred (%x).\n", mb[1]);
-- 
2.7.2


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

* [PATCH 14/19] qla2xxx: Correction to function qla26xx_dport_diagnostics().
  2016-07-06 15:14 [PATCH 00/19] qla2xxx: Patches for scsi "misc" branch Himanshu Madhani
                   ` (12 preceding siblings ...)
  2016-07-06 15:14 ` [PATCH 13/19] qla2xxx: Add support to handle Loop Init error Asynchronus event Himanshu Madhani
@ 2016-07-06 15:14 ` Himanshu Madhani
  2016-07-15 12:59   ` Hannes Reinecke
  2016-07-06 15:14 ` [PATCH 15/19] qla2xxx: Separate ISP type bits out from device type Himanshu Madhani
                   ` (5 subsequent siblings)
  19 siblings, 1 reply; 41+ messages in thread
From: Himanshu Madhani @ 2016-07-06 15:14 UTC (permalink / raw)
  To: James.Bottomley, martin.petersen
  Cc: giridhar.malavali, himanshu.madhani, linux-scsi

From: Joe Carnuccio <joe.carnuccio@qlogic.com>

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_dbg.c | 2 +-
 drivers/scsi/qla2xxx/qla_isr.c | 8 +++-----
 drivers/scsi/qla2xxx/qla_mbx.c | 5 -----
 3 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
index 288338d..1a04270 100644
--- a/drivers/scsi/qla2xxx/qla_dbg.c
+++ b/drivers/scsi/qla2xxx/qla_dbg.c
@@ -14,7 +14,7 @@
  * | Module Init and Probe        |       0x0191       | 0x0146         |
  * |                              |                    | 0x015b-0x0160	|
  * |                              |                    | 0x016e		|
- * | Mailbox commands             |       0x1196       |		|
+ * | Mailbox commands             |       0x1196       | 0x1193		|
  * |                              |                    |		|
  * | Device Discovery             |       0x2003       | 0x2016		|
  * |                              |                    | 0x2011-0x2012, |
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 134ad2f..1b87977 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -1159,13 +1159,11 @@ global_port_update:
 
 	case MBA_DPORT_DIAGNOSTICS:
 		ql_dbg(ql_dbg_async, vha, 0x5052,
-		    "D-Port Diagnostics: %04x result=%s index=%u size=%u\n",
+		    "D-Port Diagnostics: %04x result=%s\n",
 		    mb[0],
 		    mb[1] == 0 ? "start" :
-		    mb[1] == 1 ? "done (ok)" :
-		    mb[1] == 2 ? "done (error)" : "other",
-		    LSB(mb[2]),
-		    mb[3]);
+		    mb[1] == 1 ? "done (pass)" :
+		    mb[1] == 2 ? "done (error)" : "other");
 		break;
 
 	case MBA_TEMPERATURE_ALERT:
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index 0f7b83a..bf16e6f 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -5764,11 +5764,6 @@ qla26xx_dport_diagnostics(scsi_qla_host_t *vha,
 	ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1192,
 	    "Entered %s.\n", __func__);
 
-	if (size < 1024) {
-		ql_log(ql_log_warn, vha, 0x1193, "Failed insufficient size.\n");
-		return QLA_FUNCTION_PARAMETER_ERROR;
-	}
-
 	dd_dma = dma_map_single(&vha->hw->pdev->dev,
 	    dd_buf, size, DMA_FROM_DEVICE);
 	if (!dd_dma) {
-- 
2.7.2


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

* [PATCH 15/19] qla2xxx: Separate ISP type bits out from device type.
  2016-07-06 15:14 [PATCH 00/19] qla2xxx: Patches for scsi "misc" branch Himanshu Madhani
                   ` (13 preceding siblings ...)
  2016-07-06 15:14 ` [PATCH 14/19] qla2xxx: Correction to function qla26xx_dport_diagnostics() Himanshu Madhani
@ 2016-07-06 15:14 ` Himanshu Madhani
  2016-07-15 13:01   ` Hannes Reinecke
  2016-07-06 15:14 ` [PATCH 16/19] qla2xxx: Disable the adapter and skip error recovery in case of register disconnect Himanshu Madhani
                   ` (4 subsequent siblings)
  19 siblings, 1 reply; 41+ messages in thread
From: Himanshu Madhani @ 2016-07-06 15:14 UTC (permalink / raw)
  To: James.Bottomley, martin.petersen
  Cc: giridhar.malavali, himanshu.madhani, linux-scsi

From: Joe Carnuccio <joe.carnuccio@qlogic.com>

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_def.h |  6 ++++--
 drivers/scsi/qla2xxx/qla_os.c  | 44 +++++++++++++++++++++---------------------
 2 files changed, 26 insertions(+), 24 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index c04d83e..ae4a747 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -3130,7 +3130,7 @@ struct qla_hw_data {
 #define PCI_DEVICE_ID_QLOGIC_ISP2271	0x2271
 #define PCI_DEVICE_ID_QLOGIC_ISP2261	0x2261
 
-	uint32_t	device_type;
+	uint32_t	isp_type;
 #define DT_ISP2100                      BIT_0
 #define DT_ISP2200                      BIT_1
 #define DT_ISP2300                      BIT_2
@@ -3155,6 +3155,7 @@ struct qla_hw_data {
 #define DT_ISP2261			BIT_21
 #define DT_ISP_LAST			(DT_ISP2261 << 1)
 
+	uint32_t	device_type;
 #define DT_T10_PI                       BIT_25
 #define DT_IIDMA                        BIT_26
 #define DT_FWI2                         BIT_27
@@ -3162,7 +3163,8 @@ struct qla_hw_data {
 #define DT_OEM_001                      BIT_29
 #define DT_ISP2200A                     BIT_30
 #define DT_EXTENDED_IDS                 BIT_31
-#define DT_MASK(ha)     ((ha)->device_type & (DT_ISP_LAST - 1))
+
+#define DT_MASK(ha)     ((ha)->isp_type & (DT_ISP_LAST - 1))
 #define IS_QLA2100(ha)  (DT_MASK(ha) & DT_ISP2100)
 #define IS_QLA2200(ha)  (DT_MASK(ha) & DT_ISP2200)
 #define IS_QLA2300(ha)  (DT_MASK(ha) & DT_ISP2300)
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index fde7ee1..dc7e583 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -2110,27 +2110,27 @@ qla2x00_set_isp_flags(struct qla_hw_data *ha)
 	ha->device_type = DT_EXTENDED_IDS;
 	switch (ha->pdev->device) {
 	case PCI_DEVICE_ID_QLOGIC_ISP2100:
-		ha->device_type |= DT_ISP2100;
+		ha->isp_type |= DT_ISP2100;
 		ha->device_type &= ~DT_EXTENDED_IDS;
 		ha->fw_srisc_address = RISC_START_ADDRESS_2100;
 		break;
 	case PCI_DEVICE_ID_QLOGIC_ISP2200:
-		ha->device_type |= DT_ISP2200;
+		ha->isp_type |= DT_ISP2200;
 		ha->device_type &= ~DT_EXTENDED_IDS;
 		ha->fw_srisc_address = RISC_START_ADDRESS_2100;
 		break;
 	case PCI_DEVICE_ID_QLOGIC_ISP2300:
-		ha->device_type |= DT_ISP2300;
+		ha->isp_type |= DT_ISP2300;
 		ha->device_type |= DT_ZIO_SUPPORTED;
 		ha->fw_srisc_address = RISC_START_ADDRESS_2300;
 		break;
 	case PCI_DEVICE_ID_QLOGIC_ISP2312:
-		ha->device_type |= DT_ISP2312;
+		ha->isp_type |= DT_ISP2312;
 		ha->device_type |= DT_ZIO_SUPPORTED;
 		ha->fw_srisc_address = RISC_START_ADDRESS_2300;
 		break;
 	case PCI_DEVICE_ID_QLOGIC_ISP2322:
-		ha->device_type |= DT_ISP2322;
+		ha->isp_type |= DT_ISP2322;
 		ha->device_type |= DT_ZIO_SUPPORTED;
 		if (ha->pdev->subsystem_vendor == 0x1028 &&
 		    ha->pdev->subsystem_device == 0x0170)
@@ -2138,60 +2138,60 @@ qla2x00_set_isp_flags(struct qla_hw_data *ha)
 		ha->fw_srisc_address = RISC_START_ADDRESS_2300;
 		break;
 	case PCI_DEVICE_ID_QLOGIC_ISP6312:
-		ha->device_type |= DT_ISP6312;
+		ha->isp_type |= DT_ISP6312;
 		ha->fw_srisc_address = RISC_START_ADDRESS_2300;
 		break;
 	case PCI_DEVICE_ID_QLOGIC_ISP6322:
-		ha->device_type |= DT_ISP6322;
+		ha->isp_type |= DT_ISP6322;
 		ha->fw_srisc_address = RISC_START_ADDRESS_2300;
 		break;
 	case PCI_DEVICE_ID_QLOGIC_ISP2422:
-		ha->device_type |= DT_ISP2422;
+		ha->isp_type |= DT_ISP2422;
 		ha->device_type |= DT_ZIO_SUPPORTED;
 		ha->device_type |= DT_FWI2;
 		ha->device_type |= DT_IIDMA;
 		ha->fw_srisc_address = RISC_START_ADDRESS_2400;
 		break;
 	case PCI_DEVICE_ID_QLOGIC_ISP2432:
-		ha->device_type |= DT_ISP2432;
+		ha->isp_type |= DT_ISP2432;
 		ha->device_type |= DT_ZIO_SUPPORTED;
 		ha->device_type |= DT_FWI2;
 		ha->device_type |= DT_IIDMA;
 		ha->fw_srisc_address = RISC_START_ADDRESS_2400;
 		break;
 	case PCI_DEVICE_ID_QLOGIC_ISP8432:
-		ha->device_type |= DT_ISP8432;
+		ha->isp_type |= DT_ISP8432;
 		ha->device_type |= DT_ZIO_SUPPORTED;
 		ha->device_type |= DT_FWI2;
 		ha->device_type |= DT_IIDMA;
 		ha->fw_srisc_address = RISC_START_ADDRESS_2400;
 		break;
 	case PCI_DEVICE_ID_QLOGIC_ISP5422:
-		ha->device_type |= DT_ISP5422;
+		ha->isp_type |= DT_ISP5422;
 		ha->device_type |= DT_FWI2;
 		ha->fw_srisc_address = RISC_START_ADDRESS_2400;
 		break;
 	case PCI_DEVICE_ID_QLOGIC_ISP5432:
-		ha->device_type |= DT_ISP5432;
+		ha->isp_type |= DT_ISP5432;
 		ha->device_type |= DT_FWI2;
 		ha->fw_srisc_address = RISC_START_ADDRESS_2400;
 		break;
 	case PCI_DEVICE_ID_QLOGIC_ISP2532:
-		ha->device_type |= DT_ISP2532;
+		ha->isp_type |= DT_ISP2532;
 		ha->device_type |= DT_ZIO_SUPPORTED;
 		ha->device_type |= DT_FWI2;
 		ha->device_type |= DT_IIDMA;
 		ha->fw_srisc_address = RISC_START_ADDRESS_2400;
 		break;
 	case PCI_DEVICE_ID_QLOGIC_ISP8001:
-		ha->device_type |= DT_ISP8001;
+		ha->isp_type |= DT_ISP8001;
 		ha->device_type |= DT_ZIO_SUPPORTED;
 		ha->device_type |= DT_FWI2;
 		ha->device_type |= DT_IIDMA;
 		ha->fw_srisc_address = RISC_START_ADDRESS_2400;
 		break;
 	case PCI_DEVICE_ID_QLOGIC_ISP8021:
-		ha->device_type |= DT_ISP8021;
+		ha->isp_type |= DT_ISP8021;
 		ha->device_type |= DT_ZIO_SUPPORTED;
 		ha->device_type |= DT_FWI2;
 		ha->fw_srisc_address = RISC_START_ADDRESS_2400;
@@ -2199,7 +2199,7 @@ qla2x00_set_isp_flags(struct qla_hw_data *ha)
 		qla82xx_init_flags(ha);
 		break;
 	 case PCI_DEVICE_ID_QLOGIC_ISP8044:
-		ha->device_type |= DT_ISP8044;
+		ha->isp_type |= DT_ISP8044;
 		ha->device_type |= DT_ZIO_SUPPORTED;
 		ha->device_type |= DT_FWI2;
 		ha->fw_srisc_address = RISC_START_ADDRESS_2400;
@@ -2207,7 +2207,7 @@ qla2x00_set_isp_flags(struct qla_hw_data *ha)
 		qla82xx_init_flags(ha);
 		break;
 	case PCI_DEVICE_ID_QLOGIC_ISP2031:
-		ha->device_type |= DT_ISP2031;
+		ha->isp_type |= DT_ISP2031;
 		ha->device_type |= DT_ZIO_SUPPORTED;
 		ha->device_type |= DT_FWI2;
 		ha->device_type |= DT_IIDMA;
@@ -2215,7 +2215,7 @@ qla2x00_set_isp_flags(struct qla_hw_data *ha)
 		ha->fw_srisc_address = RISC_START_ADDRESS_2400;
 		break;
 	case PCI_DEVICE_ID_QLOGIC_ISP8031:
-		ha->device_type |= DT_ISP8031;
+		ha->isp_type |= DT_ISP8031;
 		ha->device_type |= DT_ZIO_SUPPORTED;
 		ha->device_type |= DT_FWI2;
 		ha->device_type |= DT_IIDMA;
@@ -2223,10 +2223,10 @@ qla2x00_set_isp_flags(struct qla_hw_data *ha)
 		ha->fw_srisc_address = RISC_START_ADDRESS_2400;
 		break;
 	case PCI_DEVICE_ID_QLOGIC_ISPF001:
-		ha->device_type |= DT_ISPFX00;
+		ha->isp_type |= DT_ISPFX00;
 		break;
 	case PCI_DEVICE_ID_QLOGIC_ISP2071:
-		ha->device_type |= DT_ISP2071;
+		ha->isp_type |= DT_ISP2071;
 		ha->device_type |= DT_ZIO_SUPPORTED;
 		ha->device_type |= DT_FWI2;
 		ha->device_type |= DT_IIDMA;
@@ -2234,7 +2234,7 @@ qla2x00_set_isp_flags(struct qla_hw_data *ha)
 		ha->fw_srisc_address = RISC_START_ADDRESS_2400;
 		break;
 	case PCI_DEVICE_ID_QLOGIC_ISP2271:
-		ha->device_type |= DT_ISP2271;
+		ha->isp_type |= DT_ISP2271;
 		ha->device_type |= DT_ZIO_SUPPORTED;
 		ha->device_type |= DT_FWI2;
 		ha->device_type |= DT_IIDMA;
@@ -2242,7 +2242,7 @@ qla2x00_set_isp_flags(struct qla_hw_data *ha)
 		ha->fw_srisc_address = RISC_START_ADDRESS_2400;
 		break;
 	case PCI_DEVICE_ID_QLOGIC_ISP2261:
-		ha->device_type |= DT_ISP2261;
+		ha->isp_type |= DT_ISP2261;
 		ha->device_type |= DT_ZIO_SUPPORTED;
 		ha->device_type |= DT_FWI2;
 		ha->device_type |= DT_IIDMA;
-- 
2.7.2


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

* [PATCH 16/19] qla2xxx: Disable the adapter and skip error recovery in case of register disconnect.
  2016-07-06 15:14 [PATCH 00/19] qla2xxx: Patches for scsi "misc" branch Himanshu Madhani
                   ` (14 preceding siblings ...)
  2016-07-06 15:14 ` [PATCH 15/19] qla2xxx: Separate ISP type bits out from device type Himanshu Madhani
@ 2016-07-06 15:14 ` Himanshu Madhani
  2016-07-15 13:02   ` Hannes Reinecke
  2016-07-06 15:14 ` [PATCH 17/19] qla2xxx: Fix duplicate message id Himanshu Madhani
                   ` (3 subsequent siblings)
  19 siblings, 1 reply; 41+ messages in thread
From: Himanshu Madhani @ 2016-07-06 15:14 UTC (permalink / raw)
  To: James.Bottomley, martin.petersen
  Cc: giridhar.malavali, himanshu.madhani, linux-scsi

From: Sawan Chandak <sawan.chandak@qlogic.com>

If there is error recovery going on due to command timeout and
there is register disconnect, then disable the adapter.

Signed-off-by: Sawan Chandak <sawan.chandak@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_attr.c |  3 +++
 drivers/scsi/qla2xxx/qla_dbg.c  |  2 +-
 drivers/scsi/qla2xxx/qla_os.c   | 55 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 59 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index 8b06ce8..fe7469c 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -1769,6 +1769,9 @@ qla2x00_terminate_rport_io(struct fc_rport *rport)
 	if (!fcport)
 		return;
 
+	if (test_bit(UNLOADING, &fcport->vha->dpc_flags))
+		return;
+
 	if (test_bit(ABORT_ISP_ACTIVE, &fcport->vha->dpc_flags))
 		return;
 
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
index 1a04270..97b0a9d 100644
--- a/drivers/scsi/qla2xxx/qla_dbg.c
+++ b/drivers/scsi/qla2xxx/qla_dbg.c
@@ -41,7 +41,7 @@
  * |                              |                    | 0x70ad-0x70ae  |
  * |                              |                    | 0x70d0-0x70d6	|
  * |                              |                    | 0x70d7-0x70db  |
- * | Task Management              |       0x803d       | 0x8000,0x800b  |
+ * | Task Management              |       0x8042       | 0x8000,0x800b  |
  * |                              |                    | 0x8019         |
  * |                              |                    | 0x8025,0x8026  |
  * |                              |                    | 0x8031,0x8032  |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index dc7e583..2674f4c 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -943,6 +943,30 @@ sp_get(struct srb *sp)
 	atomic_inc(&sp->ref_count);
 }
 
+#define ISP_REG_DISCONNECT 0xffffffffU
+/**************************************************************************
+* qla2x00_isp_reg_stat
+*
+* Description:
+*	Read the host status register of ISP before aborting the command.
+*
+* Input:
+*	ha = pointer to host adapter structure.
+*
+*
+* Returns:
+*	Either true or false.
+*
+* Note:	Return true if there is register disconnect.
+**************************************************************************/
+static inline
+uint32_t qla2x00_isp_reg_stat(struct qla_hw_data *ha)
+{
+	struct device_reg_24xx __iomem *reg = &ha->iobase->isp24;
+
+	return ((RD_REG_DWORD(&reg->host_status)) == ISP_REG_DISCONNECT);
+}
+
 /**************************************************************************
 * qla2xxx_eh_abort
 *
@@ -970,6 +994,11 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
 	int rval, wait = 0;
 	struct qla_hw_data *ha = vha->hw;
 
+	if (qla2x00_isp_reg_stat(ha)) {
+		ql_log(ql_log_info, vha, 0x8042,
+		    "PCI/Register disconnect, exiting.\n");
+		return FAILED;
+	}
 	if (!CMD_SP(cmd))
 		return SUCCESS;
 
@@ -1153,6 +1182,12 @@ qla2xxx_eh_device_reset(struct scsi_cmnd *cmd)
 	scsi_qla_host_t *vha = shost_priv(cmd->device->host);
 	struct qla_hw_data *ha = vha->hw;
 
+	if (qla2x00_isp_reg_stat(ha)) {
+		ql_log(ql_log_info, vha, 0x803e,
+		    "PCI/Register disconnect, exiting.\n");
+		return FAILED;
+	}
+
 	return __qla2xxx_eh_generic_reset("DEVICE", WAIT_LUN, cmd,
 	    ha->isp_ops->lun_reset);
 }
@@ -1163,6 +1198,12 @@ qla2xxx_eh_target_reset(struct scsi_cmnd *cmd)
 	scsi_qla_host_t *vha = shost_priv(cmd->device->host);
 	struct qla_hw_data *ha = vha->hw;
 
+	if (qla2x00_isp_reg_stat(ha)) {
+		ql_log(ql_log_info, vha, 0x803f,
+		    "PCI/Register disconnect, exiting.\n");
+		return FAILED;
+	}
+
 	return __qla2xxx_eh_generic_reset("TARGET", WAIT_TARGET, cmd,
 	    ha->isp_ops->target_reset);
 }
@@ -1190,6 +1231,13 @@ qla2xxx_eh_bus_reset(struct scsi_cmnd *cmd)
 	int ret = FAILED;
 	unsigned int id;
 	uint64_t lun;
+	struct qla_hw_data *ha = vha->hw;
+
+	if (qla2x00_isp_reg_stat(ha)) {
+		ql_log(ql_log_info, vha, 0x8040,
+		    "PCI/Register disconnect, exiting.\n");
+		return FAILED;
+	}
 
 	id = cmd->device->id;
 	lun = cmd->device->lun;
@@ -1259,6 +1307,13 @@ qla2xxx_eh_host_reset(struct scsi_cmnd *cmd)
 	uint64_t lun;
 	scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev);
 
+	if (qla2x00_isp_reg_stat(ha)) {
+		ql_log(ql_log_info, vha, 0x8041,
+		    "PCI/Register disconnect, exiting.\n");
+		schedule_work(&ha->board_disable);
+		return SUCCESS;
+	}
+
 	id = cmd->device->id;
 	lun = cmd->device->lun;
 
-- 
2.7.2


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

* [PATCH 17/19] qla2xxx: Fix duplicate message id.
  2016-07-06 15:14 [PATCH 00/19] qla2xxx: Patches for scsi "misc" branch Himanshu Madhani
                   ` (15 preceding siblings ...)
  2016-07-06 15:14 ` [PATCH 16/19] qla2xxx: Disable the adapter and skip error recovery in case of register disconnect Himanshu Madhani
@ 2016-07-06 15:14 ` Himanshu Madhani
  2016-07-15 13:02   ` Hannes Reinecke
  2016-07-06 15:14 ` [PATCH 18/19] qla2xxx: Fix BBCR offset Himanshu Madhani
                   ` (2 subsequent siblings)
  19 siblings, 1 reply; 41+ messages in thread
From: Himanshu Madhani @ 2016-07-06 15:14 UTC (permalink / raw)
  To: James.Bottomley, martin.petersen
  Cc: giridhar.malavali, himanshu.madhani, linux-scsi

From: Sawan Chandak <sawan.chandak@qlogic.com>

Signed-off-by: Sawan Chandak <sawan.chandak@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_dbg.c | 7 +++----
 drivers/scsi/qla2xxx/qla_isr.c | 2 +-
 drivers/scsi/qla2xxx/qla_mbx.c | 4 ++--
 3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
index 97b0a9d..45af34d 100644
--- a/drivers/scsi/qla2xxx/qla_dbg.c
+++ b/drivers/scsi/qla2xxx/qla_dbg.c
@@ -14,9 +14,8 @@
  * | Module Init and Probe        |       0x0191       | 0x0146         |
  * |                              |                    | 0x015b-0x0160	|
  * |                              |                    | 0x016e		|
- * | Mailbox commands             |       0x1196       | 0x1193		|
- * |                              |                    |		|
- * | Device Discovery             |       0x2003       | 0x2016		|
+ * | Mailbox commands             |       0x1199       | 0x1193		|
+ * | Device Discovery             |       0x2004       | 0x2016		|
  * |                              |                    | 0x2011-0x2012, |
  * |                              |                    | 0x2099-0x20a4  |
  * | Queue Command and IO tracing |       0x3074       | 0x300b         |
@@ -26,7 +25,7 @@
  * |                              |                    | 0x3036,0x3038  |
  * |                              |                    | 0x303a		|
  * | DPC Thread                   |       0x4023       | 0x4002,0x4013  |
- * | Async Events                 |       0x5089       | 0x502b-0x502f  |
+ * | Async Events                 |       0x5090       | 0x502b-0x502f  |
  * |				  | 		       | 0x5047         |
  * |                              |                    | 0x5084,0x5075	|
  * |                              |                    | 0x503d,0x5044  |
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 1b87977..90b3c2e 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -721,7 +721,7 @@ skip_rio:
 		break;
 
 	case MBA_LOOP_INIT_ERR:
-		ql_log(ql_log_warn, vha, 0x507b,
+		ql_log(ql_log_warn, vha, 0x5090,
 		    "LOOP INIT ERROR (%x).\n", mb[1]);
 		ha->isp_ops->fw_dump(vha, 1);
 		set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index bf16e6f..23698c9 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -404,7 +404,7 @@ mbx_done:
 		    "**** Failed mbx[0]=%x, mb[1]=%x, mb[2]=%x, mb[3]=%x, cmd=%x ****.\n",
 		    mcp->mb[0], mcp->mb[1], mcp->mb[2], mcp->mb[3], command);
 
-		ql_dbg(ql_dbg_disc, vha, 0x1115,
+		ql_dbg(ql_dbg_mbx, vha, 0x1198,
 		    "host status: 0x%x, flags:0x%lx, intr ctrl reg:0x%x, intr status:0x%x\n",
 		    RD_REG_DWORD(&reg->isp24.host_status),
 		    ha->fw_dump_cap_flags,
@@ -413,7 +413,7 @@ mbx_done:
 
 		mbx_reg = &reg->isp24.mailbox0;
 		for (i = 0; i < 6; i++)
-			ql_dbg(ql_dbg_disc + ql_dbg_verbose, vha, 0x1116,
+			ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1199,
 			    "mbox[%d] 0x%04x\n", i, RD_REG_WORD(mbx_reg++));
 	} else {
 		ql_dbg(ql_dbg_mbx, base_vha, 0x1021, "Done %s.\n", __func__);
-- 
2.7.2


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

* [PATCH 18/19] qla2xxx: Fix BBCR offset
  2016-07-06 15:14 [PATCH 00/19] qla2xxx: Patches for scsi "misc" branch Himanshu Madhani
                   ` (16 preceding siblings ...)
  2016-07-06 15:14 ` [PATCH 17/19] qla2xxx: Fix duplicate message id Himanshu Madhani
@ 2016-07-06 15:14 ` Himanshu Madhani
  2016-07-15 13:03   ` Hannes Reinecke
  2016-07-06 15:14 ` [PATCH 19/19] qla2xxx: Update driver version to 8.07.00.38-k Himanshu Madhani
  2016-07-15 19:39 ` [PATCH 00/19] qla2xxx: Patches for scsi "misc" branch Martin K. Petersen
  19 siblings, 1 reply; 41+ messages in thread
From: Himanshu Madhani @ 2016-07-06 15:14 UTC (permalink / raw)
  To: James.Bottomley, martin.petersen
  Cc: giridhar.malavali, himanshu.madhani, linux-scsi

From: Sawan Chandak <sawan.chandak@qlogic.com>

Fixes: 969a619 ("qla2xxx: Add support for buffer to buffer credit value for ISP27XX.")
Signed-off-by: Sawan Chandak <sawan.chandak@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_fw.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qla2xxx/qla_fw.h b/drivers/scsi/qla2xxx/qla_fw.h
index 4c0f3a7..8a2368b 100644
--- a/drivers/scsi/qla2xxx/qla_fw.h
+++ b/drivers/scsi/qla2xxx/qla_fw.h
@@ -1288,7 +1288,7 @@ struct vp_rpt_id_entry_24xx {
 
 	uint8_t vp_idx_map[16];
 
-	uint8_t reserved_4[28];
+	uint8_t reserved_4[24];
 	uint16_t bbcr;
 	uint8_t reserved_5[6];
 };
-- 
2.7.2


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

* [PATCH 19/19] qla2xxx: Update driver version to 8.07.00.38-k
  2016-07-06 15:14 [PATCH 00/19] qla2xxx: Patches for scsi "misc" branch Himanshu Madhani
                   ` (17 preceding siblings ...)
  2016-07-06 15:14 ` [PATCH 18/19] qla2xxx: Fix BBCR offset Himanshu Madhani
@ 2016-07-06 15:14 ` Himanshu Madhani
  2016-07-15 13:03   ` Hannes Reinecke
  2016-07-15 19:39 ` [PATCH 00/19] qla2xxx: Patches for scsi "misc" branch Martin K. Petersen
  19 siblings, 1 reply; 41+ messages in thread
From: Himanshu Madhani @ 2016-07-06 15:14 UTC (permalink / raw)
  To: James.Bottomley, martin.petersen
  Cc: giridhar.malavali, himanshu.madhani, linux-scsi

Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_version.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h
index 0bc93fa..3cb1964 100644
--- a/drivers/scsi/qla2xxx/qla_version.h
+++ b/drivers/scsi/qla2xxx/qla_version.h
@@ -7,7 +7,7 @@
 /*
  * Driver version
  */
-#define QLA2XXX_VERSION      "8.07.00.33-k"
+#define QLA2XXX_VERSION      "8.07.00.38-k"
 
 #define QLA_DRIVER_MAJOR_VER	8
 #define QLA_DRIVER_MINOR_VER	7
-- 
2.7.2


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

* Re: [PATCH 11/19] qla2xxx: Add bsg interface to support statistics counter reset.
  2016-07-06 15:14 ` [PATCH 11/19] qla2xxx: Add bsg interface to support statistics counter reset Himanshu Madhani
@ 2016-07-06 16:36   ` kbuild test robot
  2016-07-15 12:56   ` Hannes Reinecke
  1 sibling, 0 replies; 41+ messages in thread
From: kbuild test robot @ 2016-07-06 16:36 UTC (permalink / raw)
  Cc: kbuild-all, James.Bottomley, martin.petersen, giridhar.malavali,
	himanshu.madhani, linux-scsi

[-- Attachment #1: Type: text/plain, Size: 2464 bytes --]

Hi,

[auto build test WARNING on scsi/for-next]
[also build test WARNING on v4.7-rc6 next-20160706]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Himanshu-Madhani/qla2xxx-Patches-for-scsi-misc-branch/20160707-000429
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: sparc64-allyesconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 5.3.1-8) 5.3.1 20160205
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=sparc64 

All warnings (new ones prefixed by >>):

   drivers/scsi/qla2xxx/qla_bsg.c: In function 'qla2x00_get_priv_stats':
>> drivers/scsi/qla2xxx/qla_bsg.c:2295:1: warning: label 'done' defined but not used [-Wunused-label]
    done:
    ^
>> drivers/scsi/qla2xxx/qla_bsg.c:2292:1: warning: label 'done_free' defined but not used [-Wunused-label]
    done_free:
    ^

vim +/done +2295 drivers/scsi/qla2xxx/qla_bsg.c

181330c1 Sawan Chandak    2016-07-06  2286  	    rval ? EXT_STATUS_MAILBOX : EXT_STATUS_OK;
243de676 Harish Zunjarrao 2016-01-27  2287  
181330c1 Sawan Chandak    2016-07-06  2288  	bsg_job->reply_len = sizeof(*bsg_job->reply);
243de676 Harish Zunjarrao 2016-01-27  2289  	bsg_job->reply->result = DID_OK << 16;
243de676 Harish Zunjarrao 2016-01-27  2290  	bsg_job->job_done(bsg_job);
243de676 Harish Zunjarrao 2016-01-27  2291  
243de676 Harish Zunjarrao 2016-01-27 @2292  done_free:
181330c1 Sawan Chandak    2016-07-06  2293  	dma_free_coherent(&ha->pdev->dev, sizeof(*stats),
243de676 Harish Zunjarrao 2016-01-27  2294  		stats, stats_dma);
243de676 Harish Zunjarrao 2016-01-27 @2295  done:
181330c1 Sawan Chandak    2016-07-06  2296  	return 0;
243de676 Harish Zunjarrao 2016-01-27  2297  }
243de676 Harish Zunjarrao 2016-01-27  2298  

:::::: The code at line 2295 was first introduced by commit
:::::: 243de6768db50266f595ec62c5ae34783edb72ea qla2xxx: Add support for Private link statistics counters.

:::::: TO: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
:::::: CC: Martin K. Petersen <martin.petersen@oracle.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 46467 bytes --]

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

* Re: [PATCH 01/19] qla2xxx: Remove sysfs node fw_dump_template.
  2016-07-06 15:14 ` [PATCH 01/19] qla2xxx: Remove sysfs node fw_dump_template Himanshu Madhani
@ 2016-07-15 12:49   ` Hannes Reinecke
  0 siblings, 0 replies; 41+ messages in thread
From: Hannes Reinecke @ 2016-07-15 12:49 UTC (permalink / raw)
  To: Himanshu Madhani, James.Bottomley, martin.petersen
  Cc: giridhar.malavali, linux-scsi

On 07/06/2016 05:14 PM, Himanshu Madhani wrote:
> From: Joe Carnuccio <joe.carnuccio@qlogic.com>
> 
> Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
> ---
>  drivers/scsi/qla2xxx/qla_attr.c | 89 -----------------------------------------
>  drivers/scsi/qla2xxx/qla_dbg.c  |  1 +
>  2 files changed, 1 insertion(+), 89 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 02/19] qla2xxx: Add ram area DDR for fwdump template entry T262.
  2016-07-06 15:14 ` [PATCH 02/19] qla2xxx: Add ram area DDR for fwdump template entry T262 Himanshu Madhani
@ 2016-07-15 12:49   ` Hannes Reinecke
  0 siblings, 0 replies; 41+ messages in thread
From: Hannes Reinecke @ 2016-07-15 12:49 UTC (permalink / raw)
  To: Himanshu Madhani, James.Bottomley, martin.petersen
  Cc: giridhar.malavali, linux-scsi

On 07/06/2016 05:14 PM, Himanshu Madhani wrote:
> From: Joe Carnuccio <joe.carnuccio@qlogic.com>
> 
> Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
> ---
>  drivers/scsi/qla2xxx/qla_def.h  | 2 ++
>  drivers/scsi/qla2xxx/qla_mbx.c  | 7 +++++--
>  drivers/scsi/qla2xxx/qla_tmpl.c | 9 ++++++++-
>  3 files changed, 15 insertions(+), 3 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 03/19] qla2xxx: Shutdown board on thermal shutdown aen.
  2016-07-06 15:14 ` [PATCH 03/19] qla2xxx: Shutdown board on thermal shutdown aen Himanshu Madhani
@ 2016-07-15 12:50   ` Hannes Reinecke
  0 siblings, 0 replies; 41+ messages in thread
From: Hannes Reinecke @ 2016-07-15 12:50 UTC (permalink / raw)
  To: Himanshu Madhani, James.Bottomley, martin.petersen
  Cc: giridhar.malavali, linux-scsi

On 07/06/2016 05:14 PM, Himanshu Madhani wrote:
> From: Joe Carnuccio <joe.carnuccio@qlogic.com>
> 
> Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
> ---
>  drivers/scsi/qla2xxx/qla_dbg.c |  2 +-
>  drivers/scsi/qla2xxx/qla_def.h |  1 +
>  drivers/scsi/qla2xxx/qla_isr.c |  7 +++++++
>  drivers/scsi/qla2xxx/qla_os.c  | 10 ++++++++++
>  4 files changed, 19 insertions(+), 1 deletion(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 04/19] qla2xxx: Set FLOGI retry in additional firmware options for P2P (N2N) mode.
  2016-07-06 15:14 ` [PATCH 04/19] qla2xxx: Set FLOGI retry in additional firmware options for P2P (N2N) mode Himanshu Madhani
@ 2016-07-15 12:51   ` Hannes Reinecke
  0 siblings, 0 replies; 41+ messages in thread
From: Hannes Reinecke @ 2016-07-15 12:51 UTC (permalink / raw)
  To: Himanshu Madhani, James.Bottomley, martin.petersen
  Cc: giridhar.malavali, linux-scsi

On 07/06/2016 05:14 PM, Himanshu Madhani wrote:
> From: Giridhar Malavali <giridhar.malavali@qlogic.com>
> 
> When VP decoupling enabled, there could be a window where, FLOGI from initiators
> can be dropped before VP0 is enabled, causing link level recovery.
> Retry FLOGI to avoid link level recovery.
> 
> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
> ---
>  drivers/scsi/qla2xxx/qla_dbg.c  |  2 +-
>  drivers/scsi/qla2xxx/qla_init.c | 24 ++++++++++++++++++++++++
>  2 files changed, 25 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
> index 0671f07..907a7ac 100644
> --- a/drivers/scsi/qla2xxx/qla_dbg.c
> +++ b/drivers/scsi/qla2xxx/qla_dbg.c
> @@ -16,7 +16,7 @@
>   * |                              |                    | 0x016e-0x0170  |
>   * | Mailbox commands             |       0x1192       |		|
>   * |                              |                    |		|
> - * | Device Discovery             |       0x2016       | 0x2020-0x2022, |
> + * | Device Discovery             |       0x2003       | 0x2016		|
>   * |                              |                    | 0x2011-0x2012, |
>   * |                              |                    | 0x2099-0x20a4  |
>   * | Queue Command and IO tracing |       0x3074       | 0x300b         |
> diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
> index c56cdb3..a3685b6 100644
> --- a/drivers/scsi/qla2xxx/qla_init.c
> +++ b/drivers/scsi/qla2xxx/qla_init.c
> @@ -2053,6 +2053,14 @@ qla2x00_update_fw_options(scsi_qla_host_t *vha)
>  	if (IS_QLA6312(ha))
>  		ha->fw_options[2] |= BIT_13;
>  
> +	/* Set Retry FLOGI in case of P2P connection */
> +	if (ha->operating_mode == P2P) {
> +		ha->fw_options[2] |= BIT_3;
> +		ql_dbg(ql_dbg_disc, vha, 0x2100,
> +		    "(%s): Setting FLOGI retry BIT in fw_options[2]: 0x%x\n",
> +			__func__, ha->fw_options[2]);
> +	}
> +
>  	/* Update firmware options. */
>  	qla2x00_set_fw_options(vha, ha->fw_options);
>  }
> @@ -2070,6 +2078,14 @@ qla24xx_update_fw_options(scsi_qla_host_t *vha)
>  	if (ql2xfwholdabts)
>  		ha->fw_options[3] |= BIT_12;
>  
> +	/* Set Retry FLOGI in case of P2P connection */
> +	if (ha->operating_mode == P2P) {
> +		ha->fw_options[2] |= BIT_3;
> +		ql_dbg(ql_dbg_disc, vha, 0x2101,
> +		    "(%s): Setting FLOGI retry BIT in fw_options[2]: 0x%x\n",
> +			__func__, ha->fw_options[2]);
> +	}
> +
>  	/* Update Serial Link options. */
>  	if ((le16_to_cpu(ha->fw_seriallink_options24[0]) & BIT_0) == 0)
>  		return;
> @@ -6513,6 +6529,14 @@ qla81xx_update_fw_options(scsi_qla_host_t *vha)
>  	if (ql2xfwholdabts)
>  		ha->fw_options[3] |= BIT_12;
>  
> +	/* Set Retry FLOGI in case of P2P connection */
> +	if (ha->operating_mode == P2P) {
> +		ha->fw_options[2] |= BIT_3;
> +		ql_dbg(ql_dbg_disc, vha, 0x2103,
> +		    "(%s): Setting FLOGI retry BIT in fw_options[2]: 0x%x\n",
> +			__func__, ha->fw_options[2]);
> +	}
> +
>  	if (!ql2xetsenable)
>  		goto out;
>  
> 
Is this bit available for all firmware versions?
Or does one need a newer firmware here?

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 05/19] qla2xxx: Add module parameter alternate/short names.
  2016-07-06 15:14 ` [PATCH 05/19] qla2xxx: Add module parameter alternate/short names Himanshu Madhani
@ 2016-07-15 12:51   ` Hannes Reinecke
  0 siblings, 0 replies; 41+ messages in thread
From: Hannes Reinecke @ 2016-07-15 12:51 UTC (permalink / raw)
  To: Himanshu Madhani, James.Bottomley, martin.petersen
  Cc: giridhar.malavali, linux-scsi

On 07/06/2016 05:14 PM, Himanshu Madhani wrote:
> From: Joe Carnuccio <joe.carnuccio@qlogic.com>
> 
> Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
> ---
>  drivers/scsi/qla2xxx/qla_os.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
> index dc608ce..f1a2394 100644
> --- a/drivers/scsi/qla2xxx/qla_os.c
> +++ b/drivers/scsi/qla2xxx/qla_os.c
> @@ -80,6 +80,7 @@ MODULE_PARM_DESC(ql2xallocfwdump,
>  
>  int ql2xextended_error_logging;
>  module_param(ql2xextended_error_logging, int, S_IRUGO|S_IWUSR);
> +module_param_named(logging, ql2xextended_error_logging, int, S_IRUGO|S_IWUSR);
>  MODULE_PARM_DESC(ql2xextended_error_logging,
>  		"Option to enable extended error logging,\n"
>  		"\t\tDefault is 0 - no logging.  0x40000000 - Module Init & Probe.\n"
> @@ -106,6 +107,7 @@ MODULE_PARM_DESC(ql2xshiftctondsd,
>  
>  int ql2xfdmienable=1;
>  module_param(ql2xfdmienable, int, S_IRUGO|S_IWUSR);
> +module_param_named(fdmi, ql2xfdmienable, int, S_IRUGO|S_IWUSR);
>  MODULE_PARM_DESC(ql2xfdmienable,
>  		"Enables FDMI registrations. "
>  		"0 - no FDMI. Default is 1 - perform FDMI.");
> @@ -157,6 +159,7 @@ MODULE_PARM_DESC(ql2xmultique_tag,
>  
>  int ql2xfwloadbin;
>  module_param(ql2xfwloadbin, int, S_IRUGO|S_IWUSR);
> +module_param_named(fwload, ql2xfwloadbin, int, S_IRUGO|S_IWUSR);
>  MODULE_PARM_DESC(ql2xfwloadbin,
>  		"Option to specify location from which to load ISP firmware:.\n"
>  		" 2 -- load firmware via the request_firmware() (hotplug).\n"
> 
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 06/19] qla2xxx: Make debug buffer log easier to view.
  2016-07-06 15:14 ` [PATCH 06/19] qla2xxx: Make debug buffer log easier to view Himanshu Madhani
@ 2016-07-15 12:52   ` Hannes Reinecke
  0 siblings, 0 replies; 41+ messages in thread
From: Hannes Reinecke @ 2016-07-15 12:52 UTC (permalink / raw)
  To: Himanshu Madhani, James.Bottomley, martin.petersen
  Cc: giridhar.malavali, linux-scsi

On 07/06/2016 05:14 PM, Himanshu Madhani wrote:
> From: Joe Carnuccio <joe.carnuccio@qlogic.com>
> 
> Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
> ---
>  drivers/scsi/qla2xxx/qla_dbg.c | 33 ++++++++++++++-------------------
>  1 file changed, 14 insertions(+), 19 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 07/19] qla2xxx: Properly initialize IO statistics.
  2016-07-06 15:14 ` [PATCH 07/19] qla2xxx: Properly initialize IO statistics Himanshu Madhani
@ 2016-07-15 12:52   ` Hannes Reinecke
  0 siblings, 0 replies; 41+ messages in thread
From: Hannes Reinecke @ 2016-07-15 12:52 UTC (permalink / raw)
  To: Himanshu Madhani, James.Bottomley, martin.petersen
  Cc: giridhar.malavali, linux-scsi

On 07/06/2016 05:14 PM, Himanshu Madhani wrote:
> From: Joe Carnuccio <joe.carnuccio@qlogic.com>
> 
> Properly initialize IO statistics to avoid initial 0xFFFFFFF (-1) values.
> 
> Cleanup/simplify usage of pointer to statistics structure.
> 
> Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
> ---
>  drivers/scsi/qla2xxx/qla_attr.c   | 50 +++++++++++++++++++--------------------
>  drivers/scsi/qla2xxx/qla_def.h    |  1 -
>  drivers/scsi/qla2xxx/qla_init.c   |  3 +++
>  drivers/scsi/qla2xxx/qla_target.c | 16 ++++++-------
>  4 files changed, 36 insertions(+), 34 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 08/19] qla2xxx: Properly reset firmware statistics.
  2016-07-06 15:14 ` [PATCH 08/19] qla2xxx: Properly reset firmware statistics Himanshu Madhani
@ 2016-07-15 12:53   ` Hannes Reinecke
  0 siblings, 0 replies; 41+ messages in thread
From: Hannes Reinecke @ 2016-07-15 12:53 UTC (permalink / raw)
  To: Himanshu Madhani, James.Bottomley, martin.petersen
  Cc: giridhar.malavali, linux-scsi

On 07/06/2016 05:14 PM, Himanshu Madhani wrote:
> From: Joe Carnuccio <joe.carnuccio@qlogic.com>
> 
> Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
> ---
>  drivers/scsi/qla2xxx/qla_attr.c | 28 ++++++++++++++++++++++++----
>  drivers/scsi/qla2xxx/qla_bsg.c  |  2 +-
>  drivers/scsi/qla2xxx/qla_dbg.c  |  2 +-
>  drivers/scsi/qla2xxx/qla_gbl.h  |  2 +-
>  drivers/scsi/qla2xxx/qla_mbx.c  | 18 ++++++++----------
>  5 files changed, 35 insertions(+), 17 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 09/19] qla2xxx: Check for device state before unloading the driver.
  2016-07-06 15:14 ` [PATCH 09/19] qla2xxx: Check for device state before unloading the driver Himanshu Madhani
@ 2016-07-15 12:54   ` Hannes Reinecke
  0 siblings, 0 replies; 41+ messages in thread
From: Hannes Reinecke @ 2016-07-15 12:54 UTC (permalink / raw)
  To: Himanshu Madhani, James.Bottomley, martin.petersen
  Cc: giridhar.malavali, linux-scsi

On 07/06/2016 05:14 PM, Himanshu Madhani wrote:
> From: Sawan Chandak <sawan.chandak@qlogic.com>
> 
> During hot swap of PCI device, there can be PCI error on device,
> during normal driver unload. The race between normal driver unload and
> driver unload due to PCI error, can lead to system crash.Fix is to check
> if there is unload going on and allow that function to unload the driver.
> 
> Signed-off-by: Sawan Chandak <sawan.chandak@qlogic.com>
> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
> ---
>  drivers/scsi/qla2xxx/qla_dbg.c |  2 +-
>  drivers/scsi/qla2xxx/qla_def.h |  1 +
>  drivers/scsi/qla2xxx/qla_mbx.c | 41 +++++++++++++++++++++++++++++++++--------
>  drivers/scsi/qla2xxx/qla_os.c  | 21 +++++++++++++++++----
>  4 files changed, 52 insertions(+), 13 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 10/19] qla2xxx: Add bsg interface to support D_Port Diagnostics.
  2016-07-06 15:14 ` [PATCH 10/19] qla2xxx: Add bsg interface to support D_Port Diagnostics Himanshu Madhani
@ 2016-07-15 12:55   ` Hannes Reinecke
  0 siblings, 0 replies; 41+ messages in thread
From: Hannes Reinecke @ 2016-07-15 12:55 UTC (permalink / raw)
  To: Himanshu Madhani, James.Bottomley, martin.petersen
  Cc: giridhar.malavali, linux-scsi

On 07/06/2016 05:14 PM, Himanshu Madhani wrote:
> From: Joe Carnuccio <joe.carnuccio@qlogic.com>
> 
> Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
> ---
>  drivers/scsi/qla2xxx/qla_bsg.c | 44 ++++++++++++++++++++++++++++++++
>  drivers/scsi/qla2xxx/qla_bsg.h | 12 +++++++++
>  drivers/scsi/qla2xxx/qla_dbg.c |  3 +--
>  drivers/scsi/qla2xxx/qla_gbl.h |  3 +++
>  drivers/scsi/qla2xxx/qla_isr.c |  7 +++--
>  drivers/scsi/qla2xxx/qla_mbx.c | 58 +++++++++++++++++++++++++++++++++++++++++-
>  6 files changed, 122 insertions(+), 5 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 11/19] qla2xxx: Add bsg interface to support statistics counter reset.
  2016-07-06 15:14 ` [PATCH 11/19] qla2xxx: Add bsg interface to support statistics counter reset Himanshu Madhani
  2016-07-06 16:36   ` kbuild test robot
@ 2016-07-15 12:56   ` Hannes Reinecke
  1 sibling, 0 replies; 41+ messages in thread
From: Hannes Reinecke @ 2016-07-15 12:56 UTC (permalink / raw)
  To: Himanshu Madhani, James.Bottomley, martin.petersen
  Cc: giridhar.malavali, linux-scsi

On 07/06/2016 05:14 PM, Himanshu Madhani wrote:
> From: Sawan Chandak <sawan.chandak@qlogic.com>
> 
> Signed-off-by: Sawan Chandak <sawan.chandak@qlogic.com>
> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
> ---
>  drivers/scsi/qla2xxx/qla_bsg.c | 48 ++++++++++++++++++++++--------------------
>  drivers/scsi/qla2xxx/qla_bsg.h |  1 +
>  2 files changed, 26 insertions(+), 23 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 12/19] qla2xxx: Let DPORT be enabled purely by nvram.
  2016-07-06 15:14 ` [PATCH 12/19] qla2xxx: Let DPORT be enabled purely by nvram Himanshu Madhani
@ 2016-07-15 12:57   ` Hannes Reinecke
  0 siblings, 0 replies; 41+ messages in thread
From: Hannes Reinecke @ 2016-07-15 12:57 UTC (permalink / raw)
  To: Himanshu Madhani, James.Bottomley, martin.petersen
  Cc: giridhar.malavali, linux-scsi

On 07/06/2016 05:14 PM, Himanshu Madhani wrote:
> From: Joe Carnuccio <joe.carnuccio@qlogic.com>
> 
> Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
> ---
>  drivers/scsi/qla2xxx/qla_dbg.c  |  2 +-
>  drivers/scsi/qla2xxx/qla_def.h  |  1 +
>  drivers/scsi/qla2xxx/qla_init.c | 12 ++++++------
>  3 files changed, 8 insertions(+), 7 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 13/19] qla2xxx: Add support to handle Loop Init error Asynchronus event.
  2016-07-06 15:14 ` [PATCH 13/19] qla2xxx: Add support to handle Loop Init error Asynchronus event Himanshu Madhani
@ 2016-07-15 12:58   ` Hannes Reinecke
  0 siblings, 0 replies; 41+ messages in thread
From: Hannes Reinecke @ 2016-07-15 12:58 UTC (permalink / raw)
  To: Himanshu Madhani, James.Bottomley, martin.petersen
  Cc: giridhar.malavali, linux-scsi

On 07/06/2016 05:14 PM, Himanshu Madhani wrote:
> From: Joe Carnuccio <joe.carnuccio@qlogic.com>
> 
> Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
> ---
>  drivers/scsi/qla2xxx/qla_dbg.c |  2 +-
>  drivers/scsi/qla2xxx/qla_isr.c | 11 +++++++++--
>  2 files changed, 10 insertions(+), 3 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 14/19] qla2xxx: Correction to function qla26xx_dport_diagnostics().
  2016-07-06 15:14 ` [PATCH 14/19] qla2xxx: Correction to function qla26xx_dport_diagnostics() Himanshu Madhani
@ 2016-07-15 12:59   ` Hannes Reinecke
  0 siblings, 0 replies; 41+ messages in thread
From: Hannes Reinecke @ 2016-07-15 12:59 UTC (permalink / raw)
  To: Himanshu Madhani, James.Bottomley, martin.petersen
  Cc: giridhar.malavali, linux-scsi

On 07/06/2016 05:14 PM, Himanshu Madhani wrote:
> From: Joe Carnuccio <joe.carnuccio@qlogic.com>
> 
> Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
> ---
>  drivers/scsi/qla2xxx/qla_dbg.c | 2 +-
>  drivers/scsi/qla2xxx/qla_isr.c | 8 +++-----
>  drivers/scsi/qla2xxx/qla_mbx.c | 5 -----
>  3 files changed, 4 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
> index 288338d..1a04270 100644
> --- a/drivers/scsi/qla2xxx/qla_dbg.c
> +++ b/drivers/scsi/qla2xxx/qla_dbg.c
> @@ -14,7 +14,7 @@
>   * | Module Init and Probe        |       0x0191       | 0x0146         |
>   * |                              |                    | 0x015b-0x0160	|
>   * |                              |                    | 0x016e		|
> - * | Mailbox commands             |       0x1196       |		|
> + * | Mailbox commands             |       0x1196       | 0x1193		|
>   * |                              |                    |		|
>   * | Device Discovery             |       0x2003       | 0x2016		|
>   * |                              |                    | 0x2011-0x2012, |
> diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
> index 134ad2f..1b87977 100644
> --- a/drivers/scsi/qla2xxx/qla_isr.c
> +++ b/drivers/scsi/qla2xxx/qla_isr.c
> @@ -1159,13 +1159,11 @@ global_port_update:
>  
>  	case MBA_DPORT_DIAGNOSTICS:
>  		ql_dbg(ql_dbg_async, vha, 0x5052,
> -		    "D-Port Diagnostics: %04x result=%s index=%u size=%u\n",
> +		    "D-Port Diagnostics: %04x result=%s\n",
>  		    mb[0],
>  		    mb[1] == 0 ? "start" :
> -		    mb[1] == 1 ? "done (ok)" :
> -		    mb[1] == 2 ? "done (error)" : "other",
> -		    LSB(mb[2]),
> -		    mb[3]);
> +		    mb[1] == 1 ? "done (pass)" :
> +		    mb[1] == 2 ? "done (error)" : "other");
>  		break;
>  
>  	case MBA_TEMPERATURE_ALERT:
> diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
> index 0f7b83a..bf16e6f 100644
> --- a/drivers/scsi/qla2xxx/qla_mbx.c
> +++ b/drivers/scsi/qla2xxx/qla_mbx.c
> @@ -5764,11 +5764,6 @@ qla26xx_dport_diagnostics(scsi_qla_host_t *vha,
>  	ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1192,
>  	    "Entered %s.\n", __func__);
>  
> -	if (size < 1024) {
> -		ql_log(ql_log_warn, vha, 0x1193, "Failed insufficient size.\n");
> -		return QLA_FUNCTION_PARAMETER_ERROR;
> -	}
> -
>  	dd_dma = dma_map_single(&vha->hw->pdev->dev,
>  	    dd_buf, size, DMA_FROM_DEVICE);
>  	if (!dd_dma) {
> 
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 15/19] qla2xxx: Separate ISP type bits out from device type.
  2016-07-06 15:14 ` [PATCH 15/19] qla2xxx: Separate ISP type bits out from device type Himanshu Madhani
@ 2016-07-15 13:01   ` Hannes Reinecke
  0 siblings, 0 replies; 41+ messages in thread
From: Hannes Reinecke @ 2016-07-15 13:01 UTC (permalink / raw)
  To: Himanshu Madhani, James.Bottomley, martin.petersen
  Cc: giridhar.malavali, linux-scsi

On 07/06/2016 05:14 PM, Himanshu Madhani wrote:
> From: Joe Carnuccio <joe.carnuccio@qlogic.com>
> 
> Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
> ---
>  drivers/scsi/qla2xxx/qla_def.h |  6 ++++--
>  drivers/scsi/qla2xxx/qla_os.c  | 44 +++++++++++++++++++++---------------------
>  2 files changed, 26 insertions(+), 24 deletions(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
> index c04d83e..ae4a747 100644
> --- a/drivers/scsi/qla2xxx/qla_def.h
> +++ b/drivers/scsi/qla2xxx/qla_def.h
> @@ -3130,7 +3130,7 @@ struct qla_hw_data {
>  #define PCI_DEVICE_ID_QLOGIC_ISP2271	0x2271
>  #define PCI_DEVICE_ID_QLOGIC_ISP2261	0x2261
>  
> -	uint32_t	device_type;
> +	uint32_t	isp_type;
>  #define DT_ISP2100                      BIT_0
>  #define DT_ISP2200                      BIT_1
>  #define DT_ISP2300                      BIT_2
> @@ -3155,6 +3155,7 @@ struct qla_hw_data {
>  #define DT_ISP2261			BIT_21
>  #define DT_ISP_LAST			(DT_ISP2261 << 1)
>  
> +	uint32_t	device_type;
>  #define DT_T10_PI                       BIT_25
>  #define DT_IIDMA                        BIT_26
>  #define DT_FWI2                         BIT_27
> @@ -3162,7 +3163,8 @@ struct qla_hw_data {
>  #define DT_OEM_001                      BIT_29
>  #define DT_ISP2200A                     BIT_30
>  #define DT_EXTENDED_IDS                 BIT_31
> -#define DT_MASK(ha)     ((ha)->device_type & (DT_ISP_LAST - 1))
> +
> +#define DT_MASK(ha)     ((ha)->isp_type & (DT_ISP_LAST - 1))
>  #define IS_QLA2100(ha)  (DT_MASK(ha) & DT_ISP2100)
>  #define IS_QLA2200(ha)  (DT_MASK(ha) & DT_ISP2200)
>  #define IS_QLA2300(ha)  (DT_MASK(ha) & DT_ISP2300)
Hmm.
I would've thought that you take the opportunity to reshuffle the
device_type bit to start with '0'; as it stands now it doesn't
really buy you anything right now...

But anyway.

Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 16/19] qla2xxx: Disable the adapter and skip error recovery in case of register disconnect.
  2016-07-06 15:14 ` [PATCH 16/19] qla2xxx: Disable the adapter and skip error recovery in case of register disconnect Himanshu Madhani
@ 2016-07-15 13:02   ` Hannes Reinecke
  0 siblings, 0 replies; 41+ messages in thread
From: Hannes Reinecke @ 2016-07-15 13:02 UTC (permalink / raw)
  To: Himanshu Madhani, James.Bottomley, martin.petersen
  Cc: giridhar.malavali, linux-scsi

On 07/06/2016 05:14 PM, Himanshu Madhani wrote:
> From: Sawan Chandak <sawan.chandak@qlogic.com>
> 
> If there is error recovery going on due to command timeout and
> there is register disconnect, then disable the adapter.
> 
> Signed-off-by: Sawan Chandak <sawan.chandak@qlogic.com>
> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
> ---
>  drivers/scsi/qla2xxx/qla_attr.c |  3 +++
>  drivers/scsi/qla2xxx/qla_dbg.c  |  2 +-
>  drivers/scsi/qla2xxx/qla_os.c   | 55 +++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 59 insertions(+), 1 deletion(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 17/19] qla2xxx: Fix duplicate message id.
  2016-07-06 15:14 ` [PATCH 17/19] qla2xxx: Fix duplicate message id Himanshu Madhani
@ 2016-07-15 13:02   ` Hannes Reinecke
  0 siblings, 0 replies; 41+ messages in thread
From: Hannes Reinecke @ 2016-07-15 13:02 UTC (permalink / raw)
  To: Himanshu Madhani, James.Bottomley, martin.petersen
  Cc: giridhar.malavali, linux-scsi

On 07/06/2016 05:14 PM, Himanshu Madhani wrote:
> From: Sawan Chandak <sawan.chandak@qlogic.com>
> 
> Signed-off-by: Sawan Chandak <sawan.chandak@qlogic.com>
> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
> ---
>  drivers/scsi/qla2xxx/qla_dbg.c | 7 +++----
>  drivers/scsi/qla2xxx/qla_isr.c | 2 +-
>  drivers/scsi/qla2xxx/qla_mbx.c | 4 ++--
>  3 files changed, 6 insertions(+), 7 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 18/19] qla2xxx: Fix BBCR offset
  2016-07-06 15:14 ` [PATCH 18/19] qla2xxx: Fix BBCR offset Himanshu Madhani
@ 2016-07-15 13:03   ` Hannes Reinecke
  0 siblings, 0 replies; 41+ messages in thread
From: Hannes Reinecke @ 2016-07-15 13:03 UTC (permalink / raw)
  To: Himanshu Madhani, James.Bottomley, martin.petersen
  Cc: giridhar.malavali, linux-scsi

On 07/06/2016 05:14 PM, Himanshu Madhani wrote:
> From: Sawan Chandak <sawan.chandak@qlogic.com>
> 
> Fixes: 969a619 ("qla2xxx: Add support for buffer to buffer credit value for ISP27XX.")
> Signed-off-by: Sawan Chandak <sawan.chandak@qlogic.com>
> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
> ---
>  drivers/scsi/qla2xxx/qla_fw.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_fw.h b/drivers/scsi/qla2xxx/qla_fw.h
> index 4c0f3a7..8a2368b 100644
> --- a/drivers/scsi/qla2xxx/qla_fw.h
> +++ b/drivers/scsi/qla2xxx/qla_fw.h
> @@ -1288,7 +1288,7 @@ struct vp_rpt_id_entry_24xx {
>  
>  	uint8_t vp_idx_map[16];
>  
> -	uint8_t reserved_4[28];
> +	uint8_t reserved_4[24];
>  	uint16_t bbcr;
>  	uint8_t reserved_5[6];
>  };
> 
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 19/19] qla2xxx: Update driver version to 8.07.00.38-k
  2016-07-06 15:14 ` [PATCH 19/19] qla2xxx: Update driver version to 8.07.00.38-k Himanshu Madhani
@ 2016-07-15 13:03   ` Hannes Reinecke
  0 siblings, 0 replies; 41+ messages in thread
From: Hannes Reinecke @ 2016-07-15 13:03 UTC (permalink / raw)
  To: Himanshu Madhani, James.Bottomley, martin.petersen
  Cc: giridhar.malavali, linux-scsi

On 07/06/2016 05:14 PM, Himanshu Madhani wrote:
> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
> ---
>  drivers/scsi/qla2xxx/qla_version.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h
> index 0bc93fa..3cb1964 100644
> --- a/drivers/scsi/qla2xxx/qla_version.h
> +++ b/drivers/scsi/qla2xxx/qla_version.h
> @@ -7,7 +7,7 @@
>  /*
>   * Driver version
>   */
> -#define QLA2XXX_VERSION      "8.07.00.33-k"
> +#define QLA2XXX_VERSION      "8.07.00.38-k"
>  
>  #define QLA_DRIVER_MAJOR_VER	8
>  #define QLA_DRIVER_MINOR_VER	7
> 
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 00/19] qla2xxx: Patches for scsi "misc" branch.
  2016-07-06 15:14 [PATCH 00/19] qla2xxx: Patches for scsi "misc" branch Himanshu Madhani
                   ` (18 preceding siblings ...)
  2016-07-06 15:14 ` [PATCH 19/19] qla2xxx: Update driver version to 8.07.00.38-k Himanshu Madhani
@ 2016-07-15 19:39 ` Martin K. Petersen
  19 siblings, 0 replies; 41+ messages in thread
From: Martin K. Petersen @ 2016-07-15 19:39 UTC (permalink / raw)
  To: Himanshu Madhani
  Cc: James.Bottomley, martin.petersen, giridhar.malavali, linux-scsi

>>>>> "Himanshu" == Himanshu Madhani <himanshu.madhani@qlogic.com> writes:

Himanshu> Please apply the following patches to the scsi tree, misc
Himanshu> branch at your earliest convenience.

Applied to 4.8/scsi-queue. I folded the compiler fix into the offending
commit.

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2016-07-15 19:39 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-06 15:14 [PATCH 00/19] qla2xxx: Patches for scsi "misc" branch Himanshu Madhani
2016-07-06 15:14 ` [PATCH 01/19] qla2xxx: Remove sysfs node fw_dump_template Himanshu Madhani
2016-07-15 12:49   ` Hannes Reinecke
2016-07-06 15:14 ` [PATCH 02/19] qla2xxx: Add ram area DDR for fwdump template entry T262 Himanshu Madhani
2016-07-15 12:49   ` Hannes Reinecke
2016-07-06 15:14 ` [PATCH 03/19] qla2xxx: Shutdown board on thermal shutdown aen Himanshu Madhani
2016-07-15 12:50   ` Hannes Reinecke
2016-07-06 15:14 ` [PATCH 04/19] qla2xxx: Set FLOGI retry in additional firmware options for P2P (N2N) mode Himanshu Madhani
2016-07-15 12:51   ` Hannes Reinecke
2016-07-06 15:14 ` [PATCH 05/19] qla2xxx: Add module parameter alternate/short names Himanshu Madhani
2016-07-15 12:51   ` Hannes Reinecke
2016-07-06 15:14 ` [PATCH 06/19] qla2xxx: Make debug buffer log easier to view Himanshu Madhani
2016-07-15 12:52   ` Hannes Reinecke
2016-07-06 15:14 ` [PATCH 07/19] qla2xxx: Properly initialize IO statistics Himanshu Madhani
2016-07-15 12:52   ` Hannes Reinecke
2016-07-06 15:14 ` [PATCH 08/19] qla2xxx: Properly reset firmware statistics Himanshu Madhani
2016-07-15 12:53   ` Hannes Reinecke
2016-07-06 15:14 ` [PATCH 09/19] qla2xxx: Check for device state before unloading the driver Himanshu Madhani
2016-07-15 12:54   ` Hannes Reinecke
2016-07-06 15:14 ` [PATCH 10/19] qla2xxx: Add bsg interface to support D_Port Diagnostics Himanshu Madhani
2016-07-15 12:55   ` Hannes Reinecke
2016-07-06 15:14 ` [PATCH 11/19] qla2xxx: Add bsg interface to support statistics counter reset Himanshu Madhani
2016-07-06 16:36   ` kbuild test robot
2016-07-15 12:56   ` Hannes Reinecke
2016-07-06 15:14 ` [PATCH 12/19] qla2xxx: Let DPORT be enabled purely by nvram Himanshu Madhani
2016-07-15 12:57   ` Hannes Reinecke
2016-07-06 15:14 ` [PATCH 13/19] qla2xxx: Add support to handle Loop Init error Asynchronus event Himanshu Madhani
2016-07-15 12:58   ` Hannes Reinecke
2016-07-06 15:14 ` [PATCH 14/19] qla2xxx: Correction to function qla26xx_dport_diagnostics() Himanshu Madhani
2016-07-15 12:59   ` Hannes Reinecke
2016-07-06 15:14 ` [PATCH 15/19] qla2xxx: Separate ISP type bits out from device type Himanshu Madhani
2016-07-15 13:01   ` Hannes Reinecke
2016-07-06 15:14 ` [PATCH 16/19] qla2xxx: Disable the adapter and skip error recovery in case of register disconnect Himanshu Madhani
2016-07-15 13:02   ` Hannes Reinecke
2016-07-06 15:14 ` [PATCH 17/19] qla2xxx: Fix duplicate message id Himanshu Madhani
2016-07-15 13:02   ` Hannes Reinecke
2016-07-06 15:14 ` [PATCH 18/19] qla2xxx: Fix BBCR offset Himanshu Madhani
2016-07-15 13:03   ` Hannes Reinecke
2016-07-06 15:14 ` [PATCH 19/19] qla2xxx: Update driver version to 8.07.00.38-k Himanshu Madhani
2016-07-15 13:03   ` Hannes Reinecke
2016-07-15 19:39 ` [PATCH 00/19] qla2xxx: Patches for scsi "misc" branch Martin K. Petersen

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.