aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bnx2fc/bnx2fc_hwi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/bnx2fc/bnx2fc_hwi.c')
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_hwi.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_hwi.c b/drivers/scsi/bnx2fc/bnx2fc_hwi.c
index 4f409683674..1b680e288c5 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_hwi.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_hwi.c
@@ -87,7 +87,7 @@ int bnx2fc_send_fw_fcoe_init_msg(struct bnx2fc_hba *hba)
87 fcoe_init1.task_list_pbl_addr_lo = (u32) hba->task_ctx_bd_dma; 87 fcoe_init1.task_list_pbl_addr_lo = (u32) hba->task_ctx_bd_dma;
88 fcoe_init1.task_list_pbl_addr_hi = 88 fcoe_init1.task_list_pbl_addr_hi =
89 (u32) ((u64) hba->task_ctx_bd_dma >> 32); 89 (u32) ((u64) hba->task_ctx_bd_dma >> 32);
90 fcoe_init1.mtu = hba->netdev->mtu; 90 fcoe_init1.mtu = BNX2FC_MINI_JUMBO_MTU;
91 91
92 fcoe_init1.flags = (PAGE_SHIFT << 92 fcoe_init1.flags = (PAGE_SHIFT <<
93 FCOE_KWQE_INIT1_LOG_PAGE_SIZE_SHIFT); 93 FCOE_KWQE_INIT1_LOG_PAGE_SIZE_SHIFT);
@@ -590,7 +590,10 @@ static void bnx2fc_process_unsol_compl(struct bnx2fc_rport *tgt, u16 wqe)
590 590
591 num_rq = (frame_len + BNX2FC_RQ_BUF_SZ - 1) / BNX2FC_RQ_BUF_SZ; 591 num_rq = (frame_len + BNX2FC_RQ_BUF_SZ - 1) / BNX2FC_RQ_BUF_SZ;
592 592
593 spin_lock_bh(&tgt->tgt_lock);
593 rq_data = (unsigned char *)bnx2fc_get_next_rqe(tgt, num_rq); 594 rq_data = (unsigned char *)bnx2fc_get_next_rqe(tgt, num_rq);
595 spin_unlock_bh(&tgt->tgt_lock);
596
594 if (rq_data) { 597 if (rq_data) {
595 buf = rq_data; 598 buf = rq_data;
596 } else { 599 } else {
@@ -603,8 +606,10 @@ static void bnx2fc_process_unsol_compl(struct bnx2fc_rport *tgt, u16 wqe)
603 } 606 }
604 607
605 for (i = 0; i < num_rq; i++) { 608 for (i = 0; i < num_rq; i++) {
609 spin_lock_bh(&tgt->tgt_lock);
606 rq_data = (unsigned char *) 610 rq_data = (unsigned char *)
607 bnx2fc_get_next_rqe(tgt, 1); 611 bnx2fc_get_next_rqe(tgt, 1);
612 spin_unlock_bh(&tgt->tgt_lock);
608 len = BNX2FC_RQ_BUF_SZ; 613 len = BNX2FC_RQ_BUF_SZ;
609 memcpy(buf1, rq_data, len); 614 memcpy(buf1, rq_data, len);
610 buf1 += len; 615 buf1 += len;
@@ -615,13 +620,15 @@ static void bnx2fc_process_unsol_compl(struct bnx2fc_rport *tgt, u16 wqe)
615 620
616 if (buf != rq_data) 621 if (buf != rq_data)
617 kfree(buf); 622 kfree(buf);
623 spin_lock_bh(&tgt->tgt_lock);
618 bnx2fc_return_rqe(tgt, num_rq); 624 bnx2fc_return_rqe(tgt, num_rq);
625 spin_unlock_bh(&tgt->tgt_lock);
619 break; 626 break;
620 627
621 case FCOE_ERROR_DETECTION_CQE_TYPE: 628 case FCOE_ERROR_DETECTION_CQE_TYPE:
622 /* 629 /*
623 *In case of error reporting CQE a single RQ entry 630 * In case of error reporting CQE a single RQ entry
624 * is consumes. 631 * is consumed.
625 */ 632 */
626 spin_lock_bh(&tgt->tgt_lock); 633 spin_lock_bh(&tgt->tgt_lock);
627 num_rq = 1; 634 num_rq = 1;
@@ -705,6 +712,7 @@ static void bnx2fc_process_unsol_compl(struct bnx2fc_rport *tgt, u16 wqe)
705 *In case of warning reporting CQE a single RQ entry 712 *In case of warning reporting CQE a single RQ entry
706 * is consumes. 713 * is consumes.
707 */ 714 */
715 spin_lock_bh(&tgt->tgt_lock);
708 num_rq = 1; 716 num_rq = 1;
709 err_entry = (struct fcoe_err_report_entry *) 717 err_entry = (struct fcoe_err_report_entry *)
710 bnx2fc_get_next_rqe(tgt, 1); 718 bnx2fc_get_next_rqe(tgt, 1);
@@ -717,6 +725,7 @@ static void bnx2fc_process_unsol_compl(struct bnx2fc_rport *tgt, u16 wqe)
717 err_entry->tx_buf_off, err_entry->rx_buf_off); 725 err_entry->tx_buf_off, err_entry->rx_buf_off);
718 726
719 bnx2fc_return_rqe(tgt, 1); 727 bnx2fc_return_rqe(tgt, 1);
728 spin_unlock_bh(&tgt->tgt_lock);
720 break; 729 break;
721 730
722 default: 731 default: