aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_nportdisc.c
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2007-06-17 20:56:37 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-06-17 23:06:27 -0400
commited957684294618602b48f1950b0c9bbcb036583f (patch)
tree4e88dbb2e55013f973ad94099e2963dd507ea719 /drivers/scsi/lpfc/lpfc_nportdisc.c
parent2e0fef85e098f6794956b8b80b111179fbb4cbb7 (diff)
[SCSI] lpfc: NPIV: add SLI-3 interface
NPIV support is only available via new adapter interface extensions, termed SLI-3. This interface changes some of the basic behaviors such as command and response ring element sizes and data structures, as well as a change in buffer posting. Note: the new firmware extensions are found only on our mid-range and enterprise 4Gig adapters - so NPIV support is available only on these newer adapters. The latest firmware can be downloaded from the Emulex support page. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_nportdisc.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_nportdisc.c36
1 files changed, 10 insertions, 26 deletions
diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c
index e6452b88d958..b1727481a1e6 100644
--- a/drivers/scsi/lpfc/lpfc_nportdisc.c
+++ b/drivers/scsi/lpfc/lpfc_nportdisc.c
@@ -255,9 +255,8 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
255 /* Start discovery - this should just do 255 /* Start discovery - this should just do
256 CLEAR_LA */ 256 CLEAR_LA */
257 lpfc_disc_start(vport); 257 lpfc_disc_start(vport);
258 } else { 258 } else
259 lpfc_initial_flogi(vport); 259 lpfc_initial_flogi(vport);
260 }
261 } else { 260 } else {
262 stat.un.b.lsRjtRsnCode = LSRJT_LOGICAL_BSY; 261 stat.un.b.lsRjtRsnCode = LSRJT_LOGICAL_BSY;
263 stat.un.b.lsRjtRsnCodeExp = LSEXP_NOTHING_MORE; 262 stat.un.b.lsRjtRsnCodeExp = LSEXP_NOTHING_MORE;
@@ -279,19 +278,16 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
279 icmd = &cmdiocb->iocb; 278 icmd = &cmdiocb->iocb;
280 279
281 /* PLOGI chkparm OK */ 280 /* PLOGI chkparm OK */
282 lpfc_printf_log(phba, 281 lpfc_printf_log(phba, KERN_INFO, LOG_ELS,
283 KERN_INFO,
284 LOG_ELS,
285 "%d:0114 PLOGI chkparm OK Data: x%x x%x x%x x%x\n", 282 "%d:0114 PLOGI chkparm OK Data: x%x x%x x%x x%x\n",
286 phba->brd_no, 283 phba->brd_no,
287 ndlp->nlp_DID, ndlp->nlp_state, ndlp->nlp_flag, 284 ndlp->nlp_DID, ndlp->nlp_state, ndlp->nlp_flag,
288 ndlp->nlp_rpi); 285 ndlp->nlp_rpi);
289 286
290 if (phba->cfg_fcp_class == 2 && sp->cls2.classValid) { 287 if (phba->cfg_fcp_class == 2 && sp->cls2.classValid)
291 ndlp->nlp_fcp_info |= CLASS2; 288 ndlp->nlp_fcp_info |= CLASS2;
292 } else { 289 else
293 ndlp->nlp_fcp_info |= CLASS3; 290 ndlp->nlp_fcp_info |= CLASS3;
294 }
295 291
296 ndlp->nlp_class_sup = 0; 292 ndlp->nlp_class_sup = 0;
297 if (sp->cls1.classValid) 293 if (sp->cls1.classValid)
@@ -327,6 +323,7 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
327 goto out; 323 goto out;
328 lpfc_config_link(phba, mbox); 324 lpfc_config_link(phba, mbox);
329 mbox->mbox_cmpl = lpfc_sli_def_mbox_cmpl; 325 mbox->mbox_cmpl = lpfc_sli_def_mbox_cmpl;
326 mbox->vport = vport;
330 rc = lpfc_sli_issue_mbox 327 rc = lpfc_sli_issue_mbox
331 (phba, mbox, (MBX_NOWAIT | MBX_STOP_IOCB)); 328 (phba, mbox, (MBX_NOWAIT | MBX_STOP_IOCB));
332 if (rc == MBX_NOT_FINISHED) { 329 if (rc == MBX_NOT_FINISHED) {
@@ -544,9 +541,7 @@ static uint32_t
544lpfc_disc_illegal(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, 541lpfc_disc_illegal(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
545 void *arg, uint32_t evt) 542 void *arg, uint32_t evt)
546{ 543{
547 lpfc_printf_log(vport->phba, 544 lpfc_printf_log(vport->phba, KERN_ERR, LOG_DISCOVERY,
548 KERN_ERR,
549 LOG_DISCOVERY,
550 "%d:0253 Illegal State Transition: node x%x event x%x, " 545 "%d:0253 Illegal State Transition: node x%x event x%x, "
551 "state x%x Data: x%x x%x\n", 546 "state x%x Data: x%x x%x\n",
552 vport->phba->brd_no, 547 vport->phba->brd_no,
@@ -728,9 +723,7 @@ lpfc_cmpl_plogi_plogi_issue(struct lpfc_vport *vport,
728 goto out; 723 goto out;
729 724
730 /* PLOGI chkparm OK */ 725 /* PLOGI chkparm OK */
731 lpfc_printf_log(phba, 726 lpfc_printf_log(phba, KERN_INFO, LOG_ELS,
732 KERN_INFO,
733 LOG_ELS,
734 "%d:0121 PLOGI chkparm OK " 727 "%d:0121 PLOGI chkparm OK "
735 "Data: x%x x%x x%x x%x\n", 728 "Data: x%x x%x x%x x%x\n",
736 phba->brd_no, 729 phba->brd_no,
@@ -1105,9 +1098,7 @@ lpfc_cmpl_reglogin_reglogin_issue(struct lpfc_vport *vport,
1105 1098
1106 if (mb->mbxStatus) { 1099 if (mb->mbxStatus) {
1107 /* RegLogin failed */ 1100 /* RegLogin failed */
1108 lpfc_printf_log(phba, 1101 lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY,
1109 KERN_ERR,
1110 LOG_DISCOVERY,
1111 "%d:0246 RegLogin failed Data: x%x x%x x%x\n", 1102 "%d:0246 RegLogin failed Data: x%x x%x x%x\n",
1112 phba->brd_no, 1103 phba->brd_no,
1113 did, mb->mbxStatus, vport->port_state); 1104 did, mb->mbxStatus, vport->port_state);
@@ -1470,15 +1461,12 @@ static uint32_t
1470lpfc_rcv_prlo_mapped_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, 1461lpfc_rcv_prlo_mapped_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
1471 void *arg, uint32_t evt) 1462 void *arg, uint32_t evt)
1472{ 1463{
1473 struct Scsi_Host *shost = lpfc_shost_from_vport(vport);
1474 struct lpfc_hba *phba = vport->phba; 1464 struct lpfc_hba *phba = vport->phba;
1475 struct lpfc_iocbq *cmdiocb = (struct lpfc_iocbq *) arg; 1465 struct lpfc_iocbq *cmdiocb = (struct lpfc_iocbq *) arg;
1476 1466
1477 /* flush the target */ 1467 /* flush the target */
1478 spin_lock_irq(shost->host_lock);
1479 lpfc_sli_abort_iocb(phba, &phba->sli.ring[phba->sli.fcp_ring], 1468 lpfc_sli_abort_iocb(phba, &phba->sli.ring[phba->sli.fcp_ring],
1480 ndlp->nlp_sid, 0, 0, LPFC_CTX_TGT); 1469 ndlp->nlp_sid, 0, 0, LPFC_CTX_TGT);
1481 spin_unlock_irq(shost->host_lock);
1482 1470
1483 /* Treat like rcv logo */ 1471 /* Treat like rcv logo */
1484 lpfc_rcv_logo(vport, ndlp, cmdiocb, ELS_CMD_PRLO); 1472 lpfc_rcv_logo(vport, ndlp, cmdiocb, ELS_CMD_PRLO);
@@ -1926,9 +1914,7 @@ lpfc_disc_state_machine(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
1926 cur_state = ndlp->nlp_state; 1914 cur_state = ndlp->nlp_state;
1927 1915
1928 /* DSM in event <evt> on NPort <nlp_DID> in state <cur_state> */ 1916 /* DSM in event <evt> on NPort <nlp_DID> in state <cur_state> */
1929 lpfc_printf_log(phba, 1917 lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY,
1930 KERN_INFO,
1931 LOG_DISCOVERY,
1932 "%d:0211 DSM in event x%x on NPort x%x in state %d " 1918 "%d:0211 DSM in event x%x on NPort x%x in state %d "
1933 "Data: x%x\n", 1919 "Data: x%x\n",
1934 phba->brd_no, 1920 phba->brd_no,
@@ -1938,9 +1924,7 @@ lpfc_disc_state_machine(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
1938 rc = (func) (vport, ndlp, arg, evt); 1924 rc = (func) (vport, ndlp, arg, evt);
1939 1925
1940 /* DSM out state <rc> on NPort <nlp_DID> */ 1926 /* DSM out state <rc> on NPort <nlp_DID> */
1941 lpfc_printf_log(phba, 1927 lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY,
1942 KERN_INFO,
1943 LOG_DISCOVERY,
1944 "%d:0212 DSM out state %d on NPort x%x Data: x%x\n", 1928 "%d:0212 DSM out state %d on NPort x%x Data: x%x\n",
1945 phba->brd_no, 1929 phba->brd_no,
1946 rc, ndlp->nlp_DID, ndlp->nlp_flag); 1930 rc, ndlp->nlp_DID, ndlp->nlp_flag);