* [PATCH 18/34]bnx2x: Reset HW before use
@ 2009-01-14 16:43 Eilon Greenstein
2009-01-18 7:17 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Eilon Greenstein @ 2009-01-14 16:43 UTC (permalink / raw)
To: David Miller, netdev
To avoid complications, make sure that the HW is in reset (as it should be)
before trying to take it out of reset. In normal flows, the HW is indeed in rest
so this should have no effect
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
drivers/net/bnx2x_main.c | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index c416772..f17a238 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -5150,12 +5150,21 @@ static void enable_blocks_attention(struct bnx2x *bp)
}
+static void bnx2x_reset_common(struct bnx2x *bp)
+{
+ /* reset_common */
+ REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_CLEAR,
+ 0xd3ffff7f);
+ REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_CLEAR, 0x1403);
+}
+
static int bnx2x_init_common(struct bnx2x *bp)
{
u32 val, i;
DP(BNX2X_MSG_MCP, "starting common init func %d\n", BP_FUNC(bp));
+ bnx2x_reset_common(bp);
REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_SET, 0xffffffff);
REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_SET, 0xfffc);
@@ -6642,14 +6651,6 @@ static void bnx2x_reset_port(struct bnx2x *bp)
/* TODO: Close Doorbell port? */
}
-static void bnx2x_reset_common(struct bnx2x *bp)
-{
- /* reset_common */
- REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_CLEAR,
- 0xd3ffff7f);
- REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_CLEAR, 0x1403);
-}
-
static void bnx2x_reset_chip(struct bnx2x *bp, u32 reset_code)
{
DP(BNX2X_MSG_MCP, "function %d reset_code %x\n",
--
1.5.4.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 18/34]bnx2x: Reset HW before use
2009-01-14 16:43 [PATCH 18/34]bnx2x: Reset HW before use Eilon Greenstein
@ 2009-01-18 7:17 ` David Miller
2009-01-22 13:37 ` Eilon Greenstein
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2009-01-18 7:17 UTC (permalink / raw)
To: eilong; +Cc: netdev
From: "Eilon Greenstein" <eilong@broadcom.com>
Date: Wed, 14 Jan 2009 18:43:36 +0200
> To avoid complications, make sure that the HW is in reset (as it should be)
> before trying to take it out of reset. In normal flows, the HW is indeed in rest
> so this should have no effect
>
> Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 18/34]bnx2x: Reset HW before use
2009-01-18 7:17 ` David Miller
@ 2009-01-22 13:37 ` Eilon Greenstein
2009-01-22 21:45 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Eilon Greenstein @ 2009-01-22 13:37 UTC (permalink / raw)
To: David Miller; +Cc: netdev@vger.kernel.org
On Sat, 2009-01-17 at 23:17 -0800, David Miller wrote:
> From: "Eilon Greenstein" <eilong@broadcom.com>
> Date: Wed, 14 Jan 2009 18:43:36 +0200
>
> > To avoid complications, make sure that the HW is in reset (as it should be)
> > before trying to take it out of reset. In normal flows, the HW is indeed in rest
> > so this should have no effect
> >
> > Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
>
> Applied.
>
Hi Dave,
For some reason, patches 18-21 did not make it to the git (even though
you responded with "Applied" to those 4). I guess that this is what
happen when I send too many patches...
I'm re-sending those 4 after slightly adjusting the lines so it will be
easier to accept with the current net-2.6 (but without any real change
from the previous submit).
Thanks,
Eilon
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 18/34]bnx2x: Reset HW before use
2009-01-22 13:37 ` Eilon Greenstein
@ 2009-01-22 21:45 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2009-01-22 21:45 UTC (permalink / raw)
To: eilong; +Cc: netdev
From: "Eilon Greenstein" <eilong@broadcom.com>
Date: Thu, 22 Jan 2009 15:37:23 +0200
> For some reason, patches 18-21 did not make it to the git (even though
> you responded with "Applied" to those 4). I guess that this is what
> happen when I send too many patches...
>
> I'm re-sending those 4 after slightly adjusting the lines so it will be
> easier to accept with the current net-2.6 (but without any real change
> from the previous submit).
Sorry about that, I don't know how those got lost.
All applied, thanks a lot for catching this.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-01-22 21:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-14 16:43 [PATCH 18/34]bnx2x: Reset HW before use Eilon Greenstein
2009-01-18 7:17 ` David Miller
2009-01-22 13:37 ` Eilon Greenstein
2009-01-22 21:45 ` 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).