Bug 128040 - [pccbb] [patch] System hangs when PCMCIA-CF adapter plugged into cardbus slot
Summary: [pccbb] [patch] System hangs when PCMCIA-CF adapter plugged into cardbus slot
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: Warner Losh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-13 04:20 UTC by Arthur Hartwig
Modified: 2021-07-04 01:53 UTC (History)
1 user (show)

See Also:
imp: mfc-stable12+
imp: mfc-stable11+
imp: mfc-stable10+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arthur Hartwig 2008-10-13 04:20:00 UTC
All systems discussed have a TI PCI1520 PCI Cardbus bridge.

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: 

Route the functional interrupts to PCI AFTER the functional interrupt handler has been registered.

In cbb_power() in sys/dev/pccbb/pccbb.c remove the 
	PCI_MASK_CONFIG(brdev, CBBR_BRIDGECTRL,
	    & ~CBBM_BRIDGECTRL_INTR_IREQ_ISA_EN, 2);

and add it to cbb_enable_func_intr() after the 
        exca_putb(&sc->exca[0], EXCA_INTR, reg);
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:54 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 2 commit-hook freebsd_committer freebsd_triage 2019-01-07 06:00:43 UTC
A commit references this bug:

Author: imp
Date: Mon Jan  7 05:59:58 UTC 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

Changes:
  head/sys/dev/pccbb/pccbb.c
Comment 3 Warner Losh freebsd_committer freebsd_triage 2019-01-07 06:03:00 UTC
Fixed. Will MFC soonish and try the MFC status flags to see if they can help me manage this.
Comment 4 Warner Losh freebsd_committer freebsd_triage 2021-07-04 01:53:02 UTC
pc card has been removed from system.