Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: cf590b078391 ("PCI: rockchip: Add EP driver for Rockchip PCIe controller")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Acked-by: Shawn Lin <shawn.lin@rock-chips.com>

authored by

Colin Ian King and committed by
Lorenzo Pieralisi
c577f4a5 9e98c678

+1 -1
+1 -1
drivers/pci/controller/pcie-rockchip-ep.c
··· 350 350 struct rockchip_pcie *rockchip = &ep->rockchip; 351 351 u32 r = ep->max_regions - 1; 352 352 u32 offset; 353 - u16 status; 353 + u32 status; 354 354 u8 msg_code; 355 355 356 356 if (unlikely(ep->irq_pci_addr != ROCKCHIP_PCIE_EP_PCI_LEGACY_IRQ_ADDR ||