From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Yuval Mintz <Yuval.Mintz@qlogic.com>,
davem@davemloft.net, netdev@vger.kernel.org
Cc: Ariel.Elior@qlogic.com
Subject: Re: [PATCH net 6/9] bnx2x: Fix self-test for 20g devices
Date: Thu, 25 Jun 2015 16:46:41 +0300 [thread overview]
Message-ID: <558C0641.4000904@cogentembedded.com> (raw)
In-Reply-To: <1435234769-5625-7-git-send-email-Yuval.Mintz@qlogic.com>
Hello.
On 06/25/2015 03:19 PM, Yuval Mintz wrote:
> 20g-capable devices are not configured properly for self-test, using
> 10g as their speed which cause the link indication to remain down and
> fail the internal loopback test.
> Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
> Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
> ---
> drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
> diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
> index c1033a5..3df03bb 100644
> --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
> +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
> @@ -2347,12 +2347,16 @@ int bnx2x_initial_phy_init(struct bnx2x *bp, int load_mode)
> if (load_mode == LOAD_DIAG) {
> struct link_params *lp = &bp->link_params;
> lp->loopback_mode = LOOPBACK_XGXS;
> - /* do PHY loopback at 10G speed, if possible */
> - if (lp->req_line_speed[cfx_idx] < SPEED_10000) {
> + /* Prefer doing PHY loopback at highest speed */
> + if (lp->req_line_speed[cfx_idx] < SPEED_20000) {
> if (lp->speed_cap_mask[cfx_idx] &
> - PORT_HW_CFG_SPEED_CAPABILITY_D0_10G)
> + PORT_HW_CFG_SPEED_CAPABILITY_D0_20G)
> lp->req_line_speed[cfx_idx] =
> - SPEED_10000;
> + SPEED_20000;
I would have added one more tab here.
> + else if (lp->speed_cap_mask[cfx_idx] &
> + PORT_HW_CFG_SPEED_CAPABILITY_D0_10G)
This line should have been started right under 'lp'.
> + lp->req_line_speed[cfx_idx] =
This line is indented too much.
> + SPEED_10000;
This line seems alright.
WBR, Sergei
next prev parent reply other threads:[~2015-06-25 13:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-25 12:19 [PATCH net 0/9] bnx2x: various fixes Yuval Mintz
2015-06-25 12:19 ` [PATCH net 1/9] bnx2x: Correct asymmetric flow-control Yuval Mintz
2015-06-25 12:19 ` [PATCH net 2/9] bnx2x: Correct speed from baseT into KR Yuval Mintz
2015-06-25 12:19 ` [PATCH net 3/9] bnx2x: Prevent false warning when accessing MACs Yuval Mintz
2015-06-25 12:19 ` [PATCH net 4/9] bnx2x: Don't notify about scratchpad parities Yuval Mintz
2015-06-25 12:19 ` [PATCH net 5/9] bnx2x: Fix VF MAC removal Yuval Mintz
2015-06-25 12:19 ` [PATCH net 6/9] bnx2x: Fix self-test for 20g devices Yuval Mintz
2015-06-25 13:46 ` Sergei Shtylyov [this message]
2015-06-25 12:19 ` [PATCH net 7/9] bnx2x: Fix statistics gathering on link change Yuval Mintz
2015-06-25 12:19 ` [PATCH net 8/9] bnx2x: Release nvram lock on error flow Yuval Mintz
2015-06-25 12:19 ` [PATCH net 9/9] bnx2x: Fix linearization for encapsulated packets Yuval Mintz
2015-06-25 13:31 ` [PATCH net 0/9] bnx2x: various fixes David Miller
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=558C0641.4000904@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=Ariel.Elior@qlogic.com \
--cc=Yuval.Mintz@qlogic.com \
--cc=davem@davemloft.net \
--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;
as well as URLs for NNTP newsgroup(s).