Discussion:
ISA non PNP interrupt issue
(too old to reply)
dsrking
2010-09-16 05:26:47 UTC
Permalink
Hi ,

i have one doubt regarding ISA non PNP interrupt handling. It is
clear for PNP interrupt handling is done by WDF layer. But for ISA non
PNP devices, we need to mention the interrupt number in LogConfig -
IRQConfig entry. I mentioned my interrupt number in IRQConfig entry.

But I did not get any interrupt for my device. should we do anything
inside the code for interrupt register and etc., for non pnp isa
device in WDF driver?

Currently I am using amcc5933 sample in WDK. For polling mode, i can
get interrupt but in interrupt mode, i didn't get any interrupt. So
only i got doubt in registering interrupt number, vector for isa non
pnp device.

Awaiting for response.

Thanks in advance.
D.
matt_sykes
2010-09-16 09:23:22 UTC
Permalink
Post by dsrking
Hi ,
i have one doubt regarding ISA non PNP interrupt handling. It is
clear for PNP interrupt handling is done by WDF layer. But for ISA non
PNP devices, we need to mention the interrupt number in LogConfig -
IRQConfig entry. I mentioned my interrupt number in IRQConfig entry.
But I did not get any interrupt for my device. should we do anything
inside the code for interrupt register and etc., for non pnp isa
device in WDF driver?
Currently I am using amcc5933 sample in WDK. For polling mode, i can
get interrupt but in interrupt mode, i didn't get any interrupt. So
only i got doubt in registering interrupt number, vector for isa non
pnp device.
Awaiting for response.
Thanks in advance.
D.
ISA? Hmm, that brings back memories...

You need a non shared, dedicated interruupt for an ISA card. (At least
for WDM drivers. For KMDF it *might* be different but I doubt it
since its only a wrapper).
dsrking
2010-09-16 10:57:14 UTC
Permalink
Thanks matt_sykes,

I have assigned a non shared, dedicated interrupt for my ISA device.
If we write driver in WDM, how can we register interrupts and
everything. If it is possible in WDM means, the advanced version of
WDF should support ISA interrupts, right?

Could you please clarify my doubts, whether it is possible to get
interrupt in WDF driver model?

Thanks in Advance,
D.
dsrking
2010-09-16 10:59:33 UTC
Permalink
Thanks maxim,
Post by Maxim S. Shatskih
Also: ISA interrupts are Latched and cannot be shared.
I don't know where we mentioned the ISA interrupts are Latched.
In .inf file, i mentioned the interrupt number as, "IRQConfig=5".

Regards,
D.
Don Burn
2010-09-16 13:05:52 UTC
Permalink
The default for IRQConfig is latched, so you are set.


Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Post by dsrking
Thanks maxim,
Post by Maxim S. Shatskih
Also: ISA interrupts are Latched and cannot be shared.
I don't know where we mentioned the ISA interrupts are Latched.
In .inf file, i mentioned the interrupt number as, "IRQConfig=5".
Regards,
D.
dsrking
2010-09-16 13:32:05 UTC
Permalink
Thanks DonBurn,

So my settings are correct (i.e., interrupts are latched). But what
settings I am missing, i didn't get any interrupt?

Regards,
D.
matt_sykes
2010-09-17 12:01:44 UTC
Permalink
Post by dsrking
Thanks matt_sykes,
I have assigned a non shared, dedicated interrupt for my ISA device.
If we write driver in WDM, how can we register interrupts and
everything.
Hmm, seem to recall the func is someting like
IoRegisterInterruptVector() and the IoConnectInterrupt() or somethign
like that for WDM drivers (and in fact for pre WDM too, which is the
last time I used it (NT4)). Have a butchers at the DDK (or WDK as it
is now called))
Post by dsrking
If it is possible in WDM means, the advanced version of
WDF should support ISA interrupts, right?
Could you please clarify my doubts, whether it is possible to get
interrupt in WDF driver model?
As for WDF cant help you, I havent used it.
Post by dsrking
Thanks in Advance,
D.
dsrking
2010-09-20 14:52:42 UTC
Permalink
hi matt_sykes,

I installed WinDDK 6000 and got WDM based PORTIO sample. There is no
code for interrupt registration. Is it possible to write a code for
non PNP (ISA) get Resources function like below??? (Note: I mentioned
the interrupt number in .inf file IRQConfig portion)

------------------------------------------------------------------------------------------------------------------------------
case CmResourceTypeInterrupt:
dx->GotInterrupt = true;
dx->Irql = (KIRQL)resource->u.Interrupt.Level;
dx->Vector = resource->u.Interrupt.Vector;
dx->Affinity = resource->u.Interrupt.Affinity;
dx->Mode = (resource->Flags == CM_RESOURCE_INTERRUPT_LATCHED)
? Latched : LevelSensitive;
KdPrint(("RetrieveResources: Interrupt vector %x IRQL %d Affinity
%d Mode %d",
dx->Vector, dx->Irql, dx->Affinity, dx->Mode));
break;

------------------------------------------------------------------------------------------------------------------------------

* there is no function like "IoRegisterInterruptVector()" what u
mentioned in your previous post.
* For WDM, how can we give interrupt number to driver like hard coded
or my above method is right (interrupt number in .inf and get the
interrupt resource in driver code)?

Thanks in Advance.

Regards,
D.
matt_sykes
2010-09-20 15:20:30 UTC
Permalink
Post by dsrking
hi matt_sykes,
I installed WinDDK 6000 and got WDM based PORTIO sample. There is no
code for interrupt registration. Is it possible to write a code for
non PNP (ISA) get Resources function like below??? (Note: I mentioned
the interrupt number in .inf file IRQConfig portion)
---------------------------------------------------------------------------­---------------------------------------------------
                        dx->GotInterrupt = true;
                        dx->Irql = (KIRQL)resource->u.Interrupt.Level;
                        dx->Vector = resource->u.Interrupt.Vector;
                        dx->Affinity = resource->u.Interrupt.Affinity;
                        dx->Mode = (resource->Flags == CM_RESOURCE_INTERRUPT_LATCHED)
                                ? Latched : LevelSensitive;
                        KdPrint(("RetrieveResources: Interrupt vector %x IRQL %d Affinity
%d Mode %d",
                                dx->Vector, dx->Irql, dx->Affinity, dx->Mode));
                        break;
---------------------------------------------------------------------------­---------------------------------------------------
* there is no function like "IoRegisterInterruptVector()" what u
mentioned in your previous post.
* For WDM, how can we give interrupt number to driver like hard coded
or my above method is right (interrupt number in .inf and get the
interrupt resource in driver code)?
Thanks in Advance.
Regards,
D.
You need to store the interrupt (and other resource requirements) in
the registry in the drivers service key. You read this at drive start
up and claim the resources.

As for the interrupt registration, I said its somehting like that.
Just look in the DDK till you find it.
Don Burn
2010-09-20 15:34:56 UTC
Permalink
You can't hardcode an interrupt in a driver for XP and later OS'es it
does not work. You will have to use a PnP style driver and have the
LogConfig section define the interrupt. Note: it is easy to have a
conflict at which point your driver loses.

