From c0ac0d40f5783afe9a5f5b8a3819bb0c1687ff27 Mon Sep 17 00:00:00 2001 From: imp Date: Sun, 18 Jun 2000 04:59:39 +0000 Subject: [PATCH] o Implement some compatibility functions for NEWCARD compat. This is incomplete, but will eventually allow the same drivers to function with both oldcard and newcard. o Remove include of opt_bus.h. It isn't needed and gets in the way of module building. --- sys/pccard/pccard_nbk.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/sys/pccard/pccard_nbk.c b/sys/pccard/pccard_nbk.c index e58d396002df..e346956cf55a 100644 --- a/sys/pccard/pccard_nbk.c +++ b/sys/pccard/pccard_nbk.c @@ -49,8 +49,6 @@ * These compatibility nodes are called pccnbk. PCCard New Bus Kludge. */ -#include "opt_bus.h" - #include #include #include @@ -301,6 +299,27 @@ pccard_set_memory_offset(device_t bus, device_t child, int rid, offset); } +static int +pccard_get_function(device_t bus, device_t child, int *function) +{ + *function = 0; + return (0); +} + +static int +pccard_activate_function(device_t bus, device_t child) +{ + /* pccardd has alrady activated the function */ + return (0); +} + +static int +pccard_deactivate_function(device_t bus, device_t child) +{ + /* pccardd will deactivate the function */ + return (0); +} + static device_method_t pccard_methods[] = { /* Device interface */ DEVMETHOD(device_probe, pccard_probe), @@ -327,6 +346,9 @@ static device_method_t pccard_methods[] = { DEVMETHOD(card_set_res_flags, pccard_set_res_flags), DEVMETHOD(card_get_res_flags, pccard_get_res_flags), DEVMETHOD(card_set_memory_offset, pccard_set_memory_offset), + DEVMETHOD(card_get_function, pccard_get_function), + DEVMETHOD(card_activate_function, pccard_activate_function), + DEVMETHOD(card_deactivate_function, pccard_deactivate_function), { 0, 0 } };