From owner-freebsd-current@FreeBSD.ORG Wed Sep 28 03:47:51 2005 Return-Path: X-Original-To: current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0941416A41F; Wed, 28 Sep 2005 03:47:51 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9FFA343D53; Wed, 28 Sep 2005 03:47:50 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id j8S3jVQT003533; Tue, 27 Sep 2005 21:45:31 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 27 Sep 2005 21:46:08 -0600 (MDT) Message-Id: <20050927.214608.119243251.imp@bsdimp.com> To: ru@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <20050923085358.GA58772@ip.net.ua> References: <20050923085358.GA58772@ip.net.ua> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Tue, 27 Sep 2005 21:45:31 -0600 (MDT) Cc: current@FreeBSD.org Subject: Re: Powering down 16-bit wi(4) PC Card is broken for me X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2005 03:47:51 -0000 In message: <20050923085358.GA58772@ip.net.ua> Ruslan Ermilov writes: : This is with today's -CURRENT, but it's been happening for some time : now I guess. : : I have two PC Cards, one 32-bit 3.3V rl(4), and one 16-bit 5V wi(4). : And it looks there's a problem with powering down the wi(4) card. : : Ejecting/injecting rl(4) works as expected. But first time I eject : wi(4), it fails (Bad Vcc requested). After this happens, I can no : longer use this slot -- "Bad Vcc requested" is printed during each : ejection/injection, and I get "watchdog timeout" with rl(4). Ruslan, Thanks for working with me offline. I believe that the following should fix things up for you. Can you try the following patch? Warner ==== //depot/user/imp/newcard/dev/pccbb/pccbb.c#125 (text+ko) ==== @@ -1269,12 +1269,12 @@ DPRINTF(("cbb_pcic_socket_disable\n")); - /* reset signal asserting... */ - exca_clrb(&sc->exca[0], EXCA_INTR, EXCA_INTR_RESET); + /* Turn off the card's interrupt and leave it in reset */ + exca_putb(&sc->exca[0], EXCA_INTR, 0); tsleep(sc, PZERO, "cbbP1", hz / 100); /* power down the socket */ - exca_clrb(&sc->exca[0], EXCA_PWRCTL, EXCA_PWRCTL_OE); + exca_putb(&sc->exca[0], EXCA_PWRCTL, 0); cbb_power(brdev, CARD_OFF); /* wait 300ms until power fails (Tpf). */