aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_hbadisc.c
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2009-05-22 14:51:39 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-06-08 12:21:29 -0400
commitda0436e915a5c17ee79e72c1bf978a4ebb1cbf4d (patch)
tree7784646b7627117fa7849a901c85294fae905505 /drivers/scsi/lpfc/lpfc_hbadisc.c
parent3772a99175f5378b5001e8da364341a8b8226a4a (diff)
[SCSI] lpfc 8.3.2 : Addition of SLI4 Interface - Base Support
Adds new hardware and interface definitions. Adds new interface routines - utilizing the reorganized layout of the driver. Adds SLI-4 specific functions for attachment, initialization, teardown, etc. 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_hbadisc.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_hbadisc.c34
1 files changed, 30 insertions, 4 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index 25fc96c9081f..0fc66005d545 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -29,10 +29,12 @@
29#include <scsi/scsi_host.h> 29#include <scsi/scsi_host.h>
30#include <scsi/scsi_transport_fc.h> 30#include <scsi/scsi_transport_fc.h>
31 31
32#include "lpfc_hw4.h"
32#include "lpfc_hw.h" 33#include "lpfc_hw.h"
33#include "lpfc_nl.h" 34#include "lpfc_nl.h"
34#include "lpfc_disc.h" 35#include "lpfc_disc.h"
35#include "lpfc_sli.h" 36#include "lpfc_sli.h"
37#include "lpfc_sli4.h"
36#include "lpfc_scsi.h" 38#include "lpfc_scsi.h"
37#include "lpfc.h" 39#include "lpfc.h"
38#include "lpfc_logmsg.h" 40#include "lpfc_logmsg.h"
@@ -491,6 +493,10 @@ lpfc_work_done(struct lpfc_hba *phba)
491 phba->work_ha = 0; 493 phba->work_ha = 0;
492 spin_unlock_irq(&phba->hbalock); 494 spin_unlock_irq(&phba->hbalock);
493 495
496 /* First, try to post the next mailbox command to SLI4 device */
497 if (phba->pci_dev_grp == LPFC_PCI_DEV_OC)
498 lpfc_sli4_post_async_mbox(phba);
499
494 if (ha_copy & HA_ERATT) 500 if (ha_copy & HA_ERATT)
495 /* Handle the error attention event */ 501 /* Handle the error attention event */
496 lpfc_handle_eratt(phba); 502 lpfc_handle_eratt(phba);
@@ -501,9 +507,27 @@ lpfc_work_done(struct lpfc_hba *phba)
501 if (ha_copy & HA_LATT) 507 if (ha_copy & HA_LATT)
502 lpfc_handle_latt(phba); 508 lpfc_handle_latt(phba);
503 509
510 /* Process SLI4 events */
511 if (phba->pci_dev_grp == LPFC_PCI_DEV_OC) {
512 if (phba->hba_flag & FCP_XRI_ABORT_EVENT)
513 lpfc_sli4_fcp_xri_abort_event_proc(phba);
514 if (phba->hba_flag & ELS_XRI_ABORT_EVENT)
515 lpfc_sli4_els_xri_abort_event_proc(phba);
516 if (phba->hba_flag & ASYNC_EVENT)
517 lpfc_sli4_async_event_proc(phba);
518 if (phba->hba_flag & HBA_POST_RECEIVE_BUFFER) {
519 spin_lock_irq(&phba->hbalock);
520 phba->hba_flag &= ~HBA_POST_RECEIVE_BUFFER;
521 spin_unlock_irq(&phba->hbalock);
522 lpfc_sli_hbqbuf_add_hbqs(phba, LPFC_ELS_HBQ);
523 }
524 if (phba->hba_flag & HBA_RECEIVE_BUFFER)
525 lpfc_sli4_handle_received_buffer(phba);
526 }
527
504 vports = lpfc_create_vport_work_array(phba); 528 vports = lpfc_create_vport_work_array(phba);
505 if (vports != NULL) 529 if (vports != NULL)
506 for(i = 0; i <= phba->max_vpi; i++) { 530 for (i = 0; i <= phba->max_vports; i++) {
507 /* 531 /*
508 * We could have no vports in array if unloading, so if 532 * We could have no vports in array if unloading, so if
509 * this happens then just use the pport 533 * this happens then just use the pport
@@ -2556,7 +2580,8 @@ lpfc_issue_clear_la(struct lpfc_hba *phba, struct lpfc_vport *vport)
2556 * clear_la then don't send it. 2580 * clear_la then don't send it.
2557 */ 2581 */
2558 if ((phba->link_state >= LPFC_CLEAR_LA) || 2582 if ((phba->link_state >= LPFC_CLEAR_LA) ||
2559 (vport->port_type != LPFC_PHYSICAL_PORT)) 2583 (vport->port_type != LPFC_PHYSICAL_PORT) ||
2584 (phba->sli_rev == LPFC_SLI_REV4))
2560 return; 2585 return;
2561 2586
2562 /* Link up discovery */ 2587 /* Link up discovery */
@@ -2585,7 +2610,7 @@ lpfc_issue_reg_vpi(struct lpfc_hba *phba, struct lpfc_vport *vport)
2585 2610
2586 regvpimbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); 2611 regvpimbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
2587 if (regvpimbox) { 2612 if (regvpimbox) {
2588 lpfc_reg_vpi(phba, vport->vpi, vport->fc_myDID, regvpimbox); 2613 lpfc_reg_vpi(vport, regvpimbox);
2589 regvpimbox->mbox_cmpl = lpfc_mbx_cmpl_reg_vpi; 2614 regvpimbox->mbox_cmpl = lpfc_mbx_cmpl_reg_vpi;
2590 regvpimbox->vport = vport; 2615 regvpimbox->vport = vport;
2591 if (lpfc_sli_issue_mbox(phba, regvpimbox, MBX_NOWAIT) 2616 if (lpfc_sli_issue_mbox(phba, regvpimbox, MBX_NOWAIT)
@@ -2645,7 +2670,8 @@ lpfc_disc_start(struct lpfc_vport *vport)
2645 */ 2670 */
2646 if ((phba->sli3_options & LPFC_SLI3_NPIV_ENABLED) && 2671 if ((phba->sli3_options & LPFC_SLI3_NPIV_ENABLED) &&
2647 !(vport->fc_flag & FC_PT2PT) && 2672 !(vport->fc_flag & FC_PT2PT) &&
2648 !(vport->fc_flag & FC_RSCN_MODE)) { 2673 !(vport->fc_flag & FC_RSCN_MODE) &&
2674 (phba->sli_rev < LPFC_SLI_REV4)) {
2649 lpfc_issue_reg_vpi(phba, vport); 2675 lpfc_issue_reg_vpi(phba, vport);
2650 return; 2676 return;
2651 } 2677 }