NetBSD-Bugs archive

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

Re: kern/38857



gson%gson.org@localhost said:
>  >  + /* enable memory space access */
>  >  + reg = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
>  >  + reg |= PCI_COMMAND_MEM_ENABLE;
>  >  + pci_conf_write(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, reg);
>  >  + pa->pa_flags |= PCI_FLAGS_MEM_ENABLED; 

A driver should not set the MEM/IO enable bits blindly. Noone
knows whether the BARs are set correctly.
It also shouldn't modify the attach args (except in the special
case of indirect configuration).

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
-------------------------------------------------------------------
-------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index