diff options
author | James Bottomley <James.Bottomley@steeleye.com> | 2007-02-15 16:25:35 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-02-16 10:43:31 -0500 |
commit | a29fdd3c2a3e53b67baa5031372fd78fddaf48fa (patch) | |
tree | 85445d698e6f45ac741e47b24dc31bf83490bbad /drivers/scsi | |
parent | 8d63f375051bfb1506fa546db840af8510d1cd60 (diff) |
[SCSI] aic94xx: tie driver to the major number of the sequencer firmware
The sequencer firmware file has both a string (currently showing
V17/10c6) and a number (currently set to 1.1). It has become apparent
that Adaptec may issue sequencer firmware in the future which could be
incompatible with the current driver. Therefore, the driver will be
tied to the particular major number of the firmware (i.e. the current
driver will load any 1.x firmware). Additionally, the driver will print
out both the ascii string and the major number, so with this pach the
current firmware will print out
aic94xx: Found sequencer firmware version 1.1 (V17/10c6)
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/aic94xx/aic94xx_seq.c | 13 | ||||
-rw-r--r-- | drivers/scsi/aic94xx/aic94xx_seq.h | 1 |
2 files changed, 11 insertions, 3 deletions
diff --git a/drivers/scsi/aic94xx/aic94xx_seq.c b/drivers/scsi/aic94xx/aic94xx_seq.c index eae7a247bece..c750fbf7013b 100644 --- a/drivers/scsi/aic94xx/aic94xx_seq.c +++ b/drivers/scsi/aic94xx/aic94xx_seq.c | |||
@@ -44,7 +44,6 @@ | |||
44 | #define PAUSE_TRIES 1000 | 44 | #define PAUSE_TRIES 1000 |
45 | 45 | ||
46 | static const struct firmware *sequencer_fw; | 46 | static const struct firmware *sequencer_fw; |
47 | static const char *sequencer_version; | ||
48 | static u16 cseq_vecs[CSEQ_NUM_VECS], lseq_vecs[LSEQ_NUM_VECS], mode2_task, | 47 | static u16 cseq_vecs[CSEQ_NUM_VECS], lseq_vecs[LSEQ_NUM_VECS], mode2_task, |
49 | cseq_idle_loop, lseq_idle_loop; | 48 | cseq_idle_loop, lseq_idle_loop; |
50 | static u8 *cseq_code, *lseq_code; | 49 | static u8 *cseq_code, *lseq_code; |
@@ -1276,7 +1275,6 @@ static int asd_request_firmware(struct asd_ha_struct *asd_ha) | |||
1276 | header.csum = le32_to_cpu(hdr_ptr->csum); | 1275 | header.csum = le32_to_cpu(hdr_ptr->csum); |
1277 | header.major = le32_to_cpu(hdr_ptr->major); | 1276 | header.major = le32_to_cpu(hdr_ptr->major); |
1278 | header.minor = le32_to_cpu(hdr_ptr->minor); | 1277 | header.minor = le32_to_cpu(hdr_ptr->minor); |
1279 | sequencer_version = hdr_ptr->version; | ||
1280 | header.cseq_table_offset = le32_to_cpu(hdr_ptr->cseq_table_offset); | 1278 | header.cseq_table_offset = le32_to_cpu(hdr_ptr->cseq_table_offset); |
1281 | header.cseq_table_size = le32_to_cpu(hdr_ptr->cseq_table_size); | 1279 | header.cseq_table_size = le32_to_cpu(hdr_ptr->cseq_table_size); |
1282 | header.lseq_table_offset = le32_to_cpu(hdr_ptr->lseq_table_offset); | 1280 | 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) | |||
1303 | return -EINVAL; | 1301 | return -EINVAL; |
1304 | } | 1302 | } |
1305 | 1303 | ||
1304 | asd_printk("Found sequencer Firmware version %d.%d (%s)\n", | ||
1305 | header.major, header.minor, hdr_ptr->version); | ||
1306 | |||
1307 | if (header.major != SAS_RAZOR_SEQUENCER_FW_MAJOR) { | ||
1308 | asd_printk("Firmware Major Version Mismatch;" | ||
1309 | "driver requires version %d.X", | ||
1310 | SAS_RAZOR_SEQUENCER_FW_MAJOR); | ||
1311 | return -EINVAL; | ||
1312 | } | ||
1313 | |||
1306 | ptr_cseq_vecs = (u16 *)&sequencer_fw->data[header.cseq_table_offset]; | 1314 | ptr_cseq_vecs = (u16 *)&sequencer_fw->data[header.cseq_table_offset]; |
1307 | ptr_lseq_vecs = (u16 *)&sequencer_fw->data[header.lseq_table_offset]; | 1315 | ptr_lseq_vecs = (u16 *)&sequencer_fw->data[header.lseq_table_offset]; |
1308 | mode2_task = header.mode2_task; | 1316 | mode2_task = header.mode2_task; |
@@ -1335,7 +1343,6 @@ int asd_init_seqs(struct asd_ha_struct *asd_ha) | |||
1335 | return err; | 1343 | return err; |
1336 | } | 1344 | } |
1337 | 1345 | ||
1338 | asd_printk("using sequencer %s\n", sequencer_version); | ||
1339 | err = asd_seq_download_seqs(asd_ha); | 1346 | err = asd_seq_download_seqs(asd_ha); |
1340 | if (err) { | 1347 | if (err) { |
1341 | asd_printk("couldn't download sequencers for %s\n", | 1348 | 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 9437ff0ae3a4..2ea6a0d52208 100644 --- a/drivers/scsi/aic94xx/aic94xx_seq.h +++ b/drivers/scsi/aic94xx/aic94xx_seq.h | |||
@@ -31,6 +31,7 @@ | |||
31 | #define LSEQ_NUM_VECS 11 | 31 | #define LSEQ_NUM_VECS 11 |
32 | 32 | ||
33 | #define SAS_RAZOR_SEQUENCER_FW_FILE "aic94xx-seq.fw" | 33 | #define SAS_RAZOR_SEQUENCER_FW_FILE "aic94xx-seq.fw" |
34 | #define SAS_RAZOR_SEQUENCER_FW_MAJOR 1 | ||
34 | 35 | ||
35 | /* Note: All quantites in the sequencer file are little endian */ | 36 | /* Note: All quantites in the sequencer file are little endian */ |
36 | struct sequencer_file_header { | 37 | struct sequencer_file_header { |