summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla4xxx/ql4_nvram.c
diff options
context:
space:
mode:
authorManish Rangankar <manish.rangankar@qlogic.com>2011-07-25 20:48:55 +0200
committerJames Bottomley <JBottomley@Parallels.com>2011-08-27 16:36:27 +0200
commit2a991c2159782b8d318ac9f88a36c22dda3e7185 (patch)
tree963cc3bec9517038458ad7e71b9a5d45ede4d360 /drivers/scsi/qla4xxx/ql4_nvram.c
parent[SCSI] qla4xxx: Remove reduandant code after open-iscsi integration. (diff)
downloadlinux-2a991c2159782b8d318ac9f88a36c22dda3e7185.tar.xz
linux-2a991c2159782b8d318ac9f88a36c22dda3e7185.zip
[SCSI] qla4xxx: Boot from SAN support for open-iscsi
Hook qla4xxx in fw boot sysfs interface so iscsi tools can use the info to create boot sessions. Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla4xxx/ql4_nvram.c')
-rw-r--r--drivers/scsi/qla4xxx/ql4_nvram.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_nvram.c b/drivers/scsi/qla4xxx/ql4_nvram.c
index b4b859b2d47e..7851f314ba96 100644
--- a/drivers/scsi/qla4xxx/ql4_nvram.c
+++ b/drivers/scsi/qla4xxx/ql4_nvram.c
@@ -156,6 +156,27 @@ u16 rd_nvram_word(struct scsi_qla_host * ha, int offset)
return val;
}
+u8 rd_nvram_byte(struct scsi_qla_host *ha, int offset)
+{
+ u16 val = 0;
+ u8 rval = 0;
+ int index = 0;
+
+ if (offset & 0x1)
+ index = (offset - 1) / 2;
+ else
+ index = offset / 2;
+
+ val = le16_to_cpu(rd_nvram_word(ha, index));
+
+ if (offset & 0x1)
+ rval = (u8)((val & 0xff00) >> 8);
+ else
+ rval = (u8)((val & 0x00ff));
+
+ return rval;
+}
+
int qla4xxx_is_nvram_configuration_valid(struct scsi_qla_host * ha)
{
int status = QLA_ERROR;