Hi,
I am trying to develop my first KMDF USB device driver.
I have looked at KMDF 1.5 sample code. The following lines come from the
usbsamp bulkrwr.c starting from line 332:
status = WdfRequestRetrieveInputWdmMdl(Request, &requestMdl);
if(!NT_SUCCESS(status)){
UsbSamp_DbgPrint(1, (“WdfRequestRetrieveInputWdmMdl for %s
failed\n”, operation));
goto End;
}
I am not sure how the above code works. For Read operation, do we really
want to retrieve InputWdmMdl?
I am trying to use the DriverIO Staged Read/Write on CY3684 EVM from
Cypress. It seems to be ok on Staged Write, but I always failed at the
read operation with the status code = 0xC0000010
(STATUS_INVALID_DEVICE_REQUEST).
I am not sure if this is caused by the hardware or the driver. I am
still debugging. I hope somebody has some experience and save me
sometime on debugging.
Thanks,
Zhongsheng Wang
Software Design Engineer
Phone: (503)627-5260
Fax: (503)627-5622
Email: xxxxx@tek.com
The Input/Output part of the DDI WdfRequestRetrieveInputWdmMdl refers to the action that the driver will take on the buffer. For a read request, you have an output buffer b/c the caller supplies the buffer and the driver write to it, e.g. treat it as an output buffer. For a write request, you have an input buffer since the driver will be reading from the buffer.
how big of a read buffer are you sending down the stack ? is it a multiple of max packet size? if not, is your device terminating the last packet of the transfer correctly?
d
d
Thanks Doron:
The problem is kind of hardware related. The driver is working.
zhongsheng
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@Microsoft.com
Sent: Thursday, February 15, 2007 8:14 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Can anybody explain why the following code makes
sense?
The Input/Output part of the DDI WdfRequestRetrieveInputWdmMdl refers to
the action that the driver will take on the buffer. For a read request,
you have an output buffer b/c the caller supplies the buffer and the
driver write to it, e.g. treat it as an output buffer. For a write
request, you have an input buffer since the driver will be reading from
the buffer.
how big of a read buffer are you sending down the stack ? is it a
multiple of max packet size? if not, is your device terminating the
last packet of the transfer correctly?
d
d
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