• David S. Miller's avatar
    sparc: Fix bus type probing for ESP and LE devices. · 956d039a
    David S. Miller authored
    If there is a dummy "espdma" or "ledma" parent device above ESP scsi
    or LE ethernet device nodes, we have to match the bus as SBUS.
    
    Otherwise the address and size cell counts are wrong and we don't
    calculate the final physical device resource values correctly at all.
    
    Commit 5280267c ("sparc: Fix handling
    of LANCE and ESP parent nodes in of_device.c") was meant to fix this
    problem, but that only influences the inner loop of
    build_device_resources().  We need this logic to also kick in at the
    beginning of build_device_resources() as well, when we make the first
    attempt to determine the device's immediate parent bus type for 'reg'
    property element extraction.
    
    Based almost entirely upon a patch by Friedrich Oslage.
    Tested-by: default avatarMeelis Roos <mroos@linux.ee>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    956d039a
of_device_64.c 19.6 KB