Whether you can get this to work at all is another question. I played
with this years ago, and abandoned the effort since I controlled the
ACPI BIOS so could achieve the results in another fashion.


Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Post by dsrking
hi matt_sykes,
I installed WinDDK 6000 and got WDM based PORTIO sample. There is no
code for interrupt registration. Is it possible to write a code for
non PNP (ISA) get Resources function like below??? (Note: I mentioned
the interrupt number in .inf file IRQConfig portion)
------------------------------------------------------------------------------------------------------------------------------
dx->GotInterrupt = true;
dx->Irql = (KIRQL)resource->u.Interrupt.Level;
dx->Vector = resource->u.Interrupt.Vector;
dx->Affinity = resource->u.Interrupt.Affinity;
dx->Mode = (resource->Flags == CM_RESOURCE_INTERRUPT_LATCHED)
? Latched : LevelSensitive;
KdPrint(("RetrieveResources: Interrupt vector %x IRQL %d Affinity
%d Mode %d",
dx->Vector, dx->Irql, dx->Affinity, dx->Mode));
break;
------------------------------------------------------------------------------------------------------------------------------
* there is no function like "IoRegisterInterruptVector()" what u
mentioned in your previous post.
* For WDM, how can we give interrupt number to driver like hard coded
or my above method is right (interrupt number in .inf and get the
interrupt resource in driver code)?
Thanks in Advance.
Regards,
D.
matt_sykes
2010-09-20 21:54:20 UTC
Permalink
Post by Don Burn
You can't hardcode an interrupt in a driver for XP and later OS'es it
does not work.  You will have to use a PnP style driver and have the
LogConfig section define the interrupt.  Note: it is easy to have a
conflict at which point your driver loses.
Whether you can get this to work at all is another question.  I played
with this years ago, and abandoned the effort since I controlled the
ACPI BIOS so could achieve the results in another fashion.
Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website:http://www.windrvr.com
Blog:http://msmvps.com/blogs/WinDrvr
Post by dsrking
hi matt_sykes,
I installed WinDDK 6000 and got WDM based PORTIO sample. There is no
code for interrupt registration. Is it possible to write a code for
non PNP (ISA) get Resources function like below??? (Note: I mentioned
the interrupt number in .inf file IRQConfig portion)
------------------------------------------------------------------------------------------------------------------------------
                   dx->GotInterrupt = true;
                   dx->Irql = (KIRQL)resource->u.Interrupt.Level;
                   dx->Vector = resource->u.Interrupt.Vector;
                   dx->Affinity = resource->u.Interrupt.Affinity;
                   dx->Mode = (resource->Flags == CM_RESOURCE_INTERRUPT_LATCHED)
                           ? Latched : LevelSensitive;
                   KdPrint(("RetrieveResources: Interrupt vector %x IRQL %d Affinity
%d Mode %d",
                           dx->Vector, dx->Irql, dx->Affinity, dx->Mode));
                   break;
------------------------------------------------------------------------------------------------------------------------------
* there is no function like "IoRegisterInterruptVector()" what u
mentioned in your previous post.
* For WDM, how can we give interrupt number to driver like hard coded
or my above method is right (interrupt number in .inf and get the
interrupt resource in driver code)?
Thanks in Advance.
Regards,
D.
Hmm. So you are saying an NT 4 driver for an ISA card wouldnt work on
XP?
Don Burn
2010-09-20 22:31:13 UTC
Permalink
Absolutely not it will not work.


Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Post by matt_sykes
Post by Don Burn
You can't hardcode an interrupt in a driver for XP and later OS'es it
does not work.  You will have to use a PnP style driver and have the
LogConfig section define the interrupt.  Note: it is easy to have a
conflict at which point your driver loses.
Whether you can get this to work at all is another question.  I played
with this years ago, and abandoned the effort since I controlled the
ACPI BIOS so could achieve the results in another fashion.
Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website:http://www.windrvr.com
Blog:http://msmvps.com/blogs/WinDrvr
Post by dsrking
hi matt_sykes,
I installed WinDDK 6000 and got WDM based PORTIO sample. There is no
code for interrupt registration. Is it possible to write a code for
non PNP (ISA) get Resources function like below??? (Note: I mentioned
the interrupt number in .inf file IRQConfig portion)
------------------------------------------------------------------------------------------------------------------------------
                   dx->GotInterrupt = true;
                   dx->Irql = (KIRQL)resource->u.Interrupt.Level;
                   dx->Vector = resource->u.Interrupt.Vector;
                   dx->Affinity = resource->u.Interrupt.Affinity;
                   dx->Mode = (resource->Flags == CM_RESOURCE_INTERRUPT_LATCHED)
                           ? Latched : LevelSensitive;
                   KdPrint(("RetrieveResources: Interrupt vector %x IRQL %d Affinity
%d Mode %d",
                           dx->Vector, dx->Irql, dx->Affinity, dx->Mode));
                   break;
