Re: Powering down 16-bit wi(4) PC Card is broken for me

From: M. Warner Losh <imp_at_bsdimp.com>
Date: Tue, 27 Sep 2005 21:46:08 -0600 (MDT)
In message: <20050923085358.GA58772_at_ip.net.ua>
            Ruslan Ermilov <ru_at_FreeBSD.org> 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) ====

_at__at_ -1269,12 +1269,12 _at__at_
 
 	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). */
Received on Wed Sep 28 2005 - 01:47:51 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:44 UTC