ehci_alloc, ohci_alloc, uhci_alloc: Initialize DPC before connecting interrupt as the driver has to already be prepared to handle interrupts when calling IoConnectInterrupt.

svn path=/trunk/; revision=43639
This commit is contained in:
Michael Martin 2009-10-20 09:17:09 +00:00
parent 13c453792d
commit 65aa515215
3 changed files with 6 additions and 6 deletions

View file

@ -3682,6 +3682,8 @@ ehci_alloc(PDRIVER_OBJECT drvr_obj, PUNICODE_STRING reg_path, ULONG bus_addr, PU
pdev_ext->res_interrupt.level,
pdev_ext->res_interrupt.vector, &irql, &affinity);
KeInitializeDpc(&pdev_ext->ehci_dpc, ehci_dpc_callback, (PVOID) pdev_ext->ehci);
//connect the interrupt
DbgPrint("ehci_alloc(): the int=0x%x\n", vector);
if (IoConnectInterrupt(&pdev_ext->ehci_int, ehci_isr, pdev_ext->ehci, NULL, //&pdev_ext->ehci->frame_list_lock,
@ -3693,8 +3695,6 @@ ehci_alloc(PDRIVER_OBJECT drvr_obj, PUNICODE_STRING reg_path, ULONG bus_addr, PU
return NULL;
}
KeInitializeDpc(&pdev_ext->ehci_dpc, ehci_dpc_callback, (PVOID) pdev_ext->ehci);
return pdev;
}

View file

@ -479,6 +479,8 @@ ohci_alloc(PDRIVER_OBJECT drvr_obj, PUNICODE_STRING reg_path, ULONG bus_addr, PU
pdev_ext->res_interrupt.level,
pdev_ext->res_interrupt.vector, &irql, &affinity);
KeInitializeDpc(&pdev_ext->ehci_dpc, ehci_dpc_callback, (PVOID) pdev_ext->ehci);
//connect the interrupt
DbgPrint("ehci_alloc(): the int=0x%x\n", vector);
if ((status = IoConnectInterrupt(&pdev_ext->ehci_int, ehci_isr, pdev_ext->ehci, NULL, //&pdev_ext->ehci->frame_list_lock,
@ -490,8 +492,6 @@ ohci_alloc(PDRIVER_OBJECT drvr_obj, PUNICODE_STRING reg_path, ULONG bus_addr, PU
ehci_release(pdev);
return NULL;
}
KeInitializeDpc(&pdev_ext->ehci_dpc, ehci_dpc_callback, (PVOID) pdev_ext->ehci);
#endif
return pdev;

View file

@ -840,6 +840,8 @@ uhci_alloc(PDRIVER_OBJECT drvr_obj, PUNICODE_STRING reg_path, ULONG bus_addr, PU
&irql,
&affinity);
KeInitializeDpc(&pdev_ext->uhci_dpc, uhci_dpc_callback, (PVOID) pdev_ext->uhci);
//connect the interrupt
DbgPrint("uhci_alloc(): the int=0x%x\n", vector);
if (IoConnectInterrupt(&pdev_ext->uhci_int,
@ -859,8 +861,6 @@ uhci_alloc(PDRIVER_OBJECT drvr_obj, PUNICODE_STRING reg_path, ULONG bus_addr, PU
return NULL;
}
KeInitializeDpc(&pdev_ext->uhci_dpc, uhci_dpc_callback, (PVOID) pdev_ext->uhci);
return pdev;
}