NetBSD Problem Report #38380

From martin@duskware.de  Mon Apr  7 10:57:57 2008
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 5A08C63BA17
	for <gnats-bugs@gnats.netbsd.org>; Mon,  7 Apr 2008 10:57:57 +0000 (UTC)
Message-Id: <20080407105700.B624863BA17@narn.NetBSD.org>
Date: Mon,  7 Apr 2008 10:57:00 +0000 (UTC)
From: jym@ldh.org
Reply-To: jym@ldh.org
To: netbsd-bugs-owner@NetBSD.org
Subject: cbb disable (bad Vcc request)
X-Send-Pr-Version: www-1.0

>Number:         38380
>Category:       kern
>Synopsis:       cbb disable (bad Vcc request)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 07 11:00:00 +0000 2008
>Originator:     Jean-Yves Moulin
>Release:        NetBSD-current  4.99.58
>Organization:
>Environment:
NetBSD dodo.baaz.fr 4.99.58 NetBSD 4.99.58 (NIGLO) #25: Sat Mar  8 17:53:41 CET 2008  jym@dodo.baaz.fr:/usr/obj/sys/arch/i386/compile/DODO i386

>Description:
On my Toshiba Laptop (Libretto L5), cardbus socket is disable at boot (is in D3 power state). cbb(4) driver can't initialize correctly the socket:

cbb0 at pci0 dev 18 function 0: Toshiba ToPIC100 PCI-CardBus Bridge (rev. 0x33)
cbb0: bad Vcc request. sock_ctrl 0xffffff88, sock_status 0xffffffff
cbb0: disabling socket
new status 0xffffffff
cbb0: cacheline 0x0 lattimer 0x40
cbb0: bhlc 0x24000
cbb0: interrupting at irq 7
cardslot0 at cbb0 slot 0 flags 0

Socket is unusable (inserting a card does nothing).


>How-To-Repeat:
Boot a netbsd-current after merge of jmcneill-pm branch.
>Fix:
Changing power state before socket initialization:


--- pccbb.c	2008-04-07 12:55:45.000000000 +0200
+++ pccbb.c_1.167	2008-04-07 12:54:18.000000000 +0200
@@ -393,7 +393,6 @@
 	bus_addr_t sockbase;
 	char devinfo[256];
 	int flags;
-	int pwrmgt_offs;

 #ifdef __HAVE_PCCBB_ATTACH_HOOK
 	pccbb_attach_hook(parent, self, pa);
@@ -427,21 +426,6 @@

 	sc->sc_flags &= ~CBB_MEMHMAPPED;

-	/* power management: set D0 state */
-	if (pci_get_capability(pc, pa->pa_tag, PCI_CAP_PWRMGMT,
-	    &pwrmgt_offs, 0)) {
-		reg = pci_conf_read(pc, pa->pa_tag, pwrmgt_offs + PCI_PMCSR);
-		if ((reg & PCI_PMCSR_STATE_MASK) != PCI_PMCSR_STATE_D0 ||
-		    reg & 0x100 /* PCI_PMCSR_PME_EN */) {
-			reg &= ~PCI_PMCSR_STATE_MASK;
-			reg |= PCI_PMCSR_STATE_D0;
-			reg &= ~(0x100 /* PCI_PMCSR_PME_EN */);
-			pci_conf_write(pc, pa->pa_tag,
-			    pwrmgt_offs + PCI_PMCSR, reg);
-		}
-
-	}
-
 	/*
 	 * MAP socket registers and ExCA registers on memory-space
 	 * When no valid address is set on socket base registers (on pci

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.