Skip to content

Commit f390d08

Browse files
toddpoynorgregkh
authored andcommitted
staging: gasket: apex: fixup undefined PCI class
Apex chips with class 0 (PCI_CLASS_NOT_DEFINED) fixed up to PCI_CLASS_SYSTEM_OTHER to enable PCI resource assignments. Signed-off-by: Todd Poynor <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent e7cffa0 commit f390d08

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/staging/gasket/apex_driver.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,3 +739,10 @@ static ssize_t sysfs_show(
739739
gasket_sysfs_put_device_data(device, gasket_dev);
740740
return ret;
741741
}
742+
743+
static void apex_pci_fixup_class(struct pci_dev *pdev)
744+
{
745+
pdev->class = (PCI_CLASS_SYSTEM_OTHER << 8) | pdev->class;
746+
}
747+
DECLARE_PCI_FIXUP_CLASS_HEADER(APEX_PCI_VENDOR_ID, APEX_PCI_DEVICE_ID,
748+
PCI_CLASS_NOT_DEFINED, 8, apex_pci_fixup_class);

0 commit comments

Comments
 (0)