diff options
author | James Smart <james.smart@emulex.com> | 2012-08-03 12:36:13 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-09-14 09:41:19 -0400 |
commit | 67d1273385d454a3f1b083b807f2cdda95e995ec (patch) | |
tree | 93f6ff11c119b3e9460e6f302e09eaedf1844259 /drivers/scsi/lpfc/lpfc_debugfs.h | |
parent | aa6fbb757ab6fce4647bafd28f9a49e5b0fa07db (diff) |
[SCSI] lpfc 8.3.33: Tie parallel I/O queues into separate MSIX vectors
Add fcp_io_channel module attribute to control amount of parallel I/O queues
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_debugfs.h')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_debugfs.h | 69 |
1 files changed, 20 insertions, 49 deletions
diff --git a/drivers/scsi/lpfc/lpfc_debugfs.h b/drivers/scsi/lpfc/lpfc_debugfs.h index a9593ac9c134..8b2b6a3bfc25 100644 --- a/drivers/scsi/lpfc/lpfc_debugfs.h +++ b/drivers/scsi/lpfc/lpfc_debugfs.h | |||
@@ -369,7 +369,7 @@ static inline void | |||
369 | lpfc_debug_dump_fcp_wq(struct lpfc_hba *phba, int fcp_wqidx) | 369 | lpfc_debug_dump_fcp_wq(struct lpfc_hba *phba, int fcp_wqidx) |
370 | { | 370 | { |
371 | /* sanity check */ | 371 | /* sanity check */ |
372 | if (fcp_wqidx >= phba->cfg_fcp_wq_count) | 372 | if (fcp_wqidx >= phba->cfg_fcp_io_channel) |
373 | return; | 373 | return; |
374 | 374 | ||
375 | printk(KERN_ERR "FCP WQ: WQ[Idx:%d|Qid:%d]\n", | 375 | printk(KERN_ERR "FCP WQ: WQ[Idx:%d|Qid:%d]\n", |
@@ -391,15 +391,15 @@ lpfc_debug_dump_fcp_cq(struct lpfc_hba *phba, int fcp_wqidx) | |||
391 | int fcp_cqidx, fcp_cqid; | 391 | int fcp_cqidx, fcp_cqid; |
392 | 392 | ||
393 | /* sanity check */ | 393 | /* sanity check */ |
394 | if (fcp_wqidx >= phba->cfg_fcp_wq_count) | 394 | if (fcp_wqidx >= phba->cfg_fcp_io_channel) |
395 | return; | 395 | return; |
396 | 396 | ||
397 | fcp_cqid = phba->sli4_hba.fcp_wq[fcp_wqidx]->assoc_qid; | 397 | fcp_cqid = phba->sli4_hba.fcp_wq[fcp_wqidx]->assoc_qid; |
398 | for (fcp_cqidx = 0; fcp_cqidx < phba->cfg_fcp_eq_count; fcp_cqidx++) | 398 | for (fcp_cqidx = 0; fcp_cqidx < phba->cfg_fcp_io_channel; fcp_cqidx++) |
399 | if (phba->sli4_hba.fcp_cq[fcp_cqidx]->queue_id == fcp_cqid) | 399 | if (phba->sli4_hba.fcp_cq[fcp_cqidx]->queue_id == fcp_cqid) |
400 | break; | 400 | break; |
401 | if (phba->intr_type == MSIX) { | 401 | if (phba->intr_type == MSIX) { |
402 | if (fcp_cqidx >= phba->cfg_fcp_eq_count) | 402 | if (fcp_cqidx >= phba->cfg_fcp_io_channel) |
403 | return; | 403 | return; |
404 | } else { | 404 | } else { |
405 | if (fcp_cqidx > 0) | 405 | if (fcp_cqidx > 0) |
@@ -413,7 +413,7 @@ lpfc_debug_dump_fcp_cq(struct lpfc_hba *phba, int fcp_wqidx) | |||
413 | } | 413 | } |
414 | 414 | ||
415 | /** | 415 | /** |
416 | * lpfc_debug_dump_fcp_eq - dump all entries from a fcp work queue's evt queue | 416 | * lpfc_debug_dump_hba_eq - dump all entries from a fcp work queue's evt queue |
417 | * @phba: Pointer to HBA context object. | 417 | * @phba: Pointer to HBA context object. |
418 | * @fcp_wqidx: Index to a FCP work queue. | 418 | * @fcp_wqidx: Index to a FCP work queue. |
419 | * | 419 | * |
@@ -421,36 +421,30 @@ lpfc_debug_dump_fcp_cq(struct lpfc_hba *phba, int fcp_wqidx) | |||
421 | * associated to the FCP work queue specified by the @fcp_wqidx. | 421 | * associated to the FCP work queue specified by the @fcp_wqidx. |
422 | **/ | 422 | **/ |
423 | static inline void | 423 | static inline void |
424 | lpfc_debug_dump_fcp_eq(struct lpfc_hba *phba, int fcp_wqidx) | 424 | lpfc_debug_dump_hba_eq(struct lpfc_hba *phba, int fcp_wqidx) |
425 | { | 425 | { |
426 | struct lpfc_queue *qdesc; | 426 | struct lpfc_queue *qdesc; |
427 | int fcp_eqidx, fcp_eqid; | 427 | int fcp_eqidx, fcp_eqid; |
428 | int fcp_cqidx, fcp_cqid; | 428 | int fcp_cqidx, fcp_cqid; |
429 | 429 | ||
430 | /* sanity check */ | 430 | /* sanity check */ |
431 | if (fcp_wqidx >= phba->cfg_fcp_wq_count) | 431 | if (fcp_wqidx >= phba->cfg_fcp_io_channel) |
432 | return; | 432 | return; |
433 | fcp_cqid = phba->sli4_hba.fcp_wq[fcp_wqidx]->assoc_qid; | 433 | fcp_cqid = phba->sli4_hba.fcp_wq[fcp_wqidx]->assoc_qid; |
434 | for (fcp_cqidx = 0; fcp_cqidx < phba->cfg_fcp_eq_count; fcp_cqidx++) | 434 | for (fcp_cqidx = 0; fcp_cqidx < phba->cfg_fcp_io_channel; fcp_cqidx++) |
435 | if (phba->sli4_hba.fcp_cq[fcp_cqidx]->queue_id == fcp_cqid) | 435 | if (phba->sli4_hba.fcp_cq[fcp_cqidx]->queue_id == fcp_cqid) |
436 | break; | 436 | break; |
437 | if (phba->intr_type == MSIX) { | 437 | if (phba->intr_type == MSIX) { |
438 | if (fcp_cqidx >= phba->cfg_fcp_eq_count) | 438 | if (fcp_cqidx >= phba->cfg_fcp_io_channel) |
439 | return; | 439 | return; |
440 | } else { | 440 | } else { |
441 | if (fcp_cqidx > 0) | 441 | if (fcp_cqidx > 0) |
442 | return; | 442 | return; |
443 | } | 443 | } |
444 | 444 | ||
445 | if (phba->cfg_fcp_eq_count == 0) { | 445 | fcp_eqidx = fcp_cqidx; |
446 | fcp_eqidx = -1; | 446 | fcp_eqid = phba->sli4_hba.hba_eq[fcp_eqidx]->queue_id; |
447 | fcp_eqid = phba->sli4_hba.sp_eq->queue_id; | 447 | qdesc = phba->sli4_hba.hba_eq[fcp_eqidx]; |
448 | qdesc = phba->sli4_hba.sp_eq; | ||
449 | } else { | ||
450 | fcp_eqidx = fcp_cqidx; | ||
451 | fcp_eqid = phba->sli4_hba.fp_eq[fcp_eqidx]->queue_id; | ||
452 | qdesc = phba->sli4_hba.fp_eq[fcp_eqidx]; | ||
453 | } | ||
454 | 448 | ||
455 | printk(KERN_ERR "FCP EQ: WQ[Idx:%d|Qid:%d]->CQ[Idx:%d|Qid:%d]->" | 449 | printk(KERN_ERR "FCP EQ: WQ[Idx:%d|Qid:%d]->CQ[Idx:%d|Qid:%d]->" |
456 | "EQ[Idx:%d|Qid:%d]\n", | 450 | "EQ[Idx:%d|Qid:%d]\n", |
@@ -546,25 +540,6 @@ lpfc_debug_dump_mbx_cq(struct lpfc_hba *phba) | |||
546 | } | 540 | } |
547 | 541 | ||
548 | /** | 542 | /** |
549 | * lpfc_debug_dump_sp_eq - dump all entries from slow-path event queue | ||
550 | * @phba: Pointer to HBA context object. | ||
551 | * | ||
552 | * This function dumps all entries from the slow-path event queue. | ||
553 | **/ | ||
554 | static inline void | ||
555 | lpfc_debug_dump_sp_eq(struct lpfc_hba *phba) | ||
556 | { | ||
557 | printk(KERN_ERR "SP EQ: WQ[Qid:%d/Qid:%d]->CQ[Qid:%d/Qid:%d]->" | ||
558 | "EQ[Qid:%d]:\n", | ||
559 | phba->sli4_hba.mbx_wq->queue_id, | ||
560 | phba->sli4_hba.els_wq->queue_id, | ||
561 | phba->sli4_hba.mbx_cq->queue_id, | ||
562 | phba->sli4_hba.els_cq->queue_id, | ||
563 | phba->sli4_hba.sp_eq->queue_id); | ||
564 | lpfc_debug_dump_q(phba->sli4_hba.sp_eq); | ||
565 | } | ||
566 | |||
567 | /** | ||
568 | * lpfc_debug_dump_wq_by_id - dump all entries from a work queue by queue id | 543 | * lpfc_debug_dump_wq_by_id - dump all entries from a work queue by queue id |
569 | * @phba: Pointer to HBA context object. | 544 | * @phba: Pointer to HBA context object. |
570 | * @qid: Work queue identifier. | 545 | * @qid: Work queue identifier. |
@@ -577,10 +552,10 @@ lpfc_debug_dump_wq_by_id(struct lpfc_hba *phba, int qid) | |||
577 | { | 552 | { |
578 | int wq_idx; | 553 | int wq_idx; |
579 | 554 | ||
580 | for (wq_idx = 0; wq_idx < phba->cfg_fcp_wq_count; wq_idx++) | 555 | for (wq_idx = 0; wq_idx < phba->cfg_fcp_io_channel; wq_idx++) |
581 | if (phba->sli4_hba.fcp_wq[wq_idx]->queue_id == qid) | 556 | if (phba->sli4_hba.fcp_wq[wq_idx]->queue_id == qid) |
582 | break; | 557 | break; |
583 | if (wq_idx < phba->cfg_fcp_wq_count) { | 558 | if (wq_idx < phba->cfg_fcp_io_channel) { |
584 | printk(KERN_ERR "FCP WQ[Idx:%d|Qid:%d]\n", wq_idx, qid); | 559 | printk(KERN_ERR "FCP WQ[Idx:%d|Qid:%d]\n", wq_idx, qid); |
585 | lpfc_debug_dump_q(phba->sli4_hba.fcp_wq[wq_idx]); | 560 | lpfc_debug_dump_q(phba->sli4_hba.fcp_wq[wq_idx]); |
586 | return; | 561 | return; |
@@ -647,9 +622,9 @@ lpfc_debug_dump_cq_by_id(struct lpfc_hba *phba, int qid) | |||
647 | do { | 622 | do { |
648 | if (phba->sli4_hba.fcp_cq[cq_idx]->queue_id == qid) | 623 | if (phba->sli4_hba.fcp_cq[cq_idx]->queue_id == qid) |
649 | break; | 624 | break; |
650 | } while (++cq_idx < phba->cfg_fcp_eq_count); | 625 | } while (++cq_idx < phba->cfg_fcp_io_channel); |
651 | 626 | ||
652 | if (cq_idx < phba->cfg_fcp_eq_count) { | 627 | if (cq_idx < phba->cfg_fcp_io_channel) { |
653 | printk(KERN_ERR "FCP CQ[Idx:%d|Qid:%d]\n", cq_idx, qid); | 628 | printk(KERN_ERR "FCP CQ[Idx:%d|Qid:%d]\n", cq_idx, qid); |
654 | lpfc_debug_dump_q(phba->sli4_hba.fcp_cq[cq_idx]); | 629 | lpfc_debug_dump_q(phba->sli4_hba.fcp_cq[cq_idx]); |
655 | return; | 630 | return; |
@@ -680,21 +655,17 @@ lpfc_debug_dump_eq_by_id(struct lpfc_hba *phba, int qid) | |||
680 | { | 655 | { |
681 | int eq_idx; | 656 | int eq_idx; |
682 | 657 | ||
683 | for (eq_idx = 0; eq_idx < phba->cfg_fcp_eq_count; eq_idx++) { | 658 | for (eq_idx = 0; eq_idx < phba->cfg_fcp_io_channel; eq_idx++) { |
684 | if (phba->sli4_hba.fp_eq[eq_idx]->queue_id == qid) | 659 | if (phba->sli4_hba.hba_eq[eq_idx]->queue_id == qid) |
685 | break; | 660 | break; |
686 | } | 661 | } |
687 | 662 | ||
688 | if (eq_idx < phba->cfg_fcp_eq_count) { | 663 | if (eq_idx < phba->cfg_fcp_io_channel) { |
689 | printk(KERN_ERR "FCP EQ[Idx:%d|Qid:%d]\n", eq_idx, qid); | 664 | printk(KERN_ERR "FCP EQ[Idx:%d|Qid:%d]\n", eq_idx, qid); |
690 | lpfc_debug_dump_q(phba->sli4_hba.fp_eq[eq_idx]); | 665 | lpfc_debug_dump_q(phba->sli4_hba.hba_eq[eq_idx]); |
691 | return; | 666 | return; |
692 | } | 667 | } |
693 | 668 | ||
694 | if (phba->sli4_hba.sp_eq->queue_id == qid) { | ||
695 | printk(KERN_ERR "SP EQ[|Qid:%d]\n", qid); | ||
696 | lpfc_debug_dump_q(phba->sli4_hba.sp_eq); | ||
697 | } | ||
698 | } | 669 | } |
699 | 670 | ||
700 | void lpfc_debug_dump_all_queues(struct lpfc_hba *); | 671 | void lpfc_debug_dump_all_queues(struct lpfc_hba *); |