How to detect specific chipset in USB driver?

I’d need to detect if my USB driver is running on a computer with VIA chipset. It is nothing I’d like to do but there is a problem with remote wakeup which occurs only on these machines when running Vista and I need to solve it some way ASAP. I can use a workaround for this purpose but we can’t afford to enable it globally (and reduce battery life at notebooks by 10%). The workaround is to disable selective suspend so remote wakeup won’t be needed. I don’t see a way how to detect remote wakeup isn’t working so I ponder to make decision based on chipset. Unfortunately, the decision has to be made by the driver not by user mode software where it’d be rather easy.

Ideas welcome.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]

HalGetDataByOffset. Yes, it’s “obsolete”…

Calvin Guan (DDK MVP) Sr. Staff Engineer
NetXtreme Vista/Longhorn Server Miniport
Broadcom Corporation, Irvine CA 92618
Connecting Everything(r)

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-263275-
xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Wednesday, September 20, 2006 11:24 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to detect specific chipset in USB driver?

I’d need to detect if my USB driver is running on a computer with VIA
chipset. It is nothing I’d like to do but there is a problem with
remote
wakeup which occurs only on these machines when running Vista and I
need
to solve it some way ASAP. I can use a workaround for this purpose but
we
can’t afford to enable it globally (and reduce battery life at
notebooks
by 10%). The workaround is to disable selective suspend so remote
wakeup
won’t be needed. I don’t see a way how to detect remote wakeup isn’t
working so I ponder to make decision based on chipset. Unfortunately,
the
decision has to be made by the driver not by user mode software where
it’d
be rather easy.

Ideas welcome.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Can your installer figure this out at install time and then put a reg
value down for your driver?

– I can spell, I just can’t type.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Wednesday, September 20, 2006 11:24 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to detect specific chipset in USB driver?

I’d need to detect if my USB driver is running on a computer with VIA
chipset. It is nothing I’d like to do but there is a problem with remote
wakeup which occurs only on these machines when running Vista and I need
to solve it some way ASAP. I can use a workaround for this purpose but
we can’t afford to enable it globally (and reduce battery life at
notebooks by 10%). The workaround is to disable selective suspend so
remote wakeup won’t be needed. I don’t see a way how to detect remote
wakeup isn’t working so I ponder to make decision based on chipset.
Unfortunately, the decision has to be made by the driver not by user
mode software where it’d be rather easy.

Ideas welcome.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

What should I look for? Scan PCI from BusNumber 0 and SlotNumber 0 and check for VIA VID? Or something more clever?

BTW, it’d be probably sufficient if I’m able to find to which USB HC is my device attached and if it is VIA, enable workaround.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of Calvin (Hao) Guan[SMTP:xxxxx@broadcom.com]
Reply To: Windows System Software Devs Interest List
Sent: Wednesday, September 20, 2006 9:11 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to detect specific chipset in USB driver?

HalGetDataByOffset. Yes, it’s “obsolete”…

Calvin Guan (DDK MVP) Sr. Staff Engineer
NetXtreme Vista/Longhorn Server Miniport
Broadcom Corporation, Irvine CA 92618
Connecting Everything(r)

