Skip to content

Commit

Permalink
[SCSI] qla2xxx: Add OS initialization codes for ISP24xx recognition.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrew Vasquez authored and James Bottomley committed Jul 14, 2005
1 parent 0107109 commit fca2970
Show file tree
Hide file tree
Showing 4 changed files with 350 additions and 95 deletions.
3 changes: 3 additions & 0 deletions drivers/scsi/qla2xxx/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
EXTRA_CFLAGS += -DUNIQUE_FW_NAME
CONFIG_SCSI_QLA24XX=m
EXTRA_CFLAGS += -DCONFIG_SCSI_QLA24XX -DCONFIG_SCSI_QLA24XX_MODULE

qla2xxx-y := qla_os.o qla_init.o qla_mbx.o qla_iocb.o qla_isr.o qla_gs.o \
qla_dbg.o qla_sup.o qla_rscn.o qla_attr.o
Expand All @@ -14,3 +16,4 @@ obj-$(CONFIG_SCSI_QLA22XX) += qla2xxx.o qla2200.o
obj-$(CONFIG_SCSI_QLA2300) += qla2xxx.o qla2300.o
obj-$(CONFIG_SCSI_QLA2322) += qla2xxx.o qla2322.o
obj-$(CONFIG_SCSI_QLA6312) += qla2xxx.o qla6312.o
obj-$(CONFIG_SCSI_QLA24XX) += qla2xxx.o
22 changes: 14 additions & 8 deletions drivers/scsi/qla2xxx/qla_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion drivers/scsi/qla2xxx/qla_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -1989,7 +1989,8 @@ struct qla_board_info {

char isp_name[8];
struct qla_fw_info *fw_info;
char *fw_fname;;
char *fw_fname;
struct scsi_host_template *sht;
};

/* Return data from MBC_GET_ID_LIST call. */
Expand Down
Loading

0 comments on commit fca2970

Please sign in to comment.