NetBSD-Bugs archive

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

port-i386/41522: pci devices left turned off



>Number:         41522
>Category:       port-i386
>Synopsis:       pci devices left turned off
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-i386-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 02 00:35:00 +0000 2009
>Originator:     db%db.net@localhost
>Release:        NetBSD 5.0
>Organization:
Not very.

>Environment:


System: NetBSD moonlet 5.0 NetBSD 5.0 (GENERIC) #0: Sun May 31 18:59:58 EDT 
2009 db@moonlet:/usr/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
Hewlett-Packard HP Vectra (VLi8) has a "lazy" bios, and leaves
io/mem turned off on the pci bus. Thus no pci device attaches.
>How-To-Repeat:
Try to boot off of a machine with a "lazy" bios.
>Fix:

This should be optional depending perhaps on boothowto or perhaps
on quirks.
This may not be the best place for the devices to be turned on
if quirks are used. However, this diff works for me for now.

--- dev/pci/pci.c.orig  2008-11-19 21:40:59.000000000 -0500
+++ dev/pci/pci.c       2009-05-24 10:16:01.000000000 -0400
@@ -317,10 +317,14 @@
         * as appropriate.
         */
        pa.pa_flags = sc->sc_flags;
-       if ((csr & PCI_COMMAND_IO_ENABLE) == 0)
-               pa.pa_flags &= ~PCI_FLAGS_IO_ENABLED;
-       if ((csr & PCI_COMMAND_MEM_ENABLE) == 0)
-               pa.pa_flags &= ~PCI_FLAGS_MEM_ENABLED;
+       if ((csr & PCI_COMMAND_IO_ENABLE) == 0) {
+               csr |= PCI_COMMAND_IO_ENABLE;
+               pci_conf_write(pc, tag, PCI_COMMAND_STATUS_REG, csr);
+       }
+       if ((csr & PCI_COMMAND_MEM_ENABLE) == 0) {
+               csr |= PCI_COMMAND_MEM_ENABLE;
+               pci_conf_write(pc, tag, PCI_COMMAND_STATUS_REG, csr);
+       }

        /*
         * If the cache line size is not configured, then



- Diane

>Unformatted:
 
 


Home | Main Index | Thread Index | Old Index