Cardbus not detected on Sony VAIO FX-990
I'm currently using OpenBSD 4.1 -stable. The cardbus is Ricoh 5C476. I've had this problem on OpenBSD 3.9 before but managed to solve it using the guide here and patching it manually. The link is as below: http://www.gratisoft.us/ftp/pub/todd/OpenBSD/srx77/cardbus.diff The thing is only one of the card would work at a time because on that guide, one of it is a built-in wireless card. The patch file = This allows cardbus (and thus the builtin wireless) to work on the Sony VAIO SRX77. The BIOS does not include the cardbus controllers in the PCI IRQ routing table so this hack just slaps in the correct values. Yes, this is a horrible hack. Use option SRX77_HACK to enable Index: sys/arch/i386/pci/pcibios.c === RCS file: /cvs/src/sys/arch/i386/pci/pcibios.c,v retrieving revision 1.29 diff -u -r1.29 pcibios.c --- sys/arch/i386/pci/pcibios.c 3 Jun 2003 20:10:32 - 1.29 +++ sys/arch/i386/pci/pcibios.c 15 Jun 2003 15:03:49 - @@ -244,9 +244,12 @@ pcibios_pir_init(sc) struct pcibios_softc *sc; { +#ifndef SRX77_HACK paddr_t pa; +#endif pcibios_pir_table = NULL; +#ifndef SRX77_HACK for (pa = PCI_IRQ_TABLE_START; pa PCI_IRQ_TABLE_END; pa += 16) { u_int8_t *p, cksum; struct pcibios_pir_header *pirh; @@ -305,6 +308,7 @@ pcibios_pir_table_nentries = (pirh-tablesize - 32) / 16; } +#endif /* * If there was no PIR table found, try using the PCI BIOS @@ -332,6 +336,29 @@ pcibios_pir_table_nentries = 0; return NULL; } +#ifdef SRX77_HACK + /* Enable Ricoh 5C475 PCI-CardBus (cbb0) */ + bzero(pcibios_pir_table[pcibios_pir_table_nentries], + sizeof(pcibios_pir_table[pcibios_pir_table_nentries])); + pcibios_pir_table[pcibios_pir_table_nentries].bus = 1; + pcibios_pir_table[pcibios_pir_table_nentries].device = + PIR_DEVFUNC_COMPOSE(2, 0); + pcibios_pir_table[pcibios_pir_table_nentries].linkmap[0].link = + 0x62; + pcibios_pir_table[pcibios_pir_table_nentries].linkmap[0].bitmap = 0x200; + pcibios_pir_table_nentries++; + + /* Enable Texas Instruments PCI1410 PCI-CardBus (wi @ cbb1) */ + bzero(pcibios_pir_table[pcibios_pir_table_nentries], + sizeof(pcibios_pir_table[pcibios_pir_table_nentries])); + pcibios_pir_table[pcibios_pir_table_nentries].bus = 1; + pcibios_pir_table[pcibios_pir_table_nentries].device = + PIR_DEVFUNC_COMPOSE(5, 0); + pcibios_pir_table[pcibios_pir_table_nentries].linkmap[0].link = + 0x69; + pcibios_pir_table[pcibios_pir_table_nentries].linkmap[0].bitmap = 0x200; + pcibios_pir_table_nentries++; +#endif printf(%s: PCI BIOS has %d Interrupt Routing table entries\n, sc-sc_dev.dv_xname, pcibios_pir_table_nentries); } Below is the dmesg output before I patch it manually. === OpenBSD 4.1-stable (GENERIC) #15: Wed Aug 22 19:29:59 MYT 2007 [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC cpu0: Intel Pentium III (GenuineIntel 686-class) 994 MHz cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE real mem = 132145152 (129048K) avail mem = 113147904 (110496K) using 1644 buffers containing 6733824 bytes (6576K) of memory mainbus0 (root) bios0 at mainbus0: AT/286+ BIOS, date 10/19/01, BIOS32 rev. 0 @ 0xfd878, SMBIOS rev. 2.31 @ 0xd8010 (15 entries) bios0: Sony Corporation PCG-FX990(I) apm0 at bios0: Power Management spec V1.2 apm0: AC on, battery charge unknown apm0: flags 30102 dobusy 0 doidle 1 pcibios0 at bios0: rev 2.1 @ 0xfd860/0x7a0 pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdf30/176 (9 entries) pcibios0: PCI Interrupt Router at 000:31:0 (Intel 82371FB ISA rev 0x00) pcibios0: PCI bus #3 is the last bus bios0: ROM list: 0xc/0xc000 0xd8000/0x4000! 0xdc000/0x4000! acpi at mainbus0 not configured cpu0 at mainbus0 pci0 at mainbus0 bus 0: configuration mode 1 (no bios) pchb0 at pci0 dev 0 function 0 Intel 82815 Hub rev 0x11 vga1 at pci0 dev 2 function 0 Intel 82815 Graphics rev 0x11: aperture at 0xf800, size 0x400 wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation) wsdisplay0: screen 1-5 added (80x25, vt100 emulation) ppb0 at pci0 dev 30 function 0 Intel 82801BAM Hub-to-PCI rev 0x03 pci1 at ppb0 bus 1 TI TSB43AA22 FireWire rev 0x02 at pci1 dev 0 function 0 not configured cbb0 at pci1 dev 2 function 0 Ricoh 5C476 CardBus rev 0x80pci_intr_map: no mapping for pin A : couldn't map interrupt cbb1 at pci1 dev 2 function 1 Ricoh 5C476 CardBus rev 0x80pci_intr_map: no mapping for pin B : couldn't map interrupt fxp0 at pci1 dev 8
Re: Cardbus not detected on Sony VAIO FX-990
Thanks Stuart.. But the problem is I just wanna enable my cbb1. I just need to know the correct values that I should put so it would work properly instead of just cbb0? Thanks again. On 8/22/07, Stuart Henderson [EMAIL PROTECTED] wrote: On 2007/08/22 19:39, Niresh Singh wrote: I'm currently using OpenBSD 4.1 -stable. The cardbus is Ricoh 5C476. I've had this problem on OpenBSD 3.9 before but managed to solve it using the guide here and patching it manually. The link is as below: try enabling acpi boot boot -c ... UKC enable acpi 254 acpi0 enabled UKC quit if it helps, you can use config -e to patch a kernel so you don't need to do this manually.
Re: Cardbus not detected on Sony VAIO FX-990
On 8/22/07, Stuart Henderson [EMAIL PROTECTED] wrote: On 2007/08/22 19:39, Niresh Singh wrote: I'm currently using OpenBSD 4.1 -stable. The cardbus is Ricoh 5C476. I've had this problem on OpenBSD 3.9 before but managed to solve it using the guide here and patching it manually. The link is as below: try enabling acpi boot boot -c ... UKC enable acpi 254 acpi0 enabled UKC quit if it helps, you can use config -e to patch a kernel so you don't need to do this manually. On Wednesday 22 August 2007, Niresh Singh wrote: Thanks Stuart.. But the problem is I just wanna enable my cbb1. I just need to know the correct values that I should put so it would work properly instead of just cbb0? Thanks again. generic cbb0 at pci1 dev 2 function 0 Ricoh 5C476 CardBus rev 0x80pci_intr_map: no mapping for pin A : couldn't map interrupt cbb1 at pci1 dev 2 function 1 Ricoh 5C476 CardBus rev 0x80pci_intr_map: no mapping for pin B : couldn't map interrupt Post-patch cbb0 at pci1 dev 2 function 0 Ricoh 5C476 CardBus rev 0x80: irq 10 cbb1 at pci1 dev 2 function 1 Ricoh 5C476 CardBus rev 0x80pci_intr_map: no mapping for pin B : couldn't map interrupt On Wednesday 22 August 2007, Niresh Singh wrote: The problem now is, only the cbb0 is working. And the cbb0 of mine is faulty and can't be used totally. What I want is to make the cbb1 to work instead of cbb0. I tried changing the values but it just didn't work because it keep detecting the cbb0 first. I need to use my wireless pcmcia card urgently. I just want to know how could I just slap the correct values and make cbb1 work. Tried googling but nothing helpful came up. Did you even try what Stuart suggested? Your second, post-patch dmesg shows cbb1 is not getting an IRQ. The thought behind of enabling acpi is to get the kernel to recognize the device configuration, and therefore the interrupt assignment for cbb1. It may, or may not work. You may want to note many acpi improvements have gone into the tree since 4.1, so you might also want to try the current 4.2 beta available in snapshots. The problem is not specifically the Rico 5C475/5C476. I use one here without problems (single slot). The goal of that patch was to be able to *both* the Rico 5C475 at cbb0 and the TI PCI1410 at cbb1 at the same time -a system with two different cardbus chips. I see no mention of the TI PCI1410 in either of your dmesgs, none the less, the patch you applied is trying to force one to exist (on cbb1). Your dmesgs seems to show two Rico cardbus chips, not one Rico and one TI. With the patch, I suspect you are trying to forcefully enable hardware that doesn't actually exist in your system, namely the missing TI PCI1410. The patch did succeed in getting the first Rico at cbb0 working, so it seems possible that duplicating it for the second rico chip might work, maybe something like this... (snip) +#ifdef SRX77_HACK + /* Enable First Ricoh 5C475 PCI-CardBus (cbb0) */ + bzero(pcibios_pir_table[pcibios_pir_table_nentries], + sizeof(pcibios_pir_table[pcibios_pir_table_nentries])); + pcibios_pir_table[pcibios_pir_table_nentries].bus = 1; + pcibios_pir_table[pcibios_pir_table_nentries].device = + PIR_DEVFUNC_COMPOSE(2, 0); + pcibios_pir_table[pcibios_pir_table_nentries].linkmap[0].link = + 0x62; + pcibios_pir_table[pcibios_pir_table_nentries].linkmap[0].bitm ap = 0x200; + pcibios_pir_table_nentries++; + + /* Enable Second Ricoh 5C475 PCI-CardBus (cbb1) */ + bzero(pcibios_pir_table[pcibios_pir_table_nentries], + sizeof(pcibios_pir_table[pcibios_pir_table_nentries])); + pcibios_pir_table[pcibios_pir_table_nentries].bus = 1; + pcibios_pir_table[pcibios_pir_table_nentries].device = + PIR_DEVFUNC_COMPOSE(2, 0); + pcibios_pir_table[pcibios_pir_table_nentries].linkmap[0].link = + 0x62; + pcibios_pir_table[pcibios_pir_table_nentries].linkmap[0].bitmap = 0x200; + pcibios_pir_table_nentries++; +#endif (snip) I doubt the above is correct (it's a wild guess) but you get the basic idea, try to force the two rico chips to become enabled. Needless to say, none of this seems like a good idea but it might work until you figure out a better way to do it. jcr
Re: Cardbus not detected on Sony VAIO FX-990
On 2007/08/22 23:07, Niresh Singh wrote: Thanks Stuart.. But the problem is I just wanna enable my cbb1. I think what you *actually* want is a working cardbus port. I just need to know the correct values that I should put so it would work properly instead of just cbb0? The dmesg points to broken $PIR (non-acpi interrupt tables in the BIOS), being a Vaio, this is no big surprise. To a quick glance from my semi-informed eye, the hack you are using is just hardcoding the settings... And the cbb0 of mine is faulty and can't be used totally. ...and maybe hardcodes things wrongly for your system, giving broken irq routing for cbb0. If changing to the routing tables from ACPI doesn't help things, try a BIOS update if one's available, if it still doesn't work you might find someone interested in an ACPI dump to see if there's anything odd-but-fixable, but one step at a time... Cc: misc@openbsd.org Oh, what is it with gmail.com users cc'ing private posts back to the list, is their UI broken? :( Some people would rather improve the signal:noise ratio on misc@ in some small way by working things out off-list then posting a summary back when there's useful information.