Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Mar 2005 00:58:20 +0300 (MSK)
From:      Oleg Bulyzhin <oleg@rinet.ru>
To:        Dmitry Morozovsky <marck@rinet.ru>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: re driver trobles (RELENG_5)
Message-ID:  <20050323005024.U81544@lath.rinet.ru>
In-Reply-To: <20050311154312.O83809@lath.rinet.ru>
References:  <20050310164007.W94235@woozle.rinet.ru> <20050311154312.O83809@lath.rinet.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--0-952596846-1111528700=:81544
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

On Fri, 11 Mar 2005, Oleg Bulyzhin wrote:

> On Thu, 10 Mar 2005, Dmitry Morozovsky wrote:
>
>> Dear colleagues,
>> 
>> experimenting with new amd64-based router we found strange re(4) behaviour
>> when working in autoselect media mode:
>> 
>> whenever promisc mode turned on, renegotiating occurs, leading to 3 to 45
>> (depending on STP settings on the switch) network unavailability.
>> 
>> Moreover, some other re(4) setting changes seem to disturb link state
>> unneededly (such as ifconfig re0 -vlanhwtag)
>> 
>> The most annoying fact is that we non-autonegotiating mode with our re and
>> D-Link gigabit switches: fixing media at 1000BaseTX leads to link down
>> regardless of master/slave settings on both sides; on re side it is even
>> undocumented.
>> 
>> Any clues?
>> 
>> Thanks in advance.
>> 
>> Sincerely,
>> D.Marck                                     [DM5020, MCK-RIPE, DM3-RIPN]
>> ------------------------------------------------------------------------
>> *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru ***
>> ------------------------------------------------------------------------
>
> Further investigation revealed even more weirdness of re driver:
>
> If re card plugged into switch (tested with Catalyst 2948G) with fixed port
> speed/duplex (100/full) settings, and we trying to reboot - re driver fails 
> to
> attach:
>
> re0: <RealTek 8169S Single-chip Gigabit Ethernet> port 0xd000-0xd0ff mem 
> 0xcfffbf00-0xcfffbfff irq 16 at device 11.0 on pci0
> miibus0: <MII bus> on re0
> rgephy0: <RTL8169S/8110S media interface> on miibus0
> rgephy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX, 
> 1000baseTX-FDX, auto
> re0: bpf attached
> re0: Ethernet address: 00:11:09:cd:15:77
> re0: diagnostic failed, failed to receive packet in loopback mode
> re0: attach aborted due to hardware diag failure
> rgephy0: detached
> miibus0: detached
> device_attach: re0 attach returned 5
>
> If switch port configured for 'auto' mode we can reboot without problems.
>

JFYI: attached patch solved both issues.
(made using http://people.freebsd.org/~wpaul/re/)

-- 
Oleg.

================================================================
=== Oleg Bulyzhin -- OBUL-RIPN -- OBUL-RIPE -- oleg@rinet.ru ===
================================================================

--0-952596846-1111528700=:81544
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="if_re.patch"
Content-Transfer-Encoding: BASE64
Content-ID: <20050323005820.J81544@lath.rinet.ru>
Content-Description: 
Content-Disposition: attachment; filename="if_re.patch"

LS0tIHN5cy9kZXYvbWlpL3JnZXBoeS5jfglTdW4gSmFuIDMwIDAzOjU5OjU0
IDIwMDUNCisrKyBzeXMvZGV2L21paS9yZ2VwaHkuYwlUaHUgTWFyIDE3IDEw
OjQzOjU4IDIwMDUNCkBAIC0yMDAsMTcgKzIwMCwxMyBAQA0KIAkJaWYgKCht
aWktPm1paV9pZnAtPmlmX2ZsYWdzICYgSUZGX1VQKSA9PSAwKQ0KIAkJCWJy
ZWFrOw0KIA0KLQkJcmdlcGh5X3Jlc2V0KHNjKTsJLyogWFhYIGhhcmR3YXJl
IGJ1ZyB3b3JrLWFyb3VuZCAqLw0KLQ0KIAkJc3dpdGNoIChJRk1fU1VCVFlQ
RShpZmUtPmlmbV9tZWRpYSkpIHsNCiAJCWNhc2UgSUZNX0FVVE86DQotI2lm
ZGVmIGZvbw0KIAkJCS8qDQogCQkJICogSWYgd2UncmUgYWxyZWFkeSBpbiBh
dXRvIG1vZGUsIGp1c3QgcmV0dXJuLg0K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gLTEyMTIsNiArMTIxMiwyMiBAQA0KIAkgKiBDYWxsIE1JIGF0
dGFjaCByb3V0aW5lLg0KIAkgKi8NCiAJZXRoZXJfaWZhdHRhY2goaWZwLCBl
YWRkcik7DQorDQorCWZvciAocGh5ID0gMDsgcGh5IDwgMzI7IHBoeSsrKSB7
DQorCQlibXNyID0gcmVfbWlpYnVzX3JlYWRyZWcoZGV2LCBwaHksIE1JSV9C
TVNSKTsNCisJCWJtc3IgPSByZV9taWlidXNfcmVhZHJlZyhkZXYsIHBoeSwg
TUlJX0JNU1IpOw0KKwkJaWYgKCFibXNyKSBjb250aW51ZTsNCisNCisJCXJl
X21paWJ1c193cml0ZXJlZyhkZXYsIHBoeSwgTUlJX0JNQ1IsIEJNQ1JfUkVT
RVQpOw0KKwkJZm9yIChpID0gMDsgaSA8IFJMX1RJTUVPVVQ7IGkrKykgew0K
KwkJCWlmICghKHJlX21paWJ1c19yZWFkcmVnKGRldiwgcGh5LCBNSUlfQk1D
UikgJg0KKwkJCSAgICBCTUNSX1JFU0VUKSkgYnJlYWs7DQorCQkJREVMQVko
MTAwKTsNCisJCX0NCisJCXJlX21paWJ1c193cml0ZXJlZyhkZXYsIHBoeSwg
TUlJX0JNQ1IsIEJNQ1JfTE9PUCk7DQorDQorCQlicmVhazsNCisJfQ0KIA0K
IAkvKiBQZXJmb3JtIGhhcmR3YXJlIGRpYWdub3N0aWMuICovDQogCWVycm9y
ID0gcmVfZGlhZyhzYyk7DQo=

--0-952596846-1111528700=:81544--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050323005024.U81544>