> -----Original Message-----
> From: xxxxx@lists.osr.com [mailto:bounce-263275-
> xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
> Sent: Wednesday, September 20, 2006 11:24 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] How to detect specific chipset in USB driver?
>
> I’d need to detect if my USB driver is running on a computer with VIA
> chipset. It is nothing I’d like to do but there is a problem with
remote
> wakeup which occurs only on these machines when running Vista and I
need
> to solve it some way ASAP. I can use a workaround for this purpose but
we
> can’t afford to enable it globally (and reduce battery life at
notebooks
> by 10%). The workaround is to disable selective suspend so remote
wakeup
> won’t be needed. I don’t see a way how to detect remote wakeup isn’t
> working so I ponder to make decision based on chipset. Unfortunately,
the
> decision has to be made by the driver not by user mode software where
it’d
> be rather easy.
>
> Ideas welcome.
>
> Best regards,
>
> Michal Vodicka
> UPEK, Inc.
> [xxxxx@upek.com, http://www.upek.com]
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

We don’t have one installer; we have many and our customers write their own. That’s the reason why it should be handled in the driver itself. Maybe I could write a coinstaller which’d be called when driver is installed but it looks like real PITA and I don’t have time for it now.

Also, somebody at MS put the driver to Windows Update (although we forbid it) and XP signed version is automatically installed at Vista (:-O) when the device is plugged in…

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
Reply To: Windows System Software Devs Interest List
Sent: Wednesday, September 20, 2006 9:27 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to detect specific chipset in USB driver?

Can your installer figure this out at install time and then put a reg
value down for your driver?

– I can spell, I just can’t type.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Wednesday, September 20, 2006 11:24 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to detect specific chipset in USB driver?

I’d need to detect if my USB driver is running on a computer with VIA
chipset. It is nothing I’d like to do but there is a problem with remote
wakeup which occurs only on these machines when running Vista and I need
to solve it some way ASAP. I can use a workaround for this purpose but
we can’t afford to enable it globally (and reduce battery life at
notebooks by 10%). The workaround is to disable selective suspend so
remote wakeup won’t be needed. I don’t see a way how to detect remote
wakeup isn’t working so I ponder to make decision based on chipset.
Unfortunately, the decision has to be made by the driver not by user
mode software where it’d be rather easy.

Ideas welcome.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

> -----Original Message-----

From: xxxxx@lists.osr.com [mailto:bounce-263292-
xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Wednesday, September 20, 2006 1:28 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to detect specific chipset in USB driver?

What should I look for? Scan PCI from BusNumber 0 and SlotNumber 0 and
check for VIA VID? Or something more clever?

You would need a blind scan since the driver wouldn’t have knowledge of
the connection topology.

BTW, it’d be probably sufficient if I’m able to find to which USB HC
is my
device attached and if it is VIA, enable workaround.

I’m not sure if there is private channel for USB driver to ping their
HC.

Good luck,

Calvin Guan (DDK MVP) Sr. Staff Engineer
NetXtreme Vista/Longhorn Server Miniport
Broadcom Corporation, Irvine CA 92618
Connecting Everything(r)

Well, USB_BUS_INTERFACE_USBDI_V3 in the WDK there is a function pointer
which can give you the PCI info for the HC.

PUSB_BUSIFFN_QUERY_CONTROLLER_TYPE QueryControllerType;

NTSTATUS
(*PUSB_BUSIFFN_QUERY_CONTROLLER_TYPE) (
__in_opt PVOID BusContext,
__out_opt PULONG HcdiOptionFlags,
__out_opt PUSHORT PciVendorId,
__out_opt PUSHORT PciDeviceId,
__out_opt PUCHAR PciClass,
__out_opt PUCHAR PciSubClass,
__out_opt PUCHAR PciRevisionId,
__out_opt PUCHAR PciProgIf
)

From what I can gather, this is not available on a pre vista version of
usbport.sys so I don’t know if this helps you or not. Hopefully it does

D

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Wednesday, September 20, 2006 1:36 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to detect specific chipset in USB driver?

We don’t have one installer; we have many and our customers write their
own. That’s the reason why it should be handled in the driver itself.
Maybe I could write a coinstaller which’d be called when driver is
installed but it looks like real PITA and I don’t have time for it now.

Also, somebody at MS put the driver to Windows Update (although we
forbid it) and XP signed version is automatically installed at Vista
(:-O) when the device is plugged in…

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


From:
xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com
] on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
Reply To: Windows System Software Devs Interest List
Sent: Wednesday, September 20, 2006 9:27 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to detect specific chipset in USB
driver?

Can your installer figure this out at install time and then put a reg
value down for your driver?

– I can spell, I just can’t type.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Wednesday, September 20, 2006 11:24 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to detect specific chipset in USB driver?

I’d need to detect if my USB driver is running on a computer with VIA
chipset. It is nothing I’d like to do but there is a problem with
remote
wakeup which occurs only on these machines when running Vista and I
need
to solve it some way ASAP. I can use a workaround for this purpose but
we can’t afford to enable it globally (and reduce battery life at
notebooks by 10%). The workaround is to disable selective suspend so
remote wakeup won’t be needed. I don’t see a way how to detect remote
wakeup isn’t working so I ponder to make decision based on chipset.
Unfortunately, the decision has to be made by the driver not by user
mode software where it’d be rather easy.

Ideas welcome.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Thanks, it looks promising. No problem with pre-Vista because there remote wakeup works. I have to only make workaround at Vista. BTW, I enabled traces and the remote wakeup signal from the device is recognized. OS just doesn’t complete WaitWake IRP for some reasons.

If I understand correctly, I should send IRP_MN_QUERY_INTERFACE request to get the structure with function pointers. I can check if I get version 3 and if so, I can call QueryControllerType.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
Reply To: Windows System Software Devs Interest List
Sent: Wednesday, September 20, 2006 11:05 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to detect specific chipset in USB driver?

Well, USB_BUS_INTERFACE_USBDI_V3 in the WDK there is a function pointer
which can give you the PCI info for the HC.

PUSB_BUSIFFN_QUERY_CONTROLLER_TYPE QueryControllerType;

NTSTATUS
(*PUSB_BUSIFFN_QUERY_CONTROLLER_TYPE) (
__in_opt PVOID BusContext,
__out_opt PULONG HcdiOptionFlags,
__out_opt PUSHORT PciVendorId,
__out_opt PUSHORT PciDeviceId,
__out_opt PUCHAR PciClass,
__out_opt PUCHAR PciSubClass,
__out_opt PUCHAR PciRevisionId,
__out_opt PUCHAR PciProgIf
)

From what I can gather, this is not available on a pre vista version of
usbport.sys so I don’t know if this helps you or not. Hopefully it does

D

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Wednesday, September 20, 2006 1:36 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to detect specific chipset in USB driver?

We don’t have one installer; we have many and our customers write their
own. That’s the reason why it should be handled in the driver itself.
Maybe I could write a coinstaller which’d be called when driver is
installed but it looks like real PITA and I don’t have time for it now.

Also, somebody at MS put the driver to Windows Update (although we
forbid it) and XP signed version is automatically installed at Vista
(:-O) when the device is plugged in…

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]

