From nobody@FreeBSD.org  Mon Oct 13 03:10:44 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 355531065686
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 13 Oct 2008 03:10:39 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 1E5FB8FC13
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 13 Oct 2008 03:10:39 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id m9D3Acha039562
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 13 Oct 2008 03:10:38 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id m9D3AcDs039561;
	Mon, 13 Oct 2008 03:10:38 GMT
	(envelope-from nobody)
Message-Id: <200810130310.m9D3AcDs039561@www.freebsd.org>
Date: Mon, 13 Oct 2008 03:10:38 GMT
From: Arthur Hartwig <arthur.hartwig@nokia.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: System hangs when PCMCIA-CF adapter plugged into cardbus slot
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         128040
>Category:       kern
>Synopsis:       [pccbb] [patch] System hangs when PCMCIA-CF adapter plugged into cardbus slot
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 13 03:20:00 UTC 2008
>Closed-Date:    
>Last-Modified:  Mon Oct 13 04:33:34 UTC 2008
>Originator:     Arthur Hartwig
>Release:        6.3
>Organization:
Nokia
>Environment:
>Description:
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.
>How-To-Repeat:

>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);


>Release-Note:
>Audit-Trail:
>Unformatted:
