aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_sli.c
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2007-10-27 13:37:25 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-01-11 19:22:32 -0500
commit0b727fea7a700e223bf52fb1eaf4c3a27c4340db (patch)
treeff4eb6c5ab0ac7c3b2a299f037d1b73224a07c9e /drivers/scsi/lpfc/lpfc_sli.c
parent7ee5d43e2ea25336a7638715420c75583bd2ed69 (diff)
[SCSI] lpfc 8.2.3 : Remove flawed MBX_STOP_IOCB logic
Remove flawed MBX_STOP_IOCB logic Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_sli.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c69
1 files changed, 3 insertions, 66 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 41f13a300ba5..744bad627596 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -474,8 +474,7 @@ lpfc_sli_resume_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring)
474 if (pring->txq_cnt && 474 if (pring->txq_cnt &&
475 lpfc_is_link_up(phba) && 475 lpfc_is_link_up(phba) &&
476 (pring->ringno != phba->sli.fcp_ring || 476 (pring->ringno != phba->sli.fcp_ring ||
477 phba->sli.sli_flag & LPFC_PROCESS_LA) && 477 phba->sli.sli_flag & LPFC_PROCESS_LA)) {
478 !(pring->flag & LPFC_STOP_IOCB_MBX)) {
479 478
480 while ((iocb = lpfc_sli_next_iocb_slot(phba, pring)) && 479 while ((iocb = lpfc_sli_next_iocb_slot(phba, pring)) &&
481 (nextiocb = lpfc_sli_ringtx_get(phba, pring))) 480 (nextiocb = lpfc_sli_ringtx_get(phba, pring)))
@@ -490,31 +489,6 @@ lpfc_sli_resume_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring)
490 return; 489 return;
491} 490}
492 491
493/* lpfc_sli_turn_on_ring is only called by lpfc_sli_handle_mb_event below */
494static void
495lpfc_sli_turn_on_ring(struct lpfc_hba *phba, int ringno)
496{
497 struct lpfc_pgp *pgp = (phba->sli_rev == 3) ?
498 &phba->slim2p->mbx.us.s3_pgp.port[ringno] :
499 &phba->slim2p->mbx.us.s2.port[ringno];
500 unsigned long iflags;
501
502 /* If the ring is active, flag it */
503 spin_lock_irqsave(&phba->hbalock, iflags);
504 if (phba->sli.ring[ringno].cmdringaddr) {
505 if (phba->sli.ring[ringno].flag & LPFC_STOP_IOCB_MBX) {
506 phba->sli.ring[ringno].flag &= ~LPFC_STOP_IOCB_MBX;
507 /*
508 * Force update of the local copy of cmdGetInx
509 */
510 phba->sli.ring[ringno].local_getidx
511 = le32_to_cpu(pgp->cmdGetInx);
512 lpfc_sli_resume_iocb(phba, &phba->sli.ring[ringno]);
513 }
514 }
515 spin_unlock_irqrestore(&phba->hbalock, iflags);
516}
517
518struct lpfc_hbq_entry * 492struct lpfc_hbq_entry *
519lpfc_sli_next_hbq_slot(struct lpfc_hba *phba, uint32_t hbqno) 493lpfc_sli_next_hbq_slot(struct lpfc_hba *phba, uint32_t hbqno)
520{ 494{
@@ -2590,21 +2564,6 @@ lpfc_sli_issue_mbox(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, uint32_t flag)
2590 return MBX_NOT_FINISHED; 2564 return MBX_NOT_FINISHED;
2591 } 2565 }
2592 2566
2593 /* Handle STOP IOCB processing flag. This is only meaningful
2594 * if we are not polling for mbox completion.
2595 */
2596 if (flag & MBX_STOP_IOCB) {
2597 flag &= ~MBX_STOP_IOCB;
2598 /* Now flag each ring */
2599 for (i = 0; i < psli->num_rings; i++) {
2600 /* If the ring is active, flag it */
2601 if (psli->ring[i].cmdringaddr) {
2602 psli->ring[i].flag |=
2603 LPFC_STOP_IOCB_MBX;
2604 }
2605 }
2606 }
2607
2608 /* Another mailbox command is still being processed, queue this 2567 /* Another mailbox command is still being processed, queue this
2609 * command to be processed later. 2568 * command to be processed later.
2610 */ 2569 */
@@ -2639,23 +2598,6 @@ lpfc_sli_issue_mbox(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, uint32_t flag)
2639 return MBX_BUSY; 2598 return MBX_BUSY;
2640 } 2599 }
2641 2600
2642 /* Handle STOP IOCB processing flag. This is only meaningful
2643 * if we are not polling for mbox completion.
2644 */
2645 if (flag & MBX_STOP_IOCB) {
2646 flag &= ~MBX_STOP_IOCB;
2647 if (flag == MBX_NOWAIT) {
2648 /* Now flag each ring */
2649 for (i = 0; i < psli->num_rings; i++) {
2650 /* If the ring is active, flag it */
2651 if (psli->ring[i].cmdringaddr) {
2652 psli->ring[i].flag |=
2653 LPFC_STOP_IOCB_MBX;
2654 }
2655 }
2656 }
2657 }
2658
2659 psli->sli_flag |= LPFC_SLI_MBOX_ACTIVE; 2601 psli->sli_flag |= LPFC_SLI_MBOX_ACTIVE;
2660 2602
2661 /* If we are not polling, we MUST be in SLI2 mode */ 2603 /* If we are not polling, we MUST be in SLI2 mode */
@@ -2898,9 +2840,9 @@ __lpfc_sli_issue_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
2898 2840
2899 /* 2841 /*
2900 * Check to see if we are blocking IOCB processing because of a 2842 * Check to see if we are blocking IOCB processing because of a
2901 * outstanding mbox command. 2843 * outstanding event.
2902 */ 2844 */
2903 if (unlikely(pring->flag & LPFC_STOP_IOCB_MBX)) 2845 if (unlikely(pring->flag & LPFC_STOP_IOCB_EVENT))
2904 goto iocb_busy; 2846 goto iocb_busy;
2905 2847
2906 if (unlikely(phba->link_state == LPFC_LINK_DOWN)) { 2848 if (unlikely(phba->link_state == LPFC_LINK_DOWN)) {
@@ -3847,7 +3789,6 @@ lpfc_intr_handler(int irq, void *dev_id)
3847 uint32_t ha_copy; 3789 uint32_t ha_copy;
3848 uint32_t work_ha_copy; 3790 uint32_t work_ha_copy;
3849 unsigned long status; 3791 unsigned long status;
3850 int i;
3851 uint32_t control; 3792 uint32_t control;
3852 3793
3853 MAILBOX_t *mbox, *pmbox; 3794 MAILBOX_t *mbox, *pmbox;
@@ -4066,10 +4007,6 @@ send_current_mbox:
4066 lpfc_mbox_cmpl_put(phba, pmb); 4007 lpfc_mbox_cmpl_put(phba, pmb);
4067 goto send_next_mbox; 4008 goto send_next_mbox;
4068 } 4009 }
4069 } else {
4070 /* Turn on IOCB processing */
4071 for (i = 0; i < phba->sli.num_rings; i++)
4072 lpfc_sli_turn_on_ring(phba, i);
4073 } 4010 }
4074 4011
4075 } 4012 }