> ----------
> From:
xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com
] on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
> Reply To: Windows System Software Devs Interest List
> Sent: Wednesday, September 20, 2006 9:27 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] How to detect specific chipset in USB
driver?
>
> Can your installer figure this out at install time and then put a reg
> value down for your driver?
>
> – I can spell, I just can’t type.
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
> Sent: Wednesday, September 20, 2006 11:24 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] How to detect specific chipset in USB driver?
>
> I’d need to detect if my USB driver is running on a computer with VIA
> chipset. It is nothing I’d like to do but there is a problem with
remote
> wakeup which occurs only on these machines when running Vista and I
need
> to solve it some way ASAP. I can use a workaround for this purpose but
> we can’t afford to enable it globally (and reduce battery life at
> notebooks by 10%). The workaround is to disable selective suspend so
> remote wakeup won’t be needed. I don’t see a way how to detect remote>
> wakeup isn’t working so I ponder to make decision based on chipset.
> Unfortunately, the decision has to be made by the driver not by user
> mode software where it’d be rather easy.
>
> Ideas welcome.
>
> Best regards,
>
> Michal Vodicka
> UPEK, Inc.
> [xxxxx@upek.com, http://www.upek.com]
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

> ----------

From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of Calvin (Hao) Guan[SMTP:xxxxx@broadcom.com]
Reply To: Windows System Software Devs Interest List
Sent: Wednesday, September 20, 2006 10:59 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to detect specific chipset in USB driver?

> -----Original Message-----
> From: xxxxx@lists.osr.com [mailto:bounce-263292-
> xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
> Sent: Wednesday, September 20, 2006 1:28 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] How to detect specific chipset in USB driver?
>
> What should I look for? Scan PCI from BusNumber 0 and SlotNumber 0 and
> check for VIA VID? Or something more clever?

You would need a blind scan since the driver wouldn’t have knowledge of
the connection topology.

When should I stop scanning? At the first failure or can there be gaps? If so what would be reasonable max values? BTW, would such driver pass WHQL tests if the function is marked obsolete? IIRC there is checks for imports.

I’ll try what Doron suggest at first, it looks less intrusive. Thanks anyway.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]

You need to explicitly ask for V3 (based on the interface size and the
version value in the QI). I am pretty sure there are samples on how to
get V2 (for IsHighSpeedDevice()), so you just need to adjust for v3.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Wednesday, September 20, 2006 2:57 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to detect specific chipset in USB driver?

