aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_isr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_isr.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_isr.c42
1 files changed, 31 insertions, 11 deletions
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index db539b0c3dae..f1ac62d505d1 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -326,7 +326,7 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb)
326 326
327 /* Setup to process RIO completion. */ 327 /* Setup to process RIO completion. */
328 handle_cnt = 0; 328 handle_cnt = 0;
329 if (IS_QLA81XX(ha)) 329 if (IS_QLA8XXX_TYPE(ha))
330 goto skip_rio; 330 goto skip_rio;
331 switch (mb[0]) { 331 switch (mb[0]) {
332 case MBA_SCSI_COMPLETION: 332 case MBA_SCSI_COMPLETION:
@@ -544,7 +544,7 @@ skip_rio:
544 if (IS_QLA2100(ha)) 544 if (IS_QLA2100(ha))
545 break; 545 break;
546 546
547 if (IS_QLA81XX(ha)) 547 if (IS_QLA8XXX_TYPE(ha))
548 DEBUG2(printk("scsi(%ld): DCBX Completed -- %04x %04x " 548 DEBUG2(printk("scsi(%ld): DCBX Completed -- %04x %04x "
549 "%04x\n", vha->host_no, mb[1], mb[2], mb[3])); 549 "%04x\n", vha->host_no, mb[1], mb[2], mb[3]));
550 else 550 else
@@ -845,7 +845,7 @@ qla2x00_process_completed_request(struct scsi_qla_host *vha,
845 qla2x00_sp_compl(ha, sp); 845 qla2x00_sp_compl(ha, sp);
846 } else { 846 } else {
847 DEBUG2(printk("scsi(%ld) Req:%d: Invalid ISP SCSI completion" 847 DEBUG2(printk("scsi(%ld) Req:%d: Invalid ISP SCSI completion"
848 " handle(%d)\n", vha->host_no, req->id, index)); 848 " handle(0x%x)\n", vha->host_no, req->id, index));
849 qla_printk(KERN_WARNING, ha, 849 qla_printk(KERN_WARNING, ha,
850 "Invalid ISP SCSI completion handle\n"); 850 "Invalid ISP SCSI completion handle\n");
851 851
@@ -1337,6 +1337,7 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
1337 handle = (uint32_t) LSW(sts->handle); 1337 handle = (uint32_t) LSW(sts->handle);
1338 que = MSW(sts->handle); 1338 que = MSW(sts->handle);
1339 req = ha->req_q_map[que]; 1339 req = ha->req_q_map[que];
1340
1340 /* Fast path completion. */ 1341 /* Fast path completion. */
1341 if (comp_status == CS_COMPLETE && scsi_status == 0) { 1342 if (comp_status == CS_COMPLETE && scsi_status == 0) {
1342 qla2x00_process_completed_request(vha, req, handle); 1343 qla2x00_process_completed_request(vha, req, handle);
@@ -1806,6 +1807,7 @@ void qla24xx_process_response_queue(struct scsi_qla_host *vha,
1806 struct rsp_que *rsp) 1807 struct rsp_que *rsp)
1807{ 1808{
1808 struct sts_entry_24xx *pkt; 1809 struct sts_entry_24xx *pkt;
1810 struct qla_hw_data *ha = vha->hw;
1809 1811
1810 if (!vha->flags.online) 1812 if (!vha->flags.online)
1811 return; 1813 return;
@@ -1866,7 +1868,11 @@ void qla24xx_process_response_queue(struct scsi_qla_host *vha,
1866 } 1868 }
1867 1869
1868 /* Adjust ring index */ 1870 /* Adjust ring index */
1869 WRT_REG_DWORD(rsp->rsp_q_out, rsp->ring_index); 1871 if (IS_QLA82XX(ha)) {
1872 struct device_reg_82xx __iomem *reg = &ha->iobase->isp82;
1873 WRT_REG_DWORD(&reg->rsp_q_out[0], rsp->ring_index);
1874 } else
1875 WRT_REG_DWORD(rsp->rsp_q_out, rsp->ring_index);
1870} 1876}
1871 1877
1872static void 1878static void
@@ -2169,6 +2175,11 @@ static struct qla_init_msix_entry msix_entries[3] = {
2169 { "qla2xxx (multiq)", qla25xx_msix_rsp_q }, 2175 { "qla2xxx (multiq)", qla25xx_msix_rsp_q },
2170}; 2176};
2171 2177
2178static struct qla_init_msix_entry qla82xx_msix_entries[2] = {
2179 { "qla2xxx (default)", qla82xx_msix_default },
2180 { "qla2xxx (rsp_q)", qla82xx_msix_rsp_q },
2181};
2182
2172static void 2183static void
2173qla24xx_disable_msix(struct qla_hw_data *ha) 2184qla24xx_disable_msix(struct qla_hw_data *ha)
2174{ 2185{
@@ -2195,7 +2206,7 @@ qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp)
2195 struct qla_msix_entry *qentry; 2206 struct qla_msix_entry *qentry;
2196 2207
2197 entries = kzalloc(sizeof(struct msix_entry) * ha->msix_count, 2208 entries = kzalloc(sizeof(struct msix_entry) * ha->msix_count,
2198 GFP_KERNEL); 2209 GFP_KERNEL);
2199 if (!entries) 2210 if (!entries)
2200 return -ENOMEM; 2211 return -ENOMEM;
2201 2212
@@ -2240,8 +2251,15 @@ msix_failed:
2240 /* Enable MSI-X vectors for the base queue */ 2251 /* Enable MSI-X vectors for the base queue */
2241 for (i = 0; i < 2; i++) { 2252 for (i = 0; i < 2; i++) {
2242 qentry = &ha->msix_entries[i]; 2253 qentry = &ha->msix_entries[i];
2243 ret = request_irq(qentry->vector, msix_entries[i].handler, 2254 if (IS_QLA82XX(ha)) {
2244 0, msix_entries[i].name, rsp); 2255 ret = request_irq(qentry->vector,
2256 qla82xx_msix_entries[i].handler,
2257 0, qla82xx_msix_entries[i].name, rsp);
2258 } else {
2259 ret = request_irq(qentry->vector,
2260 msix_entries[i].handler,
2261 0, msix_entries[i].name, rsp);
2262 }
2245 if (ret) { 2263 if (ret) {
2246 qla_printk(KERN_WARNING, ha, 2264 qla_printk(KERN_WARNING, ha,
2247 "MSI-X: Unable to register handler -- %x/%d.\n", 2265 "MSI-X: Unable to register handler -- %x/%d.\n",
@@ -2272,7 +2290,7 @@ qla2x00_request_irqs(struct qla_hw_data *ha, struct rsp_que *rsp)
2272 2290
2273 /* If possible, enable MSI-X. */ 2291 /* If possible, enable MSI-X. */
2274 if (!IS_QLA2432(ha) && !IS_QLA2532(ha) && 2292 if (!IS_QLA2432(ha) && !IS_QLA2532(ha) &&
2275 !IS_QLA8432(ha) && !IS_QLA8001(ha)) 2293 !IS_QLA8432(ha) && !IS_QLA8XXX_TYPE(ha))
2276 goto skip_msi; 2294 goto skip_msi;
2277 2295
2278 if (ha->pdev->subsystem_vendor == PCI_VENDOR_ID_HP && 2296 if (ha->pdev->subsystem_vendor == PCI_VENDOR_ID_HP &&
@@ -2302,7 +2320,7 @@ qla2x00_request_irqs(struct qla_hw_data *ha, struct rsp_que *rsp)
2302 goto clear_risc_ints; 2320 goto clear_risc_ints;
2303 } 2321 }
2304 qla_printk(KERN_WARNING, ha, 2322 qla_printk(KERN_WARNING, ha,
2305 "MSI-X: Falling back-to INTa mode -- %d.\n", ret); 2323 "MSI-X: Falling back-to MSI mode -- %d.\n", ret);
2306skip_msix: 2324skip_msix:
2307 2325
2308 if (!IS_QLA24XX(ha) && !IS_QLA2532(ha) && !IS_QLA8432(ha) && 2326 if (!IS_QLA24XX(ha) && !IS_QLA2532(ha) && !IS_QLA8432(ha) &&
@@ -2313,7 +2331,9 @@ skip_msix:
2313 if (!ret) { 2331 if (!ret) {
2314 DEBUG2(qla_printk(KERN_INFO, ha, "MSI: Enabled.\n")); 2332 DEBUG2(qla_printk(KERN_INFO, ha, "MSI: Enabled.\n"));
2315 ha->flags.msi_enabled = 1; 2333 ha->flags.msi_enabled = 1;
2316 } 2334 } else
2335 qla_printk(KERN_WARNING, ha,
2336 "MSI-X: Falling back-to INTa mode -- %d.\n", ret);
2317skip_msi: 2337skip_msi:
2318 2338
2319 ret = request_irq(ha->pdev->irq, ha->isp_ops->intr_handler, 2339 ret = request_irq(ha->pdev->irq, ha->isp_ops->intr_handler,
@@ -2331,7 +2351,7 @@ clear_risc_ints:
2331 * FIXME: Noted that 8014s were being dropped during NK testing. 2351 * FIXME: Noted that 8014s were being dropped during NK testing.
2332 * Timing deltas during MSI-X/INTa transitions? 2352 * Timing deltas during MSI-X/INTa transitions?
2333 */ 2353 */
2334 if (IS_QLA81XX(ha)) 2354 if (IS_QLA81XX(ha) || IS_QLA82XX(ha))
2335 goto fail; 2355 goto fail;
2336 spin_lock_irq(&ha->hardware_lock); 2356 spin_lock_irq(&ha->hardware_lock);
2337 if (IS_FWI2_CAPABLE(ha)) { 2357 if (IS_FWI2_CAPABLE(ha)) {