Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Jan 2019 05:59:58 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r342842 - head/sys/dev/pccbb
Message-ID:  <201901070559.x075xwpA085200@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Mon Jan  7 05:59:58 2019
New Revision: 342842
URL: https://svnweb.freebsd.org/changeset/base/342842

Log:
  Fix TI PCI1520 PCI Cardbus bridge, but others affected.
  
  On system with Celeron 1.5GHz CPU, sometimes when a PCMCIA to Compact Flash
  adapter containing a Compact Flash card is inserted in the cardbus slot the
  system hangs. This problem has not been observed in systems with a 2.8GHz
  XEON CPU or faster.
  
  Analysis of the cbb driver shows functional interrupts are routed to PCI
  BEFORE the interrupt handler for functional interrupts has been registered.
  
  Fix applied as described in the bug.
  
  PR: 128040
  Submitted by: Arthur Hartwig

Modified:
  head/sys/dev/pccbb/pccbb.c

Modified: head/sys/dev/pccbb/pccbb.c
==============================================================================
--- head/sys/dev/pccbb/pccbb.c	Mon Jan  7 05:58:55 2019	(r342841)
+++ head/sys/dev/pccbb/pccbb.c	Mon Jan  7 05:59:58 2019	(r342842)
@@ -275,6 +275,8 @@ cbb_enable_func_intr(struct cbb_softc *sc)
 	reg = (exca_getb(&sc->exca[0], EXCA_INTR) & ~EXCA_INTR_IRQ_MASK) | 
 	    EXCA_INTR_IRQ_NONE;
 	exca_putb(&sc->exca[0], EXCA_INTR, reg);
+	PCI_MASK_CONFIG(sc->dev, CBBR_BRIDGECTRL,
+	    & ~CBBM_BRIDGECTRL_INTR_IREQ_ISA_EN, 2);
 }
 
 int
@@ -873,8 +875,6 @@ cbb_power(device_t brdev, int volts)
 			reg_ctrl &= ~TOPIC97_REG_CTRL_CLKRUN_ENA;
 		pci_write_config(sc->dev, TOPIC_REG_CTRL, reg_ctrl, 4);
 	}
-	PCI_MASK_CONFIG(brdev, CBBR_BRIDGECTRL,
-	    & ~CBBM_BRIDGECTRL_INTR_IREQ_ISA_EN, 2);
 	retval = 1;
 done:;
 	if (volts != 0 && sc->chipset == CB_O2MICRO)



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