WMI problem

I encountered strange problem with our USB device. Under some circumstances
it can quickly diconnect and connetc back USB (reason is irrelevant). As
expected, old device is removed and new one created. There is an application
which has opened handle to the old device and when detects problem, closes
it and allows finishing device removal. It takes some time and usually new
device is already available. So far so well. But if new device registers WMI
before old device deregisters it, WMI for new device stops work. The result
is Power Management tab in device manager properties for new device isn’t
available.

If old device deregistration is called before new device registration,
everything is correct. I verified IoWMIRegistrationControl() is called with
two different (and proper) device objects. Tested on XP SP1.

Best regards,

Michal Vodicka
STMicroelectronics Design and Application s.r.o.
[michal.vodicka@st.com, http:://www.st.com]

Are you unregistering from wmi in surprise remove or in remove device?
If in remove, it needs to happen during surprise remove (along with the
device interface state).

D

This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Tuesday, March 02, 2004 9:02 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] WMI problem

I encountered strange problem with our USB device. Under some
circumstances
it can quickly diconnect and connetc back USB (reason is irrelevant). As
expected, old device is removed and new one created. There is an
application
which has opened handle to the old device and when detects problem,
closes
it and allows finishing device removal. It takes some time and usually
new
device is already available. So far so well. But if new device registers
WMI
before old device deregisters it, WMI for new device stops work. The
result
is Power Management tab in device manager properties for new device
isn’t
available.

If old device deregistration is called before new device registration,
everything is correct. I verified IoWMIRegistrationControl() is called
with
two different (and proper) device objects. Tested on XP SP1.

Best regards,

