fix IRQ lock problem on shared IRQ
This commit is contained in:
parent
845651c9ec
commit
2a9617b14f
|
@ -228,7 +228,8 @@ release_io_hfcpci(hfc_pci_t *hc)
|
||||||
static void
|
static void
|
||||||
reset_hfcpci(hfc_pci_t *hc)
|
reset_hfcpci(hfc_pci_t *hc)
|
||||||
{
|
{
|
||||||
long flags;
|
long flags;
|
||||||
|
u_char val;
|
||||||
|
|
||||||
save_flags(flags);
|
save_flags(flags);
|
||||||
cli();
|
cli();
|
||||||
|
@ -308,10 +309,7 @@ reset_hfcpci(hfc_pci_t *hc)
|
||||||
Write_hfc(hc, HFCPCI_B1_RSL, 0x80); /* B1-Slot 0 STIO2 in enabled */
|
Write_hfc(hc, HFCPCI_B1_RSL, 0x80); /* B1-Slot 0 STIO2 in enabled */
|
||||||
Write_hfc(hc, HFCPCI_B2_RSL, 0x81); /* B2-Slot 1 STIO2 in enabled */
|
Write_hfc(hc, HFCPCI_B2_RSL, 0x81); /* B2-Slot 1 STIO2 in enabled */
|
||||||
|
|
||||||
/* Finally enable IRQ output */
|
val = Read_hfc(hc, HFCPCI_INT_S2);
|
||||||
hc->hw.int_m2 = HFCPCI_IRQ_ENABLE;
|
|
||||||
Write_hfc(hc, HFCPCI_INT_M2, hc->hw.int_m2);
|
|
||||||
if (Read_hfc(hc, HFCPCI_INT_S2));
|
|
||||||
restore_flags(flags);
|
restore_flags(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2040,6 +2038,12 @@ static int init_card(hfc_pci_t *hc)
|
||||||
while (cnt) {
|
while (cnt) {
|
||||||
inithfcpci(hc);
|
inithfcpci(hc);
|
||||||
unlock_dev(hc);
|
unlock_dev(hc);
|
||||||
|
/* Finally enable IRQ output
|
||||||
|
* this is only allowed, if an IRQ routine is allready
|
||||||
|
* established for this HFC, so don't do that earlier
|
||||||
|
*/
|
||||||
|
hc->hw.int_m2 = HFCPCI_IRQ_ENABLE;
|
||||||
|
Write_hfc(hc, HFCPCI_INT_M2, hc->hw.int_m2);
|
||||||
/* Timeout 80ms */
|
/* Timeout 80ms */
|
||||||
current->state = TASK_UNINTERRUPTIBLE;
|
current->state = TASK_UNINTERRUPTIBLE;
|
||||||
schedule_timeout((80*HZ)/1000);
|
schedule_timeout((80*HZ)/1000);
|
||||||
|
@ -2209,9 +2213,9 @@ setup_hfcpci(hfc_pci_t *hc)
|
||||||
hc->irq, HZ);
|
hc->irq, HZ);
|
||||||
pcibios_write_config_word(hc->hw.pci_bus, hc->hw.pci_device_fn, PCI_COMMAND, PCI_ENA_MEMIO); /* enable memory mapped ports, disable busmaster */
|
pcibios_write_config_word(hc->hw.pci_bus, hc->hw.pci_device_fn, PCI_COMMAND, PCI_ENA_MEMIO); /* enable memory mapped ports, disable busmaster */
|
||||||
hc->hw.int_m2 = 0; /* disable alle interrupts */
|
hc->hw.int_m2 = 0; /* disable alle interrupts */
|
||||||
|
Write_hfc(hc, HFCPCI_INT_M2, hc->hw.int_m2);
|
||||||
hc->hw.int_m1 = 0;
|
hc->hw.int_m1 = 0;
|
||||||
Write_hfc(hc, HFCPCI_INT_M1, hc->hw.int_m1);
|
Write_hfc(hc, HFCPCI_INT_M1, hc->hw.int_m1);
|
||||||
Write_hfc(hc, HFCPCI_INT_M2, hc->hw.int_m2);
|
|
||||||
/* At this point the needed PCI config is done */
|
/* At this point the needed PCI config is done */
|
||||||
/* fifos are still not enabled */
|
/* fifos are still not enabled */
|
||||||
hc->hw.timer.function = (void *) hfcpci_Timer;
|
hc->hw.timer.function = (void *) hfcpci_Timer;
|
||||||
|
|
Loading…
Reference in New Issue