none
IRQ enable in storport miniport driver? RRS feed

  • Question

  • Hello,

    In my storport miniport driver for SAS HBA, do I need to enable the IRQ line for interrupt handling? I ask this because in Linux driver, we call request_irq() call which registers the interrupt handler and enables IRQ line

    In my miniport DriverEntry routine, I am initializing HW_Initialization_data structure with following data:
    HwInitData.HwInterrupt = MyISR. Where MyISR is the interrupt handler routine

    After this:
    1) In the driver, do I need to enable IRQ line?
    2) How can I access IRQ information in the driver?
    3) I can get the interrupt status information from chip register, I can read it in the ISR. But if I don't enable the IRQ line, how will MyISR be called by the OS when the hardware interrupts?

    Sunday, March 11, 2018 7:08 AM

Answers

  • Once you have the adapter configuration you can access the hardware registers using StorPortReadXXX and StopPortWriteXXX functions.  The interrupt routine is set up in the PORT_CONFIGURATION_INFORMATION and will be called when the interrupt fires.  The registers you wish to modify in your interrupt routine need to be protected by the StorPortAquireSpinLock with the interrupt lock.


    Don Burn Windows Driver Consulting Website: http://www.windrvr.com

    • Marked as answer by P Krish Sunday, March 11, 2018 6:53 PM
    Sunday, March 11, 2018 10:54 AM

All replies

  • Once you have the adapter configuration you can access the hardware registers using StorPortReadXXX and StopPortWriteXXX functions.  The interrupt routine is set up in the PORT_CONFIGURATION_INFORMATION and will be called when the interrupt fires.  The registers you wish to modify in your interrupt routine need to be protected by the StorPortAquireSpinLock with the interrupt lock.


    Don Burn Windows Driver Consulting Website: http://www.windrvr.com

    • Marked as answer by P Krish Sunday, March 11, 2018 6:53 PM
    Sunday, March 11, 2018 10:54 AM
  • Thanks
    Sunday, March 11, 2018 6:53 PM