Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Jun 2009 06:18:19 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r194570 - head/sys/dev/fxp
Message-ID:  <200906210618.n5L6IJHM097626@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yongari
Date: Sun Jun 21 06:18:19 2009
New Revision: 194570
URL: http://svn.freebsd.org/changeset/base/194570

Log:
  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:
  head/sys/dev/fxp/if_fxp.c

Modified: head/sys/dev/fxp/if_fxp.c
==============================================================================
--- head/sys/dev/fxp/if_fxp.c	Sun Jun 21 06:06:43 2009	(r194569)
+++ head/sys/dev/fxp/if_fxp.c	Sun Jun 21 06:18:19 2009	(r194570)
@@ -466,10 +466,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.



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