[core] hook: prefer included fixes over pci/quirks.c
This commit is contained in:
parent
8d6eac1f49
commit
246f57e0b0
13
src/hook.c
13
src/hook.c
|
@ -34,15 +34,16 @@ static int hooked_pci_dev_specific_reset(struct pci_dev *dev, int probe)
|
||||||
int ret;
|
int ret;
|
||||||
struct vendor_reset_cfg *cfg;
|
struct vendor_reset_cfg *cfg;
|
||||||
|
|
||||||
ret = orig_pci_dev_specific_reset(dev, probe);
|
cfg = vendor_reset_cfg_find(dev->vendor, dev->device);
|
||||||
|
if (!cfg)
|
||||||
|
goto do_orig;
|
||||||
|
|
||||||
|
ret = vendor_reset_dev_locked(cfg, dev);
|
||||||
if (!ret || ret != -ENOTTY)
|
if (!ret || ret != -ENOTTY)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
cfg = vendor_reset_cfg_find(dev->vendor, dev->device);
|
do_orig:
|
||||||
if (!cfg)
|
return orig_pci_dev_specific_reset(dev, probe);
|
||||||
return -ENOTTY;
|
|
||||||
|
|
||||||
return vendor_reset_dev_locked(cfg, dev);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ftrace_hook fh_hooks[] = {
|
struct ftrace_hook fh_hooks[] = {
|
||||||
|
|
Loading…
Reference in New Issue