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:
> I look this message,
>   cardbus_mem_find: expected type mem, found i/o
> reported by cardbus_mem_find() and return 1.

I'd say cardbus_mapreg_map() should error out on that
mismatch.

dyoung%pobox.com@localhost said:
> Turning off master abort-forwarding is a step backwards.  A step
> forward is to implement proper PCI exception handling.

Another idea: Could you try the appended patch?
(I can't test myself; I only have a singlefunction
card which happily mirrors the first function if I try
to probe more.)

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 [6ddbb0eb10d651de4c9b490d6fe4ac09c1217244]
#
============================================================
--- sys/dev/pci/pccbb.c 252b83553505b3049e54d3858e3f27b505a5687c
+++ sys/dev/pci/pccbb.c 6ddbb0eb10d651de4c9b490d6fe4ac09c1217244
@@ -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);
+       (void)pci_conf_read(sc->sc_pc, brtag, 0x14); /* 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