Hi All
I have a modified toaster filter driver to be a USB (usbhub.sys on XP) Upper Filter driver
With the devicetree (OSR/DDK) utility I can see filter device is attached to the HUB device.
But when I attach a USB storage device I see HUB driver creates a PDO which is attached to usbstor.sys instead of the usb filter driver.
I want that USB filter driver to get attached to all the drivers which in general gets attach to USB hud driver.
Could you pl. let me know why is it so?
Thanks in advance.
Anand
Get Juno Platinum for as low as $4.97/month!
Unlimited Internet Access with 250MB of Email Storage.
Visit http://www.juno.com/half to sign up today!
You need to be a bus filter here, something that is not officially
supported by MSFT. In a nut shell, you need to catch
IRP_MN_QUERY_DEVICE_RELATIONS/BusRelations on the way up the stack
(after usbhub has filled in the relations). For each new device, you
need to create a filter child device object and attach it to the new
PDO. You then need to track the reported state of the usbhub PDO on
subsequent QDRs, deleting your filter child device on remove device
following the same rules as a bus driver does when it deletes a PDO on
remove device. There are more details/subtleties then this, but that is
the basic gist.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@juno.com
Sent: Wednesday, May 25, 2005 8:42 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] >> USB (usbhub.sys on XP) Upper Filter driver
Hi All
I have a modified toaster filter driver to be a USB (usbhub.sys on XP)
Upper Filter driver
With the devicetree (OSR/DDK) utility I can see filter device is
attached to the HUB device.
But when I attach a USB storage device I see HUB driver creates a PDO
which is attached to usbstor.sys instead of the usb filter driver.
I want that USB filter driver to get attached to all the drivers which
in general gets attach to USB hud driver.
Could you pl. let me know why is it so?
Thanks in advance.
Anand
Get Juno Platinum for as low as $4.97/month!
Unlimited Internet Access with 250MB of Email Storage.
Visit http://www.juno.com/half to sign up today!
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
Hi Doron,
I may be wrong here but DDK does not mention is fact (?)
Thanks,
Anand
------->
You need to be a bus filter here, something that is not officially
supported by MSFT. In a nut shell, you need to catch
IRP_MN_QUERY_DEVICE_RELATIONS/BusRelations on the way up the stack
(after usbhub has filled in the relations). For each new device, you
need to create a filter child device object and attach it to the new
PDO. You then need to track the reported state of the usbhub PDO on
subsequent QDRs, deleting your filter child device on remove device
following the same rules as a bus driver does when it deletes a PDO on
remove device. There are more details/subtleties then this, but that is
the basic gist.
d
Get Juno Platinum for as low as $4.97/month!
Unlimited Internet Access with 250MB of Email Storage.
Visit http://www.juno.com/half to sign up today!
I don’t understand your statement/question. The DDK does not document
how to be a bus filter or the rules for being one if that is what you
are asking. Also, to filter all devices on the bus, your filter child
device needs to know it is attaching to a usbhub that is plugged in
downstream to the hub you are filtering and handle the QDR irp in the
same fashion, creating downstream filter device objects for the usbhub
on top of your filter. This is a rather difficult probject, I would
rate it 9.5 on a scale of 1-10 (w/10 being the hardest) if you are not
familiar with the WDM rules for pnp and power.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@juno.com
Sent: Wednesday, May 25, 2005 10:37 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] >> USB (usbhub.sys on XP) Upper Filter driver
Hi Doron,
I may be wrong here but DDK does not mention is fact (?)
Thanks,
Anand
------->
You need to be a bus filter here, something that is not officially
supported by MSFT. In a nut shell, you need to catch
IRP_MN_QUERY_DEVICE_RELATIONS/BusRelations on the way up the stack
(after usbhub has filled in the relations). For each new device, you
need to create a filter child device object and attach it to the new
PDO. You then need to track the reported state of the usbhub PDO on
subsequent QDRs, deleting your filter child device on remove device
following the same rules as a bus driver does when it deletes a PDO on
remove device. There are more details/subtleties then this, but that is
the basic gist.
d
Get Juno Platinum for as low as $4.97/month!
Unlimited Internet Access with 250MB of Email Storage.
Visit http://www.juno.com/half to sign up today!
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
I did this once to resize the disk partitions on the fly The MBR read by
IoReadPartitionTable cannot be filtered (a bug), so, I had no other chances
then a bus filter to plug in my FiDO between Disk/ClassPnP and PartMgr.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: “Doron Holan”
To: “Windows System Software Devs Interest List”
Sent: Thursday, May 26, 2005 9:27 AM
Subject: RE: [ntdev] >> USB (usbhub.sys on XP) Upper Filter driver
You need to be a bus filter here, something that is not officially
supported by MSFT. In a nut shell, you need to catch
IRP_MN_QUERY_DEVICE_RELATIONS/BusRelations on the way up the stack
(after usbhub has filled in the relations). For each new device, you
need to create a filter child device object and attach it to the new
PDO. You then need to track the reported state of the usbhub PDO on
subsequent QDRs, deleting your filter child device on remove device
following the same rules as a bus driver does when it deletes a PDO on
remove device. There are more details/subtleties then this, but that is
the basic gist.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@juno.com
Sent: Wednesday, May 25, 2005 8:42 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] >> USB (usbhub.sys on XP) Upper Filter driver
Hi All
I have a modified toaster filter driver to be a USB (usbhub.sys on XP)
Upper Filter driver
With the devicetree (OSR/DDK) utility I can see filter device is
attached to the HUB device.
But when I attach a USB storage device I see HUB driver creates a PDO
which is attached to usbstor.sys instead of the usb filter driver.
I want that USB filter driver to get attached to all the drivers which
in general gets attach to USB hud driver.
Could you pl. let me know why is it so?
Thanks in advance.
Anand
___________________________________________________________________
Get Juno Platinum for as low as $4.97/month!
Unlimited Internet Access with 250MB of Email Storage.
Visit http://www.juno.com/half to sign up today!
—
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: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com
— Doron Holan wrote:
[snip]
> subsequent QDRs, deleting your filter child device
> on remove device
> following the same rules as a bus driver does when
> it deletes a PDO on
> remove device.
Sorry Doron, I have to disagree with you. Deleting bus
filter device objects as how a bus driver does will
work most of the time but it’s just not the correct
way. It’s risking pre-maturely deleting an FiDO.
Although the window is extremely small and perhaps one
will never have the grief, but that could happen for
sure.
I’ve promised to share my bus filter with the
community but my previous employer seemed to
automatically claim the all rights of my own work-
–
Calvin Guan Windows DDK MVP
Enterprise Network Controller Engineering
Broadcom Corporation http://www.broadcom.com
______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca
I am talk about the DOs attached to the PDOs enumerated by the bus you
are filtering. You delete them in the IRP_MN_REMOVE_DEVICE processing
just like a bus does, basically:
- you keep it around if the PDO was not reported missing
- you delete it if the PDO was reported missing
- you delete it if the FDO is being removed
I don’t see how you can be prematurely deleting the Dos attached to the
enumerated PDOs if you follow these rules.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Calvin Guan
Sent: Thursday, May 26, 2005 12:41 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] >> USB (usbhub.sys on XP) Upper Filter driver
— Doron Holan wrote:
[snip]
> subsequent QDRs, deleting your filter child device
> on remove device
> following the same rules as a bus driver does when
> it deletes a PDO on
> remove device.
Sorry Doron, I have to disagree with you. Deleting bus
filter device objects as how a bus driver does will
work most of the time but it’s just not the correct
way. It’s risking pre-maturely deleting an FiDO.
Although the window is extremely small and perhaps one
will never have the grief, but that could happen for
sure.
I’ve promised to share my bus filter with the
community but my previous employer seemed to
automatically claim the all rights of my own work-
–
Calvin Guan Windows DDK MVP
Enterprise Network Controller Engineering
Broadcom Corporation http://www.broadcom.com
______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca
—
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
Doron, I’ll take this offline and discuss with you
privately.
–
Calvin Guan Windows DDK MVP
Enterprise Network Controller Engineering
Broadcom Corporation http://www.broadcom.com
— Doron Holan wrote:
> I am talk about the DOs attached to the PDOs
> enumerated by the bus you
> are filtering. You delete them in the
> IRP_MN_REMOVE_DEVICE processing
> just like a bus does, basically:
> 1) you keep it around if the PDO was not reported
> missing
> 2) you delete it if the PDO was reported missing
> 3) you delete it if the FDO is being removed
>
> I don’t see how you can be prematurely deleting the
> Dos attached to the
> enumerated PDOs if you follow these rules.
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf
> Of Calvin Guan
> Sent: Thursday, May 26, 2005 12:41 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] >> USB (usbhub.sys on XP) Upper
> Filter driver
>
> — Doron Holan
> wrote:
> [snip]
> > subsequent QDRs, deleting your filter child device
> > on remove device
> > following the same rules as a bus driver does when
> > it deletes a PDO on
> > remove device.
>
> Sorry Doron, I have to disagree with you. Deleting
> bus
> filter device objects as how a bus driver does will
> work most of the time but it’s just not the correct
> way. It’s risking pre-maturely deleting an FiDO.
> Although the window is extremely small and perhaps
> one
> will never have the grief, but that could happen for
> sure.
>
> I’ve promised to share my bus filter with the
> community but my previous employer seemed to
> automatically claim the all rights of my own work-
>
> –
> Calvin Guan Windows DDK MVP
> Enterprise Network Controller Engineering
> Broadcom Corporation http://www.broadcom.com
>
>
>
>
> Post your free ad now! http://personals.yahoo.ca
>
> —
> 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: unknown
> lmsubst tag argument: ‘’
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
Post your free ad now! http://personals.yahoo.ca
Please don’t do that, at least not unless you promise to report the results
here. It’s not like you two are in an annoying shouting match. You’re
having a valid technical discussion, and I want to listen, or at least see
the conclusion of it. I suspect that I’m not alone in that.
Phil
Philip D. Barila
Seagate Technology LLC
(720) 684-1842
Calvin Guan
.ca> To
Sent by: “Windows System Software Devs
bounce-210256-643 Interest List”
xxxxx@lists.osr.com
No Phone Info cc
Available
Subject
RE: [ntdev] >> USB (usbhub.sys on
05/26/2005 02:32 XP) Upper Filter driver
PM
Please respond to
“Windows System
Software Devs
Interest List”
com>
Doron, I’ll take this offline and discuss with you
privately.
–
Calvin Guan Windows DDK MVP
Enterprise Network Controller Engineering
Broadcom Corporation http://www.broadcom.com
— Doron Holan wrote:
> I am talk about the DOs attached to the PDOs
> enumerated by the bus you
> are filtering. You delete them in the
> IRP_MN_REMOVE_DEVICE processing
> just like a bus does, basically:
> 1) you keep it around if the PDO was not reported
> missing
> 2) you delete it if the PDO was reported missing
> 3) you delete it if the FDO is being removed
>
> I don’t see how you can be prematurely deleting the
> Dos attached to the
> enumerated PDOs if you follow these rules.
>
> d
Should a bus filter driver replace the PDO addresses reported in the QDR
with the address of the DOs he created then? Will the PnP manager (or any
other entity, for that matter) mind that the address reported in the QDR is
not that of the topmost device in the device stack?
Shahar
“Doron Holan” wrote in message
news:xxxxx@ntdev…
I don’t understand your statement/question. The DDK does not document
how to be a bus filter or the rules for being one if that is what you
are asking. Also, to filter all devices on the bus, your filter child
device needs to know it is attaching to a usbhub that is plugged in
downstream to the hub you are filtering and handle the QDR irp in the
same fashion, creating downstream filter device objects for the usbhub
on top of your filter. This is a rather difficult probject, I would
rate it 9.5 on a scale of 1-10 (w/10 being the hardest) if you are not
familiar with the WDM rules for pnp and power.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@juno.com
Sent: Wednesday, May 25, 2005 10:37 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] >> USB (usbhub.sys on XP) Upper Filter driver
Hi Doron,
I may be wrong here but DDK does not mention is fact (?)
Thanks,
Anand
------->
You need to be a bus filter here, something that is not officially
supported by MSFT. In a nut shell, you need to catch
IRP_MN_QUERY_DEVICE_RELATIONS/BusRelations on the way up the stack
(after usbhub has filled in the relations). For each new device, you
need to create a filter child device object and attach it to the new
PDO. You then need to track the reported state of the usbhub PDO on
subsequent QDRs, deleting your filter child device on remove device
following the same rules as a bus driver does when it deletes a PDO on
remove device. There are more details/subtleties then this, but that is
the basic gist.
d
___________________________________________________________________
Get Juno Platinum for as low as $4.97/month!
Unlimited Internet Access with 250MB of Email Storage.
Visit http://www.juno.com/half to sign up today!
—
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
Why delete the DO if the PDO was reported missing? Why not just wait for the
IRP_MN_SURPRISE_REMOVAL?
Shahar
“Doron Holan” wrote in message
news:xxxxx@ntdev…
I am talk about the DOs attached to the PDOs enumerated by the bus you
are filtering. You delete them in the IRP_MN_REMOVE_DEVICE processing
just like a bus does, basically:
1) you keep it around if the PDO was not reported missing
2) you delete it if the PDO was reported missing
3) you delete it if the FDO is being removed
I don’t see how you can be prematurely deleting the Dos attached to the
enumerated PDOs if you follow these rules.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Calvin Guan
Sent: Thursday, May 26, 2005 12:41 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] >> USB (usbhub.sys on XP) Upper Filter driver
— Doron Holan wrote:
[snip]
> subsequent QDRs, deleting your filter child device
> on remove device
> following the same rules as a bus driver does when
> it deletes a PDO on
> remove device.
Sorry Doron, I have to disagree with you. Deleting bus
filter device objects as how a bus driver does will
work most of the time but it’s just not the correct
way. It’s risking pre-maturely deleting an FiDO.
Although the window is extremely small and perhaps one
will never have the grief, but that could happen for
sure.
I’ve promised to share my bus filter with the
community but my previous employer seemed to
automatically claim the all rights of my own work-
–
Calvin Guan Windows DDK MVP
Enterprise Network Controller Engineering
Broadcom Corporation http://www.broadcom.com
______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca
—
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
You can get a surprise remove w/out being reported as missing. For
instance, if the FDO on your PDO reports that is has failed through
IoInvalidateDeviceState, you will get a surprise remove. There are many
reasons you will get a surprise remove that have nothing to do with
device presence. The joy of being a bus driver ;). Add on all the bus
drivers rules and then more rules and you have a bus filter driver.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Shahar Talmi
Sent: Friday, May 27, 2005 9:11 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] >> USB (usbhub.sys on XP) Upper Filter driver
Why delete the DO if the PDO was reported missing? Why not just wait for
the
IRP_MN_SURPRISE_REMOVAL?
Shahar
“Doron Holan” wrote in message
news:xxxxx@ntdev…
I am talk about the DOs attached to the PDOs enumerated by the bus you
are filtering. You delete them in the IRP_MN_REMOVE_DEVICE processing
just like a bus does, basically:
1) you keep it around if the PDO was not reported missing
2) you delete it if the PDO was reported missing
3) you delete it if the FDO is being removed
I don’t see how you can be prematurely deleting the Dos attached to the
enumerated PDOs if you follow these rules.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Calvin Guan
Sent: Thursday, May 26, 2005 12:41 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] >> USB (usbhub.sys on XP) Upper Filter driver
— Doron Holan wrote:
[snip]
> subsequent QDRs, deleting your filter child device
> on remove device
> following the same rules as a bus driver does when
> it deletes a PDO on
> remove device.
Sorry Doron, I have to disagree with you. Deleting bus
filter device objects as how a bus driver does will
work most of the time but it’s just not the correct
way. It’s risking pre-maturely deleting an FiDO.
Although the window is extremely small and perhaps one
will never have the grief, but that could happen for
sure.
I’ve promised to share my bus filter with the
community but my previous employer seemed to
automatically claim the all rights of my own work-
–
Calvin Guan Windows DDK MVP
Enterprise Network Controller Engineering
Broadcom Corporation http://www.broadcom.com
______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca
—
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: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
No, you don’t replace the DOs in the list. Anyone can add DOs to the
list, the pnp manager doesn’t care where they came from, just the list
that it gets back is what matters.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Shahar Talmi
Sent: Friday, May 27, 2005 9:10 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] >> USB (usbhub.sys on XP) Upper Filter driver
Should a bus filter driver replace the PDO addresses reported in the QDR
with the address of the DOs he created then? Will the PnP manager (or
any
other entity, for that matter) mind that the address reported in the QDR
is
not that of the topmost device in the device stack?
Shahar
“Doron Holan” wrote in message
news:xxxxx@ntdev…
I don’t understand your statement/question. The DDK does not document
how to be a bus filter or the rules for being one if that is what you
are asking. Also, to filter all devices on the bus, your filter child
device needs to know it is attaching to a usbhub that is plugged in
downstream to the hub you are filtering and handle the QDR irp in the
same fashion, creating downstream filter device objects for the usbhub
on top of your filter. This is a rather difficult probject, I would
rate it 9.5 on a scale of 1-10 (w/10 being the hardest) if you are not
familiar with the WDM rules for pnp and power.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@juno.com
Sent: Wednesday, May 25, 2005 10:37 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] >> USB (usbhub.sys on XP) Upper Filter driver
Hi Doron,
I may be wrong here but DDK does not mention is fact (?)
Thanks,
Anand
------->
You need to be a bus filter here, something that is not officially
supported by MSFT. In a nut shell, you need to catch
IRP_MN_QUERY_DEVICE_RELATIONS/BusRelations on the way up the stack
(after usbhub has filled in the relations). For each new device, you
need to create a filter child device object and attach it to the new
PDO. You then need to track the reported state of the usbhub PDO on
subsequent QDRs, deleting your filter child device on remove device
following the same rules as a bus driver does when it deletes a PDO on
remove device. There are more details/subtleties then this, but that is
the basic gist.
d
___________________________________________________________________
Get Juno Platinum for as low as $4.97/month!
Unlimited Internet Access with 250MB of Email Storage.
Visit http://www.juno.com/half to sign up today!
—
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: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
No, you should never replace a PDO in QDR. A device
object doesn’t officially become a PDO until PNP
manager had received from QDR and linked it with a
devnode, which is a very important data structure to a
PDO. If you do so, the bus driver would get mad on you
since it believes it’s a PDO but in fact it’s not.
Partition manager and disk driver are exceptions since
they have special “agreement”.
It is also bad for some bus driver relying on some
proprietary agreement between FDO and PDO. PCI bus
driver will expect PDO and FDO for PCI-PCI bridge are
created by the same driver.
There’re more bad things but I just couldn’t remember
off hand.
As Doron said, bus filter is very difficult to get
right. It really depends on which bus you’re filtering
since each bus has their own “features” or unique
rules and bugs. Getting a bus filter working “right”
for all buses is very very challenging even you know
WDM very vell.
I’ll resume post on the suspended thread after Doron
and I have a conclusion.
–
Calvin Guan Windows DDK MVP
Staff SW Engineer, NetXtreme MINIPORT
Enterprise Network Controller Engineering
Broadcom Corporation www.broadcom.com
— Shahar Talmi wrote:
> Should a bus filter driver replace the PDO addresses
> reported in the QDR
> with the address of the DOs he created then? Will
> the PnP manager (or any
> other entity, for that matter) mind that the address
> reported in the QDR is
> not that of the topmost device in the device stack?
>
> Shahar
>
> “Doron Holan” wrote
> in message
> news:xxxxx@ntdev…
> I don’t understand your statement/question. The DDK
> does not document
> how to be a bus filter or the rules for being one if
> that is what you
> are asking. Also, to filter all devices on the bus,
> your filter child
> device needs to know it is attaching to a usbhub
> that is plugged in
> downstream to the hub you are filtering and handle
> the QDR irp in the
> same fashion, creating downstream filter device
> objects for the usbhub
> on top of your filter. This is a rather difficult
> probject, I would
> rate it 9.5 on a scale of 1-10 (w/10 being the
> hardest) if you are not
> familiar with the WDM rules for pnp and power.
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf
> Of xxxxx@juno.com
> Sent: Wednesday, May 25, 2005 10:37 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] >> USB (usbhub.sys on XP) Upper
> Filter driver
>
>
> Hi Doron,
>
> I may be wrong here but DDK does not mention is fact
> (?)
>
> Thanks,
> Anand
>
> ------->
>
> You need to be a bus filter here, something that is
> not officially
> supported by MSFT. In a nut shell, you need to
> catch
> IRP_MN_QUERY_DEVICE_RELATIONS/BusRelations on the
> way up the stack
> (after usbhub has filled in the relations). For
> each new device, you
> need to create a filter child device object and
> attach it to the new
> PDO. You then need to track the reported state of
> the usbhub PDO on
> subsequent QDRs, deleting your filter child device
> on remove device
> following the same rules as a bus driver does when
> it deletes a PDO on
> remove device. There are more details/subtleties
> then this, but that is
> the basic gist.
>
> d
>
>
> Get Juno Platinum for as low as $4.97/month!
> Unlimited Internet Access with 250MB of Email
> Storage.
> Visit http://www.juno.com/half to sign up today!
>
>
> —
> 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:
> xxxxx@yahoo.ca
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
___
Post your free ad now! http://personals.yahoo.ca
It isn’t that difficult. You have a core set of bus filtering technology, a
bus filter base class, and then you have to extend that functionality for
each individual bus driver’s peculiar features with a bus specific child
class. Too bad WDF doesn’t have such a class.
=====================
Mark Roddy
Windows .NET/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Calvin Guan
Sent: Friday, May 27, 2005 1:18 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] >> USB (usbhub.sys on XP) Upper Filter driver
No, you should never replace a PDO in QDR. A device object
doesn’t officially become a PDO until PNP manager had
received from QDR and linked it with a devnode, which is a
very important data structure to a PDO. If you do so, the bus
driver would get mad on you since it believes it’s a PDO but
in fact it’s not.
Partition manager and disk driver are exceptions since they
have special “agreement”.
It is also bad for some bus driver relying on some
proprietary agreement between FDO and PDO. PCI bus driver
will expect PDO and FDO for PCI-PCI bridge are created by the
same driver.
There’re more bad things but I just couldn’t remember off hand.
As Doron said, bus filter is very difficult to get right. It
really depends on which bus you’re filtering since each bus
has their own “features” or unique rules and bugs. Getting a
bus filter working “right”
for all buses is very very challenging even you know WDM very vell.
I’ll resume post on the suspended thread after Doron and I
have a conclusion.
–
Calvin Guan Windows DDK MVP
Staff SW Engineer, NetXtreme MINIPORT
Enterprise Network Controller Engineering
Broadcom Corporation www.broadcom.com
— Shahar Talmi wrote:
> > Should a bus filter driver replace the PDO addresses
> reported in the
> > QDR with the address of the DOs he created then? Will the
> PnP manager
> > (or any other entity, for that matter) mind that the
> address reported
> > in the QDR is not that of the topmost device in the device stack?
> >
> > Shahar
> >
> > “Doron Holan” wrote in message
> > news:xxxxx@ntdev…
> > I don’t understand your statement/question. The DDK does
> not document
> > how to be a bus filter or the rules for being one if that
> is what you
> > are asking. Also, to filter all devices on the bus, your
> filter child
> > device needs to know it is attaching to a usbhub that is plugged in
> > downstream to the hub you are filtering and handle the QDR
> irp in the
> > same fashion, creating downstream filter device objects for
> the usbhub
> > on top of your filter. This is a rather difficult
> probject, I would
> > rate it 9.5 on a scale of 1-10 (w/10 being the
> > hardest) if you are not
> > familiar with the WDM rules for pnp and power.
> >
> > d
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of
> > xxxxx@juno.com
> > Sent: Wednesday, May 25, 2005 10:37 PM
> > To: Windows System Software Devs Interest List
> > Subject: RE: [ntdev] >> USB (usbhub.sys on XP) Upper Filter driver
> >
> >
> > Hi Doron,
> >
> > I may be wrong here but DDK does not mention is fact
> > (?)
> >
> > Thanks,
> > Anand
> >
> > ------->
> >
> > You need to be a bus filter here, something that is not officially
> > supported by MSFT. In a nut shell, you need to catch
> > IRP_MN_QUERY_DEVICE_RELATIONS/BusRelations on the way up the stack
> > (after usbhub has filled in the relations). For each new
> device, you
> > need to create a filter child device object and attach it
> to the new
> > PDO. You then need to track the reported state of the
> usbhub PDO on
> > subsequent QDRs, deleting your filter child device on remove device
> > following the same rules as a bus driver does when it
> deletes a PDO on
> > remove device. There are more details/subtleties then
> this, but that
> > is the basic gist.
> >
> > d
> >
> >
>
> > Get Juno Platinum for as low as $4.97/month!
> > Unlimited Internet Access with 250MB of Email Storage.
> > Visit http://www.juno.com/half to sign up today!
> >
> >
> > —
> > 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:
> > xxxxx@yahoo.ca
> > To unsubscribe send a blank email to
> > xxxxx@lists.osr.com
> >
>
>___
> Post your free ad now! http://personals.yahoo.ca
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
> xxxxx@hollistech.com To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
Hmmm, I think the hard part is those bus specific
behaviours are doc’ed anywhere, it takes time to learn
and discover. Let’s see 2 examples here:
-
Some versions of usbhub driver “forgets” to delete
child PDO after the parent FDO is gone upon surprise
removal. There’s little you can do about it. This
seemed fixed in w2k3 though.
-
USBhub stack by default doesn’t send URBs to the
roothub PDO stack top, rather, it queries HCI driver
for targeting DO, and roothub PDO is always returned
to the HUB driver. So a bus filters attempting to
catch URBs at HCI-ROOTHUB level never see any URB. Of
course, it could be achieved by intercepting the prior
query if you already know the story.
There are other special rules when I was testing my
filter on all buses I could find in my box. Usually,
you don’t learn those rules until you get burned by a
nasty issue and have done some debugging to prove that
it’s not the fault of your filter. Sometimes it’s
because one specific techni used in BUS_AAA is great
but not BUS_BBB because BUS_BBB is doing this and
that… You start to find a solution and make sure it
works without breaking others and keep the filter
bus-independent as much as possible.
It is quite head banging IMO. Sometimes, not all
problems can be worked around easily even though you
know exactly what they are.
–
Calvin Guan Windows DDK MVP
Staff SW Engineer, NetXtreme MINIPORT
Enterprise Network Controller Engineering
Broadcom Corporation www.broadcom.com
— Mark Roddy wrote:
> It isn’t that difficult. You have a core set of bus
> filtering technology, a
> bus filter base class, and then you have to extend
> that functionality for
> each individual bus driver’s peculiar features with
> a bus specific child
> class. Too bad WDF doesn’t have such a class.
>
>
> =====================
> Mark Roddy
> Windows .NET/XP/2000 Consulting
> Hollis Technology Solutions 603-321-1032
> www.hollistech.com
>
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On
> Behalf Of Calvin Guan
> > Sent: Friday, May 27, 2005 1:18 PM
> > To: Windows System Software Devs Interest List
> > Subject: Re:[ntdev] >> USB (usbhub.sys on XP)
> Upper Filter driver
> >
> > No, you should never replace a PDO in QDR. A
> device object
> > doesn’t officially become a PDO until PNP manager
> had
> > received from QDR and linked it with a devnode,
> which is a
> > very important data structure to a PDO. If you do
> so, the bus
> > driver would get mad on you since it believes it’s
> a PDO but
> > in fact it’s not.
> > Partition manager and disk driver are exceptions
> since they
> > have special “agreement”.
> >
> > It is also bad for some bus driver relying on some
>
> > proprietary agreement between FDO and PDO. PCI bus
> driver
> > will expect PDO and FDO for PCI-PCI bridge are
> created by the
> > same driver.
> >
> > There’re more bad things but I just couldn’t
> remember off hand.
> >
> > As Doron said, bus filter is very difficult to get
> right. It
> > really depends on which bus you’re filtering since
> each bus
> > has their own “features” or unique rules and bugs.
> Getting a
> > bus filter working “right”
> > for all buses is very very challenging even you
> know WDM very vell.
> >
> > I’ll resume post on the suspended thread after
> Doron and I
> > have a conclusion.
> >
> > –
> > Calvin Guan Windows DDK MVP
> > Staff SW Engineer, NetXtreme MINIPORT
> > Enterprise Network Controller Engineering
> > Broadcom Corporation www.broadcom.com
> >
> >
> > — Shahar Talmi wrote:
> > > Should a bus filter driver replace the PDO
> addresses
> > reported in the
> > > QDR with the address of the DOs he created then?
> Will the
> > PnP manager
> > > (or any other entity, for that matter) mind that
> the
> > address reported
> > > in the QDR is not that of the topmost device in
> the device stack?
> > >
> > > Shahar
> > >
> > > “Doron Holan”
> wrote in message
> > > news:xxxxx@ntdev…
> > > I don’t understand your statement/question. The
> DDK does
> > not document
> > > how to be a bus filter or the rules for being
> one if that
> > is what you
> > > are asking. Also, to filter all devices on the
> bus, your
> > filter child
> > > device needs to know it is attaching to a usbhub
> that is plugged in
> > > downstream to the hub you are filtering and
> handle the QDR
> > irp in the
> > > same fashion, creating downstream filter device
> objects for
> > the usbhub
> > > on top of your filter. This is a rather
> difficult
> > probject, I would
> > > rate it 9.5 on a scale of 1-10 (w/10 being the
> > > hardest) if you are not
> > > familiar with the WDM rules for pnp and power.
> > >
> > > d
> > >
> > > -----Original Message-----
> > > From: xxxxx@lists.osr.com
> > > [mailto:xxxxx@lists.osr.com] On
> Behalf Of
> > > xxxxx@juno.com
> > > Sent: Wednesday, May 25, 2005 10:37 PM
> > > To: Windows System Software Devs Interest List
> > > Subject: RE: [ntdev] >> USB (usbhub.sys on XP)
> Upper Filter driver
> > >
> > >
> > > Hi Doron,
> > >
> > > I may be wrong here but DDK does not mention is
> fact
> > > (?)
> > >
> > > Thanks,
> > > Anand
> > >
> > > ------->
> > >
> > > You need to be a bus filter here, something that
> is not officially
> > > supported by MSFT. In a nut shell, you need to
> catch
> > > IRP_MN_QUERY_DEVICE_RELATIONS/BusRelations on
> the way up the stack
> > > (after usbhub has filled in the relations). For
> each new
> > device, you
> > > need to create a filter child device object and
> attach it
> > to the new
> > > PDO. You then need to track the reported state
> of the
> > usbhub PDO on
> > > subsequent QDRs, deleting your filter child
> device on remove device
> > > following the same rules as a bus driver does
> when it
> > deletes a PDO on
> > > remove device. There are more
> details/subtleties then
> > this, but that
> > > is the basic gist.
> > >
> > > d
> > >
> > >
> >
>
> > > Get Juno Platinum for as low as $4.97/month!
> > > Unlimited Internet Access with 250MB of Email
> Storage.
> > > Visit http://www.juno.com/half to sign up today!
> > >
> > >
> > > —
> > > 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:
> > > xxxxx@yahoo.ca
> > > To unsubscribe send a blank email to
> > > xxxxx@lists.osr.com
> > >
> >
> >
>
___
> > Post your free ad now! http://personals.yahoo.ca
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
>
=== message truncated ===
______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca