Skip to contentSkip to conversation

qla2xxx: fixes for 2.6.16.

PATCH In review [email protected] 2 participants 18 messages Jan 14, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover qla2xxx: fixes for 2.6.16.

James,

Here's a set of bug-fixes for several of the outstanding issues with the qla2xxx driver. Please apply.

 drivers/scsi/qla2xxx/Kconfig       |    4 +
 drivers/scsi/qla2xxx/qla_attr.c    |    4 -
 drivers/scsi/qla2xxx/qla_dbg.c     |  105 ++++++++++++++++++------------------
 drivers/scsi/qla2xxx/qla_dbg.h     |    4 -
 drivers/scsi/qla2xxx/qla_gbl.h     |    6 --
 drivers/scsi/qla2xxx/qla_gs.c      |    8 +-
 drivers/scsi/qla2xxx/qla_init.c    |   24 +++++---
 drivers/scsi/qla2xxx/qla_isr.c     |   14 ++--
 drivers/scsi/qla2xxx/qla_mbx.c     |  107 ++++---------------------------------
 drivers/scsi/qla2xxx/qla_os.c      |    6 ++
 drivers/scsi/qla2xxx/qla_sup.c     |    3 +
 drivers/scsi/qla2xxx/qla_version.h |    4 -
 12 files changed, 114 insertions(+), 175 deletions(-)

---

Reference proper node/port names in fc_host class.
Correct FC4 feature assignment during RFF_ID.
Drop noisy 'UNDERRUN' status message.
Use msleep() as delay during ISP polling.
Correct excessive delay during LOAD-RISC-RAM mailbox command. Re-enable flash-part write protection on ISP24xx boards. Update firmware-dump procedure for ISP24xx.
Correct issue where portstate does not transition during loop-resync. Correct swing/emphasis settings for ISP24XX.
Collapse load RISC RAM implementations.
Correct execution-throttle setting for ISP24xx.
Correct setting of FDMI supported/current port speed. Kconfig update: Add URL to download firmware images. Disable port-type RSCN handling via driver state-machine. Update version number to 8.01.04-k.

Regards,
Andrew Vasquez
QLogic Corporation

#1 lore raw

PATCH 1/15 qla2xxx: Reference proper node/port names in fc_host class.

The initial-control-block references are not always correct as the use-node-name qualifier during NVRAM configuration will cause the firmware to use the portname as a base for the nodename.

---

 drivers/scsi/qla2xxx/qla_attr.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

5508215832b4d5f6850c6963bd1e3a45089d3e05

drivers/scsi/qla2xxx/qla_attr.c +2 -2
index 2efca52..b17ee62 100644
@@ -541,7 +541,7 @@ struct fc_function_template qla2xxx_tran
 void
 qla2x00_init_host_attr(scsi_qla_host_t *ha)
 {
-	fc_host_node_name(ha->host) = wwn_to_u64(ha->init_cb->node_name);
-	fc_host_port_name(ha->host) = wwn_to_u64(ha->init_cb->port_name);
+	fc_host_node_name(ha->host) = wwn_to_u64(ha->node_name);
+	fc_host_port_name(ha->host) = wwn_to_u64(ha->port_name);
 	fc_host_supported_classes(ha->host) = FC_COS_CLASS3;
 }
Signature · 1 line
1.1.1-g4c34
#2 lore raw

PATCH 2/15 qla2xxx: Correct FC4 feature assignment during RFF_ID.

In reply to [email protected]

---

 drivers/scsi/qla2xxx/qla_gs.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

34cf8c49e659aadcad2387be61afc69909844e1b

drivers/scsi/qla2xxx/qla_gs.c +1 -0
index cd6f7c3..0e8ada0 100644
@@ -538,6 +538,7 @@ qla2x00_rff_id(scsi_qla_host_t *ha)
 	ct_req->req.rff_id.port_id[1] = ha->d_id.b.area;
 	ct_req->req.rff_id.port_id[2] = ha->d_id.b.al_pa;
 
+	ct_req->req.rff_id.fc4_feature = BIT_1;
 	ct_req->req.rff_id.fc4_type = 0x08;		/* SCSI - FCP */
 
 	/* Execute MS IOCB */
