Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

qla2xxx: Add memory barrier before ringing doorbell.

Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>

authored by

Himanshu Madhani and committed by
Christoph Hellwig
63163e06 e07f8f65

+16
+16
drivers/scsi/qla2xxx/qla_target.c
··· 1040 1040 "qla_target(%d): Sending 24xx Notify Ack %d\n", 1041 1041 vha->vp_idx, nack->u.isp24.status); 1042 1042 1043 + /* Memory Barrier */ 1044 + wmb(); 1043 1045 qla2x00_start_iocbs(vha, vha->req); 1044 1046 } 1045 1047 ··· 1119 1117 1120 1118 vha->vha_tgt.qla_tgt->abts_resp_expected++; 1121 1119 1120 + /* Memory Barrier */ 1121 + wmb(); 1122 1122 qla2x00_start_iocbs(vha, vha->req); 1123 1123 } 1124 1124 ··· 1166 1162 CTIO7_FLAGS_TERMINATE); 1167 1163 ctio->u.status1.ox_id = cpu_to_le16(entry->fcp_hdr_le.ox_id); 1168 1164 1165 + /* Memory Barrier */ 1166 + wmb(); 1169 1167 qla2x00_start_iocbs(vha, vha->req); 1170 1168 1171 1169 qlt_24xx_send_abts_resp(vha, (struct abts_recv_from_24xx *)entry, ··· 1339 1333 ctio->u.status1.response_len = __constant_cpu_to_le16(8); 1340 1334 ctio->u.status1.sense_data[0] = resp_code; 1341 1335 1336 + /* Memory Barrier */ 1337 + wmb(); 1342 1338 qla2x00_start_iocbs(ha, ha->req); 1343 1339 } 1344 1340 ··· 2420 2412 cmd->state = QLA_TGT_STATE_PROCESSED; /* Mid-level is done processing */ 2421 2413 cmd->cmd_sent_to_fw = 1; 2422 2414 2415 + /* Memory Barrier */ 2416 + wmb(); 2423 2417 qla2x00_start_iocbs(vha, vha->req); 2424 2418 spin_unlock_irqrestore(&ha->hardware_lock, flags); 2425 2419 ··· 2498 2488 cmd->state = QLA_TGT_STATE_NEED_DATA; 2499 2489 cmd->cmd_sent_to_fw = 1; 2500 2490 2491 + /* Memory Barrier */ 2492 + wmb(); 2501 2493 qla2x00_start_iocbs(vha, vha->req); 2502 2494 spin_unlock_irqrestore(&ha->hardware_lock, flags); 2503 2495 ··· 2708 2696 if (ctio24->u.status1.residual != 0) 2709 2697 ctio24->u.status1.scsi_status |= SS_RESIDUAL_UNDER; 2710 2698 2699 + /* Memory Barrier */ 2700 + wmb(); 2711 2701 qla2x00_start_iocbs(vha, vha->req); 2712 2702 return ret; 2713 2703 } ··· 4343 4329 */ 4344 4330 ctio24->u.status1.ox_id = swab16(atio->u.isp24.fcp_hdr.ox_id); 4345 4331 ctio24->u.status1.scsi_status = cpu_to_le16(status); 4332 + /* Memory Barrier */ 4333 + wmb(); 4346 4334 qla2x00_start_iocbs(vha, vha->req); 4347 4335 return 0; 4348 4336 }