linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next 1/1] bna: Multiple Definition and Interface Setup Fix
@ 2011-10-05  2:31 Rasesh Mody
  2011-10-05  3:27 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Rasesh Mody @ 2011-10-05  2:31 UTC (permalink / raw)
  To: davem, netdev
  Cc: linux-next, linux-kernel, linux-scsi, rdunlap, sfr, huangj,
	adapter_linux_open_src_team, Rasesh Mody

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>
---
 drivers/net/ethernet/brocade/bna/bfa_ioc.c    |    5 ++++-
 drivers/net/ethernet/brocade/bna/bfa_ioc.h    |    2 +-
 drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c |    2 +-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/brocade/bna/bfa_ioc.c b/drivers/net/ethernet/brocade/bna/bfa_ioc.c
index e02d607..b0307a0 100644
--- a/drivers/net/ethernet/brocade/bna/bfa_ioc.c
+++ b/drivers/net/ethernet/brocade/bna/bfa_ioc.c
@@ -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);
diff --git a/drivers/net/ethernet/brocade/bna/bfa_ioc.h b/drivers/net/ethernet/brocade/bna/bfa_ioc.h
index d5a21f4..ca158d1 100644
--- a/drivers/net/ethernet/brocade/bna/bfa_ioc.h
+++ b/drivers/net/ethernet/brocade/bna/bfa_ioc.h
@@ -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);
diff --git a/drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c b/drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c
index c2d3b1a..348479b 100644
--- a/drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c
+++ b/drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c
@@ -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;
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [net-next 1/1] bna: Multiple Definition and Interface Setup Fix
  2011-10-05  2:31 [net-next 1/1] bna: Multiple Definition and Interface Setup Fix Rasesh Mody
@ 2011-10-05  3:27 ` David Miller
  2011-10-05  8:26   ` Stephen Rothwell
  0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2011-10-05  3:27 UTC (permalink / raw)
  To: rmody
  Cc: netdev, linux-next, linux-kernel, linux-scsi, rdunlap, sfr,
	huangj, adapter_linux_open_src_team

From: Rasesh Mody <rmody@brocade.com>
Date: Tue, 4 Oct 2011 19:31:20 -0700

> 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>

Applied, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [net-next 1/1] bna: Multiple Definition and Interface Setup Fix
  2011-10-05  3:27 ` David Miller
@ 2011-10-05  8:26   ` Stephen Rothwell
  2011-10-05 17:09     ` Randy Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2011-10-05  8:26 UTC (permalink / raw)
  To: David Miller
  Cc: rmody, netdev, linux-next, linux-kernel, linux-scsi, rdunlap,
	huangj, adapter_linux_open_src_team

[-- Attachment #1: Type: text/plain, Size: 1021 bytes --]

On Tue, 04 Oct 2011 23:27:13 -0400 (EDT) David Miller <davem@davemloft.net> wrote:
>
> From: Rasesh Mody <rmody@brocade.com>
> Date: Tue, 4 Oct 2011 19:31:20 -0700
> 
> > 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>
> 
> Applied, thanks.

I also manually applied this to linux-next today.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [net-next 1/1] bna: Multiple Definition and Interface Setup Fix
  2011-10-05  8:26   ` Stephen Rothwell
@ 2011-10-05 17:09     ` Randy Dunlap
  0 siblings, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2011-10-05 17:09 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: David Miller, rmody, netdev, linux-next, linux-kernel,
	linux-scsi, huangj, adapter_linux_open_src_team,
	Mauro Carvalho Chehab

On 10/05/11 01:26, Stephen Rothwell wrote:
> On Tue, 04 Oct 2011 23:27:13 -0400 (EDT) David Miller <davem@davemloft.net> wrote:
>>
>> From: Rasesh Mody <rmody@brocade.com>
>> Date: Tue, 4 Oct 2011 19:31:20 -0700
>>
>>> 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>
>>
>> Applied, thanks.

Thanks for the patch.

> I also manually applied this to linux-next today.

We could also stand to have this patch applied to linux-next since
it doesn't seem to be merged anywhere else yet: (for drivers/media/video)

http://marc.info/?l=linux-next&m=131741851601754&w=2


-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-10-05 17:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-05  2:31 [net-next 1/1] bna: Multiple Definition and Interface Setup Fix Rasesh Mody
2011-10-05  3:27 ` David Miller
2011-10-05  8:26   ` Stephen Rothwell
2011-10-05 17:09     ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).