Signature · 1 line
1.1.1-g4c34
#3 lore raw

PATCH 3/15 qla2xxx: Drop noisy 'UNDERRUN' status message.

In reply to [email protected]

There's no point in displaying the message during a valid underrun case. Limit the message to potentially problematic cases.

---

 drivers/scsi/qla2xxx/qla_isr.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

296a4916c8f4b2c725dfdccdb8c42c9cbd5815aa

drivers/scsi/qla2xxx/qla_isr.c +6 -5
index 5181d96..8a539dd 100644
@@ -963,15 +963,16 @@ qla2x00_status_entry(scsi_qla_host_t *ha
 		break;
 
 	case CS_DATA_UNDERRUN:
-		DEBUG2(printk(KERN_INFO
-		    "scsi(%ld:%d:%d) UNDERRUN status detected 0x%x-0x%x.\n",
-		    ha->host_no, cp->device->id, cp->device->lun, comp_status,
-		    scsi_status));
-
 		resid = resid_len;
 		if (scsi_status & SS_RESIDUAL_UNDER) {
 			cp->resid = resid;
 			CMD_RESID_LEN(cp) = resid;
+		} else {
+			DEBUG2(printk(KERN_INFO
+			    "scsi(%ld:%d:%d) UNDERRUN status detected "
+			    "0x%x-0x%x.\n", ha->host_no, cp->device->id,
+			    cp->device->lun, comp_status, scsi_status));
+
 		}
 
 		/*
Signature · 1 line
1.1.1-g4c34
#4 lore raw

PATCH 4/15 qla2xxx: Use msleep() as delay during ISP polling.

In reply to [email protected]

Mailbox commands are polled for completion during ISP initialization. During potentially 'long' mailbox commands (i.e. fabric login), we really don't want a busy-wait delay to potentially trigger a (benign) soft-lockup BUG().

---

 drivers/scsi/qla2xxx/qla_mbx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

33308585d10c6105a34a23246190d64477a0a372

drivers/scsi/qla2xxx/qla_mbx.c +1 -1
index 9746cd1..f90e68d 100644
@@ -196,7 +196,7 @@ qla2x00_mailbox_command(scsi_qla_host_t 
 			/* Check for pending interrupts. */
 			qla2x00_poll(ha);
 
-			udelay(10); /* v4.27 */
+			msleep(10);
 		} /* while */
 	}
 
Signature · 1 line
1.1.1-g4c34
#5 lore raw

Re: [PATCH 04/15] qla2xxx: Use msleep() as delay during ISP polling.

