aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/aic94xx
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-19 13:32:28 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-19 13:32:28 -0800
commit5fc77247f7db01b6377a5ea6ab18c8ac60021045 (patch)
treed9f33f0e01b64a46ade3f45a3553b1a8ba8fc5b5 /drivers/scsi/aic94xx
parentd43a338e395371733a80ec473b40baac5f74d768 (diff)
parent7c9d6f16f50d3aeb780e4f103a1ba8b35d9ae803 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: [SCSI] SCSI core: better initialization for sdev->scsi_level [SCSI] scsi_proc.c: display sdev->scsi_level correctly [SCSI] megaraid_sas: update version and author info [SCSI] megaraid_sas: return sync cache call with success [SCSI] megaraid_sas: replace pci_alloc_consitent with dma_alloc_coherent in ioctl path [SCSI] megaraid_sas: add bios_param in scsi_host_template [SCSI] megaraid_sas: do not process cmds if hw_crit_error is set [SCSI] scsi_transport.h should include scsi_device.h [SCSI] aic79xx: remove extra newline from info message [SCSI] scsi_scan.c: handle bad inquiry responses [SCSI] aic94xx: tie driver to the major number of the sequencer firmware [SCSI] lpfc: add PCI error recovery support [SCSI] megaraid: pci_module_init to pci_register_driver [SCSI] tgt: fix the user/kernel ring buffer interface [SCSI] sgiwd93: interfacing to wd33c93 [SCSI] wd33c93: Fast SCSI with WD33C93B
Diffstat (limited to 'drivers/scsi/aic94xx')
-rw-r--r--drivers/scsi/aic94xx/aic94xx_seq.c13
-rw-r--r--drivers/scsi/aic94xx/aic94xx_seq.h1
2 files changed, 11 insertions, 3 deletions
diff --git a/drivers/scsi/aic94xx/aic94xx_seq.c b/drivers/scsi/aic94xx/aic94xx_seq.c
index eae7a247bec..c750fbf7013 100644
--- a/drivers/scsi/aic94xx/aic94xx_seq.c
+++ b/drivers/scsi/aic94xx/aic94xx_seq.c
@@ -44,7 +44,6 @@
#define PAUSE_TRIES 1000
static const struct firmware *sequencer_fw;
-static const char *sequencer_version;
static u16 cseq_vecs[CSEQ_NUM_VECS], lseq_vecs[LSEQ_NUM_VECS], mode2_task,
cseq_idle_loop, lseq_idle_loop;
static u8 *cseq_code, *lseq_code;
@@ -1276,7 +1275,6 @@ static int asd_request_firmware(struct asd_ha_struct *asd_ha)
header.csum = le32_to_cpu(hdr_ptr->csum);
header.major = le32_to_cpu(hdr_ptr->major);
header.minor = le32_to_cpu(hdr_ptr->minor);
- sequencer_version = hdr_ptr->version;
header.cseq_table_offset = le32_to_cpu(hdr_ptr->cseq_table_offset);
header.cseq_table_size = le32_to_cpu(hdr_ptr->cseq_table_size);
header.lseq_table_offset = le32_to_cpu(hdr_ptr->lseq_table_offset);
@@ -1303,6 +1301,16 @@ static int asd_request_firmware(struct asd_ha_struct *asd_ha)
return -EINVAL;
}
+ asd_printk("Found sequencer Firmware version %d.%d (%s)\n",
+ header.major, header.minor, hdr_ptr->version);
+
+ if (header.major != SAS_RAZOR_SEQUENCER_FW_MAJOR) {
+ asd_printk("Firmware Major Version Mismatch;"
+ "driver requires version %d.X",
+ SAS_RAZOR_SEQUENCER_FW_MAJOR);
+ return -EINVAL;
+ }
+
ptr_cseq_vecs = (u16 *)&sequencer_fw->data[header.cseq_table_offset];
ptr_lseq_vecs = (u16 *)&sequencer_fw->data[header.lseq_table_offset];
mode2_task = header.mode2_task;
@@ -1335,7 +1343,6 @@ int asd_init_seqs(struct asd_ha_struct *asd_ha)
return err;
}
- asd_printk("using sequencer %s\n", sequencer_version);
err = asd_seq_download_seqs(asd_ha);
if (err) {
asd_printk("couldn't download sequencers for %s\n",
diff --git a/drivers/scsi/aic94xx/aic94xx_seq.h b/drivers/scsi/aic94xx/aic94xx_seq.h
index 9437ff0ae3a..2ea6a0d5220 100644
--- a/drivers/scsi/aic94xx/aic94xx_seq.h
+++ b/drivers/scsi/aic94xx/aic94xx_seq.h
@@ -31,6 +31,7 @@
#define LSEQ_NUM_VECS 11
#define SAS_RAZOR_SEQUENCER_FW_FILE "aic94xx-seq.fw"
+#define SAS_RAZOR_SEQUENCER_FW_MAJOR 1
/* Note: All quantites in the sequencer file are little endian */
struct sequencer_file_header {