diff options
author | Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> | 2010-12-21 19:00:19 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-12-23 16:56:17 -0500 |
commit | c9e8fd5cfb7de50139a8aa0f70f9fe03311cdd01 (patch) | |
tree | b2172208b47ec59eaf00cb6bbad0f418a56079f1 /drivers/scsi | |
parent | 21090cbe95189d4ce6135fc8fec2f416b3eb227f (diff) |
[SCSI] qla2xxx: Fix for memory wedge on fw halt for ISP82XX
Signed-off-by: Swapnil Nagle <swapnil.nagle@qlogic.com>
Signed-off-by: Karen Higgins <karen.higgins@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_nx.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c index 9175e847b93a..6ea5e98b850b 100644 --- a/drivers/scsi/qla2xxx/qla_nx.c +++ b/drivers/scsi/qla2xxx/qla_nx.c | |||
@@ -1079,11 +1079,55 @@ qla82xx_pinit_from_rom(scsi_qla_host_t *vha) | |||
1079 | 1079 | ||
1080 | /* Halt all the indiviual PEGs and other blocks of the ISP */ | 1080 | /* Halt all the indiviual PEGs and other blocks of the ISP */ |
1081 | qla82xx_rom_lock(ha); | 1081 | qla82xx_rom_lock(ha); |
1082 | |||
1083 | /* mask all niu interrupts */ | ||
1084 | qla82xx_wr_32(ha, QLA82XX_CRB_NIU + 0x40, 0xff); | ||
1085 | /* disable xge rx/tx */ | ||
1086 | qla82xx_wr_32(ha, QLA82XX_CRB_NIU + 0x70000, 0x00); | ||
1087 | /* disable xg1 rx/tx */ | ||
1088 | qla82xx_wr_32(ha, QLA82XX_CRB_NIU + 0x80000, 0x00); | ||
1089 | |||
1090 | /* halt sre */ | ||
1091 | val = qla82xx_rd_32(ha, QLA82XX_CRB_SRE + 0x1000); | ||
1092 | qla82xx_wr_32(ha, QLA82XX_CRB_SRE + 0x1000, val & (~(0x1))); | ||
1093 | |||
1094 | /* halt epg */ | ||
1095 | qla82xx_wr_32(ha, QLA82XX_CRB_EPG + 0x1300, 0x1); | ||
1096 | |||
1097 | /* halt timers */ | ||
1098 | qla82xx_wr_32(ha, QLA82XX_CRB_TIMER + 0x0, 0x0); | ||
1099 | qla82xx_wr_32(ha, QLA82XX_CRB_TIMER + 0x8, 0x0); | ||
1100 | qla82xx_wr_32(ha, QLA82XX_CRB_TIMER + 0x10, 0x0); | ||
1101 | qla82xx_wr_32(ha, QLA82XX_CRB_TIMER + 0x18, 0x0); | ||
1102 | qla82xx_wr_32(ha, QLA82XX_CRB_TIMER + 0x100, 0x0); | ||
1103 | |||
1104 | /* halt pegs */ | ||
1105 | qla82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_0 + 0x3c, 1); | ||
1106 | qla82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_1 + 0x3c, 1); | ||
1107 | qla82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_2 + 0x3c, 1); | ||
1108 | qla82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_3 + 0x3c, 1); | ||
1109 | qla82xx_wr_32(ha, QLA82XX_CRB_PEG_NET_4 + 0x3c, 1); | ||
1110 | |||
1111 | /* big hammer */ | ||
1112 | msleep(1000); | ||
1082 | if (test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags)) | 1113 | if (test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags)) |
1083 | /* don't reset CAM block on reset */ | 1114 | /* don't reset CAM block on reset */ |
1084 | qla82xx_wr_32(ha, QLA82XX_ROMUSB_GLB_SW_RESET, 0xfeffffff); | 1115 | qla82xx_wr_32(ha, QLA82XX_ROMUSB_GLB_SW_RESET, 0xfeffffff); |
1085 | else | 1116 | else |
1086 | qla82xx_wr_32(ha, QLA82XX_ROMUSB_GLB_SW_RESET, 0xffffffff); | 1117 | qla82xx_wr_32(ha, QLA82XX_ROMUSB_GLB_SW_RESET, 0xffffffff); |
1118 | |||
1119 | /* reset ms */ | ||
1120 | val = qla82xx_rd_32(ha, QLA82XX_CRB_QDR_NET + 0xe4); | ||
1121 | val |= (1 << 1); | ||
1122 | qla82xx_wr_32(ha, QLA82XX_CRB_QDR_NET + 0xe4, val); | ||
1123 | msleep(20); | ||
1124 | |||
1125 | /* unreset ms */ | ||
1126 | val = qla82xx_rd_32(ha, QLA82XX_CRB_QDR_NET + 0xe4); | ||
1127 | val &= ~(1 << 1); | ||
1128 | qla82xx_wr_32(ha, QLA82XX_CRB_QDR_NET + 0xe4, val); | ||
1129 | msleep(20); | ||
1130 | |||
1087 | qla82xx_rd_32(ha, QLA82XX_PCIE_REG(PCIE_SEM2_UNLOCK)); | 1131 | qla82xx_rd_32(ha, QLA82XX_PCIE_REG(PCIE_SEM2_UNLOCK)); |
1088 | 1132 | ||
1089 | /* Read the signature value from the flash. | 1133 | /* Read the signature value from the flash. |