drivers/scsi/qla2xxx/qla_mbx.c qla2x00_mailbox_command(scsi_qla_host_t · line 199

Quoted 3 lines
drivers/scsi/qla2xxx/qla_mbx.c +1 -1
-			udelay(10); /* v4.27 */
+			msleep(10);

this goes from a 10 microsecond delay to a 10 milisecond delay. Was that intentional?

#6 lore raw

Re: [PATCH 04/15] qla2xxx: Use msleep() as delay during ISP polling.

Quoted 5 lines · Arjan van de Ven

drivers/scsi/qla2xxx/qla_mbx.c qla2x00_mailbox_command(scsi_qla_host_t · line 199

Quoted 2 lines
drivers/scsi/qla2xxx/qla_mbx.c +1 -1
-			udelay(10); /* v4.27 */
+			msleep(10);

this goes from a 10 microsecond delay to a 10 milisecond delay. Was that intentional?

the original (original) code was:

	...
	set_current_state(TASK_UNINTERRUPTIBLE);
	schedule_timeout(10);

during upstream development it was changed (incorrectly) to:

	udelay(10);

again, the qla2xxx driver only uses this poll-for-completion mechanism during init-time. There really is (was) no reason to bang on the chip in such a tight-loop.

Thanks,
Andrew

#7 lore raw

PATCH 5/15 qla2xxx: Correct excessive delay during LOAD-RISC-RAM mailbox command.

In reply to [email protected]

Problem report (against 2.4.x driver) from Jeff Layton <[email protected]>:

An OEM noticed that the U6 qla2200 driver would hang for around 2 minutes at boot time and then proceed normally. I found that the delay was occurring when loading the new firmware into the card, and was due to a schedule_timeout(10) added to the bottom of the polling loop.

Some testing showed that the load ram operation on the card was very quick (on the order of a couple of jiffies), but the sleep in the polling loop was making each operation take around 25-30.

The attached patch corrects this by making it skip sleeping during the load ram operation, since I believe we only do that when the module is plugged in. It also skips sleeping if the mbox_int flag got set during the current loop.

This corrected the hang on my test setup, and OEM also confirmed that it corrected the problem for them.

---

 drivers/scsi/qla2xxx/qla_mbx.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

d2997d0c232a39d077c4744a97a274cc31884d15

drivers/scsi/qla2xxx/qla_mbx.c +3 -1
index f90e68d..3de8fee 100644
@@ -196,7 +196,9 @@ qla2x00_mailbox_command(scsi_qla_host_t 
 			/* Check for pending interrupts. */
 			qla2x00_poll(ha);
 
-			msleep(10);
+			if (command != MBC_LOAD_RISC_RAM_EXTENDED &&
+			    !ha->flags.mbox_int)
+				msleep(10);
 		} /* while */
 	}
 
Signature · 1 line
1.1.1-g4c34
#8 lore raw

PATCH 6/15 qla2xxx: Re-enable flash-part write protection on ISP24xx boards.

In reply to [email protected]

Driver would not correctly re-enable the write-protection bits of the flash part after updates.

---

 drivers/scsi/qla2xxx/qla_sup.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

8b1f204feb44e6ee426c4d1b068ac6234fc1c0a6

drivers/scsi/qla2xxx/qla_sup.c +3 -0
index d54d2a9..f4d755a 100644
@@ -573,6 +573,9 @@ qla24xx_write_flash_data(scsi_qla_host_t
 		}
 	} while (0);
 
+	/* Enable flash write-protection. */
+	qla24xx_write_flash_dword(ha, flash_conf_to_access_addr(0x101), 0x9c);
+
 	/* Disable flash write. */
 	WRT_REG_DWORD(&reg->ctrl_status,
 	    RD_REG_DWORD(&reg->ctrl_status) & ~CSRX_FLASH_ENABLE);
Signature · 1 line
1.1.1-g4c34
#9 lore raw

PATCH 7/15 qla2xxx: Update firmware-dump procedure for ISP24xx.

In reply to [email protected]

Small changes to register retrieval and order as per latest firmware specification.

---

 drivers/scsi/qla2xxx/qla_dbg.c |  105 ++++++++++++++++++++--------------------
 drivers/scsi/qla2xxx/qla_dbg.h |    4 +-
 2 files changed, 55 insertions(+), 54 deletions(-)

df6e05fa3f6c026a83c3cb6e9a7365bba5fa7ac6

