|
@@ -6454,12 +6454,29 @@ qlt_24xx_process_atio_queue(struct scsi_qla_host *vha, uint8_t ha_locked)
|
|
|
if (!vha->flags.online)
|
|
|
return;
|
|
|
|
|
|
- while (ha->tgt.atio_ring_ptr->signature != ATIO_PROCESSED) {
|
|
|
+ while ((ha->tgt.atio_ring_ptr->signature != ATIO_PROCESSED) ||
|
|
|
+ fcpcmd_is_corrupted(ha->tgt.atio_ring_ptr)) {
|
|
|
pkt = (struct atio_from_isp *)ha->tgt.atio_ring_ptr;
|
|
|
cnt = pkt->u.raw.entry_count;
|
|
|
|
|
|
- qlt_24xx_atio_pkt_all_vps(vha, (struct atio_from_isp *)pkt,
|
|
|
- ha_locked);
|
|
|
+ if (unlikely(fcpcmd_is_corrupted(ha->tgt.atio_ring_ptr))) {
|
|
|
+ /*
|
|
|
+ * This packet is corrupted. The header + payload
|
|
|
+ * can not be trusted. There is no point in passing
|
|
|
+ * it further up.
|
|
|
+ */
|
|
|
+ ql_log(ql_log_warn, vha, 0xffff,
|
|
|
+ "corrupted fcp frame SID[%3phN] OXID[%04x] EXCG[%x] %64phN\n",
|
|
|
+ pkt->u.isp24.fcp_hdr.s_id,
|
|
|
+ be16_to_cpu(pkt->u.isp24.fcp_hdr.ox_id),
|
|
|
+ le32_to_cpu(pkt->u.isp24.exchange_addr), pkt);
|
|
|
+
|
|
|
+ adjust_corrupted_atio(pkt);
|
|
|
+ qlt_send_term_exchange(vha, NULL, pkt, ha_locked, 0);
|
|
|
+ } else {
|
|
|
+ qlt_24xx_atio_pkt_all_vps(vha,
|
|
|
+ (struct atio_from_isp *)pkt, ha_locked);
|
|
|
+ }
|
|
|
|
|
|
for (i = 0; i < cnt; i++) {
|
|
|
ha->tgt.atio_ring_index++;
|