diff options
author | se <se@FreeBSD.org> | 1997-02-04 18:31:57 +0000 |
---|---|---|
committer | se <se@FreeBSD.org> | 1997-02-04 18:31:57 +0000 |
commit | 9b86dcdae7ec5b0323bd5b2ee29c0945adc91404 (patch) | |
tree | 21f3dc3d7bac66f209216e65c8cc5b87f02acc59 /sys | |
parent | ffd9cd487afa1475f6482b10655d0e9f20a5adb9 (diff) | |
download | FreeBSD-src-9b86dcdae7ec5b0323bd5b2ee29c0945adc91404.zip FreeBSD-src-9b86dcdae7ec5b0323bd5b2ee29c0945adc91404.tar.gz |
Add interface revision field to pci_register_lkm parameter list.pci.c pcibus.h
This parameter is intended to allow new kernels to work with old LKM binaries,
provided the revision ID is incremented whenever the PCI LKM interface is
changed. The revision ID does not at all protect against changes in data
structures accesses by the driver.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/pci.c | 6 | ||||
-rw-r--r-- | sys/pci/pci.c | 6 | ||||
-rw-r--r-- | sys/pci/pcibus.h | 2 |
3 files changed, 11 insertions, 3 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index d8b134c..a1b295b 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -953,10 +953,14 @@ static void pci_rescan() **======================================================== */ -int pci_register_lkm (struct pci_device *dvp) +int pci_register_lkm (struct pci_device *dvp, int if_revision) { struct pci_lkm *lkm; + if (if_version != 0) { + return -1; + } + if (!dvp || !dvp->pd_probe || !dvp->pd_attach) { return -1; } diff --git a/sys/pci/pci.c b/sys/pci/pci.c index d8b134c..a1b295b 100644 --- a/sys/pci/pci.c +++ b/sys/pci/pci.c @@ -953,10 +953,14 @@ static void pci_rescan() **======================================================== */ -int pci_register_lkm (struct pci_device *dvp) +int pci_register_lkm (struct pci_device *dvp, int if_revision) { struct pci_lkm *lkm; + if (if_version != 0) { + return -1; + } + if (!dvp || !dvp->pd_probe || !dvp->pd_attach) { return -1; } diff --git a/sys/pci/pcibus.h b/sys/pci/pcibus.h index aa3c46a..3ff8205 100644 --- a/sys/pci/pcibus.h +++ b/sys/pci/pcibus.h @@ -94,6 +94,6 @@ struct pcibus { extern struct linker_set pcibus_set; -int pci_register_lkm (struct pci_device *dvp); +int pci_register_lkm (struct pci_device *dvp, int if_revision); #endif |