drivers/scsi/qla2xxx/qla_dbg.c +53 -52
index 5c5d231..2d9b12f 100644
@@ -1003,10 +1003,10 @@ qla24xx_fw_dump(scsi_qla_host_t *ha, int
 	fw = (struct qla24xx_fw_dump *) ha->fw_dump24;
 
 	rval = QLA_SUCCESS;
-	fw->hccr = RD_REG_DWORD(&reg->hccr);
+	fw->host_status = RD_REG_DWORD(&reg->host_status);
 
 	/* Pause RISC. */
-	if ((fw->hccr & HCCRX_RISC_PAUSE) == 0) {
+	if ((RD_REG_DWORD(&reg->hccr) & HCCRX_RISC_PAUSE) == 0) {
 		WRT_REG_DWORD(&reg->hccr, HCCRX_SET_RISC_RESET |
 		    HCCRX_CLR_HOST_INT);
 		RD_REG_DWORD(&reg->hccr);		/* PCI Posting. */
@@ -1021,16 +1021,54 @@ qla24xx_fw_dump(scsi_qla_host_t *ha, int
 		}
 	}
 
-	/* Disable interrupts. */
-	WRT_REG_DWORD(&reg->ictrl, 0);
-	RD_REG_DWORD(&reg->ictrl);
-
 	if (rval == QLA_SUCCESS) {
 		/* Host interface registers. */
 		dmp_reg = (uint32_t __iomem *)(reg + 0);
 		for (cnt = 0; cnt < sizeof(fw->host_reg) / 4; cnt++)
 			fw->host_reg[cnt] = RD_REG_DWORD(dmp_reg++);
 
+		/* Disable interrupts. */
+		WRT_REG_DWORD(&reg->ictrl, 0);
+		RD_REG_DWORD(&reg->ictrl);
+
+		/* Shadow registers. */
+		WRT_REG_DWORD(&reg->iobase_addr, 0x0F70);
+		RD_REG_DWORD(&reg->iobase_addr);
+		dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xF0);
+		WRT_REG_DWORD(dmp_reg, 0xB0000000);
+		dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xFC);
+		fw->shadow_reg[0] = RD_REG_DWORD(dmp_reg);
+
+		dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xF0);
+		WRT_REG_DWORD(dmp_reg, 0xB0100000);
+		dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xFC);
+		fw->shadow_reg[1] = RD_REG_DWORD(dmp_reg);
+
+		dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xF0);
+		WRT_REG_DWORD(dmp_reg, 0xB0200000);
+		dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xFC);
+		fw->shadow_reg[2] = RD_REG_DWORD(dmp_reg);
+
+		dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xF0);
+		WRT_REG_DWORD(dmp_reg, 0xB0300000);
+		dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xFC);
+		fw->shadow_reg[3] = RD_REG_DWORD(dmp_reg);
+
+		dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xF0);
+		WRT_REG_DWORD(dmp_reg, 0xB0400000);
+		dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xFC);
+		fw->shadow_reg[4] = RD_REG_DWORD(dmp_reg);
+
+		dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xF0);
+		WRT_REG_DWORD(dmp_reg, 0xB0500000);
+		dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xFC);
+		fw->shadow_reg[5] = RD_REG_DWORD(dmp_reg);
+
+		dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xF0);
+		WRT_REG_DWORD(dmp_reg, 0xB0600000);
+		dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xFC);
+		fw->shadow_reg[6] = RD_REG_DWORD(dmp_reg);
+
 		/* Mailbox registers. */
 		mbx_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80);
 		for (cnt = 0; cnt < sizeof(fw->mailbox_reg) / 2; cnt++)
@@ -1308,43 +1346,6 @@ qla24xx_fw_dump(scsi_qla_host_t *ha, int
 		for (cnt = 0; cnt < 16; cnt++)
 			*iter_reg++ = RD_REG_DWORD(dmp_reg++);
 
-		WRT_REG_DWORD(&reg->iobase_addr, 0x0F70);
-		RD_REG_DWORD(&reg->iobase_addr);
-		dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xF0);
-		WRT_REG_DWORD(dmp_reg, 0xB0000000);
-		dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xFC);
-		fw->shadow_reg[0] = RD_REG_DWORD(dmp_reg);
-
-		dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xF0);
-		WRT_REG_DWORD(dmp_reg, 0xB0100000);
-		dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xFC);
-		fw->shadow_reg[1] = RD_REG_DWORD(dmp_reg);
-
-		dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xF0);
-		WRT_REG_DWORD(dmp_reg, 0xB0200000);
-		dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xFC);
-		fw->shadow_reg[2] = RD_REG_DWORD(dmp_reg);
-
-		dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xF0);
-		WRT_REG_DWORD(dmp_reg, 0xB0300000);
-		dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xFC);
-		fw->shadow_reg[3] = RD_REG_DWORD(dmp_reg);
-
-		dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xF0);
-		WRT_REG_DWORD(dmp_reg, 0xB0400000);
-		dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xFC);
-		fw->shadow_reg[4] = RD_REG_DWORD(dmp_reg);
-
-		dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xF0);
-		WRT_REG_DWORD(dmp_reg, 0xB0500000);
-		dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xFC);
-		fw->shadow_reg[5] = RD_REG_DWORD(dmp_reg);
-
-		dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xF0);
-		WRT_REG_DWORD(dmp_reg, 0xB0600000);
-		dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xFC);
-		fw->shadow_reg[6] = RD_REG_DWORD(dmp_reg);
-
 		/* Local memory controller registers. */
 		iter_reg = fw->lmc_reg;
 		WRT_REG_DWORD(&reg->iobase_addr, 0x3000);
