summaryrefslogtreecommitdiff
path: root/pcnet32/irq.c
blob: f82e8b11c6a583e445aef825f6e5e51c4053cf33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <error.h>

#include <mach.h>
#include <hurd.h>

#include "netdevice.h"
#include "device_U.h"
#include "irq.h"

extern mach_port_t master_device;

/*
 * Install the irq in the kernel.
 */
int
request_irq (struct linux_device *dev,
	     void (*handler) (int), unsigned long flags)
{
  return device_intr_notify (master_device, dev->irq, dev->dev_id,
			     ports_get_right (dev), MACH_MSG_TYPE_MAKE_SEND);
}

/*
 * Deallocate an irq.
 */
void
free_irq (struct linux_device *dev)
{
  error_t err;
  err = device_intr_notify (master_device, dev->irq, dev->dev_id,
			    MACH_PORT_NULL, MACH_MSG_TYPE_MAKE_SEND);
  if (err)
    error (0, err, "device_intr_notify");
}