]> git.karo-electronics.de Git - linux-beck.git/commit
PCI: rphahp: Fix endianess issues
authorLaurent Dufour <ldufour@linux.vnet.ibm.com>
Thu, 10 Apr 2014 13:02:13 +0000 (15:02 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 25 Apr 2014 17:48:42 +0000 (11:48 -0600)
commit761ce53330a4f02c58768631027d1c1dd0d538f7
tree3306d11fa1aa25fb02edc0a52366b84339288692
parent374a91404314cef882b27b293dd34d89e2a3c0b6
PCI: rphahp: Fix endianess issues

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: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/hotplug/rpaphp_core.c