Skip to content
Commit ae5cbc43 authored by Hou Zhiqiang's avatar Hou Zhiqiang Committed by Priyanka Jain
Browse files

pci: layerscape: Change to allocate zeroed memery for struct ls_pcie



As on some incipient Layerscape platforms (LS1043A series) there isn't
separate PF control register block, these registers reside in the LUT
register block, so when the driver detected there isn't 'ctrl', it will
assign the 'lut' address to the ls_pcie->ctrl.

The current code allocate memory for the struct ls_pcie with random
contents, this can result in skipping to assign the ls_pcie->ctrl with
the 'lut' address, then further crash with the incorrect address.

Fixes: 118e58e2 ("pci: layerscape: Split the EP and RC driver")
Signed-off-by: default avatarHou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: default avatarPriyanka Jain <priyanka.jain@nxp.com>
parent a7c532f9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment