Current-Users archive

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

Re: cardbus reads from not exist function



kiyohara%kk.iij4u.or.jp@localhost said:
> cardbus_mapreg_map called: cardbus1 1
> pccbb_conf_read: mabrt 

This is earlier than expected... Give me one more try: I believe
the status bit was not cleared correctly.

best regards
Matthias





-------------------------------------------------------------------
-------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich

Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr. Harald Bolt,
Dr. Sebastian M. Schmidt
-------------------------------------------------------------------
-------------------------------------------------------------------
#
# old_revision [b1fe9c50db90131253b9e52e563a7f3ea7814f39]
#
# patch "sys/dev/pci/pccbb.c"
#  from [252b83553505b3049e54d3858e3f27b505a5687c]
#    to [3c46148cb837dd629b02a063e0b73ad3b0a600e9]
#
============================================================
--- sys/dev/pci/pccbb.c 252b83553505b3049e54d3858e3f27b505a5687c
+++ sys/dev/pci/pccbb.c 3c46148cb837dd629b02a063e0b73ad3b0a600e9
@@ -1893,8 +1893,16 @@ pccbb_conf_read(cardbus_chipset_tag_t cc
 pccbb_conf_read(cardbus_chipset_tag_t cc, cardbustag_t tag, int offset)
 {
        struct pccbb_softc *sc = (struct pccbb_softc *)cc;
+       pcitag_t brtag = sc->sc_tag;
+       cardbusreg_t reg;
 
-       return pci_conf_read(sc->sc_pc, tag, offset);
+       pci_conf_write(sc->sc_pc, brtag, 0x14, 0x20000000); /* clear */
+       reg = pci_conf_read(sc->sc_pc, tag, offset);
+       if (pci_conf_read(sc->sc_pc, brtag, 0x14) & 0x20000000) {
+               printf("pccbb_conf_read: mabrt\n");
+               return (0xffffffff);
+       }
+       return reg;
 }
 
 /*


Home | Main Index | Thread Index | Old Index