Thanks, it looks promising. No problem with pre-Vista because there
remote wakeup works. I have to only make workaround at Vista. BTW, I
enabled traces and the remote wakeup signal from the device is
recognized. OS just doesn’t complete WaitWake IRP for some reasons.

If I understand correctly, I should send IRP_MN_QUERY_INTERFACE request
to get the structure with function pointers. I can check if I get
version 3 and if so, I can call QueryControllerType.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


From:
xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com
] on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
Reply To: Windows System Software Devs Interest List
Sent: Wednesday, September 20, 2006 11:05 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to detect specific chipset in USB
driver?

Well, USB_BUS_INTERFACE_USBDI_V3 in the WDK there is a function
pointer
which can give you the PCI info for the HC.

PUSB_BUSIFFN_QUERY_CONTROLLER_TYPE QueryControllerType;

NTSTATUS
(*PUSB_BUSIFFN_QUERY_CONTROLLER_TYPE) (
__in_opt PVOID BusContext,
__out_opt PULONG HcdiOptionFlags,
__out_opt PUSHORT PciVendorId,
__out_opt PUSHORT PciDeviceId,
__out_opt PUCHAR PciClass,
__out_opt PUCHAR PciSubClass,
__out_opt PUCHAR PciRevisionId,
__out_opt PUCHAR PciProgIf
)

From what I can gather, this is not available on a pre vista version
of
usbport.sys so I don’t know if this helps you or not. Hopefully it
does

D

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Wednesday, September 20, 2006 1:36 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to detect specific chipset in USB driver?

We don’t have one installer; we have many and our customers write
their
own. That’s the reason why it should be handled in the driver itself.
Maybe I could write a coinstaller which’d be called when driver is
installed but it looks like real PITA and I don’t have time for it
now.

Also, somebody at MS put the driver to Windows Update (although we
forbid it) and XP signed version is automatically installed at Vista
(:-O) when the device is plugged in…

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]

> ----------
> From:

xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com

] on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
> Reply To: Windows System Software Devs Interest List
> Sent: Wednesday, September 20, 2006 9:27 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] How to detect specific chipset in USB
driver?
>
> Can your installer figure this out at install time and then put a
reg
> value down for your driver?
>
> – I can spell, I just can’t type.
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Michal
Vodicka
> Sent: Wednesday, September 20, 2006 11:24 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] How to detect specific chipset in USB driver?
>
> I’d need to detect if my USB driver is running on a computer with
VIA
> chipset. It is nothing I’d like to do but there is a problem with
remote
> wakeup which occurs only on these machines when running Vista and I
need
> to solve it some way ASAP. I can use a workaround for this purpose
but
> we can’t afford to enable it globally (and reduce battery life at
> notebooks by 10%). The workaround is to disable selective suspend so
> remote wakeup won’t be needed. I don’t see a way how to detect
remote>
> wakeup isn’t working so I ponder to make decision based on chipset.
> Unfortunately, the decision has to be made by the driver not by user
> mode software where it’d be rather easy.
>
> Ideas welcome.
>
> Best regards,
>
> Michal Vodicka
> UPEK, Inc.
> [xxxxx@upek.com, http://www.upek.com]
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Michal Vodicka wrote:

>From: Calvin (Hao) Guan[SMTP:xxxxx@broadcom.com]
>
>
>>From: Michal Vodicka
>>
>>What should I look for? Scan PCI from BusNumber 0 and SlotNumber 0 and
>>check for VIA VID? Or something more clever?
>>
>>
>You would need a blind scan since the driver wouldn’t have knowledge of
>the connection topology.
>
>
>
When should I stop scanning? At the first failure or can there be gaps? If so what would be reasonable max values? BTW, would such driver pass WHQL tests if the function is marked obsolete? IIRC there is checks for imports.

Well, there can be 256 busses, 32 devices per bus, and 8 functions per
device. There certainly are gaps.

Are you talking about the PCI chipset or the USB controller chipset?
The PCI chipset is usually (always?) on PCI bus #0.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Thanks, Doron. I implemented it and it works as expected. The code which checks for high speed device is in the IsoUsb DDK sample.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
Reply To: Windows System Software Devs Interest List
Sent: Thursday, September 21, 2006 12:01 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to detect specific chipset in USB driver?

You need to explicitly ask for V3 (based on the interface size and the
version value in the QI). I am pretty sure there are samples on how to
get V2 (for IsHighSpeedDevice()), so you just need to adjust for v3.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Wednesday, September 20, 2006 2:57 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to detect specific chipset in USB driver?

Thanks, it looks promising. No problem with pre-Vista because there
remote wakeup works. I have to only make workaround at Vista. BTW, I
enabled traces and the remote wakeup signal from the device is
recognized. OS just doesn’t complete WaitWake IRP for some reasons.

If I understand correctly, I should send IRP_MN_QUERY_INTERFACE request
to get the structure with function pointers. I can check if I get
version 3 and if so, I can call QueryControllerType.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]

