Hi all
I have the follow problem and although I am trying for over a week I
cannot find a solution.
I have 6 drivers 4 of them use the serial port hardware and two the
parallel port hardware.
All of them are kernel (not WDM) drivers.
The serial port drivers use the serial port in not standard mode and the
same is true also for the parallel.
Their usage is transparent to the user.
The user mode program disables the serial/parallel port using the
setupapi functionality then installs my driver and start it.
After that I use createfile to gain access to it etc etc etc.
On exit the user mode program stops and uninstalls my driver and enables
the win driver leaving the system in its initial state.
The drivers work ok (under win2000/XP) if the motherboard has no ACPI
support.
If it has then although everything works fine the serial/parallel chip
is dead. It seems that the pnp manager when disables the device cuts off
also the power.
Now the Question, is there any way to power again the device??
I wrote a WDM driver to access the hardware but although it installs ok
it cannot claim the port resources.
Although the windows driver for the serial/parallel port is disabled the
PNP manager still reserves the resources and I cannot gain control over
them.
I understand that I have to cut and try different approaches but I
wonder if anyone of you has a suggestion that will save me time.
(SV2AGW) George Rossopoulos
www.elcom.gr/sv2agw
xxxxx@elcom.gr
+306932 465 216
> Now the Question, is there any way to power again the device??
All known to me modern SuperIO chips are ACPI-ready. So if you unload driver
for serial port
hardware always comes to D3 state (see power.c file of serial driver from
DDK). This means,
your driver doesn’t properly implement power management. You should
implement your device
as an owner of power policy and force device stack to D0 before any
read/write operation.
By the way, the easiest way is to write filter driver and leave native
driver intact.
Sincerely,
Igor V. Slewsarev
Hi Igor
Thank you for the reply. I considered of a filter driver but I need
access to ISR routines and I am not sure of how to implement it as lower
driver.
Have you any suggestions for reading or even better an example?
regards
(SV2AGW) George Rossopoulos
www.elcom.gr/sv2agw
xxxxx@elcom.gr
+306932 465 216
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Igor Slewsarev
Sent: Wednesday, November 05, 2003 11:32 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: How to deal with ACPI?
> Now the Question, is there any way to power again the device??
All known to me modern SuperIO chips are ACPI-ready. So if
you unload driver for serial port hardware always comes to D3
state (see power.c file of serial driver from DDK). This
means, your driver doesn’t properly implement power
management. You should implement your device as an owner of
power policy and force device stack to D0 before any
read/write operation. By the way, the easiest way is to write
filter driver and leave native driver intact.
Sincerely,
Igor V. Slewsarev
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@softhome.net To
unsubscribe send a blank email to xxxxx@lists.osr.com
Hi!
Have you any suggestions for reading or even better an example?
Yes, I have; but IMHO rewriting existing old-style drivers is the preferable
way.
(read W. Oney’s “Programming the Microsoft Windows Driver Model” - the book
for all
times and nations).
If you really want to directly prevent COM port from going down, I’ll send
you code. Only
please notice - this is a dirty trick, so think twice before using it.
Sincerely,
Igor V. Slewsarev
I think perhaps you need to rewrite your replacement serial driver as a WDM
driver so that you can get power management support.
=====================
Mark Roddy
-----Original Message-----
From: (SV2AGW) George Rossopoulos [mailto:xxxxx@softhome.net]
Sent: Wednesday, November 05, 2003 5:56 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: How to deal with ACPI?
Hi Igor
Thank you for the reply. I considered of a filter driver but
I need access to ISR routines and I am not sure of how to
implement it as lower driver.
Have you any suggestions for reading or even better an example?
regards
(SV2AGW) George Rossopoulos
www.elcom.gr/sv2agw
xxxxx@elcom.gr
+306932 465 216
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Igor
Slewsarev
> Sent: Wednesday, November 05, 2003 11:32 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Re: How to deal with ACPI?
>
>
> > Now the Question, is there any way to power again the device??
> All known to me modern SuperIO chips are ACPI-ready. So if
you unload
> driver for serial port hardware always comes to D3 state
(see power.c
> file of serial driver from DDK). This means, your driver doesn’t
> properly implement power management. You should implement
your device
> as an owner of power policy and force device stack to D0 before any
> read/write operation. By the way, the easiest way is to
write filter
> driver and leave native driver intact.
>
> Sincerely,
> Igor V. Slewsarev
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@softhome.net To
unsubscribe send a blank email to xxxxx@lists.osr.com
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Hi Igor
Thank you I am waiting the code, just to get the idea.
I have W.Oney’s Book but I could say it is not of much help, it is not
written very well, too many thinks in different places.
I wish Art Baker to publish a book on WDM…
Thank you
(SV2AGW) George Rossopoulos
www.elcom.gr/sv2agw
xxxxx@elcom.gr
+306932 465 216
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Igor Slewsarev
Sent: Wednesday, November 05, 2003 3:35 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: How to deal with ACPI?
Hi!
> Have you any suggestions for reading or even better an example?
Yes, I have; but IMHO rewriting existing old-style drivers is
the preferable way. (read W. Oney’s “Programming the
Microsoft Windows Driver Model” - the book for all times and
nations). If you really want to directly prevent COM port
from going down, I’ll send you code. Only please notice -
this is a dirty trick, so think twice before using it.
Sincerely,
Igor V. Slewsarev
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@softhome.net To
unsubscribe send a blank email to xxxxx@lists.osr.com
There’s more to it than that.
Igor, the system is shutting off the device because it believes that there
is no active driver associated with it. In order to work around this
behavior, you need to make sure that your device is clearly associated with
the node in the ACPI BIOS that is being shut off. In order to do that, you
need to have a WDM driver loaded on top of the PDO that the ACPI driver is
enumerating.
Several people suggested that you write a WDM filter driver, which would
certainly get you into the stack on top of the right PDO. But what I think
that you really need to do is write an FDO, not a filter, that completely
replaces the in-box serial driver. This will also remove your need to
programmatically disable the in-box serial driver using SetupDi*.
Write your FDO, then create an INF that has a more specific match for the
serial port than the INF that we ship in the box. Your driver will then be
preferentially loaded (signing issues aside.)
–
Jake Oshins
Windows Base Kernel Team
This posting is provided “AS IS” with no warranties, and confers no rights.
OR if you wish to include a script sample in your post please add “Use of
included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm”
“Roddy, Mark” wrote in message news:xxxxx@ntdev…
>
> I think perhaps you need to rewrite your replacement serial driver as a
WDM
> driver so that you can get power management support.
>
>
> =====================
> Mark Roddy
>
>
> > -----Original Message-----
> > From: (SV2AGW) George Rossopoulos [mailto:xxxxx@softhome.net]
> > Sent: Wednesday, November 05, 2003 5:56 AM
> > To: Windows System Software Devs Interest List
> > Subject: [ntdev] Re: How to deal with ACPI?
> >
> > Hi Igor
> >
> > Thank you for the reply. I considered of a filter driver but
> > I need access to ISR routines and I am not sure of how to
> > implement it as lower driver.
> > Have you any suggestions for reading or even better an example?
> >
> > regards
> >
> > (SV2AGW) George Rossopoulos
> > www.elcom.gr/sv2agw
> > xxxxx@elcom.gr
> > +306932 465 216
> >
> > > -----Original Message-----
> > > From: xxxxx@lists.osr.com
> > > [mailto:xxxxx@lists.osr.com] On Behalf Of Igor
> > Slewsarev
> > > Sent: Wednesday, November 05, 2003 11:32 AM
> > > To: Windows System Software Devs Interest List
> > > Subject: [ntdev] Re: How to deal with ACPI?
> > >
> > >
> > > > Now the Question, is there any way to power again the device??
> > > All known to me modern SuperIO chips are ACPI-ready. So if
> > you unload
> > > driver for serial port hardware always comes to D3 state
> > (see power.c
> > > file of serial driver from DDK). This means, your driver doesn’t
> > > properly implement power management. You should implement
> > your device
> > > as an owner of power policy and force device stack to D0 before any
> > > read/write operation. By the way, the easiest way is to
> > write filter
> > > driver and leave native driver intact.
> > >
> > > Sincerely,
> > > Igor V. Slewsarev
> > >
> > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@softhome.net To
> > unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@stratus.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
>