Author: navaraf Date: Mon May 26 13:32:40 2008 New Revision: 33717
URL: http://svn.reactos.org/svn/reactos?rev=33717&view=rev Log: Fix incorrect logic in IntVideoPortSetupInterrupt and add comment.
Modified: trunk/reactos/drivers/video/videoprt/interrupt.c
Modified: trunk/reactos/drivers/video/videoprt/interrupt.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/inte... ============================================================================== --- trunk/reactos/drivers/video/videoprt/interrupt.c [iso-8859-1] (original) +++ trunk/reactos/drivers/video/videoprt/interrupt.c [iso-8859-1] Mon May 26 13:32:40 2008 @@ -48,13 +48,17 @@
DeviceExtension = (PVIDEO_PORT_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
- if (ConfigInfo->BusInterruptVector == 0) - ConfigInfo->BusInterruptVector = DeviceExtension->InterruptVector; + /* + * MSDN documentation for VIDEO_PORT_CONFIG_INFO states: "If a miniport driver's + * HwVidFindAdapter function finds that the video adapter does not generate + * interrupts or that it cannot determine a valid interrupt vector/level for + * the adapter, HwVidFindAdapter should set both BusInterruptVector and + * BusInterruptLevel to zero. + */
- if (ConfigInfo->BusInterruptLevel == 0) - ConfigInfo->BusInterruptLevel = DeviceExtension->InterruptLevel; - - if (DriverExtension->InitializationData.HwInterrupt != NULL) + if (DriverExtension->InitializationData.HwInterrupt != NULL && + ConfigInfo->BusInterruptLevel != 0 && + ConfigInfo->BusInterruptVector != 0) { ULONG InterruptVector; KIRQL Irql;