diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_ct.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_ct.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c index e724048bf390..0ebcd9baca79 100644 --- a/drivers/scsi/lpfc/lpfc_ct.c +++ b/drivers/scsi/lpfc/lpfc_ct.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <scsi/scsi_device.h> | 31 | #include <scsi/scsi_device.h> |
32 | #include <scsi/scsi_host.h> | 32 | #include <scsi/scsi_host.h> |
33 | #include <scsi/scsi_transport_fc.h> | 33 | #include <scsi/scsi_transport_fc.h> |
34 | #include <scsi/fc/fc_fs.h> | ||
34 | 35 | ||
35 | #include "lpfc_hw4.h" | 36 | #include "lpfc_hw4.h" |
36 | #include "lpfc_hw.h" | 37 | #include "lpfc_hw.h" |
@@ -336,8 +337,8 @@ lpfc_gen_req(struct lpfc_vport *vport, struct lpfc_dmabuf *bmp, | |||
336 | /* Fill in rest of iocb */ | 337 | /* Fill in rest of iocb */ |
337 | icmd->un.genreq64.w5.hcsw.Fctl = (SI | LA); | 338 | icmd->un.genreq64.w5.hcsw.Fctl = (SI | LA); |
338 | icmd->un.genreq64.w5.hcsw.Dfctl = 0; | 339 | icmd->un.genreq64.w5.hcsw.Dfctl = 0; |
339 | icmd->un.genreq64.w5.hcsw.Rctl = FC_UNSOL_CTL; | 340 | icmd->un.genreq64.w5.hcsw.Rctl = FC_RCTL_DD_UNSOL_CTL; |
340 | icmd->un.genreq64.w5.hcsw.Type = FC_COMMON_TRANSPORT_ULP; | 341 | icmd->un.genreq64.w5.hcsw.Type = FC_TYPE_CT; |
341 | 342 | ||
342 | if (!tmo) { | 343 | if (!tmo) { |
343 | /* FC spec states we need 3 * ratov for CT requests */ | 344 | /* FC spec states we need 3 * ratov for CT requests */ |
@@ -395,9 +396,14 @@ lpfc_ct_cmd(struct lpfc_vport *vport, struct lpfc_dmabuf *inmp, | |||
395 | outmp = lpfc_alloc_ct_rsp(phba, cmdcode, bpl, rsp_size, &cnt); | 396 | outmp = lpfc_alloc_ct_rsp(phba, cmdcode, bpl, rsp_size, &cnt); |
396 | if (!outmp) | 397 | if (!outmp) |
397 | return -ENOMEM; | 398 | return -ENOMEM; |
398 | 399 | /* | |
400 | * Form the CT IOCB. The total number of BDEs in this IOCB | ||
401 | * is the single command plus response count from | ||
402 | * lpfc_alloc_ct_rsp. | ||
403 | */ | ||
404 | cnt += 1; | ||
399 | status = lpfc_gen_req(vport, bmp, inmp, outmp, cmpl, ndlp, 0, | 405 | status = lpfc_gen_req(vport, bmp, inmp, outmp, cmpl, ndlp, 0, |
400 | cnt+1, 0, retry); | 406 | cnt, 0, retry); |
401 | if (status) { | 407 | if (status) { |
402 | lpfc_free_ct_rsp(phba, outmp); | 408 | lpfc_free_ct_rsp(phba, outmp); |
403 | return -ENOMEM; | 409 | return -ENOMEM; |
@@ -533,6 +539,9 @@ lpfc_ns_rsp(struct lpfc_vport *vport, struct lpfc_dmabuf *mp, uint32_t Size) | |||
533 | SLI_CTNS_GFF_ID, | 539 | SLI_CTNS_GFF_ID, |
534 | 0, Did) == 0) | 540 | 0, Did) == 0) |
535 | vport->num_disc_nodes++; | 541 | vport->num_disc_nodes++; |
542 | else | ||
543 | lpfc_setup_disc_node | ||
544 | (vport, Did); | ||
536 | } | 545 | } |
537 | else { | 546 | else { |
538 | lpfc_debugfs_disc_trc(vport, | 547 | lpfc_debugfs_disc_trc(vport, |
@@ -1241,7 +1250,7 @@ lpfc_ns_cmd(struct lpfc_vport *vport, int cmdcode, | |||
1241 | be16_to_cpu(SLI_CTNS_RFF_ID); | 1250 | be16_to_cpu(SLI_CTNS_RFF_ID); |
1242 | CtReq->un.rff.PortId = cpu_to_be32(vport->fc_myDID); | 1251 | CtReq->un.rff.PortId = cpu_to_be32(vport->fc_myDID); |
1243 | CtReq->un.rff.fbits = FC4_FEATURE_INIT; | 1252 | CtReq->un.rff.fbits = FC4_FEATURE_INIT; |
1244 | CtReq->un.rff.type_code = FC_FCP_DATA; | 1253 | CtReq->un.rff.type_code = FC_TYPE_FCP; |
1245 | cmpl = lpfc_cmpl_ct_cmd_rff_id; | 1254 | cmpl = lpfc_cmpl_ct_cmd_rff_id; |
1246 | break; | 1255 | break; |
1247 | } | 1256 | } |