diff options
author | Atul Deshmukh <atul.deshmukh@qlogic.com> | 2013-08-27 01:37:28 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-09-03 10:28:00 -0400 |
commit | 7ec0effd30bb4b1379cd2f5ed1a7bd6b9ec49cfd (patch) | |
tree | e249c7e5d1a3ae11eeeb2e0aef0883872d7e74ce /drivers/scsi/qla2xxx/qla_attr.c | |
parent | 7b8335589035b47504f98c1a22547f514386a48c (diff) |
[SCSI] qla2xxx: Add support for ISP8044.
[jejb: checkpatch fixes]
Signed-off-by: Atul Deshmukh <atul.deshmukh@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_attr.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_attr.c | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index d7a99ae7f39d..8e8b50ee9a0e 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c | |||
@@ -29,7 +29,7 @@ qla2x00_sysfs_read_fw_dump(struct file *filp, struct kobject *kobj, | |||
29 | if (!(ha->fw_dump_reading || ha->mctp_dump_reading)) | 29 | if (!(ha->fw_dump_reading || ha->mctp_dump_reading)) |
30 | return 0; | 30 | return 0; |
31 | 31 | ||
32 | if (IS_QLA82XX(ha)) { | 32 | if (IS_P3P_TYPE(ha)) { |
33 | if (off < ha->md_template_size) { | 33 | if (off < ha->md_template_size) { |
34 | rval = memory_read_from_buffer(buf, count, | 34 | rval = memory_read_from_buffer(buf, count, |
35 | &off, ha->md_tmplt_hdr, ha->md_template_size); | 35 | &off, ha->md_tmplt_hdr, ha->md_template_size); |
@@ -71,7 +71,7 @@ qla2x00_sysfs_write_fw_dump(struct file *filp, struct kobject *kobj, | |||
71 | ql_log(ql_log_info, vha, 0x705d, | 71 | ql_log(ql_log_info, vha, 0x705d, |
72 | "Firmware dump cleared on (%ld).\n", vha->host_no); | 72 | "Firmware dump cleared on (%ld).\n", vha->host_no); |
73 | 73 | ||
74 | if (IS_QLA82XX(vha->hw)) { | 74 | if (IS_P3P_TYPE(ha)) { |
75 | qla82xx_md_free(vha); | 75 | qla82xx_md_free(vha); |
76 | qla82xx_md_prep(vha); | 76 | qla82xx_md_prep(vha); |
77 | } | 77 | } |
@@ -95,11 +95,15 @@ qla2x00_sysfs_write_fw_dump(struct file *filp, struct kobject *kobj, | |||
95 | qla82xx_idc_lock(ha); | 95 | qla82xx_idc_lock(ha); |
96 | qla82xx_set_reset_owner(vha); | 96 | qla82xx_set_reset_owner(vha); |
97 | qla82xx_idc_unlock(ha); | 97 | qla82xx_idc_unlock(ha); |
98 | } else if (IS_QLA8044(ha)) { | ||
99 | qla8044_idc_lock(ha); | ||
100 | qla82xx_set_reset_owner(vha); | ||
101 | qla8044_idc_unlock(ha); | ||
98 | } else | 102 | } else |
99 | qla2x00_system_error(vha); | 103 | qla2x00_system_error(vha); |
100 | break; | 104 | break; |
101 | case 4: | 105 | case 4: |
102 | if (IS_QLA82XX(ha)) { | 106 | if (IS_P3P_TYPE(ha)) { |
103 | if (ha->md_tmplt_hdr) | 107 | if (ha->md_tmplt_hdr) |
104 | ql_dbg(ql_dbg_user, vha, 0x705b, | 108 | ql_dbg(ql_dbg_user, vha, 0x705b, |
105 | "MiniDump supported with this firmware.\n"); | 109 | "MiniDump supported with this firmware.\n"); |
@@ -109,7 +113,7 @@ qla2x00_sysfs_write_fw_dump(struct file *filp, struct kobject *kobj, | |||
109 | } | 113 | } |
110 | break; | 114 | break; |
111 | case 5: | 115 | case 5: |
112 | if (IS_QLA82XX(ha)) | 116 | if (IS_P3P_TYPE(ha)) |
113 | set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); | 117 | set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); |
114 | break; | 118 | break; |
115 | case 6: | 119 | case 6: |
@@ -597,14 +601,23 @@ qla2x00_sysfs_write_reset(struct file *filp, struct kobject *kobj, | |||
597 | "Issuing ISP reset.\n"); | 601 | "Issuing ISP reset.\n"); |
598 | 602 | ||
599 | scsi_block_requests(vha->host); | 603 | scsi_block_requests(vha->host); |
600 | set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); | ||
601 | if (IS_QLA82XX(ha)) { | 604 | if (IS_QLA82XX(ha)) { |
602 | ha->flags.isp82xx_no_md_cap = 1; | 605 | ha->flags.isp82xx_no_md_cap = 1; |
603 | qla82xx_idc_lock(ha); | 606 | qla82xx_idc_lock(ha); |
604 | qla82xx_set_reset_owner(vha); | 607 | qla82xx_set_reset_owner(vha); |
605 | qla82xx_idc_unlock(ha); | 608 | qla82xx_idc_unlock(ha); |
609 | } else if (IS_QLA8044(ha)) { | ||
610 | qla8044_idc_lock(ha); | ||
611 | idc_control = qla8044_rd_reg(ha, | ||
612 | QLA8044_IDC_DRV_CTRL); | ||
613 | qla8044_wr_reg(ha, QLA8044_IDC_DRV_CTRL, | ||
614 | (idc_control | GRACEFUL_RESET_BIT1)); | ||
615 | qla82xx_set_reset_owner(vha); | ||
616 | qla8044_idc_unlock(ha); | ||
617 | } else { | ||
618 | set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); | ||
619 | qla2xxx_wake_dpc(vha); | ||
606 | } | 620 | } |
607 | qla2xxx_wake_dpc(vha); | ||
608 | qla2x00_wait_for_chip_reset(vha); | 621 | qla2x00_wait_for_chip_reset(vha); |
609 | scsi_unblock_requests(vha->host); | 622 | scsi_unblock_requests(vha->host); |
610 | break; | 623 | break; |
@@ -640,7 +653,7 @@ qla2x00_sysfs_write_reset(struct file *filp, struct kobject *kobj, | |||
640 | break; | 653 | break; |
641 | } | 654 | } |
642 | case 0x2025e: | 655 | case 0x2025e: |
643 | if (!IS_QLA82XX(ha) || vha != base_vha) { | 656 | if (!IS_P3P_TYPE(ha) || vha != base_vha) { |
644 | ql_log(ql_log_info, vha, 0x7071, | 657 | ql_log(ql_log_info, vha, 0x7071, |
645 | "FCoE ctx reset no supported.\n"); | 658 | "FCoE ctx reset no supported.\n"); |
646 | return -EPERM; | 659 | return -EPERM; |
@@ -1212,7 +1225,7 @@ qla2x00_mpi_version_show(struct device *dev, struct device_attribute *attr, | |||
1212 | scsi_qla_host_t *vha = shost_priv(class_to_shost(dev)); | 1225 | scsi_qla_host_t *vha = shost_priv(class_to_shost(dev)); |
1213 | struct qla_hw_data *ha = vha->hw; | 1226 | struct qla_hw_data *ha = vha->hw; |
1214 | 1227 | ||
1215 | if (!IS_QLA81XX(ha) && !IS_QLA8031(ha)) | 1228 | if (!IS_QLA81XX(ha) && !IS_QLA8031(ha) && !IS_QLA8044(ha)) |
1216 | return snprintf(buf, PAGE_SIZE, "\n"); | 1229 | return snprintf(buf, PAGE_SIZE, "\n"); |
1217 | 1230 | ||
1218 | return snprintf(buf, PAGE_SIZE, "%d.%02d.%02d (%x)\n", | 1231 | return snprintf(buf, PAGE_SIZE, "%d.%02d.%02d (%x)\n", |