------------------------------------------------------------------------------------------------------------------------------
* there is no function like "IoRegisterInterruptVector()" what u
mentioned in your previous post.
* For WDM, how can we give interrupt number to driver like hard coded
or my above method is right (interrupt number in .inf and get the
interrupt resource in driver code)?
Thanks in Advance.
Regards,
D.
Hmm. So you are saying an NT 4 driver for an ISA card wouldnt work on
XP?
matt_sykes
2010-09-21 05:59:30 UTC
Permalink
Post by Don Burn
Absolutely not it will not work.
Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website:http://www.windrvr.com
Blog:http://msmvps.com/blogs/WinDrvr
Post by Don Burn
You can't hardcode an interrupt in a driver for XP and later OS'es it
does not work.  You will have to use a PnP style driver and have the
LogConfig section define the interrupt.  Note: it is easy to have a
conflict at which point your driver loses.
Whether you can get this to work at all is another question.  I played
with this years ago, and abandoned the effort since I controlled the
ACPI BIOS so could achieve the results in another fashion.
Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website:http://www.windrvr.com
Blog:http://msmvps.com/blogs/WinDrvr
Post by dsrking
hi matt_sykes,
I installed WinDDK 6000 and got WDM based PORTIO sample. There is no
code for interrupt registration. Is it possible to write a code for
non PNP (ISA) get Resources function like below??? (Note: I mentioned
the interrupt number in .inf file IRQConfig portion)
------------------------------------------------------------------------------------------------------------------------------
                   dx->GotInterrupt = true;
                   dx->Irql = (KIRQL)resource->u.Interrupt.Level;
                   dx->Vector = resource->u.Interrupt.Vector;
                   dx->Affinity = resource->u.Interrupt.Affinity;
                   dx->Mode = (resource->Flags == CM_RESOURCE_INTERRUPT_LATCHED)
                           ? Latched : LevelSensitive;
                   KdPrint(("RetrieveResources: Interrupt vector %x IRQL %d Affinity
%d Mode %d",
                           dx->Vector, dx->Irql, dx->Affinity, dx->Mode));
                   break;
------------------------------------------------------------------------------------------------------------------------------
* there is no function like "IoRegisterInterruptVector()" what u
mentioned in your previous post.
* For WDM, how can we give interrupt number to driver like hard coded
or my above method is right (interrupt number in .inf and get the
interrupt resource in driver code)?
Thanks in Advance.
Regards,
D.
Hmm.  So you are saying an NT 4 driver for an ISA card wouldnt work on
XP?
Thanks for correcting me Don. I always assumed that Microsoft
maintained backwards compatibility.
Maxim S. Shatskih
2010-09-21 07:56:17 UTC
Permalink
Post by matt_sykes
Hmm. So you are saying an NT 4 driver for an ISA card wouldnt work on
XP?
Non-PnP NT4 hardware drivers were obsoleted in w2k, but were working on w2k, though immediately disabling all power management features on the machine.

I don't know if they were completely dropped in XP, probably so. Even if not - the power management will be disabled.

The thing is that NT4 was not a widespread consumer OS, so the demand for drivers for it was low (mainly Ethernet and storage), with this small amount of drivers partly being miniports which are ported from Nt4 to w2k+ trivially. So, MS was not good at maintaining compat with NT4 hardware drivers.
--
Maxim S. Shatskih
Windows DDK MVP
***@storagecraft.com
http://www.storagecraft.com
matt_sykes
2010-09-30 13:38:37 UTC
Permalink
Post by Maxim S. Shatskih
Hmm.  So you are saying an NT 4 driver for an ISA card wouldnt work on
XP?
Non-PnP NT4 hardware drivers were obsoleted in w2k, but were working on w2k, though immediately disabling all power management features on the machine.
I don't know if they were completely dropped in XP, probably so. Even if not - the power management will be disabled.
The thing is that NT4 was not a widespread consumer OS, so the demand for drivers for it was low (mainly Ethernet and storage), with this small amount of drivers partly being miniports which are ported from Nt4 to w2k+ trivially. So, MS was not good at maintaining compat with NT4 hardware drivers.
--
Maxim S. Shatskih
Windows DDK MVP
Hmm, I didnt know that. Shows how long ago I worked with ISA!

Maxim S. Shatskih
2010-09-16 10:35:25 UTC
Permalink
Post by dsrking
But I did not get any interrupt for my device. should we do anything
Also: ISA interrupts are Latched and cannot be shared.
--
Maxim S. Shatskih
Windows DDK MVP
***@storagecraft.com
http://www.storagecraft.com
Loading...