提交 c577f4a5 编写于 作者: C Colin Ian King 提交者: Lorenzo Pieralisi

PCI: rockchip: Fix rockchip_pcie_ep_assert_intx() bitwise operations

Currently the bitwise operations on the u16 variable 'status' with
the setting ROCKCHIP_PCIE_EP_CMD_STATUS_IS are incorrect because
ROCKCHIP_PCIE_EP_CMD_STATUS_IS is 1UL<<19 which is wider than the
u16 variable.

Fix this by making status a u32.

Fixes: cf590b07 ("PCI: rockchip: Add EP driver for Rockchip PCIe controller")
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: NMukesh Ojha <mojha@codeaurora.org>
Acked-by: NShawn Lin <shawn.lin@rock-chips.com>
上级 9e98c678
...@@ -350,7 +350,7 @@ static void rockchip_pcie_ep_assert_intx(struct rockchip_pcie_ep *ep, u8 fn, ...@@ -350,7 +350,7 @@ static void rockchip_pcie_ep_assert_intx(struct rockchip_pcie_ep *ep, u8 fn,
struct rockchip_pcie *rockchip = &ep->rockchip; struct rockchip_pcie *rockchip = &ep->rockchip;
u32 r = ep->max_regions - 1; u32 r = ep->max_regions - 1;
u32 offset; u32 offset;
u16 status; u32 status;
u8 msg_code; u8 msg_code;
if (unlikely(ep->irq_pci_addr != ROCKCHIP_PCIE_EP_PCI_LEGACY_IRQ_ADDR || if (unlikely(ep->irq_pci_addr != ROCKCHIP_PCIE_EP_PCI_LEGACY_IRQ_ADDR ||
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册