.. | .. |
---|
18 | 18 | * | Queue Command and IO tracing | 0x3074 | 0x300b | |
---|
19 | 19 | * | | | 0x3027-0x3028 | |
---|
20 | 20 | * | | | 0x303d-0x3041 | |
---|
21 | | - * | | | 0x302d,0x3033 | |
---|
| 21 | + * | | | 0x302e,0x3033 | |
---|
22 | 22 | * | | | 0x3036,0x3038 | |
---|
23 | 23 | * | | | 0x303a | |
---|
24 | 24 | * | DPC Thread | 0x4023 | 0x4002,0x4013 | |
---|
.. | .. |
---|
112 | 112 | uint32_t stat; |
---|
113 | 113 | ulong i, j, timer = 6000000; |
---|
114 | 114 | int rval = QLA_FUNCTION_FAILED; |
---|
| 115 | + scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); |
---|
115 | 116 | |
---|
116 | 117 | clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); |
---|
| 118 | + |
---|
| 119 | + if (qla_pci_disconnected(vha, reg)) |
---|
| 120 | + return rval; |
---|
| 121 | + |
---|
117 | 122 | for (i = 0; i < ram_dwords; i += dwords, addr += dwords) { |
---|
118 | 123 | if (i + dwords > ram_dwords) |
---|
119 | 124 | dwords = ram_dwords - i; |
---|
.. | .. |
---|
136 | 141 | ha->flags.mbox_int = 0; |
---|
137 | 142 | while (timer--) { |
---|
138 | 143 | udelay(5); |
---|
| 144 | + |
---|
| 145 | + if (qla_pci_disconnected(vha, reg)) |
---|
| 146 | + return rval; |
---|
139 | 147 | |
---|
140 | 148 | stat = rd_reg_dword(®->host_status); |
---|
141 | 149 | /* Check for pending interrupts. */ |
---|
.. | .. |
---|
191 | 199 | uint32_t dwords = qla2x00_gid_list_size(ha) / 4; |
---|
192 | 200 | uint32_t stat; |
---|
193 | 201 | ulong i, j, timer = 6000000; |
---|
| 202 | + scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); |
---|
194 | 203 | |
---|
195 | 204 | clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); |
---|
| 205 | + |
---|
| 206 | + if (qla_pci_disconnected(vha, reg)) |
---|
| 207 | + return rval; |
---|
196 | 208 | |
---|
197 | 209 | for (i = 0; i < ram_dwords; i += dwords, addr += dwords) { |
---|
198 | 210 | if (i + dwords > ram_dwords) |
---|
.. | .. |
---|
215 | 227 | ha->flags.mbox_int = 0; |
---|
216 | 228 | while (timer--) { |
---|
217 | 229 | udelay(5); |
---|
218 | | - stat = rd_reg_dword(®->host_status); |
---|
| 230 | + if (qla_pci_disconnected(vha, reg)) |
---|
| 231 | + return rval; |
---|
219 | 232 | |
---|
| 233 | + stat = rd_reg_dword(®->host_status); |
---|
220 | 234 | /* Check for pending interrupts. */ |
---|
221 | 235 | if (!(stat & HSRX_RISC_INT)) |
---|
222 | 236 | continue; |
---|