Completed function declarations and/or added prototypes and/or added
#includes to get prototypes. pci now uses a different interrupt handler type for interrupts that it dispatches and the isa interrupt handler type for the interrupts that it handles.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** $Id: pcibus.c,v 1.19 1995/10/17 23:30:11 se Exp $
|
||||
** $Id: pcibus.c,v 1.20 1995/12/10 13:39:04 phk Exp $
|
||||
**
|
||||
** pci bus subroutines for i386 architecture.
|
||||
**
|
||||
@@ -102,10 +102,10 @@ static void
|
||||
pcibus_write (pcici_t tag, u_long reg, u_long data);
|
||||
|
||||
static int
|
||||
pcibus_ihandler_attach (int irq, void(*ihandler)(), int arg, unsigned* maskp);
|
||||
pcibus_ihandler_attach (int irq, inthand2_t *func, int arg, unsigned* maskptr);
|
||||
|
||||
static int
|
||||
pcibus_ihandler_detach (int irq, void(*handler)());
|
||||
pcibus_ihandler_detach (int irq, inthand2_t *func);
|
||||
|
||||
static int
|
||||
pcibus_imask_include (int irq, unsigned* maskptr);
|
||||
@@ -423,14 +423,14 @@ pcibus_write (pcici_t tag, u_long reg, u_long data)
|
||||
*/
|
||||
|
||||
static int
|
||||
pcibus_ihandler_attach (int irq, void(*func)(), int arg, unsigned * maskptr)
|
||||
pcibus_ihandler_attach (int irq, inthand2_t *func, int arg, unsigned * maskptr)
|
||||
{
|
||||
int result;
|
||||
result = register_intr(
|
||||
irq, /* isa irq */
|
||||
0, /* deviced?? */
|
||||
0, /* flags? */
|
||||
(inthand2_t*) func, /* handler */
|
||||
func, /* handler */
|
||||
maskptr, /* mask pointer */
|
||||
arg); /* handler arg */
|
||||
|
||||
@@ -445,13 +445,13 @@ pcibus_ihandler_attach (int irq, void(*func)(), int arg, unsigned * maskptr)
|
||||
}
|
||||
|
||||
static int
|
||||
pcibus_ihandler_detach (int irq, void(*func)())
|
||||
pcibus_ihandler_detach (int irq, inthand2_t *func)
|
||||
{
|
||||
int result;
|
||||
|
||||
INTRDIS ((1ul<<irq));
|
||||
|
||||
result = unregister_intr (irq, (inthand2_t*) func);
|
||||
result = unregister_intr (irq, func);
|
||||
|
||||
if (result)
|
||||
printf ("@@@ pcibus_ihandler_detach: result=%d\n", result);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** $Id: pcibus.c,v 1.19 1995/10/17 23:30:11 se Exp $
|
||||
** $Id: pcibus.c,v 1.20 1995/12/10 13:39:04 phk Exp $
|
||||
**
|
||||
** pci bus subroutines for i386 architecture.
|
||||
**
|
||||
@@ -102,10 +102,10 @@ static void
|
||||
pcibus_write (pcici_t tag, u_long reg, u_long data);
|
||||
|
||||
static int
|
||||
pcibus_ihandler_attach (int irq, void(*ihandler)(), int arg, unsigned* maskp);
|
||||
pcibus_ihandler_attach (int irq, inthand2_t *func, int arg, unsigned* maskptr);
|
||||
|
||||
static int
|
||||
pcibus_ihandler_detach (int irq, void(*handler)());
|
||||
pcibus_ihandler_detach (int irq, inthand2_t *func);
|
||||
|
||||
static int
|
||||
pcibus_imask_include (int irq, unsigned* maskptr);
|
||||
@@ -423,14 +423,14 @@ pcibus_write (pcici_t tag, u_long reg, u_long data)
|
||||
*/
|
||||
|
||||
static int
|
||||
pcibus_ihandler_attach (int irq, void(*func)(), int arg, unsigned * maskptr)
|
||||
pcibus_ihandler_attach (int irq, inthand2_t *func, int arg, unsigned * maskptr)
|
||||
{
|
||||
int result;
|
||||
result = register_intr(
|
||||
irq, /* isa irq */
|
||||
0, /* deviced?? */
|
||||
0, /* flags? */
|
||||
(inthand2_t*) func, /* handler */
|
||||
func, /* handler */
|
||||
maskptr, /* mask pointer */
|
||||
arg); /* handler arg */
|
||||
|
||||
@@ -445,13 +445,13 @@ pcibus_ihandler_attach (int irq, void(*func)(), int arg, unsigned * maskptr)
|
||||
}
|
||||
|
||||
static int
|
||||
pcibus_ihandler_detach (int irq, void(*func)())
|
||||
pcibus_ihandler_detach (int irq, inthand2_t *func)
|
||||
{
|
||||
int result;
|
||||
|
||||
INTRDIS ((1ul<<irq));
|
||||
|
||||
result = unregister_intr (irq, (inthand2_t*) func);
|
||||
result = unregister_intr (irq, func);
|
||||
|
||||
if (result)
|
||||
printf ("@@@ pcibus_ihandler_detach: result=%d\n", result);
|
||||
|
||||
+15
-7
@@ -1,6 +1,6 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** $Id: pci.c,v 1.37 1995/12/14 09:54:08 phk Exp $
|
||||
** $Id: pci.c,v 1.38 1995/12/15 13:40:20 se Exp $
|
||||
**
|
||||
** General subroutines for the PCI bus.
|
||||
** pci_configure ()
|
||||
@@ -36,7 +36,7 @@
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
#include <pci.h>
|
||||
#include "pci.h"
|
||||
#if NPCI > 0
|
||||
|
||||
/*========================================================
|
||||
@@ -1245,7 +1245,7 @@ getintdescbymptr (u_int irq, unsigned * mptr)
|
||||
|
||||
static unsigned pci_mask0 = 0;
|
||||
|
||||
int pci_map_int (pcici_t tag, int(*func)(), void* arg, unsigned* maskptr)
|
||||
int pci_map_int (pcici_t tag, pci_inthand_t *func, void *arg, unsigned *maskptr)
|
||||
{
|
||||
u_int irq;
|
||||
int result, oldspl;
|
||||
@@ -1317,7 +1317,13 @@ int pci_map_int (pcici_t tag, int(*func)(), void* arg, unsigned* maskptr)
|
||||
*/
|
||||
|
||||
result = pcibus->pb_iattach
|
||||
(irq, (void(*)()) func, (int) arg, maskptr);
|
||||
/*
|
||||
* XXX if we get here, then `func' must be pci_int
|
||||
* so the bogus casts are almost OK since they just
|
||||
* undo the bogus casts that were needed to pass
|
||||
* pci_int and its arg to pci_map_int().
|
||||
*/
|
||||
(irq, (inthand2_t *) func, (int) arg, maskptr);
|
||||
if (result) goto conflict;
|
||||
|
||||
#ifdef NO_SHARED_IRQ
|
||||
@@ -1335,7 +1341,8 @@ int pci_map_int (pcici_t tag, int(*func)(), void* arg, unsigned* maskptr)
|
||||
** replace old handler by shared-int-handler.
|
||||
*/
|
||||
|
||||
result = pcibus->pb_idetach (irq,(void(*)())tail->pcid_handler);
|
||||
result = pcibus->pb_idetach (irq,
|
||||
(inthand2_t *) tail->pcid_handler);
|
||||
if (result)
|
||||
printf ("\tCANNOT DETACH INT HANDLER.\n");
|
||||
|
||||
@@ -1433,7 +1440,8 @@ int pci_unmap_int (pcici_t tag)
|
||||
** Remove the old handler.
|
||||
*/
|
||||
|
||||
result = pcibus->pb_idetach (irq,(void(*)())this->pcid_handler);
|
||||
result = pcibus->pb_idetach (irq,
|
||||
(inthand2_t *) this->pcid_handler);
|
||||
if (result)
|
||||
printf ("\tirq %d: cannot remove handler.\n", irq);
|
||||
|
||||
@@ -1451,7 +1459,7 @@ int pci_unmap_int (pcici_t tag)
|
||||
printf ("\tirq %d: cannot remove handler.\n", irq);
|
||||
|
||||
result = pcibus->pb_iattach (irq,
|
||||
(void(*)()) tail->pcid_handler,
|
||||
(inthand2_t *) tail->pcid_handler,
|
||||
(int) tail->pcid_argument,
|
||||
tail->pcid_maskptr);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** $Id: pcibus.c,v 1.19 1995/10/17 23:30:11 se Exp $
|
||||
** $Id: pcibus.c,v 1.20 1995/12/10 13:39:04 phk Exp $
|
||||
**
|
||||
** pci bus subroutines for i386 architecture.
|
||||
**
|
||||
@@ -102,10 +102,10 @@ static void
|
||||
pcibus_write (pcici_t tag, u_long reg, u_long data);
|
||||
|
||||
static int
|
||||
pcibus_ihandler_attach (int irq, void(*ihandler)(), int arg, unsigned* maskp);
|
||||
pcibus_ihandler_attach (int irq, inthand2_t *func, int arg, unsigned* maskptr);
|
||||
|
||||
static int
|
||||
pcibus_ihandler_detach (int irq, void(*handler)());
|
||||
pcibus_ihandler_detach (int irq, inthand2_t *func);
|
||||
|
||||
static int
|
||||
pcibus_imask_include (int irq, unsigned* maskptr);
|
||||
@@ -423,14 +423,14 @@ pcibus_write (pcici_t tag, u_long reg, u_long data)
|
||||
*/
|
||||
|
||||
static int
|
||||
pcibus_ihandler_attach (int irq, void(*func)(), int arg, unsigned * maskptr)
|
||||
pcibus_ihandler_attach (int irq, inthand2_t *func, int arg, unsigned * maskptr)
|
||||
{
|
||||
int result;
|
||||
result = register_intr(
|
||||
irq, /* isa irq */
|
||||
0, /* deviced?? */
|
||||
0, /* flags? */
|
||||
(inthand2_t*) func, /* handler */
|
||||
func, /* handler */
|
||||
maskptr, /* mask pointer */
|
||||
arg); /* handler arg */
|
||||
|
||||
@@ -445,13 +445,13 @@ pcibus_ihandler_attach (int irq, void(*func)(), int arg, unsigned * maskptr)
|
||||
}
|
||||
|
||||
static int
|
||||
pcibus_ihandler_detach (int irq, void(*func)())
|
||||
pcibus_ihandler_detach (int irq, inthand2_t *func)
|
||||
{
|
||||
int result;
|
||||
|
||||
INTRDIS ((1ul<<irq));
|
||||
|
||||
result = unregister_intr (irq, (inthand2_t*) func);
|
||||
result = unregister_intr (irq, func);
|
||||
|
||||
if (result)
|
||||
printf ("@@@ pcibus_ihandler_detach: result=%d\n", result);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** $Id: pcibus.c,v 1.19 1995/10/17 23:30:11 se Exp $
|
||||
** $Id: pcibus.c,v 1.20 1995/12/10 13:39:04 phk Exp $
|
||||
**
|
||||
** pci bus subroutines for i386 architecture.
|
||||
**
|
||||
@@ -102,10 +102,10 @@ static void
|
||||
pcibus_write (pcici_t tag, u_long reg, u_long data);
|
||||
|
||||
static int
|
||||
pcibus_ihandler_attach (int irq, void(*ihandler)(), int arg, unsigned* maskp);
|
||||
pcibus_ihandler_attach (int irq, inthand2_t *func, int arg, unsigned* maskptr);
|
||||
|
||||
static int
|
||||
pcibus_ihandler_detach (int irq, void(*handler)());
|
||||
pcibus_ihandler_detach (int irq, inthand2_t *func);
|
||||
|
||||
static int
|
||||
pcibus_imask_include (int irq, unsigned* maskptr);
|
||||
@@ -423,14 +423,14 @@ pcibus_write (pcici_t tag, u_long reg, u_long data)
|
||||
*/
|
||||
|
||||
static int
|
||||
pcibus_ihandler_attach (int irq, void(*func)(), int arg, unsigned * maskptr)
|
||||
pcibus_ihandler_attach (int irq, inthand2_t *func, int arg, unsigned * maskptr)
|
||||
{
|
||||
int result;
|
||||
result = register_intr(
|
||||
irq, /* isa irq */
|
||||
0, /* deviced?? */
|
||||
0, /* flags? */
|
||||
(inthand2_t*) func, /* handler */
|
||||
func, /* handler */
|
||||
maskptr, /* mask pointer */
|
||||
arg); /* handler arg */
|
||||
|
||||
@@ -445,13 +445,13 @@ pcibus_ihandler_attach (int irq, void(*func)(), int arg, unsigned * maskptr)
|
||||
}
|
||||
|
||||
static int
|
||||
pcibus_ihandler_detach (int irq, void(*func)())
|
||||
pcibus_ihandler_detach (int irq, inthand2_t *func)
|
||||
{
|
||||
int result;
|
||||
|
||||
INTRDIS ((1ul<<irq));
|
||||
|
||||
result = unregister_intr (irq, (inthand2_t*) func);
|
||||
result = unregister_intr (irq, func);
|
||||
|
||||
if (result)
|
||||
printf ("@@@ pcibus_ihandler_detach: result=%d\n", result);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** $Id: pcibus.c,v 1.19 1995/10/17 23:30:11 se Exp $
|
||||
** $Id: pcibus.c,v 1.20 1995/12/10 13:39:04 phk Exp $
|
||||
**
|
||||
** pci bus subroutines for i386 architecture.
|
||||
**
|
||||
@@ -102,10 +102,10 @@ static void
|
||||
pcibus_write (pcici_t tag, u_long reg, u_long data);
|
||||
|
||||
static int
|
||||
pcibus_ihandler_attach (int irq, void(*ihandler)(), int arg, unsigned* maskp);
|
||||
pcibus_ihandler_attach (int irq, inthand2_t *func, int arg, unsigned* maskptr);
|
||||
|
||||
static int
|
||||
pcibus_ihandler_detach (int irq, void(*handler)());
|
||||
pcibus_ihandler_detach (int irq, inthand2_t *func);
|
||||
|
||||
static int
|
||||
pcibus_imask_include (int irq, unsigned* maskptr);
|
||||
@@ -423,14 +423,14 @@ pcibus_write (pcici_t tag, u_long reg, u_long data)
|
||||
*/
|
||||
|
||||
static int
|
||||
pcibus_ihandler_attach (int irq, void(*func)(), int arg, unsigned * maskptr)
|
||||
pcibus_ihandler_attach (int irq, inthand2_t *func, int arg, unsigned * maskptr)
|
||||
{
|
||||
int result;
|
||||
result = register_intr(
|
||||
irq, /* isa irq */
|
||||
0, /* deviced?? */
|
||||
0, /* flags? */
|
||||
(inthand2_t*) func, /* handler */
|
||||
func, /* handler */
|
||||
maskptr, /* mask pointer */
|
||||
arg); /* handler arg */
|
||||
|
||||
@@ -445,13 +445,13 @@ pcibus_ihandler_attach (int irq, void(*func)(), int arg, unsigned * maskptr)
|
||||
}
|
||||
|
||||
static int
|
||||
pcibus_ihandler_detach (int irq, void(*func)())
|
||||
pcibus_ihandler_detach (int irq, inthand2_t *func)
|
||||
{
|
||||
int result;
|
||||
|
||||
INTRDIS ((1ul<<irq));
|
||||
|
||||
result = unregister_intr (irq, (inthand2_t*) func);
|
||||
result = unregister_intr (irq, func);
|
||||
|
||||
if (result)
|
||||
printf ("@@@ pcibus_ihandler_detach: result=%d\n", result);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** $Id: pcibus.c,v 1.19 1995/10/17 23:30:11 se Exp $
|
||||
** $Id: pcibus.c,v 1.20 1995/12/10 13:39:04 phk Exp $
|
||||
**
|
||||
** pci bus subroutines for i386 architecture.
|
||||
**
|
||||
@@ -102,10 +102,10 @@ static void
|
||||
pcibus_write (pcici_t tag, u_long reg, u_long data);
|
||||
|
||||
static int
|
||||
pcibus_ihandler_attach (int irq, void(*ihandler)(), int arg, unsigned* maskp);
|
||||
pcibus_ihandler_attach (int irq, inthand2_t *func, int arg, unsigned* maskptr);
|
||||
|
||||
static int
|
||||
pcibus_ihandler_detach (int irq, void(*handler)());
|
||||
pcibus_ihandler_detach (int irq, inthand2_t *func);
|
||||
|
||||
static int
|
||||
pcibus_imask_include (int irq, unsigned* maskptr);
|
||||
@@ -423,14 +423,14 @@ pcibus_write (pcici_t tag, u_long reg, u_long data)
|
||||
*/
|
||||
|
||||
static int
|
||||
pcibus_ihandler_attach (int irq, void(*func)(), int arg, unsigned * maskptr)
|
||||
pcibus_ihandler_attach (int irq, inthand2_t *func, int arg, unsigned * maskptr)
|
||||
{
|
||||
int result;
|
||||
result = register_intr(
|
||||
irq, /* isa irq */
|
||||
0, /* deviced?? */
|
||||
0, /* flags? */
|
||||
(inthand2_t*) func, /* handler */
|
||||
func, /* handler */
|
||||
maskptr, /* mask pointer */
|
||||
arg); /* handler arg */
|
||||
|
||||
@@ -445,13 +445,13 @@ pcibus_ihandler_attach (int irq, void(*func)(), int arg, unsigned * maskptr)
|
||||
}
|
||||
|
||||
static int
|
||||
pcibus_ihandler_detach (int irq, void(*func)())
|
||||
pcibus_ihandler_detach (int irq, inthand2_t *func)
|
||||
{
|
||||
int result;
|
||||
|
||||
INTRDIS ((1ul<<irq));
|
||||
|
||||
result = unregister_intr (irq, (inthand2_t*) func);
|
||||
result = unregister_intr (irq, func);
|
||||
|
||||
if (result)
|
||||
printf ("@@@ pcibus_ihandler_detach: result=%d\n", result);
|
||||
|
||||
+2
-1
@@ -21,7 +21,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: if_pdq.c,v 1.10 1995/12/05 02:01:53 davidg Exp $
|
||||
* $Id: if_pdq.c,v 1.11 1995/12/07 12:47:37 davidg Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/mbuf.h>
|
||||
#include <sys/protosw.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
@@ -101,6 +101,8 @@
|
||||
#include <pci/pcivar.h>
|
||||
#include <pci/if_vxreg.h>
|
||||
|
||||
static int eeprom_rdy __P((int unit));
|
||||
static int get_e __P((int unit, int offset));
|
||||
static int vxioctl __P((struct ifnet * ifp, int, caddr_t));
|
||||
static void vxmbuffill __P((caddr_t, int));
|
||||
static void vxmbufempty __P((struct vx_softc *));
|
||||
|
||||
+7
-19
@@ -1,6 +1,6 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** $Id: ncr.c,v 1.50 1995/12/07 12:47:40 davidg Exp $
|
||||
** $Id: ncr.c,v 1.51 1995/12/14 09:54:04 phk Exp $
|
||||
**
|
||||
** Device driver for the NCR 53C810 PCI-SCSI-Controller.
|
||||
**
|
||||
@@ -193,7 +193,6 @@
|
||||
#include <pci/pcivar.h>
|
||||
#include <pci/pcireg.h>
|
||||
#include <pci/ncrreg.h>
|
||||
extern PRINT_ADDR();
|
||||
#else
|
||||
#include <sys/device.h>
|
||||
#include <dev/pci/ncr_reg.h>
|
||||
@@ -1203,11 +1202,7 @@ static void ncr_getclock (ncb_p np);
|
||||
static ccb_p ncr_get_ccb (ncb_p np, u_long flags, u_long t,u_long l);
|
||||
static U_INT32 ncr_info (int unit);
|
||||
static void ncr_init (ncb_p np, char * msg, u_long code);
|
||||
#ifdef __NetBSD__
|
||||
static int ncr_intr (void *);
|
||||
#else /* !__NetBSD__ */
|
||||
static int ncr_intr (ncb_p np);
|
||||
#endif /* __NetBSD__ */
|
||||
static int ncr_intr (void *vnp);
|
||||
static void ncr_int_ma (ncb_p np);
|
||||
static void ncr_int_sir (ncb_p np);
|
||||
static void ncr_int_sto (ncb_p np);
|
||||
@@ -1254,7 +1249,7 @@ static void ncr_attach (pcici_t tag, int unit);
|
||||
|
||||
|
||||
static char ident[] =
|
||||
"\n$Id: ncr.c,v 1.50 1995/12/07 12:47:40 davidg Exp $\n";
|
||||
"\n$Id: ncr.c,v 1.51 1995/12/14 09:54:04 phk Exp $\n";
|
||||
|
||||
static u_long ncr_version = NCR_VERSION * 11
|
||||
+ (u_long) sizeof (struct ncb) * 7
|
||||
@@ -3157,7 +3152,7 @@ ncr_probe(parent, match, aux)
|
||||
struct cfdata *cf = match;
|
||||
struct pci_attach_args *pa = aux;
|
||||
|
||||
#ifdef 0
|
||||
#if 0
|
||||
if (!pci_targmatch(cf, pa))
|
||||
return 0;
|
||||
#endif
|
||||
@@ -3500,18 +3495,11 @@ static void ncr_attach (pcici_t config_id, int unit)
|
||||
**==========================================================
|
||||
*/
|
||||
|
||||
#ifdef __NetBSD__
|
||||
int
|
||||
ncr_intr(arg)
|
||||
void *arg;
|
||||
{
|
||||
ncb_p np = arg;
|
||||
#else /* !__NetBSD__ */
|
||||
static int
|
||||
ncr_intr(np)
|
||||
ncb_p np;
|
||||
ncr_intr(vnp)
|
||||
void *vnp;
|
||||
{
|
||||
#endif /* __NetBSD__ */
|
||||
ncb_p np = vnp;
|
||||
int n = 0;
|
||||
int oldspl = splbio();
|
||||
|
||||
|
||||
+15
-7
@@ -1,6 +1,6 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** $Id: pci.c,v 1.37 1995/12/14 09:54:08 phk Exp $
|
||||
** $Id: pci.c,v 1.38 1995/12/15 13:40:20 se Exp $
|
||||
**
|
||||
** General subroutines for the PCI bus.
|
||||
** pci_configure ()
|
||||
@@ -36,7 +36,7 @@
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
#include <pci.h>
|
||||
#include "pci.h"
|
||||
#if NPCI > 0
|
||||
|
||||
/*========================================================
|
||||
@@ -1245,7 +1245,7 @@ getintdescbymptr (u_int irq, unsigned * mptr)
|
||||
|
||||
static unsigned pci_mask0 = 0;
|
||||
|
||||
int pci_map_int (pcici_t tag, int(*func)(), void* arg, unsigned* maskptr)
|
||||
int pci_map_int (pcici_t tag, pci_inthand_t *func, void *arg, unsigned *maskptr)
|
||||
{
|
||||
u_int irq;
|
||||
int result, oldspl;
|
||||
@@ -1317,7 +1317,13 @@ int pci_map_int (pcici_t tag, int(*func)(), void* arg, unsigned* maskptr)
|
||||
*/
|
||||
|
||||
result = pcibus->pb_iattach
|
||||
(irq, (void(*)()) func, (int) arg, maskptr);
|
||||
/*
|
||||
* XXX if we get here, then `func' must be pci_int
|
||||
* so the bogus casts are almost OK since they just
|
||||
* undo the bogus casts that were needed to pass
|
||||
* pci_int and its arg to pci_map_int().
|
||||
*/
|
||||
(irq, (inthand2_t *) func, (int) arg, maskptr);
|
||||
if (result) goto conflict;
|
||||
|
||||
#ifdef NO_SHARED_IRQ
|
||||
@@ -1335,7 +1341,8 @@ int pci_map_int (pcici_t tag, int(*func)(), void* arg, unsigned* maskptr)
|
||||
** replace old handler by shared-int-handler.
|
||||
*/
|
||||
|
||||
result = pcibus->pb_idetach (irq,(void(*)())tail->pcid_handler);
|
||||
result = pcibus->pb_idetach (irq,
|
||||
(inthand2_t *) tail->pcid_handler);
|
||||
if (result)
|
||||
printf ("\tCANNOT DETACH INT HANDLER.\n");
|
||||
|
||||
@@ -1433,7 +1440,8 @@ int pci_unmap_int (pcici_t tag)
|
||||
** Remove the old handler.
|
||||
*/
|
||||
|
||||
result = pcibus->pb_idetach (irq,(void(*)())this->pcid_handler);
|
||||
result = pcibus->pb_idetach (irq,
|
||||
(inthand2_t *) this->pcid_handler);
|
||||
if (result)
|
||||
printf ("\tirq %d: cannot remove handler.\n", irq);
|
||||
|
||||
@@ -1451,7 +1459,7 @@ int pci_unmap_int (pcici_t tag)
|
||||
printf ("\tirq %d: cannot remove handler.\n", irq);
|
||||
|
||||
result = pcibus->pb_iattach (irq,
|
||||
(void(*)()) tail->pcid_handler,
|
||||
(inthand2_t *) tail->pcid_handler,
|
||||
(int) tail->pcid_argument,
|
||||
tail->pcid_maskptr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user