Netdev List
 help / color / mirror / Atom feed
From: "Dmitry Kravkov" <dmitry@broadcom.com>
To: "Jean-Michel Hautbois" <jhautbois@gmail.com>
Cc: netdev <netdev@vger.kernel.org>,
	"Barak Witkowski" <barak@broadcom.com>,
	"Eilon Greenstein" <eilong@broadcom.com>,
	"davem@davemloft.net" <davem@davemloft.net>
Subject: Re: bnx2x: link detected up at startup even when it should be down
Date: Thu, 27 Sep 2012 13:43:17 +0200	[thread overview]
Message-ID: <1348746197.7217.49.camel@lb-tlvb-dmitry> (raw)
In-Reply-To: <CAL8zT=jFRJt5OT_nJWWocKjWJJ3LajKrA1f7Zy5wMKz9V-DHXA@mail.gmail.com>

On Thu, 2012-09-27 at 12:07 +0200, Jean-Michel Hautbois wrote:
> 2012/9/27 Dmitry Kravkov <dmitry@broadcom.com>:
> > On Tue, 2012-09-25 at 16:00 +0200, Jean-Michel Hautbois wrote:
> >> 2012/9/25 Jean-Michel Hautbois <jhautbois@gmail.com>:
> >> > 2012/9/25 Dmitry Kravkov <dmitry@broadcom.com>:
> >> >>> -----Original Message-----
> >> >>> From: Jean-Michel Hautbois [mailto:jhautbois@gmail.com]
> >> >>> Sent: Tuesday, September 25, 2012 2:54 PM
> >> >>> To: Dmitry Kravkov
> >> >>> Cc: netdev; Barak Witkowski; Eilon Greenstein; davem@davemloft.net
> >> >>> Subject: Re: bnx2x: link detected up at startup even when it should be down
> >> >>
> >> >>
> >> FYI, eth4 and eth5 are seen UP and they should be down.
> > It looks driver misses DCC "disable/enable" update
> >
> > Can you pls test this simple patch?
> >
> > From 1efa0314f4b912f474089f5f8375d37bc265a502 Mon Sep 17 00:00:00 2001
> > From: Dmitry Kravkov <dmitry@broadcom.com>
> > Date: Fri, 22 Mar 2013 05:12:02 +0200
> > Subject: [PATCH] bnx2x: DCC disable/enable update can be missed by driver
> >
> > As a result of missed update, OS may be updated with wrong link status.
> > ---
> >  drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c |    1 +
> >  1 files changed, 1 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
> > index 2f6361e..3962d57 100644
> > --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
> > +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
> > @@ -3445,6 +3445,7 @@ static inline void bnx2x_attn_int_deasserted3(struct bnx2x *bp, u32 attn)
> >                         int func = BP_FUNC(bp);
> >
> >                         REG_WR(bp, MISC_REG_AEU_GENERAL_ATTN_12 + func*4, 0);
> > +                       bnx2x_read_mf_cfg(bp);
> >                         bp->mf_config[BP_VN(bp)] = MF_CFG_RD(bp,
> >                                         func_mf_config[BP_ABS_FUNC(bp)].config);
> >                         val = SHMEM_RD(bp,
> > --
> > 1.7.1
> >
> >
> >
> >> JM
> >>
> 
> This patch does not work (no change at all).
> 

Since bnx2x.debug didn't work for you, Let's try to force some debug
messages from inside the driver:

---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index 3962d57..c6aeac0 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -10791,7 +10791,7 @@ static int __devinit bnx2x_init_one(struct pci_dev *pdev,
 			  tx_count, rx_count);
 
 	bp->igu_sb_cnt = max_non_def_sbs;
-	bp->msg_enable = debug;
+	bp->msg_enable = debug | BNX2X_MSG_MCP | NETIF_MSG_PROBE | NETIF_MSG_LINK;
 	pci_set_drvdata(pdev, dev);
 
 	rc = bnx2x_init_dev(pdev, dev, ent->driver_data);
-- 
1.7.1

Can you post outputs then?

Thanks

> Regards,
> JM
> 

  reply	other threads:[~2012-09-27 11:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-20 15:39 bnx2x: link detected up at startup even when it should be down Jean-Michel Hautbois
2012-09-20 20:08 ` Dmitry Kravkov
2012-09-21  6:03   ` Jean-Michel Hautbois
2012-09-21 19:23     ` Dmitry Kravkov
2012-09-25  7:40       ` Dmitry Kravkov
2012-09-25  8:11         ` Jean-Michel Hautbois
2012-09-25 10:42           ` Dmitry Kravkov
2012-09-25 12:22             ` Jean-Michel Hautbois
2012-09-25 12:54               ` Jean-Michel Hautbois
2012-09-25 13:11                 ` Dmitry Kravkov
2012-09-25 13:16                   ` Jean-Michel Hautbois
2012-09-25 14:00                     ` Jean-Michel Hautbois
2012-09-27  8:21                       ` Dmitry Kravkov
2012-09-27 10:07                         ` Jean-Michel Hautbois
2012-09-27 11:43                           ` Dmitry Kravkov [this message]
2012-09-27 12:51                             ` Jean-Michel Hautbois

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1348746197.7217.49.camel@lb-tlvb-dmitry \
    --to=dmitry@broadcom.com \
    --cc=barak@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=eilong@broadcom.com \
    --cc=jhautbois@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox