From owner-svn-src-stable@FreeBSD.ORG Tue Dec 7 19:15:34 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D79A106566C; Tue, 7 Dec 2010 19:15:34 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 41C1C8FC13; Tue, 7 Dec 2010 19:15:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oB7JFYTD077595; Tue, 7 Dec 2010 19:15:34 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oB7JFYL5077593; Tue, 7 Dec 2010 19:15:34 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201012071915.oB7JFYL5077593@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 7 Dec 2010 19:15:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216265 - stable/7/sys/dev/fxp X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Dec 2010 19:15:34 -0000 Author: yongari Date: Tue Dec 7 19:15:33 2010 New Revision: 216265 URL: http://svn.freebsd.org/changeset/base/216265 Log: MFC r216111: If RX lockup workaround is enabled, fxp(4) will periodically reset the controller to workaround silicon bug of i82557. Each reset will re-establish link which in turn triggers MII status change callback. The callback will try to reconfigure controller if the controller is not i82557 to enable flow-control. This caused endless link UP/DOWN when the workaround was enabled on non-i82557 controller. To fix the issue, apply RX lockup workaround only for i82557. Previously it blindly checked undocumented EEPROM location such that it sometimes enabled the workaround for other controllers. At this time, only i82557 is known to have the silicon bug. This fixes a regression introduced in r215906 which enabled flow control support for all controllers except i82557. Reported by: Karl Denninger (karl <> denninger dot net) Tested by: Karl Denninger (karl <> denninger dot net) Approved by: re (kensmith) Modified: stable/7/sys/dev/fxp/if_fxp.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/fxp/if_fxp.c ============================================================================== --- stable/7/sys/dev/fxp/if_fxp.c Tue Dec 7 19:14:18 2010 (r216264) +++ stable/7/sys/dev/fxp/if_fxp.c Tue Dec 7 19:15:33 2010 (r216265) @@ -527,10 +527,12 @@ fxp_attach(device_t dev) } /* Receiver lock-up workaround detection. */ - fxp_read_eeprom(sc, &data, 3, 1); - if ((data & 0x03) != 0x03) { - sc->flags |= FXP_FLAG_RXBUG; - device_printf(dev, "Enabling Rx lock-up workaround\n"); + if (sc->revision < FXP_REV_82558_A4) { + fxp_read_eeprom(sc, &data, 3, 1); + if ((data & 0x03) != 0x03) { + sc->flags |= FXP_FLAG_RXBUG; + device_printf(dev, "Enabling Rx lock-up workaround\n"); + } } /*