Page MenuHomeFreeBSD

D31763.diff
No OneTemporary

D31763.diff

diff --git a/sys/dev/ppbus/ppb_base.c b/sys/dev/ppbus/ppb_base.c
--- a/sys/dev/ppbus/ppb_base.c
+++ b/sys/dev/ppbus/ppb_base.c
@@ -220,6 +220,14 @@
mtx_unlock(ppb->ppc_lock);
}
+struct mtx *
+ppb_get_lock(device_t bus)
+{
+ struct ppb_data *ppb = DEVTOSOFTC(bus);
+
+ return (ppb->ppc_lock);
+}
+
void
_ppb_assert_locked(device_t bus, const char *file, int line)
{
diff --git a/sys/dev/ppbus/ppbconf.h b/sys/dev/ppbus/ppbconf.h
--- a/sys/dev/ppbus/ppbconf.h
+++ b/sys/dev/ppbus/ppbconf.h
@@ -259,6 +259,7 @@
/* bus related functions */
extern void ppb_lock(device_t);
extern void ppb_unlock(device_t);
+extern struct mtx *ppb_get_lock(device_t);
extern void _ppb_assert_locked(device_t, const char *, int);
extern void ppb_init_callout(device_t, struct callout *, int);
extern int ppb_sleep(device_t, void *, int, const char *, int);
diff --git a/sys/dev/ppbus/pps.c b/sys/dev/ppbus/pps.c
--- a/sys/dev/ppbus/pps.c
+++ b/sys/dev/ppbus/pps.c
@@ -141,9 +141,11 @@
UID_ROOT, GID_WHEEL, 0600, PPS_NAME "%d", unit);
sc->devs[0] = d;
sc->pps[0].ppscap = PPS_CAPTUREASSERT | PPS_ECHOASSERT;
+ sc->pps[0].driver_abi = PPS_ABI_VERSION;
+ sc->pps[0].driver_mtx = ppb_get_lock(ppbus);
d->si_drv1 = sc;
d->si_drv2 = (void*)0;
- pps_init(&sc->pps[0]);
+ pps_init_abi(&sc->pps[0]);
ppb_lock(ppbus);
if (ppb_request_bus(ppbus, dev, PPB_DONTWAIT)) {
@@ -193,9 +195,11 @@
UID_ROOT, GID_WHEEL, 0600, PPS_NAME "%db%d", unit, i - 1);
sc->devs[i] = d;
sc->pps[i].ppscap = PPS_CAPTUREASSERT | PPS_CAPTURECLEAR;
+ sc->pps[i].driver_abi = PPS_ABI_VERSION;
+ sc->pps[i].driver_mtx = ppb_get_lock(ppbus);
d->si_drv1 = sc;
d->si_drv2 = (void *)(intptr_t)i;
- pps_init(&sc->pps[i]);
+ pps_init_abi(&sc->pps[i]);
}
ppb_lock(ppbus);
} while (0);

File Metadata

Mime Type
text/plain
Expires
Tue, Oct 1, 1:20 PM (21 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
13252792
Default Alt Text
D31763.diff (1 KB)

Event Timeline