Skip to contentSkip to conversation

qla4xxx: Added support for ISP82XX

PATCH In review Vikas Chaudhary 2 participants 3 messages Jun 16, 2010

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

PATCH 7/11 qla4xxx: Added support for ISP82XX

Signed-off-by Vikas Chaudhary <Vikas [email protected]>
---
 drivers/scsi/qla4xxx/Kconfig      |    8 +-
 drivers/scsi/qla4xxx/Makefile     |    2 +-
 drivers/scsi/qla4xxx/ql4_def.h    |  141 +++-
 drivers/scsi/qla4xxx/ql4_fw.h     |  139 +++-
 drivers/scsi/qla4xxx/ql4_glbl.h   |  106 ++-
 drivers/scsi/qla4xxx/ql4_init.c   |  135 ++-
 drivers/scsi/qla4xxx/ql4_inline.h |    2 +-
 drivers/scsi/qla4xxx/ql4_iocb.c   |   73 ++-
 drivers/scsi/qla4xxx/ql4_isr.c    |  388 ++++++-
 drivers/scsi/qla4xxx/ql4_mbx.c    |  171 ++-
 drivers/scsi/qla4xxx/ql4_nvram.c  |    2 +-
 drivers/scsi/qla4xxx/ql4_nvram.h  |   10 +-
 drivers/scsi/qla4xxx/ql4_nx.c     | 2317 +++++++++++++++++++++++++++++++++++++
 drivers/scsi/qla4xxx/ql4_nx.h     |  779 +++++++++++++
 drivers/scsi/qla4xxx/ql4_os.c     |  678 +++++++++---
 15 files changed, 4593 insertions(+), 358 deletions(-)
 create mode 100644 drivers/scsi/qla4xxx/ql4_nx.c
 create mode 100644 drivers/scsi/qla4xxx/ql4_nx.h
drivers/scsi/qla4xxx/Kconfig +4 -4
index 69cbff3..2c33ce6 100644
@@ -1,7 +1,7 @@
 config SCSI_QLA_ISCSI
-	tristate "QLogic ISP4XXX host adapter family support"
-	depends on PCI && SCSI && NET
+	tristate "QLogic ISP4XXX and ISP82XX host adapter family support"
+	depends on PCI && SCSI
 	select SCSI_ISCSI_ATTRS
 	---help---
-	This driver supports the QLogic 40xx (ISP4XXX) iSCSI host
-	adapter family.
+	This driver supports the QLogic 40xx (ISP4XXX) and 8022 (ISP82XX)
+	iSCSI host adapter family.
drivers/scsi/qla4xxx/Makefile +1 -1
index 86ea37b..0339ff0 100644
@@ -1,5 +1,5 @@
 qla4xxx-y := ql4_os.o ql4_init.o ql4_mbx.o ql4_iocb.o ql4_isr.o \
-		ql4_nvram.o ql4_dbg.o
+		ql4_nx.o ql4_nvram.o ql4_dbg.o
 
 obj-$(CONFIG_SCSI_QLA_ISCSI) += qla4xxx.o
 
drivers/scsi/qla4xxx/ql4_def.h +130 -11

246 lines not on this page · raw message

drivers/scsi/qla4xxx/ql4_fw.h +138 -1

185 lines not on this page · raw message

drivers/scsi/qla4xxx/ql4_glbl.h +82 -24

141 lines not on this page · raw message

drivers/scsi/qla4xxx/ql4_init.c +94 -41

267 lines not on this page · raw message

drivers/scsi/qla4xxx/ql4_inline.h +1 -1
index 6375eb0..9471ac7 100644
@@ -29,7 +29,7 @@ qla4xxx_lookup_ddb_by_fw_index(struct scsi_qla_host *ha, uint32_t fw_ddb_index)
 		ddb_entry = ha->fw_ddb_index_map[fw_ddb_index];
 	}
 
