From 58a49816c74149abb24e3fecd0b0cadf7fb2a62c Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sun, 26 Sep 1999 21:52:43 +0000 Subject: [PATCH] *** empty log message *** --- sys/pccard/driver.h | 6 ++++-- sys/pccard/pccard.c | 6 +++--- sys/pccard/pccard_nbk.c | 2 ++ sys/pccard/pcic.c | 31 ++++++++++++++++++++----------- sys/pccard/pcic.h | 4 ++-- 5 files changed, 31 insertions(+), 18 deletions(-) diff --git a/sys/pccard/driver.h b/sys/pccard/driver.h index 09acc50a072e..31711d584983 100644 --- a/sys/pccard/driver.h +++ b/sys/pccard/driver.h @@ -2,6 +2,8 @@ * pccard driver interface. * Bruce Evans, November 1995. * This file is in the public domain. + * + * $FreeBSD$ */ #ifndef _PCCARD_DRIVER_H_ @@ -10,8 +12,8 @@ struct pccard_device; void pccard_add_driver __P((struct pccard_device *)); -#ifdef _I386_ISA_ISA_DEVICE_H_ /* XXX actually if inthand2_t is declared */ -int pccard_alloc_intr __P((u_int imask, inthand2_t *hand, int unit, +#ifdef _I386_ISA_ISA_DEVICE_H_ /* XXX actually if ointhand2_t is declared */ +int pccard_alloc_intr __P((u_int imask, ointhand2_t *hand, int unit, u_int *maskp, u_int *pcic_imask)); #endif void pccard_remove_driver __P((struct pccard_device *)); diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c index ca3f353d170d..5eac5abcff09 100644 --- a/sys/pccard/pccard.c +++ b/sys/pccard/pccard.c @@ -100,7 +100,7 @@ static void disable_slot(struct slot *); static int invalid_io_memory(unsigned long, int); static struct pccard_device *find_driver(char *); static void remove_device(struct pccard_devinfo *); -static inthand2_t slot_irq_handler; +static ointhand2_t slot_irq_handler; static void power_off_slot(void *); static void pccard_configure(void *); @@ -537,7 +537,7 @@ pccard_alloc_slot(struct slot_ctrl *ctrl) * allowed are passed as a mask. */ int -pccard_alloc_intr(u_int imask, inthand2_t *hand, int unit, +pccard_alloc_intr(u_int imask, ointhand2_t *hand, int unit, u_int *maskp, u_int *pcic_imask) { int irq; @@ -801,7 +801,7 @@ pccard_event(struct slot *slt, enum card_event event) * slot_irq_handler - Interrupt handler for shared irq devices. */ static void -slot_irq_handler(void *arg) +slot_irq_handler(int arg) { struct pccard_devinfo *devi; struct slot *slt = (struct slot *)arg; diff --git a/sys/pccard/pccard_nbk.c b/sys/pccard/pccard_nbk.c index 3fd7114d2813..d7bb3174a3fb 100644 --- a/sys/pccard/pccard_nbk.c +++ b/sys/pccard/pccard_nbk.c @@ -265,6 +265,7 @@ pccnbk_wrap_old_driver(struct pccard_device *drv) drv->driver = driver; } +#if 0 static driver_t pccnbk_driver = { "pccnbk", pccnbk_methods, @@ -272,3 +273,4 @@ static driver_t pccnbk_driver = { }; DRIVER_MODULE(pccnbk, pccard, pccnbk_driver, pccnbk_devclass, 0, 0); +#endif diff --git a/sys/pccard/pcic.c b/sys/pccard/pcic.c index 35a33051ecb2..e4af972c309d 100644 --- a/sys/pccard/pcic.c +++ b/sys/pccard/pcic.c @@ -26,6 +26,8 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ */ /* @@ -44,6 +46,7 @@ #include #include +#include #include #ifdef PC98 @@ -62,7 +65,7 @@ /* * Prototypes for interrupt handler. */ -static inthand2_t pcicintr; +static ointhand2_t pcicintr; static int pcic_ioctl __P((struct slot *, int, caddr_t)); static int pcic_power __P((struct slot *)); static timeout_t pcic_reset; @@ -170,15 +173,19 @@ putw(struct pcic_slot *sp, int reg, unsigned short word) */ #ifdef APIC_IO int register_pcic_intr(int intr, int device_id, u_int flags, - inthand2_t handler, u_int *maskptr, int unit){ + ointhand2_t handler, u_int *maskptr, int unit) +{ int apic_intr; apic_intr = isa_apic_irq(intr); - if (apic_intr <0) return -1; - else return register_intr(apic_intr, device_id, flags, handler, - maskptr, unit); + if (apic_intr <0) + return -1; + else + return register_intr(apic_intr, device_id, flags, handler, + maskptr, unit); } -int unregister_pcic_intr(int intr, inthand2_t handler){ +int unregister_pcic_intr(int intr, ointhand2_t handler) +{ int apic_intr; apic_intr = isa_apic_irq(intr); return unregister_intr(apic_intr, handler); @@ -187,11 +194,13 @@ int unregister_pcic_intr(int intr, inthand2_t handler){ #else /* Not APIC_IO */ int register_pcic_intr(int intr, int device_id, u_int flags, - inthand2_t handler, u_int *maskptr, int unit){ + ointhand2_t handler, u_int *maskptr, int unit) +{ return register_intr(intr, device_id, flags, handler, maskptr, unit); } -int unregister_pcic_intr(int intr, inthand2_t handler){ +int unregister_pcic_intr(int intr, ointhand2_t handler) +{ return unregister_intr(intr, handler); } @@ -300,7 +309,7 @@ pcic_dump_attributes(unsigned char *scratch, int maxlen) #endif static void -nullfunc(void *unused) +nullfunc(int arg) { /* empty */ } @@ -1109,7 +1118,7 @@ pcic_disable(struct slot *slt) static void pcictimeout(void *chan) { - pcicintr(NULL); + pcicintr(0); pcictimeout_ch = timeout(pcictimeout, 0, hz/2); } @@ -1120,7 +1129,7 @@ pcictimeout(void *chan) * on this card, so send an event to the main code. */ static void -pcicintr(void *unused) +pcicintr(int unit) { int slot, s; unsigned char chg; diff --git a/sys/pccard/pcic.h b/sys/pccard/pcic.h index 5988089d43cd..53839a38d816 100644 --- a/sys/pccard/pcic.h +++ b/sys/pccard/pcic.h @@ -32,5 +32,5 @@ */ int register_pcic_intr(int intr, int device_id, u_int flags, - inthand2_t handler, u_int *maskptr, int unit); -int unregister_pcic_intr(int intr, inthand2_t handler); + ointhand2_t handler, u_int *maskptr, int unit); +int unregister_pcic_intr(int intr, ointhand2_t handler);