netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] bna: Remove Unnecessary CNA Check
@ 2011-07-28 21:49 Rasesh Mody
  2011-07-28 21:49 ` [PATCH 2/2] bna: HW Interface Init Update Rasesh Mody
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Rasesh Mody @ 2011-07-28 21:49 UTC (permalink / raw)
  To: davem, netdev; +Cc: adapter_linux_open_src_team, Rasesh Mody

Change details:
 - ioc->cna is always set to 1 for eth functions, remove the check that
   asserts IOC is in CNA mode in bfa_ioc_firmware_lock() and
   bfa_ioc_firmware_unlock() in bfa_ioc_ct.c.

Signed-off-by: Rasesh Mody <rmody@brocade.com>
---
 drivers/net/bna/bfa_ioc_ct.c |   12 ------------
 1 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/drivers/net/bna/bfa_ioc_ct.c b/drivers/net/bna/bfa_ioc_ct.c
index 87aecdf..c43f942 100644
--- a/drivers/net/bna/bfa_ioc_ct.c
+++ b/drivers/net/bna/bfa_ioc_ct.c
@@ -84,12 +84,6 @@ bfa_ioc_ct_firmware_lock(struct bfa_ioc *ioc)
 	struct bfi_ioc_image_hdr fwhdr;
 
 	/**
-	 * Firmware match check is relevant only for CNA.
-	 */
-	if (!ioc->cna)
-		return true;
-
-	/**
 	 * If bios boot (flash based) -- do not increment usage count
 	 */
 	if (bfa_cb_image_get_size(BFA_IOC_FWIMG_TYPE(ioc)) <
@@ -140,12 +134,6 @@ bfa_ioc_ct_firmware_unlock(struct bfa_ioc *ioc)
 	u32 usecnt;
 
 	/**
-	 * Firmware lock is relevant only for CNA.
-	 */
-	if (!ioc->cna)
-		return;
-
-	/**
 	 * If bios boot (flash based) -- do not decrement usage count
 	 */
 	if (bfa_cb_image_get_size(BFA_IOC_FWIMG_TYPE(ioc)) <
-- 
1.7.1


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

* [PATCH 2/2] bna: HW Interface Init Update
  2011-07-28 21:49 [PATCH 1/2] bna: Remove Unnecessary CNA Check Rasesh Mody
@ 2011-07-28 21:49 ` Rasesh Mody
  2011-08-01  8:56   ` David Miller
  2011-07-29  1:28 ` [PATCH 1/2] bna: Remove Unnecessary CNA Check David Miller
  2011-08-01  8:56 ` David Miller
  2 siblings, 1 reply; 7+ messages in thread
From: Rasesh Mody @ 2011-07-28 21:49 UTC (permalink / raw)
  To: davem, netdev; +Cc: adapter_linux_open_src_team, Rasesh Mody

Change details:
 - Split the hw interface into common and asic specific to support new asic
   in the future.
 - Fix bfa_ioc_ct_isr_mode_set() to also include the case that we are already
   in the desired msix mode.

Signed-off-by: Rasesh Mody <rmody@brocade.com>
---
 drivers/net/bna/bfa_ioc_ct.c |   28 +++++++++++++++++-----------
 1 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/drivers/net/bna/bfa_ioc_ct.c b/drivers/net/bna/bfa_ioc_ct.c
index c43f942..29b5fd0 100644
--- a/drivers/net/bna/bfa_ioc_ct.c
+++ b/drivers/net/bna/bfa_ioc_ct.c
@@ -50,26 +50,32 @@ static enum bfa_status bfa_ioc_ct_pll_init(void __iomem *rb, bool fcmode);
 
 static struct bfa_ioc_hwif nw_hwif_ct;
 
+static void
+bfa_ioc_set_ctx_hwif(struct bfa_ioc *ioc, struct bfa_ioc_hwif *hwif)
+{
+	hwif->ioc_firmware_lock = bfa_ioc_ct_firmware_lock;
+	hwif->ioc_firmware_unlock = bfa_ioc_ct_firmware_unlock;
+	hwif->ioc_notify_fail = bfa_ioc_ct_notify_fail;
+	hwif->ioc_ownership_reset = bfa_ioc_ct_ownership_reset;
+	hwif->ioc_sync_start = bfa_ioc_ct_sync_start;
+	hwif->ioc_sync_join = bfa_ioc_ct_sync_join;
+	hwif->ioc_sync_leave = bfa_ioc_ct_sync_leave;
+	hwif->ioc_sync_ack = bfa_ioc_ct_sync_ack;
+	hwif->ioc_sync_complete = bfa_ioc_ct_sync_complete;
+}
+
 /**
  * Called from bfa_ioc_attach() to map asic specific calls.
  */
 void
 bfa_nw_ioc_set_ct_hwif(struct bfa_ioc *ioc)
 {
+	bfa_ioc_set_ctx_hwif(ioc, &nw_hwif_ct);
+
 	nw_hwif_ct.ioc_pll_init = bfa_ioc_ct_pll_init;
-	nw_hwif_ct.ioc_firmware_lock = bfa_ioc_ct_firmware_lock;
-	nw_hwif_ct.ioc_firmware_unlock = bfa_ioc_ct_firmware_unlock;
 	nw_hwif_ct.ioc_reg_init = bfa_ioc_ct_reg_init;
 	nw_hwif_ct.ioc_map_port = bfa_ioc_ct_map_port;
 	nw_hwif_ct.ioc_isr_mode_set = bfa_ioc_ct_isr_mode_set;
-	nw_hwif_ct.ioc_notify_fail = bfa_ioc_ct_notify_fail;
-	nw_hwif_ct.ioc_ownership_reset = bfa_ioc_ct_ownership_reset;
-	nw_hwif_ct.ioc_sync_start = bfa_ioc_ct_sync_start;
-	nw_hwif_ct.ioc_sync_join = bfa_ioc_ct_sync_join;
-	nw_hwif_ct.ioc_sync_leave = bfa_ioc_ct_sync_leave;
-	nw_hwif_ct.ioc_sync_ack = bfa_ioc_ct_sync_ack;
-	nw_hwif_ct.ioc_sync_complete = bfa_ioc_ct_sync_complete;
-
 	ioc->ioc_hwif = &nw_hwif_ct;
 }
 
@@ -297,7 +303,7 @@ bfa_ioc_ct_isr_mode_set(struct bfa_ioc *ioc, bool msix)
 	/**
 	 * If already in desired mode, do not change anything
 	 */
-	if (!msix && mode)
+	if ((!msix && mode) || (msix && !mode))
 		return;
 
 	if (msix)
-- 
1.7.1


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

* Re: [PATCH 1/2] bna: Remove Unnecessary CNA Check
  2011-07-28 21:49 [PATCH 1/2] bna: Remove Unnecessary CNA Check Rasesh Mody
  2011-07-28 21:49 ` [PATCH 2/2] bna: HW Interface Init Update Rasesh Mody
