Skip to content

Commit 5e886f1

Browse files
Youssef SamirSasha Levin
authored andcommitted
accel/qaic: Mask out SR-IOV PCI resources
[ Upstream commit 8685520 ] During the initialization of the qaic device, pci_select_bars() is used to fetch a bitmask of the BARs exposed by the device. On devices that have Virtual Functions capabilities, the bitmask includes SR-IOV BARs. Use a mask to filter out SR-IOV BARs if they exist. Signed-off-by: Youssef Samir <[email protected]> Reviewed-by: Jeffrey Hugo <[email protected]> Signed-off-by: Jeffrey Hugo <[email protected]> Reviewed-by: Lizhi Hou <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Sasha Levin <[email protected]>
1 parent f13e5b1 commit 5e886f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/accel/qaic/qaic_drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ static int init_pci(struct qaic_device *qdev, struct pci_dev *pdev)
432432
int bars;
433433
int ret;
434434

435-
bars = pci_select_bars(pdev, IORESOURCE_MEM);
435+
bars = pci_select_bars(pdev, IORESOURCE_MEM) & 0x3f;
436436

437437
/* make sure the device has the expected BARs */
438438
if (bars != (BIT(0) | BIT(2) | BIT(4))) {

0 commit comments

Comments
 (0)