From owner-svn-src-stable-7@FreeBSD.ORG Wed Nov 4 18:08:54 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1845C106568D; Wed, 4 Nov 2009 18:08:54 +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 06B008FC08; Wed, 4 Nov 2009 18:08:54 +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 nA4I8reu041267; Wed, 4 Nov 2009 18:08:53 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4I8raU041265; Wed, 4 Nov 2009 18:08:53 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911041808.nA4I8raU041265@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 4 Nov 2009 18:08:53 +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: r198914 - stable/7/sys/dev/fxp X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2009 18:08:54 -0000 Author: yongari Date: Wed Nov 4 18:08:53 2009 New Revision: 198914 URL: http://svn.freebsd.org/changeset/base/198914 Log: MFC r194570: Due to possible PCI bus lock-up issues fxp(4) didn't perform full hardware reset in attach phase. Selective reset does not clear configured parameters so I think full hardware reset is required. To prevent PCI bus lock-up, do selective reset first which will get off the controller from PCI bus and request software reset after selective reset. Software reset will unmask interrupts so disable it after the reset. Modified: stable/7/sys/dev/fxp/if_fxp.c Directory Properties: stable/7/sys/ (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 Wed Nov 4 18:07:09 2009 (r198913) +++ stable/7/sys/dev/fxp/if_fxp.c Wed Nov 4 18:08:53 2009 (r198914) @@ -467,10 +467,14 @@ fxp_attach(device_t dev) } /* - * Reset to a stable state. + * Put CU/RU idle state and prepare full reset. */ CSR_WRITE_4(sc, FXP_CSR_PORT, FXP_PORT_SELECTIVE_RESET); DELAY(10); + /* Full reset and disable interrupts. */ + CSR_WRITE_4(sc, FXP_CSR_PORT, FXP_PORT_SOFTWARE_RESET); + DELAY(10); + CSR_WRITE_1(sc, FXP_CSR_SCB_INTRCNTL, FXP_SCB_INTR_DISABLE); /* * Find out how large of an SEEPROM we have.