]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
bna: Multiple Definition and Interface Setup Fix
authorRasesh Mody <rmody@brocade.com>
Wed, 5 Oct 2011 03:04:01 +0000 (23:04 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 5 Oct 2011 03:04:01 +0000 (23:04 -0400)
drivers/net/built-in.o: In function `bfa_ioc_ct2_poweron':
(.text+0xcdc90): multiple definition of `bfa_ioc_ct2_poweron'
drivers/scsi/built-in.o:(.text+0x17f9a0): first defined here

This patch renames bfa_ioc_ct2_poweron() to bfa_nw_ioc_ct2_poweron() to avoid
multiple definition with Brocade scsi driver. It also modifies asic specific
interface setup to allocate MSIX resources at power on in case of 1860 HW with
no asic block and warns if the asic gen is neither BFI_ASIC_GEN_CT nor
BFI_ASIC_GEN_CT2.

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/brocade/bna/bfa_ioc.c
drivers/net/ethernet/brocade/bna/bfa_ioc.h
drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c

index e02d6071a9c43280236bcb8d381a44eeaa1d126a..b0307a00a109e06ca876e25d42c44773b51250be 100644 (file)
@@ -2006,8 +2006,11 @@ bfa_nw_ioc_pci_init(struct bfa_ioc *ioc, struct bfa_pcidev *pcidev,
         */
        if (ioc->asic_gen == BFI_ASIC_GEN_CT)
                bfa_nw_ioc_set_ct_hwif(ioc);
-       else
+       else {
+               WARN_ON(ioc->asic_gen != BFI_ASIC_GEN_CT2);
                bfa_nw_ioc_set_ct2_hwif(ioc);
+               bfa_nw_ioc_ct2_poweron(ioc);
+       }
 
        bfa_ioc_map_port(ioc);
        bfa_ioc_reg_init(ioc);
index d5a21f4ee1bb85cf5802c3cbe9794c6eec743f9b..ca158d1eaef3a61718ff15c4101a81ee596fe851 100644 (file)
@@ -281,7 +281,7 @@ void bfa_nw_ioc_mbox_regisr(struct bfa_ioc *ioc, enum bfi_mclass mc,
 
 void bfa_nw_ioc_set_ct_hwif(struct bfa_ioc *ioc);
 void bfa_nw_ioc_set_ct2_hwif(struct bfa_ioc *ioc);
-void bfa_ioc_ct2_poweron(struct bfa_ioc *ioc);
+void bfa_nw_ioc_ct2_poweron(struct bfa_ioc *ioc);
 
 void bfa_nw_ioc_attach(struct bfa_ioc *ioc, void *bfa,
                struct bfa_ioc_cbfn *cbfn);
index c2d3b1adbca4dd1d78d3ba627d146267ab0063c7..348479bbfa3a42b953a111bb06c31cec5e4917a8 100644 (file)
@@ -454,7 +454,7 @@ bfa_ioc_ct2_lpu_read_stat(struct bfa_ioc *ioc)
 #define __MSIX_VT_NUMVT_(_v)           ((_v) << __MSIX_VT_NUMVT__SH)
 #define __MSIX_VT_OFST_                        0x000007ff
 void
-bfa_ioc_ct2_poweron(struct bfa_ioc *ioc)
+bfa_nw_ioc_ct2_poweron(struct bfa_ioc *ioc)
 {
        void __iomem *rb = ioc->pcidev.pci_bar_kva;
        u32 r32;