When performing function reset to LPe16000 port which is connected to a fabric
and has targets (LUNs) discovered in the zone, sometimes the reset can fail and
end up in the port being unresponsive or system crash or hang. Now, when
reposting the SCSI SGL list after function reset, set the logical XRI allocated
bit in the logical XRI bmask to account for the XRIs posted, so duplicated
XRI will not be allocated later for new SGLs. Also, reset the used xri counts,
and updated them properly during function reset.
commit id:
41899be7e8b95c9c8b51ad4ff932769af508306f
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
spin_lock_irq(&phba->hbalock);
spin_lock(&phba->scsi_buf_list_lock);
- list_for_each_entry_safe(sb, sb_next, &phba->lpfc_scsi_buf_list, list)
+ list_for_each_entry_safe(sb, sb_next, &phba->lpfc_scsi_buf_list, list) {
sb->cur_iocbq.sli4_xritag =
phba->sli4_hba.xri_ids[sb->cur_iocbq.sli4_lxritag];
+ set_bit(sb->cur_iocbq.sli4_lxritag, phba->sli4_hba.xri_bmask);
+ phba->sli4_hba.max_cfg_param.xri_used++;
+ phba->sli4_hba.xri_count++;
+ }
spin_unlock(&phba->scsi_buf_list_lock);
spin_unlock_irq(&phba->hbalock);
return 0;
rc = -ENOMEM;
goto free_vpi_ids;
}
+ phba->sli4_hba.max_cfg_param.xri_used = 0;
+ phba->sli4_hba.xri_count = 0;
phba->sli4_hba.xri_ids = kzalloc(count *
sizeof(uint16_t),
GFP_KERNEL);