> ----------
> From:
xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com
] on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
> Reply To: Windows System Software Devs Interest List
> Sent: Wednesday, September 20, 2006 11:05 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] How to detect specific chipset in USB
driver?
>
> Well, USB_BUS_INTERFACE_USBDI_V3 in the WDK there is a function
pointer
> which can give you the PCI info for the HC.
>
>
> PUSB_BUSIFFN_QUERY_CONTROLLER_TYPE QueryControllerType;
>
> NTSTATUS
> (*PUSB_BUSIFFN_QUERY_CONTROLLER_TYPE) (
> __in_opt PVOID BusContext,
> __out_opt PULONG HcdiOptionFlags,
> __out_opt PUSHORT PciVendorId,
> __out_opt PUSHORT PciDeviceId,
> __out_opt PUCHAR PciClass,
> __out_opt PUCHAR PciSubClass,
> __out_opt PUCHAR PciRevisionId,
> __out_opt PUCHAR PciProgIf
> )
>
> From what I can gather, this is not available on a pre vista version
of
> usbport.sys so I don’t know if this helps you or not. Hopefully it
does
>
> D
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
> Sent: Wednesday, September 20, 2006 1:36 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] How to detect specific chipset in USB driver?
>
> We don’t have one installer; we have many and our customers write
their
> own. That’s the reason why it should be handled in the driver itself.
> Maybe I could write a coinstaller which’d be called when driver is
> installed but it looks like real PITA and I don’t have time for it
now.
>
> Also, somebody at MS put the driver to Windows Update (although we
> forbid it) and XP signed version is automatically installed at Vista
> (:-O) when the device is plugged in…
>
> Best regards,
>
> Michal Vodicka
> UPEK, Inc.
> [xxxxx@upek.com, http://www.upek.com]
>
>
> > ----------
> > From:
>
xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com
> ] on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]>
> > Reply To: Windows System Software Devs Interest List
> > Sent: Wednesday, September 20, 2006 9:27 PM
> > To: Windows System Software Devs Interest List
> > Subject: RE: [ntdev] How to detect specific chipset in USB
> driver?
> >
> > Can your installer figure this out at install time and then put a
reg
> > value down for your driver?
> >
> > – I can spell, I just can’t type.
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of Michal
Vodicka
> > Sent: Wednesday, September 20, 2006 11:24 AM
> > To: Windows System Software Devs Interest List
> > Subject: [ntdev] How to detect specific chipset in USB driver?
> >
> > I’d need to detect if my USB driver is running on a computer with
VIA
> > chipset. It is nothing I’d like to do but there is a problem with
> remote
> > wakeup which occurs only on these machines when running Vista and I
> need
> > to solve it some way ASAP. I can use a workaround for this purpose
but
> > we can’t afford to enable it globally (and reduce battery life at
> > notebooks by 10%). The workaround is to disable selective suspend so
> > remote wakeup won’t be needed. I don’t see a way how to detect
remote>
> > wakeup isn’t working so I ponder to make decision based on chipset.
> > Unfortunately, the decision has to be made by the driver not by user
> > mode software where it’d be rather easy.
> >
> > Ideas welcome.
> >
> > Best regards,
> >
> > Michal Vodicka
> > UPEK, Inc.
> > [xxxxx@upek.com, http://www.upek.com]
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > To unsubscribe, visit the List Server section of OSR Online at
> > http://www.osronline.com/page.cfm?name=ListServer
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> >
> > To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
> >
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer