Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Oct 2011 03:24:17 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r226490 - head/sys/dev/ath
Message-ID:  <201110180324.p9I3OHAY054041@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Tue Oct 18 03:24:17 2011
New Revision: 226490
URL: http://svn.freebsd.org/changeset/base/226490

Log:
  Add a WAR from the reference code - clear the PCI error status
  upon detach.
  
  Obtained from:	Atheros

Modified:
  head/sys/dev/ath/if_ath_pci.c

Modified: head/sys/dev/ath/if_ath_pci.c
==============================================================================
--- head/sys/dev/ath/if_ath_pci.c	Tue Oct 18 03:17:06 2011	(r226489)
+++ head/sys/dev/ath/if_ath_pci.c	Tue Oct 18 03:24:17 2011	(r226490)
@@ -199,6 +199,11 @@ ath_pci_detach(device_t dev)
 	/* check if device was removed */
 	sc->sc_invalid = !bus_child_present(dev);
 
+	/*
+	 * Do a config read to clear pre-existing pci error status.
+	 */
+	(void) pci_read_config(dev, PCIR_COMMAND, 4);
+
 	ath_detach(sc);
 
 	bus_generic_detach(dev);



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