scsi: cxgb4i: get pf number from lldi->pf
authorVarun Prakash <varun@chelsio.com>
Thu, 21 Feb 2019 14:04:23 +0000 (19:34 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 27 Feb 2019 14:41:45 +0000 (09:41 -0500)
Instead of using viid to get pf number, directly get pf number from
lldi->pf.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/cxgbi/cxgb4i/cxgb4i.c

index 49f8028ac52418015cb0a6e064ceb2e3e81353cd..ba14a4cdf1200c0b93c5e562bc84acccbcadc601 100644 (file)
@@ -2122,8 +2122,7 @@ static void *t4_uld_add(const struct cxgb4_lld_info *lldi)
        cdev->itp = &cxgb4i_iscsi_transport;
        cdev->owner = THIS_MODULE;
 
-       cdev->pfvf = FW_VIID_PFN_G(cxgb4_port_viid(lldi->ports[0]))
-                       << FW_VIID_PFN_S;
+       cdev->pfvf = FW_PFVF_CMD_PFN_V(lldi->pf);
        pr_info("cdev 0x%p,%s, pfvf %u.\n",
                cdev, lldi->ports[0]->name, cdev->pfvf);