|
@@ -926,10 +926,10 @@ lpfc_sli4_repost_scsi_sgl_list(struct lpfc_hba *phba)
|
|
|
|
|
|
/* get all SCSI buffers need to repost to a local list */
|
|
|
spin_lock_irq(&phba->scsi_buf_list_get_lock);
|
|
|
- spin_lock_irq(&phba->scsi_buf_list_put_lock);
|
|
|
+ spin_lock(&phba->scsi_buf_list_put_lock);
|
|
|
list_splice_init(&phba->lpfc_scsi_buf_list_get, &post_sblist);
|
|
|
list_splice(&phba->lpfc_scsi_buf_list_put, &post_sblist);
|
|
|
- spin_unlock_irq(&phba->scsi_buf_list_put_lock);
|
|
|
+ spin_unlock(&phba->scsi_buf_list_put_lock);
|
|
|
spin_unlock_irq(&phba->scsi_buf_list_get_lock);
|
|
|
|
|
|
/* post the list of scsi buffer sgls to port if available */
|
|
@@ -1137,22 +1137,21 @@ lpfc_get_scsi_buf_s3(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp)
|
|
|
{
|
|
|
struct lpfc_scsi_buf * lpfc_cmd = NULL;
|
|
|
struct list_head *scsi_buf_list_get = &phba->lpfc_scsi_buf_list_get;
|
|
|
- unsigned long gflag = 0;
|
|
|
- unsigned long pflag = 0;
|
|
|
+ unsigned long iflag = 0;
|
|
|
|
|
|
- spin_lock_irqsave(&phba->scsi_buf_list_get_lock, gflag);
|
|
|
+ spin_lock_irqsave(&phba->scsi_buf_list_get_lock, iflag);
|
|
|
list_remove_head(scsi_buf_list_get, lpfc_cmd, struct lpfc_scsi_buf,
|
|
|
list);
|
|
|
if (!lpfc_cmd) {
|
|
|
- spin_lock_irqsave(&phba->scsi_buf_list_put_lock, pflag);
|
|
|
+ spin_lock(&phba->scsi_buf_list_put_lock);
|
|
|
list_splice(&phba->lpfc_scsi_buf_list_put,
|
|
|
&phba->lpfc_scsi_buf_list_get);
|
|
|
INIT_LIST_HEAD(&phba->lpfc_scsi_buf_list_put);
|
|
|
list_remove_head(scsi_buf_list_get, lpfc_cmd,
|
|
|
struct lpfc_scsi_buf, list);
|
|
|
- spin_unlock_irqrestore(&phba->scsi_buf_list_put_lock, pflag);
|
|
|
+ spin_unlock(&phba->scsi_buf_list_put_lock);
|
|
|
}
|
|
|
- spin_unlock_irqrestore(&phba->scsi_buf_list_get_lock, gflag);
|
|
|
+ spin_unlock_irqrestore(&phba->scsi_buf_list_get_lock, iflag);
|
|
|
return lpfc_cmd;
|
|
|
}
|
|
|
/**
|
|
@@ -1170,11 +1169,10 @@ static struct lpfc_scsi_buf*
|
|
|
lpfc_get_scsi_buf_s4(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp)
|
|
|
{
|
|
|
struct lpfc_scsi_buf *lpfc_cmd, *lpfc_cmd_next;
|
|
|
- unsigned long gflag = 0;
|
|
|
- unsigned long pflag = 0;
|
|
|
+ unsigned long iflag = 0;
|
|
|
int found = 0;
|
|
|
|
|
|
- spin_lock_irqsave(&phba->scsi_buf_list_get_lock, gflag);
|
|
|
+ spin_lock_irqsave(&phba->scsi_buf_list_get_lock, iflag);
|
|
|
list_for_each_entry_safe(lpfc_cmd, lpfc_cmd_next,
|
|
|
&phba->lpfc_scsi_buf_list_get, list) {
|
|
|
if (lpfc_test_rrq_active(phba, ndlp,
|
|
@@ -1185,11 +1183,11 @@ lpfc_get_scsi_buf_s4(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp)
|
|
|
break;
|
|
|
}
|
|
|
if (!found) {
|
|
|
- spin_lock_irqsave(&phba->scsi_buf_list_put_lock, pflag);
|
|
|
+ spin_lock(&phba->scsi_buf_list_put_lock);
|
|
|
list_splice(&phba->lpfc_scsi_buf_list_put,
|
|
|
&phba->lpfc_scsi_buf_list_get);
|
|
|
INIT_LIST_HEAD(&phba->lpfc_scsi_buf_list_put);
|
|
|
- spin_unlock_irqrestore(&phba->scsi_buf_list_put_lock, pflag);
|
|
|
+ spin_unlock(&phba->scsi_buf_list_put_lock);
|
|
|
list_for_each_entry_safe(lpfc_cmd, lpfc_cmd_next,
|
|
|
&phba->lpfc_scsi_buf_list_get, list) {
|
|
|
if (lpfc_test_rrq_active(
|
|
@@ -1200,7 +1198,7 @@ lpfc_get_scsi_buf_s4(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp)
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- spin_unlock_irqrestore(&phba->scsi_buf_list_get_lock, gflag);
|
|
|
+ spin_unlock_irqrestore(&phba->scsi_buf_list_get_lock, iflag);
|
|
|
if (!found)
|
|
|
return NULL;
|
|
|
return lpfc_cmd;
|