mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 19:26:32 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user