@ 2011-07-29  1:28 ` David Miller
  2011-07-29  1:45   ` Rasesh Mody
  2011-08-01  8:56 ` David Miller
  2 siblings, 1 reply; 7+ messages in thread
From: David Miller @ 2011-07-29  1:28 UTC (permalink / raw)
  To: rmody; +Cc: netdev, adapter_linux_open_src_team


So are these bug fixes or cleanups/features?  You don't say where
you intend these changes to go.

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

* RE: [PATCH 1/2] bna: Remove Unnecessary CNA Check
  2011-07-29  1:28 ` [PATCH 1/2] bna: Remove Unnecessary CNA Check David Miller
@ 2011-07-29  1:45   ` Rasesh Mody
  2011-07-29  1:46     ` David Miller
  0 siblings, 1 reply; 7+ messages in thread
From: Rasesh Mody @ 2011-07-29  1:45 UTC (permalink / raw)
  To: David Miller; +Cc: netdev@vger.kernel.org, Adapter Linux Open SRC Team

>From: David Miller [mailto:davem@davemloft.net]
>Sent: Thursday, July 28, 2011 6:29 PM
>
>So are these bug fixes or cleanups/features?  You don't say where
>you intend these changes to go.

Can you please put these into net-next tree? These patches remove unnecessary code and updates h/w initialize code.

We'll submit the features/cleanups patches in subsequent submissions against net-next.

Thanks,
Rasesh

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

* Re: [PATCH 1/2] bna: Remove Unnecessary CNA Check
  2011-07-29  1:45   ` Rasesh Mody
@ 2011-07-29  1:46     ` David Miller
  0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2011-07-29  1:46 UTC (permalink / raw)
  To: rmody; +Cc: netdev, adapter_linux_open_src_team

From: Rasesh Mody <rmody@brocade.com>
Date: Thu, 28 Jul 2011 18:45:11 -0700

> Can you please put these into net-next tree?

Ok.

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

* Re: [PATCH 1/2] bna: Remove Unnecessary CNA Check
  2011-07-28 21:49 [PATCH 1/2] bna: Remove Unnecessary CNA Check Rasesh Mody
  2011-07-28 21:49 ` [PATCH 2/2] bna: HW Interface Init Update Rasesh Mody
  2011-07-29  1:28 ` [PATCH 1/2] bna: Remove Unnecessary CNA Check David Miller
@ 2011-08-01  8:56 ` David Miller
  2 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2011-08-01  8:56 UTC (permalink / raw)
  To: rmody; +Cc: netdev, adapter_linux_open_src_team

From: Rasesh Mody <rmody@brocade.com>
Date: Thu, 28 Jul 2011 14:49:26 -0700

> Change details:
>  - ioc->cna is always set to 1 for eth functions, remove the check that
>    asserts IOC is in CNA mode in bfa_ioc_firmware_lock() and
>    bfa_ioc_firmware_unlock() in bfa_ioc_ct.c.
> 
> Signed-off-by: Rasesh Mody <rmody@brocade.com>

Queued up for net-next

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

* Re: [PATCH 2/2] bna: HW Interface Init Update
  2011-07-28 21:49 ` [PATCH 2/2] bna: HW Interface Init Update Rasesh Mody
@ 2011-08-01  8:56   ` David Miller
  0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2011-08-01  8:56 UTC (permalink / raw)
  To: rmody; +Cc: netdev, adapter_linux_open_src_team

From: Rasesh Mody <rmody@brocade.com>
Date: Thu, 28 Jul 2011 14:49:27 -0700

> Change details:
>  - Split the hw interface into common and asic specific to support new asic
>    in the future.
>  - Fix bfa_ioc_ct_isr_mode_set() to also include the case that we are already
>    in the desired msix mode.
> 
> Signed-off-by: Rasesh Mody <rmody@brocade.com>

Queued up for net-next

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

end of thread, other threads:[~2011-08-01  8:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-28 21:49 [PATCH 1/2] bna: Remove Unnecessary CNA Check Rasesh Mody
2011-07-28 21:49 ` [PATCH 2/2] bna: HW Interface Init Update Rasesh Mody
2011-08-01  8:56   ` David Miller
2011-07-29  1:28 ` [PATCH 1/2] bna: Remove Unnecessary CNA Check David Miller
2011-07-29  1:45   ` Rasesh Mody
2011-07-29  1:46     ` David Miller
2011-08-01  8:56 ` David Miller

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