aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_sli.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_sli.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c42
1 files changed, 39 insertions, 3 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index d6ffe26ae123..d08fd89dd44f 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -766,7 +766,9 @@ lpfc_sli_process_unsol_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
766 } 766 }
767 /* unSolicited Responses */ 767 /* unSolicited Responses */
768 if (pring->prt[0].profile) { 768 if (pring->prt[0].profile) {
769 (pring->prt[0].lpfc_sli_rcv_unsol_event) (phba, pring, saveq); 769 if (pring->prt[0].lpfc_sli_rcv_unsol_event)
770 (pring->prt[0].lpfc_sli_rcv_unsol_event) (phba, pring,
771 saveq);
770 match = 1; 772 match = 1;
771 } else { 773 } else {
772 /* We must search, based on rctl / type 774 /* We must search, based on rctl / type
@@ -777,8 +779,9 @@ lpfc_sli_process_unsol_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
777 Rctl) 779 Rctl)
778 && (pring->prt[i]. 780 && (pring->prt[i].
779 type == Type)) { 781 type == Type)) {
780 (pring->prt[i].lpfc_sli_rcv_unsol_event) 782 if (pring->prt[i].lpfc_sli_rcv_unsol_event)
781 (phba, pring, saveq); 783 (pring->prt[i].lpfc_sli_rcv_unsol_event)
784 (phba, pring, saveq);
782 match = 1; 785 match = 1;
783 break; 786 break;
784 } 787 }
@@ -2377,6 +2380,37 @@ lpfc_sli_issue_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
2377 return IOCB_BUSY; 2380 return IOCB_BUSY;
2378} 2381}
2379 2382
2383static int
2384lpfc_extra_ring_setup( struct lpfc_hba *phba)
2385{
2386 struct lpfc_sli *psli;
2387 struct lpfc_sli_ring *pring;
2388
2389 psli = &phba->sli;
2390
2391 /* Adjust cmd/rsp ring iocb entries more evenly */
2392 pring = &psli->ring[psli->fcp_ring];
2393 pring->numCiocb -= SLI2_IOCB_CMD_R1XTRA_ENTRIES;
2394 pring->numRiocb -= SLI2_IOCB_RSP_R1XTRA_ENTRIES;
2395 pring->numCiocb -= SLI2_IOCB_CMD_R3XTRA_ENTRIES;
2396 pring->numRiocb -= SLI2_IOCB_RSP_R3XTRA_ENTRIES;
2397
2398 pring = &psli->ring[1];
2399 pring->numCiocb += SLI2_IOCB_CMD_R1XTRA_ENTRIES;
2400 pring->numRiocb += SLI2_IOCB_RSP_R1XTRA_ENTRIES;
2401 pring->numCiocb += SLI2_IOCB_CMD_R3XTRA_ENTRIES;
2402 pring->numRiocb += SLI2_IOCB_RSP_R3XTRA_ENTRIES;
2403
2404 /* Setup default profile for this ring */
2405 pring->iotag_max = 4096;
2406 pring->num_mask = 1;
2407 pring->prt[0].profile = 0; /* Mask 0 */
2408 pring->prt[0].rctl = FC_UNSOL_DATA;
2409 pring->prt[0].type = 5;
2410 pring->prt[0].lpfc_sli_rcv_unsol_event = NULL;
2411 return 0;
2412}
2413
2380int 2414int
2381lpfc_sli_setup(struct lpfc_hba *phba) 2415lpfc_sli_setup(struct lpfc_hba *phba)
2382{ 2416{
@@ -2460,6 +2494,8 @@ lpfc_sli_setup(struct lpfc_hba *phba)
2460 "SLI2 SLIM Data: x%x x%x\n", 2494 "SLI2 SLIM Data: x%x x%x\n",
2461 phba->brd_no, totiocb, MAX_SLI2_IOCB); 2495 phba->brd_no, totiocb, MAX_SLI2_IOCB);
2462 } 2496 }
2497 if (phba->cfg_multi_ring_support == 2)
2498 lpfc_extra_ring_setup(phba);
2463 2499
2464 return 0; 2500 return 0;
2465} 2501}