aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r--drivers/scsi/lpfc/lpfc_bsg.c4
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c5
2 files changed, 5 insertions, 4 deletions
diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c
index bc270639c1c3..de5a1b08b036 100644
--- a/drivers/scsi/lpfc/lpfc_bsg.c
+++ b/drivers/scsi/lpfc/lpfc_bsg.c
@@ -1249,7 +1249,7 @@ lpfc_bsg_hba_get_event(struct fc_bsg_job *job)
1249 struct lpfc_hba *phba = vport->phba; 1249 struct lpfc_hba *phba = vport->phba;
1250 struct get_ct_event *event_req; 1250 struct get_ct_event *event_req;
1251 struct get_ct_event_reply *event_reply; 1251 struct get_ct_event_reply *event_reply;
1252 struct lpfc_bsg_event *evt; 1252 struct lpfc_bsg_event *evt, *evt_next;
1253 struct event_data *evt_dat = NULL; 1253 struct event_data *evt_dat = NULL;
1254 unsigned long flags; 1254 unsigned long flags;
1255 uint32_t rc = 0; 1255 uint32_t rc = 0;
@@ -1269,7 +1269,7 @@ lpfc_bsg_hba_get_event(struct fc_bsg_job *job)
1269 event_reply = (struct get_ct_event_reply *) 1269 event_reply = (struct get_ct_event_reply *)
1270 job->reply->reply_data.vendor_reply.vendor_rsp; 1270 job->reply->reply_data.vendor_reply.vendor_rsp;
1271 spin_lock_irqsave(&phba->ct_ev_lock, flags); 1271 spin_lock_irqsave(&phba->ct_ev_lock, flags);
1272 list_for_each_entry(evt, &phba->ct_ev_waiters, node) { 1272 list_for_each_entry_safe(evt, evt_next, &phba->ct_ev_waiters, node) {
1273 if (evt->reg_id == event_req->ev_reg_id) { 1273 if (evt->reg_id == event_req->ev_reg_id) {
1274 if (list_empty(&evt->events_to_get)) 1274 if (list_empty(&evt->events_to_get))
1275 break; 1275 break;
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 0392e114531c..d8fd7310766e 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -15808,7 +15808,7 @@ lpfc_sli4_fcf_rr_index_set(struct lpfc_hba *phba, uint16_t fcf_index)
15808void 15808void
15809lpfc_sli4_fcf_rr_index_clear(struct lpfc_hba *phba, uint16_t fcf_index) 15809lpfc_sli4_fcf_rr_index_clear(struct lpfc_hba *phba, uint16_t fcf_index)
15810{ 15810{
15811 struct lpfc_fcf_pri *fcf_pri; 15811 struct lpfc_fcf_pri *fcf_pri, *fcf_pri_next;
15812 if (fcf_index >= LPFC_SLI4_FCF_TBL_INDX_MAX) { 15812 if (fcf_index >= LPFC_SLI4_FCF_TBL_INDX_MAX) {
15813 lpfc_printf_log(phba, KERN_ERR, LOG_FIP, 15813 lpfc_printf_log(phba, KERN_ERR, LOG_FIP,
15814 "2762 FCF (x%x) reached driver's book " 15814 "2762 FCF (x%x) reached driver's book "
@@ -15818,7 +15818,8 @@ lpfc_sli4_fcf_rr_index_clear(struct lpfc_hba *phba, uint16_t fcf_index)
15818 } 15818 }
15819 /* Clear the eligible FCF record index bmask */ 15819 /* Clear the eligible FCF record index bmask */
15820 spin_lock_irq(&phba->hbalock); 15820 spin_lock_irq(&phba->hbalock);
15821 list_for_each_entry(fcf_pri, &phba->fcf.fcf_pri_list, list) { 15821 list_for_each_entry_safe(fcf_pri, fcf_pri_next, &phba->fcf.fcf_pri_list,
15822 list) {
15822 if (fcf_pri->fcf_rec.fcf_index == fcf_index) { 15823 if (fcf_pri->fcf_rec.fcf_index == fcf_index) {
15823 list_del_init(&fcf_pri->list); 15824 list_del_init(&fcf_pri->list);
15824 break; 15825 break;