http://groups.google.com/group/microsoft.public.development.device.drivers?hl=en
microsoft.public.development.device.drivers@googlegroups.com
Today's topics:
* use createfile to access usb device - 1 messages, 1 author
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/f2a601c497597b51?hl=en
* AVStream Driver filter: GraphEdt initiating stop - 2 messages, 2 authors
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/44a44576524b32ca?hl=en
* Installing kbfiltr sample.. - 3 messages, 3 authors
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/65bf0a37344c3251?hl=en
* Scatter/gather list with only one element - 3 messages, 2 authors
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/0fea62ceef109b85?hl=en
* Running TCP/IP Over cPCI Backplane - 2 messages, 2 authors
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/aaea9bce38c968d5?hl=en
* DIFx 2.1: DPInst.exe and 'Welcome to the Found New Hardware Wi - 1 messages,
1 author
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/4b5c835eb9880b54?hl=en
* dpinst problem when running in Vista non-administrator mode - 1 messages, 1
author
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/40b3822895602952?hl=en
* printer notification - 1 messages, 1 author
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/9d3d86813e949f36?hl=en
* OPOS SO LineDisplay CreateWindow problem - 1 messages, 1 author
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/a220beb0ee3cb3b9?hl=en
* Driver Signing: Vista: Driver File details: Digital signer - 1 messages, 1
author
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/a143962c85dc4dc0?hl=en
* ndis passthru question - 1 messages, 1 author
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/73b34647edd0955c?hl=en
* How to monitor IP addresses in the vista kernel? - 1 messages, 1 author
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/fd3beb28339a3c83?hl=en
* KMDF1.5: Reading from USB interrupt endpoints - 3 messages, 2 authors
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/c5d6acf97b7796db?hl=en
* Packet alignment constraint in WinUSB - 3 messages, 1 author
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/e2fefa52792b695b?hl=en
* WDFMEMORY handle and memory buffer - 1 messages, 1 author
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/c3d76eea8180d7ee?hl=en
==============================================================================
TOPIC: use createfile to access usb device
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/f2a601c497597b51?hl=en
==============================================================================
== 1 of 1 ==
Date: Thurs, Jun 5 2008 12:01 am
From: "Maxim S. Shatskih"
> > can u tell me how to accee thes api's from visual c++ application
Add setupapi.lib to your lib list in the IDE's project options.
Then just type SetupDiGetClassDevs in the code, and include setupapi.h to
stdafx.h
As about the coding sample - DEVCON source in the WDK is the proper one, it is
the command-line Device Manager.
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com
==============================================================================
TOPIC: AVStream Driver filter: GraphEdt initiating stop
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/44a44576524b32ca?hl=en
==============================================================================
== 1 of 2 ==
Date: Thurs, Jun 5 2008 12:24 am
From: ShivaP
Hi all,
I have a problem with the pin-centric kernel mode wdm avstream driver filter
for a usb device. first time when I build the graph and start playing the
graph in graphedt, it plays fine and when stops fine.
But for the next time, when the graph is played, it plays the graph for 2 -3
seconds and then the graph edt application initiates a stop operation.
I also get a error message in the graph edit application
"The graph could not change state"
Catastrophic failure (return code: 0x8000ffff)
Under what situation does the graphedit gives such a error message and stops
playing the graph.
Also, please note, when I re-initialize the device, by plugging out and
plugging in, and then re-open the graphedit application and play the graph,
it works fine agai for the first time.
Can somebody help to solve this issue..
Thanks..
== 2 of 2 ==
Date: Thurs, Jun 5 2008 3:31 am
From: "Igor V. Slewsarev"
Try to send EOS
==============================================================================
TOPIC: Installing kbfiltr sample..
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/65bf0a37344c3251?hl=en
==============================================================================
== 1 of 3 ==
Date: Thurs, Jun 5 2008 12:33 am
From: Thiago
I will only use this filter in my PC with Windows XP installed and i'm
not going to make a release for Windows Vista.
Thanks for your tip.
== 2 of 3 ==
Date: Thurs, Jun 5 2008 1:01 am
From: "Maxim S. Shatskih"
Write it to UpperFilters multi-string value below KbdClass at
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E96B-E325-11CE-B
FC1-08002BE10318}
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com
"Thiago" <thiforums@gmail.com> wrote in message
news:b02770a6-8dcc-4d4c-b718-d477a04bbc65@56g2000hsm.googlegroups.com...
> This is not a really "how to install the kbfiltr sample driver?"
> question! I know that it comes with a text teaching how to install it.
> The problem is that it uses a .INF file and i want to know how to
> install it without this .INF file. I tried to use the Driver Loader,
> it registers the driver but i can't start its service because it gives
> me the following error: "The service could not be started because it
> is disabled or does not have associated devices enabled." I tried to
> restart the computer and this message still appears!
> Any solution?
== 3 of 3 ==
Date: Thurs, Jun 5 2008 10:11 am
From: Ray Trent
Cool... so why exactly do you care if it's installed with an INF file?
Is there some reason you're trying to make this as difficult as possible
on yourself?
Anyway, as others have said, you can get it to work by adding your
service and then putting it in i8042prt's UpperFilters key. But it's
still only about 1% of what UpdateDriverForPlugAndPlayDevices does when
given an INF file, even on XP.
Thiago wrote:
> I will only use this filter in my PC with Windows XP installed and i'm
> not going to make a release for Windows Vista.
>
> Thanks for your tip.
--
Ray
==============================================================================
TOPIC: Scatter/gather list with only one element
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/0fea62ceef109b85?hl=en
==============================================================================
== 1 of 3 ==
Date: Thurs, Jun 5 2008 12:23 am
From: alex
Maxim S. Shatskih wrote:
>> Then I allocate a DMA adapter with IoGetDmaAdapter(). When I use
>> GetScatterGatherList() the list I receive in my AdapterListControl
>> function has always 1 element, regardless of the length of the transfer.
>
> Can you look at the MDL passed to GetScatterGatherList and its tail?
I'm not sure I know what the MDL tail is. How can I inspect it?
Looking at the fields of the MDL structure I see meaningful numbers,
such as:
StartVa: 2219864064
ByteOffset: 52
ByteCount: 40000
Is it possible that GetScatterGatherList() coalesces many elements in
one, i.e. if it has 10 contiguous physical pages it fills the structure
with one entry of length 40960?
> what the the physical page numbers?
How can I find the physical page numbers in the MDL?
Bye
Alex
== 2 of 3 ==
Date: Thurs, Jun 5 2008 1:06 am
From: "Maxim S. Shatskih"
> Is it possible that GetScatterGatherList() coalesces many elements in
> one, i.e. if it has 10 contiguous physical pages it fills the structure
> with one entry of length 40960?
Surely.
> > what the the physical page numbers?
> How can I find the physical page numbers in the MDL?
Several 64bit (for PAE and x64 OS) or 32bit words just after struct _MDL, each
word describing 1 page.
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com
== 3 of 3 ==
Date: Thurs, Jun 5 2008 7:42 am
From: alex
Maxim S. Shatskih wrote:
>>> what the the physical page numbers?
>> How can I find the physical page numbers in the MDL?
>
> Several 64bit (for PAE and x64 OS) or 32bit words just after struct _MDL, each
> word describing 1 page.
Ok, did a transfer of 81920 bytes and looking at the first 5 32 bit
DWORDs after the struct _MDL I see these page frame numbers:
8916
8920
8924
8928
8932
(in decimal representation)
They are regularly spaced, but they're not consecutive. What can I infer
about the physical memory layout?
Bye
Alex
==============================================================================
TOPIC: Running TCP/IP Over cPCI Backplane
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/aaea9bce38c968d5?hl=en
==============================================================================
== 1 of 2 ==
Date: Thurs, Jun 5 2008 12:58 am
From: "Maxim S. Shatskih"
Is your hardware an Ethernet hardware? then write NDIS miniport for it.
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com
"Boby George" <bgeorge@nospam.microsoft.com> wrote in message
news:uTPTGcpxIHA.2360@TK2MSFTNGP05.phx.gbl...
> We have hardware that has cPCI backplane. Now we would like to run a TCP/IP
> stack over this cPCI backplane. I looked around on MSDN and found few
> references to samples like "Sample NDIS WDM Miniport Driver", "NDIS Virtual
> Miniport Driver". I am not sure which is the right approach. Are there any
> other samples or documentation that I can look into regarding this
> implementation. Any guidance is greatly appreciated.
>
> Thanks,
>
> Boby
>
>
== 2 of 2 ==
Date: Thurs, Jun 5 2008 10:05 am
From: "Boby George"
Our hardware has multiple perpherals like Ethernet, USB, SATA etc. But in
this case I need to run Ethernet protocol stack over the PCI Backplane. I
hope it make sense.
Thanks,
Boby
"Maxim S. Shatskih" <maxim@storagecraft.com> wrote in message
news:O5GqqHuxIHA.5892@TK2MSFTNGP02.phx.gbl...
> Is your hardware an Ethernet hardware? then write NDIS miniport for it.
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> maxim@storagecraft.com
> http://www.storagecraft.com
>
> "Boby George" <bgeorge@nospam.microsoft.com> wrote in message
> news:uTPTGcpxIHA.2360@TK2MSFTNGP05.phx.gbl...
>> We have hardware that has cPCI backplane. Now we would like to run a
>> TCP/IP
>> stack over this cPCI backplane. I looked around on MSDN and found few
>> references to samples like "Sample NDIS WDM Miniport Driver", "NDIS
>> Virtual
>> Miniport Driver". I am not sure which is the right approach. Are there
>> any
>> other samples or documentation that I can look into regarding this
>> implementation. Any guidance is greatly appreciated.
>>
>> Thanks,
>>
>> Boby
>>
>>
>
==============================================================================
TOPIC: DIFx 2.1: DPInst.exe and 'Welcome to the Found New Hardware Wi
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/4b5c835eb9880b54?hl=en
==============================================================================
== 1 of 1 ==
Date: Thurs, Jun 5 2008 1:16 am
From: Galit Heller
We reported this issue to Microsoft a few months back. They say they can do
nothing at this stage.
BTW, in Vista it doesn't happen (since version 2.1)
"Nick Rivers" wrote:
> The ''Welcome to the Found New Hardware Wizard' dialog blocks DPInst.
> I could still need some advice.
>
> Anyone from DIFx please?
>
> "Nick Rivers" <nrivers@yahoo.com> wrote in message
> news:OJRov4$hIHA.1212@TK2MSFTNGP05.phx.gbl...
> > Anyone please? DIFx team?
> >
> > "Nick Rivers" <nrivers@yahoo.com> wrote in message
> > news:ONFhZTRhIHA.5468@TK2MSFTNGP03.phx.gbl...
> >> Hello DIFx team members,
> >>
> >> I´ve just tried to use DPInst.exe v2.1 to install my signed driver
> >> packages with Windows XP SP2.
> >>
> >> Here is my problem:
> >> DPInst.exe does not continue installing the driver packages until the
> >> 'Welcome to the Found New Hardware Wizard'
> >> dialog will be closed.
> >> I did not encounter this problem using DIFxAPI instead.
> >>
> >> Do you know why? Is there a solution or is it as designed?
> >>
> >> Thanks
> >> Nick
> >>
> >
> >
>
>
>
==============================================================================
TOPIC: dpinst problem when running in Vista non-administrator mode
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/40b3822895602952?hl=en
==============================================================================
== 1 of 1 ==
Date: Thurs, Jun 5 2008 1:24 am
From: Galit Heller
Hi,
I've encountered the following problem when attempting to run dpinst
(version 2.1.0.0) on Vista systems (both32 and 64 bit) w/o administrator
privileges:
The hourglass-circle flashes, task manager shows multiple instances of the
dpinst process, and memory utilization is high.
After approx 10 minutes (actually on 64 bits only reboot helped, after ~30
minutes), the processes disappear and the system returns to normal memoryand
cpu utilization. DPInst.log isn't created, driver isn't installed, and no
error message is shown - which poses a problem for the end user of the
installation package, which invokes dpinst as a custom action.
In XP, the same dpinst.exe program presents an appropriate error dialog
saying user does not have sufficient privileges to install.
Is this a know issue with dpinst ? Is there any workaround to eliminate the
issue ?
Thanks,
Galit
==============================================================================
TOPIC: printer notification
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/9d3d86813e949f36?hl=en
==============================================================================
== 1 of 1 ==
Date: Thurs, Jun 5 2008 2:48 am
From: @nam
Hello,
I have no prior experience with ddk or wdk. I dont want to write a device
driver. I just need a notification when a user issues a print command. I want
to know which file he/she has asked to print. Please help me in this
endeavour of mine. I will appreciate it. Many thanks.
--
-@nam
==============================================================================
TOPIC: OPOS SO LineDisplay CreateWindow problem
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/a220beb0ee3cb3b9?hl=en
==============================================================================
== 1 of 1 ==
Date: Thurs, Jun 5 2008 4:24 am
From: eskomk
On Jun 4, 2:09 pm, "Maxim S. Shatskih" <ma...@storagecraft.com> wrote:
> Correct, this is a macro defined to CreateWindowA or CreateWindowW
>
> Why is this bad?
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> ma...@storagecraft.comhttp://www.storagecraft.com
>
> "eskomk" <esko.huja...@gmail.com> wrote in message
>
> news:0877a2c3-f20b-484f-bc0b-ae5f3929bf4c@e53g2000hsa.googlegroups.com...
>
> > Hi,
>
> > How can I solve this problem:
> > MS VisualStudio C++ thinks that CreateWindow is a macro and tries to
> > expand it.
>
> > It seems that this is a well-known problem, however I have not found
> > any applicable solution.
>
> > -Esko
This clip from
http://www.wincor-nixdorf.com/internet/cae/servlet/contentblob/70232/publicationFile/6402/Opos16readme_download.pdf
explains it better than I can:
CLIP1 -->
Remark 2: For the OPOS line display class, it is necessary
to rename the methods:
DestroyWindow -> xDestroyWindow
CreateWindow -> xCreateWindow
in the wrapper class (*.h and *.cpp file). Also,
the access to these methods in the application
should be done with these names. Otherwise the
C++ - compiler will generate many syntax errors
like
"Create Window: illegal number of arguments in
CreateWindowA"
The reason is a "misunderstanding" between the
Class Wizard and the MSVC system headers. In the
system headers the name CreateWindow and
DestroyWindow are used as macro definitions
and they are mapped to DestroyWindowA and
CreateWindowA in the ANSI version. Microsoft uses
this macro-replacing -mechanism to allow ANSI
and UNICODE compiling. However, if you have C++
classes with a method using a "reserved"
word the compiler will generate errors.
In general: you should not use method names
which are already used in the Window API. This is
not a restriction of the language C++ but of the
MSVC compiler.
CLIP1 <--
It is not only when creating with wizard, if you try and modify the
sources to be "CreateWindow", not (e.eg) "xCreateWindow", error
messages follows.
Now I had #undef:ed CreateWindow, but it still gives me error
error C2059: syntax error : 'constant'
on a header file which the compiler generates, on the last line of
this clip:
CLIP2 -->
virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
CreateWindow(
LONG LViewportRow,
LONG LViewportColumn,
LONG LViewportHeight,
LONG LViewportWidth,
LONG LWindowHeight,
LONG LWindowWidth) = 0;
CLIP2 <--
-Esko
==============================================================================
TOPIC: Driver Signing: Vista: Driver File details: Digital signer
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/a143962c85dc4dc0?hl=en
==============================================================================
== 1 of 1 ==
Date: Thurs, Jun 5 2008 4:22 am
From: kota
Hi,
We have followed the driver signing as it explained in the below paper:
http://www.microsoft.com/whdc/winlogo/drvsign/kmcs_walkthrough.mspx.
In the device manager: in Driver Tab, it shows the digital signer: as our
company name. but not in "Driver File details/Digital signer", here it shows
as not digitally signed.
Also in system info(msinfo32 from Run), here under software
environment\signed drivers also, it shows that driver is "not signed".
Also tried with below sequence to test it, but result is same.
1) signed the driver 2) stamped the inf 3) generate the catalogue 4) sign
the catalogue 5) verified the catalogue with sys & inf.
With this sequence also, it shows that driver is not signed in driver file
details & system info\signeddrivers, but it shows that it is signed in driver
tab.
Question 1. Why in Driver file details it is not shown as above?
-------------------------------------------------------------------------------
2): We followed the same sequence for xp-32 & xp-64, here it shows the WHQL
pop up that not signed, also in device manager\driver tab also, it is not
showing that driver is signed, where as in vista atleast here it is signed.
I tried to install the xp-32 driver package on vista-32, it works in above
vista-32 way.
Question 2) Why is xp is not showing the signing details atleast like vista.
Note: We have verisign SPC, while installing in vista, it shows that our
company as publisher for this driver.
Thanks,
Kota.
Thanks,
Kota
==============================================================================
TOPIC: ndis passthru question
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/73b34647edd0955c?hl=en
==============================================================================
== 1 of 1 ==
Date: Thurs, Jun 5 2008 6:56 am
From: PCAUSA
On Jun 4, 10:37 pm, Joey <oinkshan...@gmail.com> wrote:
> Thanks for the replies,
>
> I think I'm confused because of this:
>
> "If the MiniportSend(Packets) function of a serialized driver returns
> a status other than NDIS_STATUS_PENDING for a given packet, the
> miniport driver never calls NdisMSendComplete with that packet. The
> return from MiniportSend(Packets) releases ownership of such a packet.
> Consequently, a serialized miniport driver must not call
> NdisMSendComplete with any packet for which its MiniportSend(Packets)
> function did not return NDIS_STATUS_PENDING. Any send packet for which
> a serialized NIC driver returns something other than
> NDIS_STATUS_PENDING should be considered inaccessible by that miniport
> driver as soon as its MiniportSend(Packets) function returns control.
> "
>
> I don't understand why does the passthru call NdisMSendComplete from
> within MpSend even though the status returned !=pending. Is it
> pretending that the send was completed? What happens if the packet is
> inaccessible and passthru doesn't call NdisMSendComplete?
>
> if (Status != NDIS_STATUS_PENDING)
> {
> NdisMSendComplete(ADAPT_MINIPORT_HANDLE(pAdapt),
> Packet,
> Status);
> }
>
> Thanks,
> Joey
When NDIS_STATUS_PENDING is returned from MPSend that status really
means "NDIS will call the send complete callback. It may actually have
called it already or it may call it later. But NDIS will call it".
If any other status is returned, then NDIS will _not_ call the send
complete handler.
Thomas F. Divine
http://www.pcausa.com
==============================================================================
TOPIC: How to monitor IP addresses in the vista kernel?
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/fd3beb28339a3c83?hl=en
==============================================================================
== 1 of 1 ==
Date: Thurs, Jun 5 2008 8:36 am
From: ehippo
Hi, guys.
I need detect routed packets in my NDIS LWF driver, so I need to
receiver notification about adding and deleting of IP address.
In NT kernel I could use TdiRegisterPnPHandlers.
But if it is possible I want to do it in some other _VISTA_ way (wsk,
iphlp, wfp etc ), so how could I do this?
==============================================================================
TOPIC: KMDF1.5: Reading from USB interrupt endpoints
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/c5d6acf97b7796db?hl=en
==============================================================================
== 1 of 3 ==
Date: Thurs, Jun 5 2008 8:58 am
From: Johan Paul
Hi all,
Just a short question I have been wondering for a while now and I
would like to get this cleared; Am I right that I can read from a USB
interrupt endpoint in the same way I can read from a bulk endpoint? In
other words, I do not need to worry about if the endpoint is bulk or
interrupt as long as I parse the interface+endpoint descriptors right
and find my pipes? I remember reading from the Windows Driver
Foundation book that KMDF supports both bulk and interrupt endpoints,
but does this imply what I stated above?
I know that the osrusbfx2 example uses a continuous reader for an
interrupt endpoint, but I would like to read from the interrupt
endpoint just as I would from an bulk endpoint.
Now I just seem to have a problem that when I send a read request to
an interrupt endpoint the request's completion routine is never called
- although I can see from USB bus traces that the host controller ACKs
the IN transaction for the read - and thus the read request from the
user space application never returns.
I can successfully read from bulk endpoints with this same code - the
only difference is the endpoint's type.
What am I missing? Thanks!
BR,
Johan
== 2 of 3 ==
Date: Thurs, Jun 5 2008 11:51 am
From: "Doron Holan [MSFT]"
you are not missing anything, you can read/write to an interrupt endpoint
using the same APIs that you read/write to an bulk endpoint
d
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"Johan Paul" <johan.paul@gmail.com> wrote in message
news:dfa6b5b5-6bd9-4a57-9f20-a672e9eaaa5f@x41g2000hsb.googlegroups.com...
> Hi all,
>
> Just a short question I have been wondering for a while now and I
> would like to get this cleared; Am I right that I can read from a USB
> interrupt endpoint in the same way I can read from a bulk endpoint? In
> other words, I do not need to worry about if the endpoint is bulk or
> interrupt as long as I parse the interface+endpoint descriptors right
> and find my pipes? I remember reading from the Windows Driver
> Foundation book that KMDF supports both bulk and interrupt endpoints,
> but does this imply what I stated above?
>
> I know that the osrusbfx2 example uses a continuous reader for an
> interrupt endpoint, but I would like to read from the interrupt
> endpoint just as I would from an bulk endpoint.
>
> Now I just seem to have a problem that when I send a read request to
> an interrupt endpoint the request's completion routine is never called
> - although I can see from USB bus traces that the host controller ACKs
> the IN transaction for the read - and thus the read request from the
> user space application never returns.
>
> I can successfully read from bulk endpoints with this same code - the
> only difference is the endpoint's type.
>
> What am I missing? Thanks!
>
>
> BR,
>
> Johan
== 3 of 3 ==
Date: Thurs, Jun 5 2008 12:05 pm
From: Johan Paul
Thanks Doron for your answer! This makes me feel a lot better. Do you
have any ideas why I now seem to miss the completion routine although
the host controller ACKs the IN transaction? Do you know, for example,
if some host controllers would have issues with this? I am sure the same
code works, for example, inside VMWare (VMWare running XP32, Vista32
inside VMWare) but I tested this today on my AMD64 laptop with Vista32
installed on it and saw that the read never completes.
I thought I would try tomorrow to do the read operation synchronously to
see if that makes a differance.
--
Johan
> you are not missing anything, you can read/write to an interrupt
> endpoint using the same APIs that you read/write to an bulk endpoint
>
> d
>
==============================================================================
TOPIC: Packet alignment constraint in WinUSB
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/e2fefa52792b695b?hl=en
==============================================================================
== 1 of 3 ==
Date: Thurs, Jun 5 2008 9:41 am
From: Paarvai Naai
Thanks for your reply. That also agrees with our testing of RAW_IO. Would
it be possible to update the MSDN docs to reduce confusion for other users?
If you could forward this request to the appropriate people, it would be much
appreciated.
Please see the RAW_IO description in the following page:
http://msdn.microsoft.com/en-us/library/aa476450.aspx
Best Regards,
Paarvai
"Randy Aull (MS)" wrote:
> You are correct that the MaxPacket restriction only applies to IN endpoints.
> The purpose of the constraint on IN endpoints is to prevent a malicious or
> malfunctioning usermode client from causing a babble condition on the bus.
== 2 of 3 ==
Date: Thurs, Jun 5 2008 10:15 am
From: Paarvai Naai
My intention was not for this to have become such a passionate
discussion. I would simply like to address the technical issues in as
accurate a manner as possible. Since this is a public forum, we have
a responsibility to future users to ensure that the information
contained in this thread is correct.
> >> There are no other ways. USB transfers are aligned, period.
> >...
> >> No, it is just plain impossible. "Raw" means - no extra processing,
> >> exactly as on USB wire. This means the alignment requirement. If
> >> you do not want this requirement - go away from raw mode, you will
> >> have the same functionality as in both UNIXen.
> >
> >This is incorrect. Please refer to the EHCI specification:
>
> I am curious to know what part of Maxim's statement you believe is
> contradicted by this section.
Actually, the entire statement is incorrect.
Here is the detailed explanation:
1) Neither read nor write transfer requests that are submitted to the
EHCI host controller are required to be aligned to MaxPacket. This is
as per EHCI specification and was confirmed by Randy in this thread.
This directly contradicts the above statement "Raw means - no extra
processing, exactly as on USB wire. This means the alignment
requirement."
2) Both Linux and Darwin user-mode USB drivers do not enforce an
alignment requirement on the user-mode application. Furthermore, they
do not internally allocate aligned buffers to satisfy a fictitious
MaxPacket alignment requirement. Since we have visibility into the
source code, we are able to directly confirm this behavior. This
directly contradicts the above statement "If you do not want this
requirement - go away from raw mode, you will have the same
functionality as in both UNIXen."
3) Given the above two points, it is certainly not "plain impossible."
> >Therefore, for both OUT and IN packets, partial packet transfers are
> >fully supported by the EHCI hardware.
>
> !!! What? How did you possibly come to that conclusion? What those
> paragraphs say exactly match what the rest of us have been saying: when a
> device sends more data than the request asked for, that's "babble", which
> is a protocol violation.
First of all, Maxim's post was not talking about babble. The only
posts that mention babble are yours and Randy's. However in Randy's
post, he confirms that there is an artificial restriction at the
WinUSB level to avoid babble.
---
Now, the restriction on MaxPacket allignment is not imposed by the
lower USB stack. It is in fact imposed by the WinUSB driver
itself. This is to prevent malicious or malfunctioning software from
causing a babble condition on the bus.
---
I am not concerned with babble. Rather, I already know in advance
that our device will send a partial packet. I should be allowed to
request exactly that much data through WinUSB, just as we can in our
kernel driver. Of course, given Randy's response, I would like to
understand the consequences of "malicious or malfunctioning software"
in more detail.
> "Partial packet transfers" are supported, yes, but only in the sense
> that the DEVICE is allowed to send less than the maximum packet
> size.
Of course the device can send less than MaxPacket bytes in a packet.
However, the issue in question is whether the host-side software
(driver, application, etc.) should be allowed to request a non-aligned
number of bytes from the host controller.
> >This makes sense, since Linux
> >and Darwin both have the same behavior as I previously described.
>
> No, it doesn't.
I'm happy to clarify this point further.
Both Linux and Darwin allow the host-side software to request a
non-aligned number bytes from the host controller. If the device
responds with less than or equal to the amount requested, everything
goes smoothly with no additional overhead. If a babble condition
occurs, both operating systems gracefully return an error condition so
that the application can deal with it appropriately.
As it stands now, WinUSB does not allow this under RAW_IO, thus
requiring an extra buffer allocation and copy for non-aligned packets.
It seems like a minor issue, but is a perfectly legitimate topic of
discussion for this newsgroup. (We are already in the process of
discussing why non-RAW_IO doesn't work well for us on a different
thread.)
> >Is it possible for somebody at Microsoft with visibility into the
> >source code to comment on this issue?
>
> This newsgroup is not an official Microsoft support channel. If you want
> an official word, you will have to call Microsoft support and pay for a
> support event.
This posting was explicitly filed as a suggestion. We already have a
workaround (allocate + copy) for this issue. Our purpose for
discussing the matter is with the hopes that Microsoft can improve
their products for the benefit of all developers.
In this vein, it is in Microsoft's best interests to be involved with
the discussions of the community. From time to time, when the issue
becomes sufficiently technical, they do reply to postings. This is to
be expected, since they are the only ones with visibility into the
source code. We appreciate Randy's responses to this thread.
Best Regards,
Paarvai
== 3 of 3 ==
Date: Thurs, Jun 5 2008 10:40 am
From: Paarvai Naai
> >My understanding is that WinUSB imposes the MaxPacket limitation to
> >prevent a security issue in which user-mode software can stall the
> >EHCI controller for the entire system. Is this correct?
>
> No, that's silly. A stall on an endpoint affects ONLY that endpoint.
You are correct that the EHCI specification states that only the
particular Queue Head will be stalled.
However, we do not know how the Windows EHCI driver behaves when this
happens. Randy's post seems to suggest that there are cross-endpoint
implications. Otherwise, why would he have expressed a concern for
malicious software affecting the system?
WinUSB only allows a single process to use a device. Therefore, any
behavior that is contained within a single device should not have
security implications for other processes. If the process wants to
continue using the endpoint, it can issue a WinUsb_ResetPipe to clear
the halt condition. Furthermore, when the process terminates, the
Queue Heads are most likely un-linked and the stall will no longer be
a concern.
Could Randy or someone else at Microsoft possibly comment on this?
> Look, if the limitations of WinUSB aren't acceptable for you, then for
> goodness sakes, just throw WinUSB in the trash and write a kernel driver.
> Kernel USB drivers are not that hard to write.
>
> WinUSB is a good solution for many USB problems. However, it is NOT the
> solution for EVERY USB problem.
You seem to have experience with USB driver development. I assure you
that our team also has extensive experience with driver development on
multiple platforms, down to both the device and host controller
hardware. As I had mentioned in a previous post, we already have a
working kernel-mode driver. Since we use user-mode drivers on Linux
and Darwin, we would like to use a user-mode driver on Windows to
achieve a more consistent development and end-user experience.
Our intention on these forums is to use our cross-platform experience
to provide constructive input that can improve WinUSB. Our experience
with the other platforms seems to suggest that what we are asking is
reasonable. We are perfectly willing to be convinced otherwise, but
would appreciate if we could be given some solid technical
justification for why this particular design decision was made.
I don't quite understand your unwillingness to discuss the limitations
that we bring up. We (and probably also you) do not have access to
either WinUSB or the Windows EHCI driver source code. Therefore, all
of our information comes from the sparse documentation provided on
MSDN, and is necessarily second-hand. It is only fair to allow us to
continue this process of inquiry until a resolution is reached, rather
than simply attempt to shut down the discussion by telling us to write
a kernel driver (that we already have).
Best Regards,
Paarvai
==============================================================================
TOPIC: WDFMEMORY handle and memory buffer
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/c3d76eea8180d7ee?hl=en
==============================================================================
== 1 of 1 ==
Date: Thurs, Jun 5 2008 11:45 am
From: "Doron Holan [MSFT]"
if you have a race with a uuid, you will have a race withy any other way you
use to construct an ID. a PDO_IDENTIFICATION_DESCRIPTION will be copied by
the framework, you do not need to allocate these dynamically. you might
need to allocate memory that the description points to
d
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"泛若不繫舟" <ZivHuang@gmail.com> wrote in message
news:23f1810b-5173-48a2-9439-a9b927feb2a1@q24g2000prf.googlegroups.com...
> Hi Maxim,
>
> ExUuidCreate is a good idea, but this function only can be called at
> PASSIVE_LEVEL. >_<
> I need store the signature when reporting the child is creating and
> missing.
> And I also need to consider about race condition when making that
> signature.
>
> Is there any good solution for that? Thanks. ^_^
>
> Ziv
>
> On 6月4日, 下午1時50分, "Maxim S. Shatskih" <ma...@storagecraft.com> wrote:
>> ExUuidCreate is the correct way for such kind of things.
>>
>> --
>> Maxim Shatskih, Windows DDK MVP
>> StorageCraft Corporation
>> ma...@storagecraft.comhttp://www.storagecraft.com
>>
>> "?????" <ZivHu...@gmail.com> wrote in message
>>
>> news:d81a155e-05ca-455e-a9a3-de59af093cf3@z24g2000prf.googlegroups.com...
>>
>>
>>
>> > Hi all,
>>
>> > I'm writing a bus driver. I make child's signature by using WDFMEMORY
>> > handle.
>>
>> > Is there any possible I get the same handle value with different
>> > memory buffer at different time?
>>
>> > If so, using the WDFMEMORY hanle as child's signature may be risky.
>> > ^_^a
>>
>> > May I use systemtime to contruct PDO_IDENTIFICATION_DESCRIPTION?
>>
>> > Is it safe enough?
>>
>> > Thanks.
>>
>> > Ziv- 隱藏被引用文字 -
>>
>> - 顯示被引用文字 -
>
==============================================================================
You received this message because you are subscribed to the Google Groups "microsoft.public.development.device.drivers"
group.
To post to this group, visit http://groups.google.com/group/microsoft.public.development.device.drivers?hl=en
To unsubscribe from this group, send email to microsoft.public.development.device.drivers-unsubscribe@googlegroups.com
To change the way you get mail from this group, visit:
http://groups.google.com/group/microsoft.public.development.device.drivers/subscribe?hl=en
To report abuse, send email explaining the problem to abuse@googlegroups.com
==============================================================================
Google Groups: http://groups.google.com?hl=en
No comments:
Post a Comment