From: Don Burn on
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



"dsrking" <dsrking2006(a)gmail.com> wrote in message
news:52886119-d633-4358-b59a-9b21834bb918(a)q26g2000vbn.googlegroups.com:

> 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.

From: matt_sykes on
On 20 Sep, 17:34, "Don Burn" <b...(a)windrvr.com> wrote:
> 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
>
> "dsrking" <dsrking2...(a)gmail.com> wrote in message
>
> news:52886119-d633-4358-b59a-9b21834bb918(a)q26g2000vbn.googlegroups.com:
>
> > 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.

Hmm. So you are saying an NT 4 driver for an ISA card wouldnt work on
XP?
From: Don Burn on
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




"matt_sykes" <zzebowa(a)hotmail.com> wrote in message
news:639bfa76-3615-40ad-a270-1a09444cc29d(a)q9g2000vbd.googlegroups.com:

> On 20 Sep, 17:34, "Don Burn" <b...(a)windrvr.com> wrote:
> > 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
> >
> > "dsrking" <dsrking2...(a)gmail.com> wrote in message
> >
> > news:52886119-d633-4358-b59a-9b21834bb918(a)q26g2000vbn.googlegroups.com:
> >
> > > 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.
>
> Hmm. So you are saying an NT 4 driver for an ISA card wouldnt work on
> XP?

From: matt_sykes on
On 21 Sep, 00:31, "Don Burn" <b...(a)windrvr.com> wrote:
> 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
>
> "matt_sykes" <zzeb...(a)hotmail.com> wrote in message
>
> news:639bfa76-3615-40ad-a270-1a09444cc29d(a)q9g2000vbd.googlegroups.com:
>
> > On 20 Sep, 17:34, "Don Burn" <b...(a)windrvr.com> wrote:
> > > 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
>
> > > "dsrking" <dsrking2...(a)gmail.com> wrote in message
>
> > >news:52886119-d633-4358-b59a-9b21834bb918(a)q26g2000vbn.googlegroups.com:
>
> > > > 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.
>
> > 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.
From: Maxim S. Shatskih on
>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
maxim(a)storagecraft.com
http://www.storagecraft.com