aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_attr.c
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2005-07-06 10:31:47 -0700
committerJames Bottomley <jejb@mulgrave.(none)>2005-07-14 11:02:23 -0400
commitfca297037127e524e8f61b3fc1c7a1886e5d757b (patch)
tree90ee788ff7839cb3b6db67698ff5e065391636bf /drivers/scsi/qla2xxx/qla_attr.c
parent0107109ed69c9e04b6fa35ac41d870c74dcce3fc (diff)
downloadkernel_samsung_espresso10-fca297037127e524e8f61b3fc1c7a1886e5d757b.zip
kernel_samsung_espresso10-fca297037127e524e8f61b3fc1c7a1886e5d757b.tar.gz
kernel_samsung_espresso10-fca297037127e524e8f61b3fc1c7a1886e5d757b.tar.bz2
[SCSI] qla2xxx: Add OS initialization codes for ISP24xx recognition.
Add OS initialization codes for ISP24xx recognition. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_attr.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_attr.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index 9361f42..659a5d6 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -63,23 +63,29 @@ qla2x00_sysfs_write_fw_dump(struct kobject *kobj, char *buf, loff_t off,
ha->host_no);
vfree(ha->fw_dump_buffer);
- free_pages((unsigned long)ha->fw_dump,
- ha->fw_dump_order);
+ if (!IS_QLA24XX(ha) && !IS_QLA25XX(ha))
+ free_pages((unsigned long)ha->fw_dump,
+ ha->fw_dump_order);
ha->fw_dump_reading = 0;
ha->fw_dump_buffer = NULL;
ha->fw_dump = NULL;
+ ha->fw_dumped = 0;
}
break;
case 1:
- if (ha->fw_dump != NULL && !ha->fw_dump_reading) {
+ if ((ha->fw_dump || ha->fw_dumped) && !ha->fw_dump_reading) {
ha->fw_dump_reading = 1;
- dump_size = FW_DUMP_SIZE_1M;
- if (ha->fw_memory_size < 0x20000)
- dump_size = FW_DUMP_SIZE_128K;
- else if (ha->fw_memory_size < 0x80000)
- dump_size = FW_DUMP_SIZE_512K;
+ if (IS_QLA24XX(ha) || IS_QLA25XX(ha))
+ dump_size = FW_DUMP_SIZE_24XX;
+ else {
+ dump_size = FW_DUMP_SIZE_1M;
+ if (ha->fw_memory_size < 0x20000)
+ dump_size = FW_DUMP_SIZE_128K;
+ else if (ha->fw_memory_size < 0x80000)
+ dump_size = FW_DUMP_SIZE_512K;
+ }
ha->fw_dump_buffer = (char *)vmalloc(dump_size);
if (ha->fw_dump_buffer == NULL) {
qla_printk(KERN_WARNING, ha,