* Re: [Bridge] Bridge not functional after disconnect / connect
@ 2008-01-31 8:44 Alex Shnitman
2008-01-31 9:59 ` Malcolm Scott
2008-01-31 16:50 ` Stephen Hemminger
0 siblings, 2 replies; 6+ messages in thread
From: Alex Shnitman @ 2008-01-31 8:44 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: bridge
Hi,
lspci gives this:
02:05.0 Ethernet controller: Marvell Technology Group Ltd. 88E8001 Gigabit Ethernet Controller (rev 13)
02:09.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
The first one is the one having the trouble. Is this hardware known to be problematic?
Thanks,
--Alex
----- Original Message ----
From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Alex Shnitman <alexta69@yahoo.com>
Cc: bridge@lists.linux-foundation.org
Sent: Thursday, January 31, 2008 12:22:22 AM
Subject: Re: [Bridge] Bridge not functional after disconnect / connect
On
Wed,
30
Jan
2008
14:15:11
-0800
(PST)
Alex
Shnitman
<alexta69@yahoo.com>
wrote:
>
Hi,
>
>
I
have
two
NICs
on
my
machine,
one
connected
to
a
router
and
is
always
up,
and
the
other
connected
back-to-back
to
a
laptop,
and
this
one
I
disconnect
and
connect
all
the
time.
I
created
a
bridge
on
top
of
these
two
interfaces,
and
it
functions
fine,
except
when
I
disconnect
and
connect
the
laptop,
I
have
to
remove
it
from
the
bridge
and
add
it
back
before
it
starts
bridging!
In
other
words,
I
need
to
do
"brctl
delif
br0
eth0;
brctl
addif
br0
eth0".
>
>
The
output
of
"brctl
showmacs
br0"
and
"brctl
showstp
br0"
looks
the
same
and
perfectly
correct
before
the
removal/adding
and
after
it.
From
playing
around
with
Wireshark
it
seems
to
me
that
before
delif/addif
only
broadcasts
are
received
from
the
laptop;
unicast
packets
do
not
appear
there.
I
got
all
zeros
in
/proc/sys/net/bridge/*.
It
looks
like
everything
is
configured
correctly.
>
>
Any
idea
at
all
why
I
see
this
behavior?
Any
tips
as
to
how
I
might
debug
it?
>
>
The
kernel
I'm
running
is
2.6.18
from
Debian
Etch.
What
hardware?
There
were
many
fixes
since
that
old
kernel.
--
Stephen
Hemminger
<stephen.hemminger@vyatta.com>
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [Bridge] Bridge not functional after disconnect / connect
2008-01-31 8:44 [Bridge] Bridge not functional after disconnect / connect Alex Shnitman
@ 2008-01-31 9:59 ` Malcolm Scott
2008-01-31 16:50 ` Stephen Hemminger
1 sibling, 0 replies; 6+ messages in thread
From: Malcolm Scott @ 2008-01-31 9:59 UTC (permalink / raw)
To: Alex Shnitman; +Cc: bridge
At 00:44 today, Alex Shnitman wrote:
> 02:05.0 Ethernet controller: Marvell Technology Group Ltd. 88E8001 Gigabit Ethernet Controller (rev 13)
Is that the sky2 driver? That is in my experience pretty buggy until about
2.6.22.
--
Malcolm Scott
Research Assistant
University of Cambridge Computer Laboratory
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Bridge] Bridge not functional after disconnect / connect
2008-01-31 8:44 [Bridge] Bridge not functional after disconnect / connect Alex Shnitman
2008-01-31 9:59 ` Malcolm Scott
@ 2008-01-31 16:50 ` Stephen Hemminger
1 sibling, 0 replies; 6+ messages in thread
From: Stephen Hemminger @ 2008-01-31 16:50 UTC (permalink / raw)
To: Alex Shnitman; +Cc: bridge
There were some fixes to carrier handling that went into 2.6.24.
commit 21d7f67700ad7a4523d35d43ce95755e40eae5b7
Author: Stephen Hemminger <shemminger@linux-foundation.org>
Date: Mon Nov 26 11:54:51 2007 -0800
skge: fiber link up/down fix
The driver would not work over fibre if other end when down then
came back up (would require reloading driver). The correct way
to manage the link the same way for both TP and fibre.
Resloves problem described in: http://lkml.org/lkml/2007/11/6/395
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index b680cb0..73a4246 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -1095,16 +1095,9 @@ static void xm_link_down(struct skge_hw *hw, int port)
{
struct net_device *dev = hw->dev[port];
struct skge_port *skge = netdev_priv(dev);
- u16 cmd = xm_read16(hw, port, XM_MMU_CMD);
xm_write16(hw, port, XM_IMSK, XM_IMSK_DISABLE);
- cmd &= ~(XM_MMU_ENA_RX | XM_MMU_ENA_TX);
- xm_write16(hw, port, XM_MMU_CMD, cmd);
-
- /* dummy read to ensure writing */
- xm_read16(hw, port, XM_MMU_CMD);
-
if (netif_carrier_ok(dev))
skge_link_down(skge);
}
@@ -1194,6 +1187,7 @@ static void genesis_init(struct skge_hw *hw)
static void genesis_reset(struct skge_hw *hw, int port)
{
const u8 zero[8] = { 0 };
+ u32 reg;
skge_write8(hw, SK_REG(port, GMAC_IRQ_MSK), 0);
@@ -1209,6 +1203,11 @@ static void genesis_reset(struct skge_hw *hw, int port)
xm_write16(hw, port, PHY_BCOM_INT_MASK, 0xffff);
xm_outhash(hw, port, XM_HSM, zero);
+
+ /* Flush TX and RX fifo */
+ reg = xm_read32(hw, port, XM_MODE);
+ xm_write32(hw, port, XM_MODE, reg | XM_MD_FTF);
+ xm_write32(hw, port, XM_MODE, reg | XM_MD_FRF);
}
@@ -1714,6 +1713,12 @@ static void genesis_stop(struct skge_port *skge)
struct skge_hw *hw = skge->hw;
int port = skge->port;
unsigned retries = 1000;
+ u16 cmd;
+
+ /* Disable Tx and Rx */
+ cmd = xm_read16(hw, port, XM_MMU_CMD);
+ cmd &= ~(XM_MMU_ENA_RX | XM_MMU_ENA_TX);
+ xm_write16(hw, port, XM_MMU_CMD, cmd);
genesis_reset(hw, port);
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Bridge] Bridge not functional after disconnect / connect
@ 2008-01-31 11:31 Alex Shnitman
0 siblings, 0 replies; 6+ messages in thread
From: Alex Shnitman @ 2008-01-31 11:31 UTC (permalink / raw)
To: Malcolm Scott; +Cc: bridge
In fact, it's the skge driver. I'll try to upgrade the kernel to 2.6.22 (the latest one available in etch backports) and report the results.
Thanks,
--Alex
----- Original Message ----
From: Malcolm Scott <Malcolm.Scott@cl.cam.ac.uk>
To: Alex Shnitman <alexta69@yahoo.com>
Cc: Stephen Hemminger <shemminger@linux-foundation.org>; bridge@lists.linux-foundation.org
Sent: Thursday, January 31, 2008 11:59:34 AM
Subject: Re: [Bridge] Bridge not functional after disconnect / connect
At
00:44
today,
Alex
Shnitman
wrote:
>
02:05.0
Ethernet
controller:
Marvell
Technology
Group
Ltd.
88E8001
Gigabit
Ethernet
Controller
(rev
13)
Is
that
the
sky2
driver?
That
is
in
my
experience
pretty
buggy
until
about
2.6.22.
--
Malcolm
Scott
Research
Assistant
University
of
Cambridge
Computer
Laboratory
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
^ permalink raw reply [flat|nested] 6+ messages in thread* [Bridge] Bridge not functional after disconnect / connect
@ 2008-01-30 22:15 Alex Shnitman
2008-01-30 22:22 ` Stephen Hemminger
0 siblings, 1 reply; 6+ messages in thread
From: Alex Shnitman @ 2008-01-30 22:15 UTC (permalink / raw)
To: bridge
Hi,
I have two NICs on my machine, one connected to a router and is always up, and the other connected back-to-back to a laptop, and this one I disconnect and connect all the time. I created a bridge on top of these two interfaces, and it functions fine, except when I disconnect and connect the laptop, I have to remove it from the bridge and add it back before it starts bridging! In other words, I need to do "brctl delif br0 eth0; brctl addif br0 eth0".
The output of "brctl showmacs br0" and "brctl showstp br0" looks the same and perfectly correct before the removal/adding and after it. From playing around with Wireshark it seems to me that before delif/addif only broadcasts are received from the laptop; unicast packets do not appear there. I got all zeros in /proc/sys/net/bridge/*. It looks like everything is configured correctly.
Any idea at all why I see this behavior? Any tips as to how I might debug it?
The kernel I'm running is 2.6.18 from Debian Etch.
Please, if any more information is required, let me know. I don't want to spam the list with long dumps of everything if it's not needed.
Thanks in advance,
--Alex
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [Bridge] Bridge not functional after disconnect / connect
2008-01-30 22:15 Alex Shnitman
@ 2008-01-30 22:22 ` Stephen Hemminger
0 siblings, 0 replies; 6+ messages in thread
From: Stephen Hemminger @ 2008-01-30 22:22 UTC (permalink / raw)
To: Alex Shnitman; +Cc: bridge
On Wed, 30 Jan 2008 14:15:11 -0800 (PST)
Alex Shnitman <alexta69@yahoo.com> wrote:
> Hi,
>
> I have two NICs on my machine, one connected to a router and is always up, and the other connected back-to-back to a laptop, and this one I disconnect and connect all the time. I created a bridge on top of these two interfaces, and it functions fine, except when I disconnect and connect the laptop, I have to remove it from the bridge and add it back before it starts bridging! In other words, I need to do "brctl delif br0 eth0; brctl addif br0 eth0".
>
> The output of "brctl showmacs br0" and "brctl showstp br0" looks the same and perfectly correct before the removal/adding and after it. From playing around with Wireshark it seems to me that before delif/addif only broadcasts are received from the laptop; unicast packets do not appear there. I got all zeros in /proc/sys/net/bridge/*. It looks like everything is configured correctly.
>
> Any idea at all why I see this behavior? Any tips as to how I might debug it?
>
> The kernel I'm running is 2.6.18 from Debian Etch.
What hardware? There were many fixes since that old kernel.
--
Stephen Hemminger <stephen.hemminger@vyatta.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-01-31 16:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-31 8:44 [Bridge] Bridge not functional after disconnect / connect Alex Shnitman
2008-01-31 9:59 ` Malcolm Scott
2008-01-31 16:50 ` Stephen Hemminger
-- strict thread matches above, loose matches on Subject: below --
2008-01-31 11:31 Alex Shnitman
2008-01-30 22:15 Alex Shnitman
2008-01-30 22:22 ` Stephen Hemminger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.