Subject: Re: patch cardbus pccbb.c
To: Garrett D'Amore <garrett_damore@tadpole.com>
From: Xning Lee <xning@soforge.com>
List: tech-kern
Date: 12/05/2005 12:19:25
"Garrett D'Amore" <garrett_damore@tadpole.com> writes:
> Just out of a desire for improved readability, is there a reason you are
> using a numeric 0x00004000, instead of a symbolic definition. (I don't
> have any experience/knowledge with these bridges, but the pccbb.c file
> seems to use mostly symbolic values, which I think is a very good
> thing.) I guess you need to add a define below CB_SOCKET_FORCE_BADVCC
> in pccbbreg.h.
>
> -- Garrett
>
Thanks, symbolic value is a good advice.
> Xning Lee wrote:
>
>>Problem: My usb 2.0 cardbus, if insert it before boot my laptop pc,
>> then get bad vcc error using NetBSD.
>> (if insert it after boot NetBSD, then everything is ok.)
>>
>>My patch:
>>=========
>>
>>--- sys/dev/pci/pccbb.c 14 Sep 2005 21:39:59 +0800 1.125
>>+++ sys/dev/pci/pccbb.c 05 Dec 2005 09:50:12 +0800
>>@@ -916,6 +916,10 @@
>> bus_space_write_1(bmt, bmh, 0x800 + PCIC_INTR,
>> bus_space_read_1(bmt, bmh, 0x800 + PCIC_INTR) & ~PCIC_INTR_RESET);
>>
>>+ /* Redo card voltage interrogation */
>>+ if (bus_space_read_4(bmt, bmh, CB_SOCKET_STAT) & CB_SOCKET_STAT_BADVCC)
>>+ bus_space_write_4(bmt, bmh, CB_SOCKET_FORCE, 0x00004000);
>>+
>> /* turn off power */
>> pccbb_power((cardbus_chipset_tag_t)sc, CARDBUS_VCC_0V | CARDBUS_VPP_0V);
>>
>>
>>
>
>
> --
> Garrett D'Amore http://www.tadpolecomputer.com/
> Sr. Staff Engineer Extending the Power of 64-bit UNIX Computing
> Tadpole Computer, Inc. Phone: (951) 325-2134
>