From owner-freebsd-net@FreeBSD.ORG Wed Jan 12 21:28:20 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 4098D1065672 for ; Wed, 12 Jan 2011 21:28:20 +0000 (UTC) (envelope-from artemb@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id C0A298FC22 for ; Wed, 12 Jan 2011 21:28:19 +0000 (UTC) Received: by bwz12 with SMTP id 12so891675bwz.13 for ; Wed, 12 Jan 2011 13:28:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Pvog0ARtSInK7tQpn23oBdpalUSyblNyacQToKU4YO0=; b=NyfLICHIGoOdJC4KReLlaSoxp/04xkERAM+NRGDp7pH3s/ZrC7Tq7SxFpEbRUQIY8v 8UuaAoWSKQCvYt228vNk+mpHzFErBHdSIwm6bmf9vFIYiGCzZK3r5zFLfDXVO6lfDI/9 EhWwhYbyT0iQZnS7e99fTpQopQdTHcyQIjdA4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=fhDly7szMZgTc16W+l7B2AKkRzt6hugtHoJ6Hi5F850uSHWh6pn5F+RFTHOo2VMbhp YlphK64cKI9EzFs04ruVjNAkrE5sfSYErpTI5zF3CHiPd5cYn434v5dF0C9zKANa3w84 n5CBtykhSP6D+DIaZwg4/hYWOs8vQrZDrElBE= MIME-Version: 1.0 Received: by 10.204.122.65 with SMTP id k1mr1108891bkr.80.1294865998558; Wed, 12 Jan 2011 12:59:58 -0800 (PST) Received: by 10.204.22.18 with HTTP; Wed, 12 Jan 2011 12:59:58 -0800 (PST) In-Reply-To: <36074996.20110112192009@serebryakov.spb.ru> References: <36074996.20110112192009@serebryakov.spb.ru> Date: Wed, 12 Jan 2011 12:59:58 -0800 Message-ID: From: Artem Belevich To: Lev Serebryakov Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-net@freebsd.org 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 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:28:20 -0000 2011/1/12 Lev Serebryakov : > Hello, Freebsd-net. > > =A0Thanks 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! > > =A0I'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. > > =A0But if it is set ON (non-zero value) before "media / mediopt" > changes via "ifconfig" autonegotiation IS NOT set with 10/100Mbit > settings. > > =A0I'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. --Artem