Skip to content

Commit

Permalink
staging: gasket: apex: fixup undefined PCI class
Browse files Browse the repository at this point in the history
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 <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
toddpoynor authored and gregkh committed Jul 28, 2018
1 parent e7cffa0 commit f390d08
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/staging/gasket/apex_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,3 +739,10 @@ static ssize_t sysfs_show(
gasket_sysfs_put_device_data(device, gasket_dev);
return ret;
}

static void apex_pci_fixup_class(struct pci_dev *pdev)
{
pdev->class = (PCI_CLASS_SYSTEM_OTHER << 8) | pdev->class;
}
DECLARE_PCI_FIXUP_CLASS_HEADER(APEX_PCI_VENDOR_ID, APEX_PCI_DEVICE_ID,
PCI_CLASS_NOT_DEFINED, 8, apex_pci_fixup_class);

0 comments on commit f390d08

Please sign in to comment.