Michal Vodicka
STMicroelectronics Design and Application s.r.o.
[michal.vodicka@st.com, http:://www.st.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@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

From remove device as BulkUsb DDK sample does. Do you mean all DDK WDM
samples are wrong? Every one deregisters WMI from remove device and not
surprise remove.

Also, I found at least three times in DDK docs something like this:

WMI does not send an IRP_MN_REGINFO_EX request after a driver calls
IoWMIRegistrationControl with WMIREG_ACTION_DEREGISTER, because WMI requires
no further information from the driver. A driver typically deregisters its
blocks in response to an IRP_MN_REMOVE_DEVICE request.

You’re probably right after deregistering from surpise remove problem would
disappear but it seems it would only conceal symptoms and not solve real
problem. The real problem as I see it is deregistration for one device
influences other one.

Best regards,

Michal Vodicka
STMicroelectronics Design and Application s.r.o.
[michal.vodicka@st.com, http:://www.st.com]


From:
xxxxx@windows.microsoft.com[SMTP:xxxxx@windows.microsoft.com]
Reply To: xxxxx@lists.osr.com
Sent: Wednesday, March 03, 2004 7:22 AM
To: xxxxx@lists.osr.com
Subject: RE: [ntdev] WMI problem

Are you unregistering from wmi in surprise remove or in remove device?
If in remove, it needs to happen during surprise remove (along with the
device interface state).

D

This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Tuesday, March 02, 2004 9:02 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] WMI problem

I encountered strange problem with our USB device. Under some
circumstances
it can quickly diconnect and connetc back USB (reason is irrelevant). As
expected, old device is removed and new one created. There is an
application
which has opened handle to the old device and when detects problem,
closes
it and allows finishing device removal. It takes some time and usually
new
device is already available. So far so well. But if new device registers
WMI
before old device deregisters it, WMI for new device stops work. The
result
is Power Management tab in device manager properties for new device
isn’t
available.

If old device deregistration is called before new device registration,
everything is correct. I verified IoWMIRegistrationControl() is called
with
two different (and proper) device objects. Tested on XP SP1.

Best regards,

Michal Vodicka
STMicroelectronics Design and Application s.r.o.
[michal.vodicka@st.com, http:://www.st.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@windows.microsoft.com
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: michal.vodicka@st.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

That’s b/c the device path is what is used to create the unique name for
wmi guid or device interface. Since 2 devices can exist with the same
path in the surprise remove case (one is remove pending), you must do
this in surprise remove. I will get the docs and samples fixed to
reflect this.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Wednesday, March 03, 2004 11:24 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] WMI problem

From remove device as BulkUsb DDK sample does. Do you mean all DDK WDM
samples are wrong? Every one deregisters WMI from remove device and not
surprise remove.

Also, I found at least three times in DDK docs something like this:

WMI does not send an IRP_MN_REGINFO_EX request after a driver calls
IoWMIRegistrationControl with WMIREG_ACTION_DEREGISTER, because WMI
requires
no further information from the driver. A driver typically deregisters
its
blocks in response to an IRP_MN_REMOVE_DEVICE request.

You’re probably right after deregistering from surpise remove problem
would
disappear but it seems it would only conceal symptoms and not solve real
problem. The real problem as I see it is deregistration for one device
influences other one.

Best regards,

Michal Vodicka
STMicroelectronics Design and Application s.r.o.
[michal.vodicka@st.com, http:://www.st.com]


From:
xxxxx@windows.microsoft.com[SMTP:xxxxx@windows.microsoft.com]
Reply To: xxxxx@lists.osr.com
Sent: Wednesday, March 03, 2004 7:22 AM
To: xxxxx@lists.osr.com
Subject: RE: [ntdev] WMI problem

Are you unregistering from wmi in surprise remove or in remove device?
If in remove, it needs to happen during surprise remove (along with
the
device interface state).

D

This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Tuesday, March 02, 2004 9:02 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] WMI problem

I encountered strange problem with our USB device. Under some
circumstances
it can quickly diconnect and connetc back USB (reason is irrelevant).
As
expected, old device is removed and new one created. There is an
application
which has opened handle to the old device and when detects problem,
closes
it and allows finishing device removal. It takes some time and usually
new
device is already available. So far so well. But if new device
registers
WMI
before old device deregisters it, WMI for new device stops work. The
result
is Power Management tab in device manager properties for new device
isn’t
available.

If old device deregistration is called before new device registration,
everything is correct. I verified IoWMIRegistrationControl() is called
with
two different (and proper) device objects. Tested on XP SP1.

Best regards,

Michal Vodicka
STMicroelectronics Design and Application s.r.o.
[michal.vodicka@st.com, http:://www.st.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@windows.microsoft.com
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: michal.vodicka@st.com
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@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

OK, I understand. Thanks.

Best regards,

Michal Vodicka
STMicroelectronics Design and Application s.r.o.
[michal.vodicka@st.com, http:://www.st.com]


From:
xxxxx@windows.microsoft.com[SMTP:xxxxx@windows.microsoft.com]
Reply To: xxxxx@lists.osr.com
Sent: Wednesday, March 03, 2004 11:12 PM
To: xxxxx@lists.osr.com
Subject: RE: [ntdev] WMI problem

That’s b/c the device path is what is used to create the unique name for
wmi guid or device interface. Since 2 devices can exist with the same
path in the surprise remove case (one is remove pending), you must do
this in surprise remove. I will get the docs and samples fixed to
reflect this.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Wednesday, March 03, 2004 11:24 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] WMI problem

From remove device as BulkUsb DDK sample does. Do you mean all DDK WDM
samples are wrong? Every one deregisters WMI from remove device and not
surprise remove.

Also, I found at least three times in DDK docs something like this:

WMI does not send an IRP_MN_REGINFO_EX request after a driver calls
IoWMIRegistrationControl with WMIREG_ACTION_DEREGISTER, because WMI
requires
no further information from the driver. A driver typically deregisters
its
blocks in response to an IRP_MN_REMOVE_DEVICE request.

You’re probably right after deregistering from surpise remove problem
would
disappear but it seems it would only conceal symptoms and not solve real
problem. The real problem as I see it is deregistration for one device
influences other one.

Best regards,

Michal Vodicka
STMicroelectronics Design and Application s.r.o.
[michal.vodicka@st.com, http:://www.st.com]

> ----------
> From:
> xxxxx@windows.microsoft.com[SMTP:xxxxx@windows.microsoft.com]
> Reply To: xxxxx@lists.osr.com
> Sent: Wednesday, March 03, 2004 7:22 AM
> To: xxxxx@lists.osr.com
> Subject: RE: [ntdev] WMI problem
>
> Are you unregistering from wmi in surprise remove or in remove device?
> If in remove, it needs to happen during surprise remove (along with
the
> device interface state).
>
> D
>
> This posting is provided “AS IS” with no warranties, and confers no
> rights.
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
> Sent: Tuesday, March 02, 2004 9:02 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] WMI problem
>
> I encountered strange problem with our USB device. Under some
> circumstances
> it can quickly diconnect and connetc back USB (reason is irrelevant).
As
> expected, old device is removed and new one created. There is an
> application
> which has opened handle to the old device and when detects problem,
> closes
> it and allows finishing device removal. It takes some time and usually
> new
> device is already available. So far so well. But if new device
registers
> WMI
> before old device deregisters it, WMI for new device stops work. The
> result
> is Power Management tab in device manager properties for new device
> isn’t
> available.
>
> If old device deregistration is called before new device registration,
> everything is correct. I verified IoWMIRegistrationControl() is called
> with
> two different (and proper) device objects. Tested on XP SP1.
>
> Best regards,
>
> Michal Vodicka
> STMicroelectronics Design and Application s.r.o.
> [michal.vodicka@st.com, http:://www.st.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@windows.microsoft.com
> 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: michal.vodicka@st.com
> 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@windows.microsoft.com
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: michal.vodicka@st.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Thank you for pointing out the samples and docs need fixing! The
appropriate owners have been notified / bugged.

Thx
d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Wednesday, March 03, 2004 2:42 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] WMI problem

OK, I understand. Thanks.

Best regards,

Michal Vodicka
STMicroelectronics Design and Application s.r.o.
[michal.vodicka@st.com, http:://www.st.com]


From:
xxxxx@windows.microsoft.com[SMTP:xxxxx@windows.microsoft.com]
Reply To: xxxxx@lists.osr.com
Sent: Wednesday, March 03, 2004 11:12 PM
To: xxxxx@lists.osr.com
Subject: RE: [ntdev] WMI problem

That’s b/c the device path is what is used to create the unique name
for
wmi guid or device interface. Since 2 devices can exist with the same
path in the surprise remove case (one is remove pending), you must do
this in surprise remove. I will get the docs and samples fixed to
reflect this.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Wednesday, March 03, 2004 11:24 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] WMI problem

From remove device as BulkUsb DDK sample does. Do you mean all DDK
WDM
samples are wrong? Every one deregisters WMI from remove device and
not
surprise remove.

Also, I found at least three times in DDK docs something like this:

WMI does not send an IRP_MN_REGINFO_EX request after a driver calls
IoWMIRegistrationControl with WMIREG_ACTION_DEREGISTER, because WMI
requires
no further information from the driver. A driver typically deregisters
its
blocks in response to an IRP_MN_REMOVE_DEVICE request.

You’re probably right after deregistering from surpise remove problem
would
disappear but it seems it would only conceal symptoms and not solve
real
problem. The real problem as I see it is deregistration for one device
influences other one.

Best regards,

Michal Vodicka
STMicroelectronics Design and Application s.r.o.
[michal.vodicka@st.com, http:://www.st.com]

> ----------
> From:
> xxxxx@windows.microsoft.com[SMTP:xxxxx@windows.microsoft.com]
> Reply To: xxxxx@lists.osr.com
> Sent: Wednesday, March 03, 2004 7:22 AM
> To: xxxxx@lists.osr.com
> Subject: RE: [ntdev] WMI problem
>
> Are you unregistering from wmi in surprise remove or in remove
device?
> If in remove, it needs to happen during surprise remove (along with
the
> device interface state).
>
> D
>
> This posting is provided “AS IS” with no warranties, and confers no
> rights.
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Michal
Vodicka
> Sent: Tuesday, March 02, 2004 9:02 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] WMI problem
>
> I encountered strange problem with our USB device. Under some
> circumstances
> it can quickly diconnect and connetc back USB (reason is
irrelevant).
As
> expected, old device is removed and new one created. There is an
> application
> which has opened handle to the old device and when detects problem,
> closes
> it and allows finishing device removal. It takes some time and
usually
> new
> device is already available. So far so well. But if new device
registers
> WMI
> before old device deregisters it, WMI for new device stops work. The
> result
> is Power Management tab in device manager properties for new device
> isn’t
> available.
>
> If old device deregistration is called before new device
registration,
> everything is correct. I verified IoWMIRegistrationControl() is
called
> with
> two different (and proper) device objects. Tested on XP SP1.
>
> Best regards,
>
> Michal Vodicka
> STMicroelectronics Design and Application s.r.o.
> [michal.vodicka@st.com, http:://www.st.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@windows.microsoft.com
> 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: michal.vodicka@st.com
> 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@windows.microsoft.com
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: michal.vodicka@st.com
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@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

That’s great. I can confirm it apparently solves problem. Hopefully surprise
removal is always sent before new device arrival (I can see about 2 sec time
difference for 50 ms disconnect).

Best regards,

Michal Vodicka
STMicroelectronics Design and Application s.r.o.
[michal.vodicka@st.com, http:://www.st.com]


From:
xxxxx@windows.microsoft.com[SMTP:xxxxx@windows.microsoft.com]
Reply To: xxxxx@lists.osr.com
Sent: Wednesday, March 03, 2004 11:51 PM
To: xxxxx@lists.osr.com
Subject: RE: [ntdev] WMI problem

Thank you for pointing out the samples and docs need fixing! The
appropriate owners have been notified / bugged.

Thx
d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Wednesday, March 03, 2004 2:42 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] WMI problem

OK, I understand. Thanks.

Best regards,

Michal Vodicka
STMicroelectronics Design and Application s.r.o.
[michal.vodicka@st.com, http:://www.st.com]

> ----------
> From:
> xxxxx@windows.microsoft.com[SMTP:xxxxx@windows.microsoft.com]
> Reply To: xxxxx@lists.osr.com
> Sent: Wednesday, March 03, 2004 11:12 PM
> To: xxxxx@lists.osr.com
> Subject: RE: [ntdev] WMI problem
>
> That’s b/c the device path is what is used to create the unique name
for
> wmi guid or device interface. Since 2 devices can exist with the same
> path in the surprise remove case (one is remove pending), you must do
> this in surprise remove. I will get the docs and samples fixed to
> reflect this.
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
> Sent: Wednesday, March 03, 2004 11:24 AM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] WMI problem
>
> From remove device as BulkUsb DDK sample does. Do you mean all DDK
WDM
> samples are wrong? Every one deregisters WMI from remove device and
not
> surprise remove.
>
> Also, I found at least three times in DDK docs something like this:
> -------
> WMI does not send an IRP_MN_REGINFO_EX request after a driver calls
> IoWMIRegistrationControl with WMIREG_ACTION_DEREGISTER, because WMI
> requires
> no further information from the driver. A driver typically deregisters
> its
> blocks in response to an IRP_MN_REMOVE_DEVICE request.
> -------
>
> You’re probably right after deregistering from surpise remove problem
> would
> disappear but it seems it would only conceal symptoms and not solve
real
> problem. The real problem as I see it is deregistration for one device
> influences other one.
>
> Best regards,
>
> Michal Vodicka
> STMicroelectronics Design and Application s.r.o.
> [michal.vodicka@st.com, http:://www.st.com]
>
> > ----------
> > From:
> > xxxxx@windows.microsoft.com[SMTP:xxxxx@windows.microsoft.com]
> > Reply To: xxxxx@lists.osr.com
> > Sent: Wednesday, March 03, 2004 7:22 AM
> > To: xxxxx@lists.osr.com
> > Subject: RE: [ntdev] WMI problem
> >
> > Are you unregistering from wmi in surprise remove or in remove
device?
> > If in remove, it needs to happen during surprise remove (along with
> the
> > device interface state).
> >
> > D
> >
> > This posting is provided “AS IS” with no warranties, and confers no
> > rights.
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of Michal
Vodicka
> > Sent: Tuesday, March 02, 2004 9:02 PM
> > To: Windows System Software Devs Interest List
> > Subject: [ntdev] WMI problem
> >
> > I encountered strange problem with our USB device. Under some
> > circumstances
> > it can quickly diconnect and connetc back USB (reason is
irrelevant).
> As
> > expected, old device is removed and new one created. There is an
> > application
> > which has opened handle to the old device and when detects problem,
> > closes
> > it and allows finishing device removal. It takes some time and
usually
> > new
> > device is already available. So far so well. But if new device
> registers
> > WMI
> > before old device deregisters it, WMI for new device stops work. The
> > result
> > is Power Management tab in device manager properties for new device
> > isn’t
> > available.
> >
> > If old device deregistration is called before new device
registration,
> > everything is correct. I verified IoWMIRegistrationControl() is
called
> > with
> > two different (and proper) device objects. Tested on XP SP1.
> >
> > Best regards,
> >
> > Michal Vodicka
> > STMicroelectronics Design and Application s.r.o.
> > [michal.vodicka@st.com, http:://www.st.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@windows.microsoft.com
> > 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: michal.vodicka@st.com
> > 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@windows.microsoft.com
> 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: michal.vodicka@st.com
> 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@windows.microsoft.com
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: michal.vodicka@st.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

yes, during query device relations, removals must be processed before
arrivals for this very reason.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Wednesday, March 03, 2004 7:41 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] WMI problem

That’s great. I can confirm it apparently solves problem. Hopefully
surprise
removal is always sent before new device arrival (I can see about 2 sec
time
difference for 50 ms disconnect).

Best regards,

Michal Vodicka
STMicroelectronics Design and Application s.r.o.
[michal.vodicka@st.com, http:://www.st.com]


From:
xxxxx@windows.microsoft.com[SMTP:xxxxx@windows.microsoft.com]
Reply To: xxxxx@lists.osr.com
Sent: Wednesday, March 03, 2004 11:51 PM
To: xxxxx@lists.osr.com
Subject: RE: [ntdev] WMI problem

Thank you for pointing out the samples and docs need fixing! The
appropriate owners have been notified / bugged.

Thx
d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Wednesday, March 03, 2004 2:42 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] WMI problem

OK, I understand. Thanks.

Best regards,

Michal Vodicka
STMicroelectronics Design and Application s.r.o.
[michal.vodicka@st.com, http:://www.st.com]

> ----------
> From:
> xxxxx@windows.microsoft.com[SMTP:xxxxx@windows.microsoft.com]
> Reply To: xxxxx@lists.osr.com
> Sent: Wednesday, March 03, 2004 11:12 PM
> To: xxxxx@lists.osr.com
> Subject: RE: [ntdev] WMI problem
>
> That’s b/c the device path is what is used to create the unique name
for
> wmi guid or device interface. Since 2 devices can exist with the
same
> path in the surprise remove case (one is remove pending), you must
do
> this in surprise remove. I will get the docs and samples fixed to
> reflect this.
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Michal
Vodicka
> Sent: Wednesday, March 03, 2004 11:24 AM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] WMI problem
>
> From remove device as BulkUsb DDK sample does. Do you mean all DDK
WDM
> samples are wrong? Every one deregisters WMI from remove device and
not
> surprise remove.
>
> Also, I found at least three times in DDK docs something like this:
> -------
> WMI does not send an IRP_MN_REGINFO_EX request after a driver calls
> IoWMIRegistrationControl with WMIREG_ACTION_DEREGISTER, because WMI
> requires
> no further information from the driver. A driver typically
deregisters
> its
> blocks in response to an IRP_MN_REMOVE_DEVICE request.
> -------
>
> You’re probably right after deregistering from surpise remove
problem
> would
> disappear but it seems it would only conceal symptoms and not solve
real
> problem. The real problem as I see it is deregistration for one
device
> influences other one.
>
> Best regards,
>
> Michal Vodicka
> STMicroelectronics Design and Application s.r.o.
> [michal.vodicka@st.com, http:://www.st.com]
>
> > ----------
> > From:
> > xxxxx@windows.microsoft.com[SMTP:xxxxx@windows.microsoft.com]
> > Reply To: xxxxx@lists.osr.com
> > Sent: Wednesday, March 03, 2004 7:22 AM
> > To: xxxxx@lists.osr.com
> > Subject: RE: [ntdev] WMI problem
> >
> > Are you unregistering from wmi in surprise remove or in remove
device?
> > If in remove, it needs to happen during surprise remove (along
with
> the
> > device interface state).
> >
> > D
> >
> > This posting is provided “AS IS” with no warranties, and confers
no
> > rights.
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of Michal
Vodicka
> > Sent: Tuesday, March 02, 2004 9:02 PM
> > To: Windows System Software Devs Interest List
> > Subject: [ntdev] WMI problem
> >
> > I encountered strange problem with our USB device. Under some
> > circumstances
> > it can quickly diconnect and connetc back USB (reason is
irrelevant).
> As
> > expected, old device is removed and new one created. There is an
> > application
> > which has opened handle to the old device and when detects
problem,
> > closes
> > it and allows finishing device removal. It takes some time and
usually
> > new
> > device is already available. So far so well. But if new device
> registers
> > WMI
> > before old device deregisters it, WMI for new device stops work.
The
> > result
> > is Power Management tab in device manager properties for new
device
> > isn’t
> > available.
> >
> > If old device deregistration is called before new device
registration,
> > everything is correct. I verified IoWMIRegistrationControl() is
called
> > with
> > two different (and proper) device objects. Tested on XP SP1.
> >
> > Best regards,
> >
> > Michal Vodicka
> > STMicroelectronics Design and Application s.r.o.
> > [michal.vodicka@st.com, http:://www.st.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@windows.microsoft.com
> > 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: michal.vodicka@st.com
> > 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@windows.microsoft.com
> 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: michal.vodicka@st.com
> 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@windows.microsoft.com
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: michal.vodicka@st.com
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@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com