Rob,

I wanted to point out that this patch is needed to keep the
fnic driver working after the NPIV patches.

The patch "libfc: changes to libfc_host_alloc" requires
that LLDs call libfc_host_alloc() in order to get the lport EM
list initialized.  It also changes the return value
for libfc_host_alloc().

Since this patch uses the new value, it has to go after the
other one, but that leaves a commit that breaks fnic
(I haven't tested this).

Chris, I apologize for copying the patch description from your mail
without crediting you.

        Joe


-------- Original Message --------
Subject: [Open-FCoE] [PATCH] fnic: convert fnic to use libfc_host_alloc
Date: Wed, 02 Sep 2009 16:09:47 -0700
From: Joe Eykholt <[email protected]>
To: [email protected]

libfc drivers should use libfc_host_alloc instead of scsi_host_alloc to
ensure that the fc_lport structure is properly initialized.

Signed-off-by: Joe Eykholt <[email protected]>
---
  0 files changed, 0 insertions(+), 0 deletions(-)


diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c
index 71c7bbe..bfc341c 100644
--- a/drivers/scsi/fnic/fnic_main.c
+++ b/drivers/scsi/fnic/fnic_main.c
@@ -424,15 +424,13 @@ static int __devinit fnic_probe(struct pci_dev *pdev,
         * Allocate SCSI Host and set up association between host,
         * local port, and fnic
         */
-       host = scsi_host_alloc(&fnic_host_template,
-                              sizeof(struct fc_lport) + sizeof(struct fnic));
-       if (!host) {
-               printk(KERN_ERR PFX "Unable to alloc SCSI host\n");
+       lp = libfc_host_alloc(&fnic_host_template, sizeof(struct fnic));
+       if (!lp) {
+               printk(KERN_ERR PFX "Unable to alloc libfc local port\n");
                err = -ENOMEM;
                goto err_out;
        }
-       lp = shost_priv(host);
-       lp->host = host;
+       host = lp->host;
        fnic = lport_priv(lp);
        fnic->lport = lp;



_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel
_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel

Reply via email to