-	DEBUG3(printk("scsi%d: %s: index [%d], ddb_entry = %p\n",
+	DEBUG3(printk("scsi%d: %s: ddb [%d], ddb_entry = %p\n",
 	    ha->host_no, __func__, fw_ddb_index, ddb_entry));
 
 	return ddb_entry;
drivers/scsi/qla4xxx/ql4_iocb.c +68 -5

91 lines not on this page · raw message

drivers/scsi/qla4xxx/ql4_isr.c +324 -64

569 lines not on this page · raw message

drivers/scsi/qla4xxx/ql4_mbx.c +127 -44

288 lines not on this page · raw message

drivers/scsi/qla4xxx/ql4_nvram.c +1 -1
index 7fe0482..f0d0fbf 100644
@@ -149,7 +149,7 @@ static int eeprom_readword(int eepromAddr, u16 * value,
 /* Hardware_lock must be set before calling */
 u16 rd_nvram_word(struct scsi_qla_host * ha, int offset)
 {
-	u16 val;
+	u16 val = 0;
 
 	/* NOTE: NVRAM uses half-word addresses */
 	eeprom_readword(offset, &val, ha);
drivers/scsi/qla4xxx/ql4_nvram.h +5 -5
index b47b4fc..7a8fc66 100644
@@ -8,9 +8,9 @@
 #ifndef _QL4XNVRM_H_
 #define _QL4XNVRM_H_
 
-/*
+/**
  * AM29LV Flash definitions
- */
+ **/
 #define FM93C56A_SIZE_8	 0x100
 #define FM93C56A_SIZE_16 0x80
 #define FM93C66A_SIZE_8	 0x200
@@ -19,7 +19,7 @@
 
 #define	 FM93C56A_START	      0x1
 
-// Commands
+/* Commands */
 #define	 FM93C56A_READ	      0x2
 #define	 FM93C56A_WEN	      0x0
 #define	 FM93C56A_WRITE	      0x1
@@ -62,9 +62,9 @@
 #define	 AUBURN_EEPROM_CLK_RISE	    0x1
 #define	 AUBURN_EEPROM_CLK_FALL	    0x0
 
-/* */
+/**/
 /* EEPROM format */
-/* */
+/**/
 struct bios_params {
 	uint16_t SpinUpDelay:1;
 	uint16_t BIOSDisable:1;
drivers/scsi/qla4xxx/ql4_nx.c new file +2317 -0

1,150 lines not on this page · raw message

drivers/scsi/qla4xxx/ql4_nx.h new file +779 -0

779 lines not on this page · raw message

drivers/scsi/qla4xxx/ql4_os.c +522 -156

678 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.7.0.5

Part of the diff is not shown here. View the raw message.

#1 lore raw

drivers/scsi/qla4xxx/ql4_isr.c static void qla4xxx_isr_decode_mailbox(struct scsi_qla_host * ha, · line 636

Quoted 8 lines · Vikas Chaudhary

} else {
DEBUG2(printk("scsi%ld: Unknown mailbox status %08X\n",
ha->host_no, mbox_status));

drivers/scsi/qla4xxx/ql4_isr.c +1 -1
-		ha->mbox_status[0] = mbox_status;
+		ha->mbox_status[0] = mbox_sts[0];
  	}
  }

Is this right? mbox_sts[0] is not set at this point, and you get:

drivers/scsi/qla4xxx/ql4_isr.c: In function ‘qla4xxx_isr_decode_mailbox’:
drivers/scsi/qla4xxx/ql4_isr.c:634: warning: ‘mbox_sts’ may be used uninitialized in this function

We should not hit the case though, right. Maybe in a follow up patch you can fix this since the rest of the patches look ok, and I do not want to look a them ever again :) --
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 20 lines

-----Original Message-----
From: Mike Christie [mailto:[email protected]]
Sent: Wednesday, June 16, 2010 3:03 PM
To: Vikas Chaudhary
Cc: [email protected]; [email protected]; Ravi Anand; Karen Higgins
Subject: Re: [PATCH 07/11] qla4xxx: Added support for ISP82XX

drivers/scsi/qla4xxx/ql4_isr.c static void qla4xxx_isr_decode_mailbox(struct scsi_qla_host * ha, · line 636

Quoted 8 lines · Vikas Chaudhary

} else {
DEBUG2(printk("scsi%ld: Unknown mailbox status %08X\n",
ha->host_no, mbox_status));

drivers/scsi/qla4xxx/ql4_isr.c +1 -1
-		ha->mbox_status[0] = mbox_status;
+		ha->mbox_status[0] = mbox_sts[0];
  	}
  }

Is this right? mbox_sts[0] is not set at this point, and you get:

Quoted 7 lines

drivers/scsi/qla4xxx/ql4_isr.c: In function 'qla4xxx_isr_decode_mailbox':
drivers/scsi/qla4xxx/ql4_isr.c:634: warning: 'mbox_sts' may be used uninitialized in this function

We should not hit the case though, right. Maybe in a follow up patch you can fix this since the rest of the patches look ok, and I do not want to look a them ever again :)

Thanks for pointing this out. You are right we will not hit this case. I will send follow up patch to fix this.