LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [drivers/net/bnx2.c] ADVERTISE_1000XPSE_ASYM
@ 2008-01-30 14:07 Roel Kluin
  2008-01-30 18:51 ` Michael Chan
  0 siblings, 1 reply; 3+ messages in thread
From: Roel Kluin @ 2008-01-30 14:07 UTC (permalink / raw)
  To: mchan, lkml; +Cc: netdev

In drivers/net/bnx2.c:1285: it reads in function bnx2_setup_remote_phy():

if (pause_adv & (ADVERTISE_1000XPSE_ASYM | ADVERTISE_1000XPSE_ASYM))

Note that the two are the same and this is therefore equivalent to

if (pause_adv & ADVERTISE_1000XPSE_ASYM)

This appears to be incorrect, was maybe '| ADVERTISE_1000XPAUSE' intended?

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

* Re: [drivers/net/bnx2.c] ADVERTISE_1000XPSE_ASYM
  2008-01-30 14:07 [drivers/net/bnx2.c] ADVERTISE_1000XPSE_ASYM Roel Kluin
@ 2008-01-30 18:51 ` Michael Chan
  2008-02-01  1:07   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Chan @ 2008-01-30 18:51 UTC (permalink / raw)
  To: Roel Kluin, davem; +Cc: lkml, netdev

On Wed, 2008-01-30 at 15:07 +0100, Roel Kluin wrote:
> In drivers/net/bnx2.c:1285: it reads in function bnx2_setup_remote_phy():
> 
> if (pause_adv & (ADVERTISE_1000XPSE_ASYM | ADVERTISE_1000XPSE_ASYM))
> 
> Note that the two are the same and this is therefore equivalent to
> 
> if (pause_adv & ADVERTISE_1000XPSE_ASYM)
> 
> This appears to be incorrect, was maybe '| ADVERTISE_1000XPAUSE' intended?
> 

Thanks for catching this.  The patch below will fix it.

[BNX2]: Fix ASYM PAUSE advertisement for remote PHY.

We were checking for the ASYM_PAUSE bit for 1000Base-X twice instead
checking for both the 1000Base-X bit and the 10/100/1000Base-T bit.
The purpose of the logic is to tell the firmware that ASYM_PAUSE is
set on either the Serdes or Copper interface.

Problem was discovered by Roel Kluin <12o3l@tiscali.nl>

Signed-off-by: Michael Chan <mchan@broadcom.com>

diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index be7e8f8..77400ad 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -1429,7 +1429,7 @@ bnx2_setup_remote_phy(struct bnx2 *bp, u8 port)
 
 	if (pause_adv & (ADVERTISE_1000XPAUSE | ADVERTISE_PAUSE_CAP))
 		speed_arg |= BNX2_NETLINK_SET_LINK_FC_SYM_PAUSE;
-	if (pause_adv & (ADVERTISE_1000XPSE_ASYM | ADVERTISE_1000XPSE_ASYM))
+	if (pause_adv & (ADVERTISE_1000XPSE_ASYM | ADVERTISE_PAUSE_ASYM))
 		speed_arg |= BNX2_NETLINK_SET_LINK_FC_ASYM_PAUSE;
 
 	if (port == PORT_TP)



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

* Re: [drivers/net/bnx2.c] ADVERTISE_1000XPSE_ASYM
  2008-01-30 18:51 ` Michael Chan
@ 2008-02-01  1:07   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2008-02-01  1:07 UTC (permalink / raw)
  To: mchan; +Cc: 12o3l, linux-kernel, netdev

From: "Michael Chan" <mchan@broadcom.com>
Date: Wed, 30 Jan 2008 10:51:10 -0800

> [BNX2]: Fix ASYM PAUSE advertisement for remote PHY.
> 
> We were checking for the ASYM_PAUSE bit for 1000Base-X twice instead
> checking for both the 1000Base-X bit and the 10/100/1000Base-T bit.
> The purpose of the logic is to tell the firmware that ASYM_PAUSE is
> set on either the Serdes or Copper interface.
> 
> Problem was discovered by Roel Kluin <12o3l@tiscali.nl>
> 
> Signed-off-by: Michael Chan <mchan@broadcom.com>

Applied, thanks Michael.

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

end of thread, other threads:[~2008-02-01  1:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-30 14:07 [drivers/net/bnx2.c] ADVERTISE_1000XPSE_ASYM Roel Kluin
2008-01-30 18:51 ` Michael Chan
2008-02-01  1:07   ` 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).