• Laurent Dufour's avatar
    PCI: rphahp: Fix endianess issues · 761ce533
    Laurent Dufour authored
    Numerical values stored in the device tree are encoded in Big Endian and
    should be byte swapped when running in Little Endian.
    
    The RPA hotplug module should convert those values as well.
    
    Note that in rpaphp_get_drc_props(), the comparison between indexes[i+1]
    and *index is done using the BE values (whatever is the current endianess).
    This doesn't matter since we are checking for equality here.  This way only
    the returned value is byte swapped.
    
    RPA also made RTAS calls which implies BE values to be used.  According to
    the patch done in RTAS (http://patchwork.ozlabs.org/patch/336865), no
    additional conversion is required in RPA.
    Signed-off-by: default avatarLaurent Dufour <ldufour@linux.vnet.ibm.com>
    Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
    761ce533
rpaphp_core.c 11 KB