In the recent study of Storport miniport Driver, when you see interrupt, there are two ways to respond by Hw_initialization_data function in Storport (hwinterrupt). Support line-based interrupts and message-based interrupts; another is through Port_configuration_information (Storport) Hwmsinterruptroutine in response to message-based interrupts.
These two ways have tried, so far not clear their differences, such as the prawns know, but also please enlighten ~
The first way, through the hw_initialization_data in the Hwinterrupt function to respond, relatively simple, only to set the corresponding function in DriverEntry. Seems to be able to respond to all of the interrupts, the author found in the process of a lot of non-device interrupt.
The second approach is relatively complex, and you need to set the parameters in the port_configuration_information in Hwfindadatper:
Phw_message_signaled_interrupt_routine Hwmsinterruptroutine;
Interrupt_synchronization_mode Interruptsynchronizationmode;
Where Hwmsinterruptrountine is the MSI response function, Interruptsynchronizationmode is the MSI synchronization mode supported by miniport, with the following values:
typedef enum _INTERRUPT_SYNCHRONIZATION_MODE {
Interruptsupportnone,
Interruptsynchronizeall,
Interruptsynchronizepermessage
} Interrupt_synchronization_mode;
Can be based on the needs of the value, the author only tried the Interruptsynchronizeall way.
In addition, the following items need to be added to the installation file *.inf:
This'll create entries under:
//hkey_local_machine\system\currentcontrolset\enum\pci\ven_xxxx&
// Dev_yyyy&subsys_zzzzvvvv&rev_xx\3&61aaa01&0&fa\device
//Parameters\interrupt Management \messagesignaledinterruptproperties
[XYZdriver_Inst.nt.HW]
AddReg = Msienable_addreg
[msienable_ AddReg]
HKR, Interrupt management\messagesignaledinterruptproperties, 0x00000010 HKR
, Interrupt management\ Messagesignaledinterruptproperties, msisupported, 0x00010001, 1
//This code courtesy of Adaptec Corporation
indicates that miniport supports MSI, or that your miniport supports MSI, and that your hwmsinterruptrountine will not be invoked.