[lkml]   [2004]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH] g5: Fix iommu vs. pci_device_to_OF_node
    Hi !

    The g5 iommu code would fill the "iommu_table" member of whatever
    device node was pointed to by pcidev->sysdata during boot. However,
    the ppc64 kernel fills that with a pointer to the PHB node which is
    later replaced "lazily" with a pointer to the real node when calling
    pci_device_to_OF_node(). In this case, we were thus "losign" the
    iommu_table pointer. Typical symptom: loss of the SATA when looking
    at it's /proc entry.

    This fixes it by forcing the update to the final sysdata pointer
    when filling up the iommu_table pointers. The "lazy" thing is useless
    on pmac anyway.

    Please apply,

    ===== arch/ppc64/kernel/pmac_iommu.c 1.1 vs edited =====
    --- 1.1/arch/ppc64/kernel/pmac_iommu.c Sat Feb 28 09:44:57 2004
    +++ edited/arch/ppc64/kernel/pmac_iommu.c Tue Mar 16 17:45:10 2004
    @@ -289,8 +289,11 @@
    * things simple. Setup all PCI devices to point to this table
    while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
    - dn = PCI_GET_DN(dev);
    + /* We must use pci_device_to_OF_node() to make sure that
    + * we get the real "final" pointer to the device in the
    + * pci_dev sysdata and not the temporary PHB one
    + */
    + struct device_node *dn = pci_device_to_OF_node(dev);
    if (dn)
    dn->iommu_table = &iommu_table_pmac;

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:01    [W:0.018 / U:0.276 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site