From owner-freebsd-net@FreeBSD.ORG Wed Jan 12 21:38:41 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABFCE1065679 for ; Wed, 12 Jan 2011 21:38:41 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-px0-f182.google.com (mail-px0-f182.google.com [209.85.212.182]) by mx1.freebsd.org (Postfix) with ESMTP id 797508FC27 for ; Wed, 12 Jan 2011 21:38:41 +0000 (UTC) Received: by pxi1 with SMTP id 1so163919pxi.13 for ; Wed, 12 Jan 2011 13:38:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:date:to:cc:subject:message-id:reply-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=GrsHOiqMjyYuKGS/lhCMgZjsPBN1tpUlYpGoSsRzA10=; b=SK8CSWR1YVG32xSwFv58ecasPkNgYy4plMz14BY+czQnY0+aVYA7Qf3cqYJFJRZKDK 7wv/pIq2HVjT6mY+ByQQhC+jP0KfOsS+D0igLFDqqsRhtyc3blt4CleWBR1BgOkvMdru oRPMYvzba0gyY5re8gkTYTuDQrHCSAccnT8+0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=rgnhub4sKeIz9B3YLbfIz4axv4dIzbJkLu0/0W+7nSYder2Z71JLFwebaMWPRHmTq0 IGIXi2X9VVZHczuILDKSWKDtHVWsP44cvVAH7k+dmF8sGOrG0muJfrgXfkfvg6BOTBll gDNFw3L67TzJEjT7NCceRcPIXpM9n97bSs2UY= Received: by 10.142.172.3 with SMTP id u3mr230369wfe.374.1294868320872; Wed, 12 Jan 2011 13:38:40 -0800 (PST) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id x18sm1354885wfa.23.2011.01.12.13.38.38 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 12 Jan 2011 13:38:39 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Wed, 12 Jan 2011 13:38:05 -0800 From: Pyun YongHyeon Date: Wed, 12 Jan 2011 13:38:05 -0800 To: Artem Belevich Message-ID: <20110112213805.GE12920@michelle.cdnetworks.com> References: <36074996.20110112192009@serebryakov.spb.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-net@freebsd.org, Lev Serebryakov Subject: Re: [patch] re(4) problems on networks with disabled autonegotiation "solver" (WAS: Juniper e3k with ports limitied to...) -- REQUEST FOR REVIEW X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jan 2011 21:38:41 -0000 On Wed, Jan 12, 2011 at 12:59:58PM -0800, Artem Belevich wrote: > 2011/1/12 Lev Serebryakov : > > Hello, Freebsd-net. > > > > ?Thanks to Pyun YongHyeon, who point me at fact, that rgephy(4) used > > with re(4) does autonegotiation always and all other, who helps me > > diagnose problem! > > > > ?I've prepared patch, which adds tunable/sysctl for rgephy(4) which > > allows not to sue autonegotiation by this PHY (at user responsibility, > > as here is PHYs which CAN NOT live without autonegotiation). It is OFF > > by default, and in such case behavior of driver IS NOT CHANGED. > > > > ?But if it is set ON (non-zero value) before "media / mediopt" > > changes via "ifconfig" autonegotiation IS NOT set with 10/100Mbit > > settings. > > > > ?I've documented this new tunable in re(4) manpage, as here is no > > rgephy(4) manpage. > > I wonder if we could make autonegotiation another media option. > This may solve the problem at hand in a more generic way. > > In case someone specifies speed/duplex settings but want > autonegotiation on, we can advertise only that particular speed/duplex > capability (as opposed to advertising everything we support). This > would force remote end to either establish the link with the > parameters we want or keep the link down which would be better than > keeping the link up with mismatched duplex settings. > Yeah, that would be good option. However, it's not trivial to implement these things on all PHY drivers. Some PHY hardwares do not have a capability which can tell it successfully resolved speed/duplex with manual media configuration.