drivers: fix various sys_irqsetpolicy calls

This commit is contained in:
David van Moolenbroek 2012-10-23 12:23:26 +00:00
parent bd3cde4571
commit 7dd6189cc7
3 changed files with 5 additions and 2 deletions

View file

@ -213,7 +213,7 @@ static struct device *ahci_part(dev_t minor);
static void ahci_alarm(clock_t stamp); static void ahci_alarm(clock_t stamp);
static int ahci_ioctl(dev_t minor, unsigned int request, endpoint_t endpt, static int ahci_ioctl(dev_t minor, unsigned int request, endpoint_t endpt,
cp_grant_id_t grant); cp_grant_id_t grant);
static void ahci_intr(unsigned int irqs); static void ahci_intr(unsigned int mask);
static int ahci_device(dev_t minor, device_id_t *id); static int ahci_device(dev_t minor, device_id_t *id);
static struct port_state *ahci_get_port(dev_t minor); static struct port_state *ahci_get_port(dev_t minor);
@ -1998,6 +1998,7 @@ static void ahci_init(int devind)
/* Retrieve, allocate and enable the controller's IRQ. */ /* Retrieve, allocate and enable the controller's IRQ. */
hba_state.irq = pci_attr_r8(devind, PCI_ILR); hba_state.irq = pci_attr_r8(devind, PCI_ILR);
hba_state.hook_id = 0;
if ((r = sys_irqsetpolicy(hba_state.irq, 0, &hba_state.hook_id)) != OK) if ((r = sys_irqsetpolicy(hba_state.irq, 0, &hba_state.hook_id)) != OK)
panic("unable to register IRQ: %d", r); panic("unable to register IRQ: %d", r);
@ -2090,7 +2091,7 @@ static void ahci_alarm(clock_t stamp)
/*===========================================================================* /*===========================================================================*
* ahci_intr * * ahci_intr *
*===========================================================================*/ *===========================================================================*/
static void ahci_intr(unsigned int UNUSED(irqs)) static void ahci_intr(unsigned int UNUSED(mask))
{ {
/* Process an interrupt. /* Process an interrupt.
*/ */

View file

@ -523,6 +523,7 @@ static void atl2_init(int devind)
panic("unable to allocate DMA buffers: %d", r); panic("unable to allocate DMA buffers: %d", r);
state.irq = pci_attr_r8(devind, PCI_ILR); state.irq = pci_attr_r8(devind, PCI_ILR);
state.hook_id = 0;
if ((r = sys_irqsetpolicy(state.irq, 0, &state.hook_id)) != OK) if ((r = sys_irqsetpolicy(state.irq, 0, &state.hook_id)) != OK)
panic("unable to register IRQ: %d", r); panic("unable to register IRQ: %d", r);

View file

@ -88,6 +88,7 @@ static int vbox_init(int UNUSED(type), sef_init_info_t *UNUSED(info))
port = pci_attr_r32(devind, PCI_BAR) & PCI_BAR_IO_MASK; port = pci_attr_r32(devind, PCI_BAR) & PCI_BAR_IO_MASK;
irq = pci_attr_r8(devind, PCI_ILR); irq = pci_attr_r8(devind, PCI_ILR);
hook_id = 0;
if ((r = sys_irqsetpolicy(irq, 0 /* IRQ_REENABLE */, &hook_id)) != OK) if ((r = sys_irqsetpolicy(irq, 0 /* IRQ_REENABLE */, &hook_id)) != OK)
panic("unable to register IRQ: %d", r); panic("unable to register IRQ: %d", r);