Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

cardbus reads from not exist function



Hi! all,


My cardbus of evbppc (OPENBLOCKS266) reads from not exist functions at
multi function card since pccbb.c,v1.151.
It was read strange ID and CLASS at cardbus_rescan():cardbus.c.  Also
maybe panic() here, because was read the unexpected data.


cardbus_mapreg_map called: cardbus1 0
cardbus_mem_find: expected type mem, found i/o
cardbus_mapreg_map: physaddr 80095400
cardbus1: unmap mem space
extent `pchbmem' (0x80000000 - 0x9ffffffe), flags = 0x2
     0x80060000 - 0x80060fff
     0x80061000 - 0x80061fff
     0x80062000 - 0x800620ff
     0x80063000 - 0x800637ff
     0x80064000 - 0x800640ff
extent_free: start 0x309980, end 0x30997f
panic: extent_free: region not found
Stopped in pid 0.15 (system) at netbsd:cpu_Debugger+0x10:       lwz     r0, r1, 
0x14
db> bt
0x85983b20: at panic+0x21c
0x85983b70: at extent_free+0x114
0x85983ba0: at memio_unmap+0xb8
0x85983be0: at md_space_unmap+0x64
0x85983c10: at rbus_space_free+0xa4
0x85983c40: at pccbb_rbus_cb_space_free+0x14c
0x85983c90: at cardbus_mapreg_unmap+0xfc
0x85983cc0: at cardbus_rescan+0x830
0x85983ee0: at cardbus_attach_card+0x5c
0x85983f00: at cardslot_event_thread+0x1ac
0x85983f40: at emptyidlespin+0x10
0x85983f50: at _prop_array_pool+0x33578574
0x334c338c: at _prop_array_pool+0xffcb51a8
db>


This problem was solved by this change.

Index: pccbb.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/pccbb.c,v
retrieving revision 1.151
diff -u -r1.151 pccbb.c
--- pccbb.c     16 Nov 2007 18:36:51 -0000      1.151
+++ pccbb.c     30 Jun 2008 18:00:21 -0000
@@ -785,10 +785,12 @@
        bcr |= CB_BCR_WRITE_POST_ENABLE;        /* enable write post */
        /* assert reset */
        bcr |= PCI_BRIDGE_CONTROL_SECBR << PCI_BRIDGE_CONTROL_SHIFT;
+#if 0
         /* Set master abort mode to 1, forward SERR# from secondary
          * to primary, and detect parity errors on secondary.
         */
        bcr |= PCI_BRIDGE_CONTROL_MABRT << PCI_BRIDGE_CONTROL_SHIFT;
+#endif
        bcr |= PCI_BRIDGE_CONTROL_SERR << PCI_BRIDGE_CONTROL_SHIFT;
        bcr |= PCI_BRIDGE_CONTROL_PERE << PCI_BRIDGE_CONTROL_SHIFT;
        pci_conf_write(pc, tag, PCI_BRIDGE_CONTROL_REG, bcr);


As for cardbus, I am not well informed.  Please good idea ;-)

Thanks,
--
kiyohara


Home | Main Index | Thread Index | Old Index