diff options
author | James Smart <James.Smart@Emulex.Com> | 2009-05-22 14:52:52 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-06-08 12:24:50 -0400 |
commit | 04c684968487eb4f98728363a97b8da48f3bb958 (patch) | |
tree | 33f59839ca26a1904c4e2d2895598f543266feb0 /drivers/scsi/lpfc/lpfc_hbadisc.c | |
parent | 4f774513f7b3fe96648b8936f60f835e6ceaa88e (diff) |
[SCSI] lpfc 8.3.2 : Addition of SLI4 Interface - Mailbox handling
The mailbox commands themselves are the same, or very similar to
their SLI3 counterparts. This patch genericizes mailbox command
handling and adds support for the new SLI4 mailbox queue.
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.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index 0fc66005d545..2270d9a7c8e3 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c | |||
@@ -879,7 +879,7 @@ lpfc_mbx_cmpl_clear_la(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | |||
879 | struct lpfc_vport *vport = pmb->vport; | 879 | struct lpfc_vport *vport = pmb->vport; |
880 | struct Scsi_Host *shost = lpfc_shost_from_vport(vport); | 880 | struct Scsi_Host *shost = lpfc_shost_from_vport(vport); |
881 | struct lpfc_sli *psli = &phba->sli; | 881 | struct lpfc_sli *psli = &phba->sli; |
882 | MAILBOX_t *mb = &pmb->mb; | 882 | MAILBOX_t *mb = &pmb->u.mb; |
883 | uint32_t control; | 883 | uint32_t control; |
884 | 884 | ||
885 | /* Since we don't do discovery right now, turn these off here */ | 885 | /* Since we don't do discovery right now, turn these off here */ |
@@ -942,7 +942,7 @@ lpfc_mbx_cmpl_local_config_link(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | |||
942 | { | 942 | { |
943 | struct lpfc_vport *vport = pmb->vport; | 943 | struct lpfc_vport *vport = pmb->vport; |
944 | 944 | ||
945 | if (pmb->mb.mbxStatus) | 945 | if (pmb->u.mb.mbxStatus) |
946 | goto out; | 946 | goto out; |
947 | 947 | ||
948 | mempool_free(pmb, phba->mbox_mem_pool); | 948 | mempool_free(pmb, phba->mbox_mem_pool); |
@@ -970,7 +970,7 @@ out: | |||
970 | lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX, | 970 | lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX, |
971 | "0306 CONFIG_LINK mbxStatus error x%x " | 971 | "0306 CONFIG_LINK mbxStatus error x%x " |
972 | "HBA state x%x\n", | 972 | "HBA state x%x\n", |
973 | pmb->mb.mbxStatus, vport->port_state); | 973 | pmb->u.mb.mbxStatus, vport->port_state); |
974 | mempool_free(pmb, phba->mbox_mem_pool); | 974 | mempool_free(pmb, phba->mbox_mem_pool); |
975 | 975 | ||
976 | lpfc_linkdown(phba); | 976 | lpfc_linkdown(phba); |
@@ -1202,7 +1202,7 @@ lpfc_mbx_cmpl_read_la(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | |||
1202 | struct lpfc_vport *vport = pmb->vport; | 1202 | struct lpfc_vport *vport = pmb->vport; |
1203 | struct Scsi_Host *shost = lpfc_shost_from_vport(vport); | 1203 | struct Scsi_Host *shost = lpfc_shost_from_vport(vport); |
1204 | READ_LA_VAR *la; | 1204 | READ_LA_VAR *la; |
1205 | MAILBOX_t *mb = &pmb->mb; | 1205 | MAILBOX_t *mb = &pmb->u.mb; |
1206 | struct lpfc_dmabuf *mp = (struct lpfc_dmabuf *) (pmb->context1); | 1206 | struct lpfc_dmabuf *mp = (struct lpfc_dmabuf *) (pmb->context1); |
1207 | 1207 | ||
1208 | /* Unblock ELS traffic */ | 1208 | /* Unblock ELS traffic */ |
@@ -1217,7 +1217,7 @@ lpfc_mbx_cmpl_read_la(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | |||
1217 | goto lpfc_mbx_cmpl_read_la_free_mbuf; | 1217 | goto lpfc_mbx_cmpl_read_la_free_mbuf; |
1218 | } | 1218 | } |
1219 | 1219 | ||
1220 | la = (READ_LA_VAR *) & pmb->mb.un.varReadLA; | 1220 | la = (READ_LA_VAR *) &pmb->u.mb.un.varReadLA; |
1221 | 1221 | ||
1222 | memcpy(&phba->alpa_map[0], mp->virt, 128); | 1222 | memcpy(&phba->alpa_map[0], mp->virt, 128); |
1223 | 1223 | ||
@@ -1355,7 +1355,7 @@ lpfc_mbx_cmpl_reg_login(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | |||
1355 | static void | 1355 | static void |
1356 | lpfc_mbx_cmpl_unreg_vpi(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | 1356 | lpfc_mbx_cmpl_unreg_vpi(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) |
1357 | { | 1357 | { |
1358 | MAILBOX_t *mb = &pmb->mb; | 1358 | MAILBOX_t *mb = &pmb->u.mb; |
1359 | struct lpfc_vport *vport = pmb->vport; | 1359 | struct lpfc_vport *vport = pmb->vport; |
1360 | struct Scsi_Host *shost = lpfc_shost_from_vport(vport); | 1360 | struct Scsi_Host *shost = lpfc_shost_from_vport(vport); |
1361 | 1361 | ||
@@ -1408,7 +1408,7 @@ lpfc_mbx_cmpl_reg_vpi(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | |||
1408 | { | 1408 | { |
1409 | struct lpfc_vport *vport = pmb->vport; | 1409 | struct lpfc_vport *vport = pmb->vport; |
1410 | struct Scsi_Host *shost = lpfc_shost_from_vport(vport); | 1410 | struct Scsi_Host *shost = lpfc_shost_from_vport(vport); |
1411 | MAILBOX_t *mb = &pmb->mb; | 1411 | MAILBOX_t *mb = &pmb->u.mb; |
1412 | 1412 | ||
1413 | switch (mb->mbxStatus) { | 1413 | switch (mb->mbxStatus) { |
1414 | case 0x0011: | 1414 | case 0x0011: |
@@ -2279,7 +2279,7 @@ lpfc_cleanup_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) | |||
2279 | 2279 | ||
2280 | /* cleanup any ndlp on mbox q waiting for reglogin cmpl */ | 2280 | /* cleanup any ndlp on mbox q waiting for reglogin cmpl */ |
2281 | if ((mb = phba->sli.mbox_active)) { | 2281 | if ((mb = phba->sli.mbox_active)) { |
2282 | if ((mb->mb.mbxCommand == MBX_REG_LOGIN64) && | 2282 | if ((mb->u.mb.mbxCommand == MBX_REG_LOGIN64) && |
2283 | (ndlp == (struct lpfc_nodelist *) mb->context2)) { | 2283 | (ndlp == (struct lpfc_nodelist *) mb->context2)) { |
2284 | mb->context2 = NULL; | 2284 | mb->context2 = NULL; |
2285 | mb->mbox_cmpl = lpfc_sli_def_mbox_cmpl; | 2285 | mb->mbox_cmpl = lpfc_sli_def_mbox_cmpl; |
@@ -2288,7 +2288,7 @@ lpfc_cleanup_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) | |||
2288 | 2288 | ||
2289 | spin_lock_irq(&phba->hbalock); | 2289 | spin_lock_irq(&phba->hbalock); |
2290 | list_for_each_entry_safe(mb, nextmb, &phba->sli.mboxq, list) { | 2290 | list_for_each_entry_safe(mb, nextmb, &phba->sli.mboxq, list) { |
2291 | if ((mb->mb.mbxCommand == MBX_REG_LOGIN64) && | 2291 | if ((mb->u.mb.mbxCommand == MBX_REG_LOGIN64) && |
2292 | (ndlp == (struct lpfc_nodelist *) mb->context2)) { | 2292 | (ndlp == (struct lpfc_nodelist *) mb->context2)) { |
2293 | mp = (struct lpfc_dmabuf *) (mb->context1); | 2293 | mp = (struct lpfc_dmabuf *) (mb->context1); |
2294 | if (mp) { | 2294 | if (mp) { |
@@ -2970,7 +2970,7 @@ restart_disc: | |||
2970 | lpfc_linkdown(phba); | 2970 | lpfc_linkdown(phba); |
2971 | lpfc_init_link(phba, initlinkmbox, phba->cfg_topology, | 2971 | lpfc_init_link(phba, initlinkmbox, phba->cfg_topology, |
2972 | phba->cfg_link_speed); | 2972 | phba->cfg_link_speed); |
2973 | initlinkmbox->mb.un.varInitLnk.lipsr_AL_PA = 0; | 2973 | initlinkmbox->u.mb.un.varInitLnk.lipsr_AL_PA = 0; |
2974 | initlinkmbox->vport = vport; | 2974 | initlinkmbox->vport = vport; |
2975 | initlinkmbox->mbox_cmpl = lpfc_sli_def_mbox_cmpl; | 2975 | initlinkmbox->mbox_cmpl = lpfc_sli_def_mbox_cmpl; |
2976 | rc = lpfc_sli_issue_mbox(phba, initlinkmbox, MBX_NOWAIT); | 2976 | rc = lpfc_sli_issue_mbox(phba, initlinkmbox, MBX_NOWAIT); |
@@ -3069,7 +3069,7 @@ restart_disc: | |||
3069 | void | 3069 | void |
3070 | lpfc_mbx_cmpl_fdmi_reg_login(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | 3070 | lpfc_mbx_cmpl_fdmi_reg_login(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) |
3071 | { | 3071 | { |
3072 | MAILBOX_t *mb = &pmb->mb; | 3072 | MAILBOX_t *mb = &pmb->u.mb; |
3073 | struct lpfc_dmabuf *mp = (struct lpfc_dmabuf *) (pmb->context1); | 3073 | struct lpfc_dmabuf *mp = (struct lpfc_dmabuf *) (pmb->context1); |
3074 | struct lpfc_nodelist *ndlp = (struct lpfc_nodelist *) pmb->context2; | 3074 | struct lpfc_nodelist *ndlp = (struct lpfc_nodelist *) pmb->context2; |
3075 | struct lpfc_vport *vport = pmb->vport; | 3075 | struct lpfc_vport *vport = pmb->vport; |