@@ -1677,7 +1678,7 @@ qla24xx_ascii_fw_dump(scsi_qla_host_t *h
 	    ha->fw_major_version, ha->fw_minor_version,
 	    ha->fw_subminor_version, ha->fw_attributes);
 
-	qla_uprintf(&uiter, "\nHCCR Register\n%04x\n", fw->hccr);
+	qla_uprintf(&uiter, "\nR2H Status Register\n%04x\n", fw->host_status);
 
 	qla_uprintf(&uiter, "\nHost Interface Registers");
 	for (cnt = 0; cnt < sizeof(fw->host_reg) / 4; cnt++) {
@@ -1687,6 +1688,14 @@ qla24xx_ascii_fw_dump(scsi_qla_host_t *h
 		qla_uprintf(&uiter, "%08x ", fw->host_reg[cnt]);
 	}
 
+	qla_uprintf(&uiter, "\n\nShadow Registers");
+	for (cnt = 0; cnt < sizeof(fw->shadow_reg) / 4; cnt++) {
+		if (cnt % 8 == 0)
+			qla_uprintf(&uiter, "\n");
+
+		qla_uprintf(&uiter, "%08x ", fw->shadow_reg[cnt]);
+	}
+
 	qla_uprintf(&uiter, "\n\nMailbox Registers");
 	for (cnt = 0; cnt < sizeof(fw->mailbox_reg) / 2; cnt++) {
 		if (cnt % 8 == 0)
@@ -1855,14 +1864,6 @@ qla24xx_ascii_fw_dump(scsi_qla_host_t *h
 		qla_uprintf(&uiter, "%08x ", fw->risc_gp_reg[cnt]);
 	}
 
-	qla_uprintf(&uiter, "\n\nShadow Registers");
-	for (cnt = 0; cnt < sizeof(fw->shadow_reg) / 4; cnt++) {
-		if (cnt % 8 == 0)
-			qla_uprintf(&uiter, "\n");
-
-		qla_uprintf(&uiter, "%08x ", fw->shadow_reg[cnt]);
-	}
-
 	qla_uprintf(&uiter, "\n\nLMC Registers");
 	for (cnt = 0; cnt < sizeof(fw->lmc_reg) / 4; cnt++) {
 		if (cnt % 8 == 0)
drivers/scsi/qla2xxx/qla_dbg.h +2 -2
index 935a59a..ab6afea 100644
@@ -227,8 +227,9 @@ struct qla2100_fw_dump {
 #define FW_DUMP_SIZE_24XX	0x2B0000
 
 struct qla24xx_fw_dump {
-	uint32_t hccr;
+	uint32_t host_status;
 	uint32_t host_reg[32];
+	uint32_t shadow_reg[7];
 	uint16_t mailbox_reg[32];
 	uint32_t xseq_gp_reg[128];
 	uint32_t xseq_0_reg[16];
@@ -250,7 +251,6 @@ struct qla24xx_fw_dump {
 	uint32_t rcvt0_data_dma_reg[32];
 	uint32_t rcvt1_data_dma_reg[32];
 	uint32_t risc_gp_reg[128];
-	uint32_t shadow_reg[7];
 	uint32_t lmc_reg[112];
 	uint32_t fpm_hdw_reg[192];
 	uint32_t fb_hdw_reg[176];
Signature · 1 line
1.1.1-g4c34
#10 lore raw

PATCH 8/15 qla2xxx: Correct issue where portstate does not transition during loop-resync.

In reply to [email protected]

If the Get Port Database call fails during local-loop update, then schedule the DPC routine to perform a rescan as the firmware would have updated the Get ID List port-entries of their new state.

---

 drivers/scsi/qla2xxx/qla_init.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

0d66c170cc9ef36804e0496c27e7c9194e335809

drivers/scsi/qla2xxx/qla_init.c +3 -0
index 7d973bd..e21316a 100644
@@ -1939,6 +1939,9 @@ qla2x00_configure_local_loop(scsi_qla_ho
 			    "information -- get_port_database=%x, "
 			    "loop_id=0x%04x\n",
 			    ha->host_no, rval2, new_fcport->loop_id));
+			DEBUG2(printk("scsi(%ld): Scheduling resync...\n",
+			    ha->host_no));
+			set_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags);
 			continue;
 		}
 
Signature · 1 line
1.1.1-g4c34
#11 lore raw

PATCH 9/15 qla2xxx: Correct swing/emphasis settings for ISP24XX.

In reply to [email protected]

Swing/emphasis settings in NVRAM were not being honoured due to the driver not converting the serial-link options from LE to host-endian format.

---

 drivers/scsi/qla2xxx/qla_init.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

cbbd53fecea341f1b998d3726a5f922e3036204a

drivers/scsi/qla2xxx/qla_init.c +5 -3
index e21316a..49e8315 100644
@@ -1014,11 +1014,13 @@ qla24xx_update_fw_options(scsi_qla_host_
 	int rval;
 
 	/* Update Serial Link options. */
-	if ((ha->fw_seriallink_options24[0] & BIT_0) == 0)
+	if ((le16_to_cpu(ha->fw_seriallink_options24[0]) & BIT_0) == 0)
 		return;
 
-	rval = qla2x00_set_serdes_params(ha, ha->fw_seriallink_options24[1],
-	    ha->fw_seriallink_options24[2], ha->fw_seriallink_options24[3]);
+	rval = qla2x00_set_serdes_params(ha,
+	    le16_to_cpu(ha->fw_seriallink_options24[1]),
+	    le16_to_cpu(ha->fw_seriallink_options24[2]),
+	    le16_to_cpu(ha->fw_seriallink_options24[3]));
 	if (rval != QLA_SUCCESS) {
 		qla_printk(KERN_WARNING, ha,
 		    "Unable to update Serial Link options (%x).\n", rval);
Signature · 1 line
1.1.1-g4c34
#12 lore raw

PATCH 10/15 qla2xxx: Collapse load RISC RAM implementations.

In reply to [email protected]

Simplify essentially duplicate load RISC RAM implementation in qla2x00_load_ram_ext() and qla2x00_load_ram().

---

 drivers/scsi/qla2xxx/qla_gbl.h  |    5 --
 drivers/scsi/qla2xxx/qla_init.c |    8 ++-
 drivers/scsi/qla2xxx/qla_mbx.c  |  103 ++++-----------------------------------
 3 files changed, 15 insertions(+), 101 deletions(-)

1f15b948303d24cf972b1f8cc06cffaeadb80e9f

drivers/scsi/qla2xxx/qla_gbl.h +1 -4
index bec81ad..7872c11 100644
@@ -96,10 +96,7 @@ int __qla2x00_marker(scsi_qla_host_t *, 
  * Global Function Prototypes in qla_mbx.c source file.
  */
 extern int
-qla2x00_load_ram(scsi_qla_host_t *, dma_addr_t, uint16_t, uint16_t);
-
-extern int
-qla2x00_load_ram_ext(scsi_qla_host_t *, dma_addr_t, uint32_t, uint32_t);
+qla2x00_load_ram(scsi_qla_host_t *, dma_addr_t, uint32_t, uint32_t);
 
 extern int
 qla2x00_execute_fw(scsi_qla_host_t *, uint32_t);
drivers/scsi/qla2xxx/qla_init.c +4 -4
index 49e8315..b4fbef5 100644
@@ -3672,8 +3672,8 @@ qla24xx_load_risc_flash(scsi_qla_host_t 
 			for (i = 0; i < dlen; i++)
 				dcode[i] = swab32(dcode[i]);
 
-			rval = qla2x00_load_ram_ext(ha, ha->request_dma,
-			    risc_addr, dlen);
+			rval = qla2x00_load_ram(ha, ha->request_dma, risc_addr,
+			    dlen);
 			if (rval) {
 				DEBUG(printk("scsi(%ld):[ERROR] Failed to load "
 				    "segment %d of firmware\n", ha->host_no,
@@ -3873,8 +3873,8 @@ qla24xx_load_risc(scsi_qla_host_t *ha, u
 			for (i = 0; i < dlen; i++)
 				dcode[i] = swab32(fwcode[i]);
 
-			rval = qla2x00_load_ram_ext(ha, ha->request_dma,
-			    risc_addr, dlen);
+			rval = qla2x00_load_ram(ha, ha->request_dma, risc_addr,
+			    dlen);
 			if (rval) {
 				DEBUG(printk("scsi(%ld):[ERROR] Failed to load "
 				    "segment %d of firmware\n", ha->host_no,
drivers/scsi/qla2xxx/qla_mbx.c +10 -93

123 lines not on this page · raw message

Signature · 1 line
1.1.1-g4c34
#13 lore raw

PATCH 11/15 qla2xxx: Correct execution-throttle setting for ISP24xx.

In reply to [email protected]

Similarly to other ISPs, set execution throttle to maximum allowed value since 'throttling' is done on a per-lun basis via queue-depth.

---

 drivers/scsi/qla2xxx/qla_init.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

eb3db2c21b87bc7ed3964392542a3857f9b38576

drivers/scsi/qla2xxx/qla_init.c +2 -0
index b4fbef5..8635bd1 100644
@@ -3407,6 +3407,8 @@ qla24xx_nvram_config(scsi_qla_host_t *ha
 	ha->node_name = icb->node_name;
 	ha->port_name = icb->port_name;
 
+	icb->execution_throttle = __constant_cpu_to_le16(0xFFFF);
+
 	ha->retry_count = le16_to_cpu(nv->login_retry_count);
 
 	/* Set minimum login_timeout to 4 seconds. */
Signature · 1 line
1.1.1-g4c34
#14 lore raw

PATCH 12/15 qla2xxx: Correct setting of FDMI supported/current port speed.

In reply to [email protected]

---

 drivers/scsi/qla2xxx/qla_gs.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

898e417ede8209f7f041ffb318d4e4762f153c07

drivers/scsi/qla2xxx/qla_gs.c +2 -5
index 0e8ada0..d620a8e 100644
@@ -1530,9 +1530,9 @@ qla2x00_fdmi_rpa(scsi_qla_host_t *ha)
 	eiter->type = __constant_cpu_to_be16(FDMI_PORT_SUPPORT_SPEED);
 	eiter->len = __constant_cpu_to_be16(4 + 4);
 	if (IS_QLA25XX(ha))
-		eiter->a.sup_speed = __constant_cpu_to_be32(4);
-	else if (IS_QLA24XX(ha))
 		eiter->a.sup_speed = __constant_cpu_to_be32(8);
+	else if (IS_QLA24XX(ha))
+		eiter->a.sup_speed = __constant_cpu_to_be32(4);
 	else if (IS_QLA23XX(ha))
 		eiter->a.sup_speed = __constant_cpu_to_be32(2);
 	else
@@ -1554,9 +1554,6 @@ qla2x00_fdmi_rpa(scsi_qla_host_t *ha)
 		eiter->a.cur_speed = __constant_cpu_to_be32(2);
 		break;
 	case 3:
-		eiter->a.cur_speed = __constant_cpu_to_be32(8);
-		break;
-	case 4:
 		eiter->a.cur_speed = __constant_cpu_to_be32(4);
 		break;
 	}
Signature · 1 line
1.1.1-g4c34
#15 lore raw

PATCH 13/15 qla2xxx: Kconfig update: Add URL to download firmware images.

In reply to [email protected]

---

 drivers/scsi/qla2xxx/Kconfig |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

a858c4426a247ba3bf7e28600c8488d6ec0ab283

drivers/scsi/qla2xxx/Kconfig +4 -0
index 02cc794..5758b25 100644
@@ -22,6 +22,10 @@ config SCSI_QLA_FC
 	Upon request, the driver caches the firmware image until
 	the driver is unloaded.
 
+	Firmware images can be retrieved from:
+
+		ftp://ftp.qlogic.com/outgoing/linux/firmware/
+
 	NOTE: The original method of building firmware-loader
 	modules has been deprecated as the firmware-images will
 	be removed from the kernel sources.
Signature · 1 line
1.1.1-g4c34
#16 lore raw

PATCH 14/15 qla2xxx: Disable port-type RSCN handling via driver state-machine.

In reply to [email protected]

Given the semantic changes in both the device-model and fc-transport APIs, the driver's handling of port-type RSCNs via a series of ADISCs and PLOGIs can cause series of badness ranging from unexpectedly device loss to devices not being discovered.

In the interim, disable (via a module-parameter) this feature and allow RSCN management to continue to occur within the driver's DPC thread.

---

 drivers/scsi/qla2xxx/qla_gbl.h  |    1 +
 drivers/scsi/qla2xxx/qla_init.c |    3 ++-
 drivers/scsi/qla2xxx/qla_isr.c  |    3 ++-
 drivers/scsi/qla2xxx/qla_os.c   |    6 ++++++
 4 files changed, 11 insertions(+), 2 deletions(-)

5c8a3bc356e1b56bfbb6ae25f67c22adc134e353

drivers/scsi/qla2xxx/qla_gbl.h +1 -0
index 7872c11..32be4c1 100644
@@ -62,6 +62,7 @@ extern int qlport_down_retry;
 extern int ql2xplogiabsentdevice;
 extern int ql2xloginretrycount;
 extern int ql2xfdmienable;
+extern int ql2xprocessrscn;
 
 extern void qla2x00_sp_compl(scsi_qla_host_t *, srb_t *);
 
drivers/scsi/qla2xxx/qla_init.c +2 -1
index 8635bd1..a91fea6 100644
@@ -2653,7 +2653,8 @@ qla2x00_device_resync(scsi_qla_host_t *h
 
 		switch (format) {
 		case 0:
-			if (!IS_QLA2100(ha) && !IS_QLA2200(ha) &&
+			if (ql2xprocessrscn &&
+			    !IS_QLA2100(ha) && !IS_QLA2200(ha) &&
 			    !IS_QLA6312(ha) && !IS_QLA6322(ha) &&
 			    !IS_QLA24XX(ha) && !IS_QLA25XX(ha) &&
 			    ha->flags.init_done) {
drivers/scsi/qla2xxx/qla_isr.c +2 -1
index 8a539dd..f63af08 100644
@@ -519,7 +519,8 @@ qla2x00_async_event(scsi_qla_host_t *ha,
 		 * us, create a new entry in our rscn fcports list and handle
 		 * the event like an RSCN.
 		 */
-		if (!IS_QLA2100(ha) && !IS_QLA2200(ha) && !IS_QLA6312(ha) &&
+		if (ql2xprocessrscn &&
+		    !IS_QLA2100(ha) && !IS_QLA2200(ha) && !IS_QLA6312(ha) &&
 		    !IS_QLA6322(ha) && !IS_QLA24XX(ha) && !IS_QLA25XX(ha) &&
 		    ha->flags.init_done && mb[1] != 0xffff &&
 		    ((ha->operating_mode == P2P && mb[1] != 0) ||
drivers/scsi/qla2xxx/qla_os.c +6 -0
index 2430430..4916847 100644
@@ -71,6 +71,12 @@ MODULE_PARM_DESC(ql2xfdmienable,
 		"Enables FDMI registratons "
 		"Default is 0 - no FDMI. 1 - perfom FDMI.");
 
+int ql2xprocessrscn;
+module_param(ql2xprocessrscn, int, S_IRUGO|S_IRUSR);
+MODULE_PARM_DESC(ql2xprocessrscn,
+		"Option to enable port RSCN handling via a series of less"
+		"fabric intrusive ADISCs and PLOGIs.");
+
 /*
  * SCSI host template entry points
  */
Signature · 1 line
1.1.1-g4c34
#17 lore raw

PATCH 15/15 qla2xxx: Update version number to 8.01.04-k.

In reply to [email protected]

---

 drivers/scsi/qla2xxx/qla_version.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

3a44fdacddcc718d635e5cf9cb80f8afc428a485

drivers/scsi/qla2xxx/qla_version.h +2 -2
index f7937f7..d537192 100644
@@ -7,9 +7,9 @@
 /*
  * Driver version
  */
-#define QLA2XXX_VERSION      "8.01.03-k"
+#define QLA2XXX_VERSION      "8.01.04-k"
 
 #define QLA_DRIVER_MAJOR_VER	8
 #define QLA_DRIVER_MINOR_VER	1
-#define QLA_DRIVER_PATCH_VER	3
+#define QLA_DRIVER_PATCH_VER	4
 #define QLA_DRIVER_BETA_VER	0
Signature · 1 line
1.1.1-g4c34