]> git.baikalelectronics.ru Git - kernel.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)
commit45023027bdf2b9b08dd0beef3b8941368f39b86c
tree3306d11fa1aa25fb02edc0a52366b84339288692
parent717a6330726c9b5d6401c2ff2358063eefd261ec
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