Re: mthca and LinuxBIOS

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

 



please check the patch for fix overwrite upper 32bit 

YH

--- drivers/pci/setup-res.c.orig        2005-08-05 10:08:45.000000000 -0700
+++ drivers/pci/setup-res.c     2005-08-05 13:25:06.000000000 -0700
@@ -33,6 +33,18 @@
        u32 new, check, mask;
        int reg;

+        if (resno < 6) {
+                reg = PCI_BASE_ADDRESS_0 + 4 * resno;
+                if((resno & 1)==1) {
+                        /* check if previous reg is 64 mem */
+                        pci_read_config_dword(dev, reg-4, &check );
+                        if ((check &
(PCI_BASE_ADDRESS_SPACE|PCI_BASE_ADDRESS_MEM_TYPE_MASK)) ==
+                           
(PCI_BASE_ADDRESS_SPACE_MEMORY|PCI_BASE_ADDRESS_MEM_TYPE_64))
+                                return;
+                }
+
+        }
+
        pcibios_resource_to_bus(dev, &region, res);

        pr_debug("  got res [%lx:%lx] bus [%lx:%lx] flags %lx for "
@@ -67,7 +79,7 @@

        if ((new & (PCI_BASE_ADDRESS_SPACE|PCI_BASE_ADDRESS_MEM_TYPE_MASK)) ==
            (PCI_BASE_ADDRESS_SPACE_MEMORY|PCI_BASE_ADDRESS_MEM_TYPE_64)) {
-               new = 0; /* currently everyone zeros the high address */
+               new = region.start >> 32 ;
                pci_write_config_dword(dev, reg + 4, new);
                pci_read_config_dword(dev, reg + 4, &check);
                if (check != new) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux