WdfUsbTargetPipeFormatRequestForWrite failed (STATUS_REQUEST_NOT_ACCEPTED).

Hi,

I am working on a USB-serial Fdo WDF driver. So far it works fine on XP, but failed on Vista SP1 due to the error when calling the WdfUsbTargetPipeFormatRequestForWrite to format the USB writing request.

My code is like this:

pipe = pDeviceContext->BulkWritePipe;

status = WdfRequestRetrieveInputMemory(Request, &reqMemory);
if(!NT_SUCCESS(status)){
TraceEvents(TRACE_LEVEL_ERROR, DBG_WRITE, “%s:%s WdfRequestRetrieveInputBuffer failed %!STATUS!\n”,
MODULENAME, FUNCTION, status);
goto Exit;
}

pBuf = WdfMemoryGetBuffer(reqMemory, &Buflen);
DumpData(“->”, pBuf, Buflen);

TraceEvents(TRACE_LEVEL_INFORMATION, DBG_WRITE, “%s:%s pipe = 0x%x\n”, MODULENAME, FUNCTION, pipe);

status = WdfUsbTargetPipeFormatRequestForWrite(pipe,
Request,
reqMemory,
NULL); // Offset

The pipe and Request looks fine for me, but however it returns 0xc00000d0 ( STATUS_REQUEST_NOT_ACCEPTED) when calling WdfUsbTargetPipeFormatRequestForWrite.

Any help is very appreciated.

xxxxx@sierrawireless.com wrote:

I am working on a USB-serial Fdo WDF driver. So far it works fine on XP, but failed on Vista SP1 due to the error when calling the WdfUsbTargetPipeFormatRequestForWrite to format the USB writing request.

The pipe and Request looks fine for me, but however it returns 0xc00000d0 ( STATUS_REQUEST_NOT_ACCEPTED) when calling WdfUsbTargetPipeFormatRequestForWrite.

Here’s hoping this long URL makes it through OK.

http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.development.device.drivers&tid=1d2920ab-f289-43ff-951b-f54c7868a8ac


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

Thanks Tim. The link you posted seems does not fit in my case. My driver is a FDO driver just sit on the top of Microsoft USB composite driver. I do not have my own PDO driver below.

xxxxx@sierrawireless.com wrote:

Thanks Tim. The link you posted seems does not fit in my case. My driver is a FDO driver just sit on the top of Microsoft USB composite driver. I do not have my own PDO driver below.

Yes, I missed that detail in the link. Did you dump the KMDF in-flight
recorder log to see what it was complaining about? That should help
explain it.


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

Here is dump. It complained it cannot reallocate PIRP for the target. What does that mean?

676: FxIoQueue::DispatchRequestToDriver - Calling driver EvtIoWrite for WDFREQUEST 0x7C6D41F0
677: imp_WdfRequestRetrieveInputMemory - Enter: WDFREQUEST 0x7C6D41F0
678: imp_WdfUsbTargetPipeFormatRequestForWrite - WDFUSBPIPE 5B9DD740, WDFREQUEST 7C6D41F0, WDFMEMORY 7C6D4189
679: FxRequestBase::ValidateTarget - Cannot reallocate PIRP for WDFREQUEST 7C6D41F0 using WDFIOTARGET 5B9DD740, 0xc00000d0(STATUS_REQUEST_NOT_ACCEPTED)
680: FxUsbPipe::FormatTransferRequest - Pipe A46228B8, Request 8392BE08, setting target failed, status 0xc00000d0(STATUS_REQUEST_NOT_ACCEPTED)
681: FxUsbPipe::_FormatTransfer - WDFUSBPIPE 5B9DD740, WDFREQUEST 7C6D41F0, WDFMEMORY 7C6D4189, 0xc00000d0(STATUS_REQUEST_NOT_ACCEPTED)
682: imp_WdfRequestCompleteWithInformation - Completing WDFREQUEST 0x7C6D41F0, 0xc00000d0(STATUS_REQUEST_NOT_ACCEPTED)
683: FxRequest::Complete - Completing WDFREQUEST 0x7C6D41F0 for IRP 0x83E41530 with Information 0x0, 0xc00000d0(STATUS_REQUEST_NOT_ACCEPTED)
684: FxIoQueue::RequestCompletedCallback - Enter: WDFQUEUE 0x7C684C58, WDFREQUEST 0x7C6D41F0
685: FxDevice::FreeRequestMemory - Free FxRequest* 8392BE08 memory

It means that the number of stack locations remaining in the PIRP < target device object->StackSize. The format function will attempt to reallocate a PIRP if the WDFREQUEST is created by the driver, but since the WDFREQUEST was presented by a WDFIOQUEUE and created by the IO manager, the framework must leave the PIRP alone. If this is the stack enumerated by USB, run !devobj on your device object and on the attached device (both of the PDEVICE_OBJECT values you can get from running !WDFDEVICE )

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@sierrawireless.com
Sent: Thursday, June 19, 2008 11:47 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] WdfUsbTargetPipeFormatRequestForWrite failed (STATUS_REQUEST_NOT_ACCEPTED).

Here is dump. It complained it cannot reallocate PIRP for the target. What does that mean?

676: FxIoQueue::DispatchRequestToDriver - Calling driver EvtIoWrite for WDFREQUEST 0x7C6D41F0
677: imp_WdfRequestRetrieveInputMemory - Enter: WDFREQUEST 0x7C6D41F0
678: imp_WdfUsbTargetPipeFormatRequestForWrite - WDFUSBPIPE 5B9DD740, WDFREQUEST 7C6D41F0, WDFMEMORY 7C6D4189
679: FxRequestBase::ValidateTarget - Cannot reallocate PIRP for WDFREQUEST 7C6D41F0 using WDFIOTARGET 5B9DD740, 0xc00000d0(STATUS_REQUEST_NOT_ACCEPTED)
680: FxUsbPipe::FormatTransferRequest - Pipe A46228B8, Request 8392BE08, setting target failed, status 0xc00000d0(STATUS_REQUEST_NOT_ACCEPTED)
681: FxUsbPipe::_FormatTransfer - WDFUSBPIPE 5B9DD740, WDFREQUEST 7C6D41F0, WDFMEMORY 7C6D4189, 0xc00000d0(STATUS_REQUEST_NOT_ACCEPTED)
682: imp_WdfRequestCompleteWithInformation - Completing WDFREQUEST 0x7C6D41F0, 0xc00000d0(STATUS_REQUEST_NOT_ACCEPTED)
683: FxRequest::Complete - Completing WDFREQUEST 0x7C6D41F0 for IRP 0x83E41530 with Information 0x0, 0xc00000d0(STATUS_REQUEST_NOT_ACCEPTED)
684: FxIoQueue::RequestCompletedCallback - Enter: WDFQUEUE 0x7C684C58, WDFREQUEST 0x7C6D41F0
685: FxDevice::FreeRequestMemory - Free FxRequest* 8392BE08 memory


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

Thanks Doron. You are right. My solution for this is to create a new request and associate the memory buffer in original request and then send it down. In completion routine, delete the new request and complete the original request.

By the way, is it very helpful to add the explanation for this error code and cause in WDK doc?

Please use the feedback link at the bottom of the doc page and ask for the update (you can include a link to this thread via OSR’s web interface for the list)

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@sierrawireless.com
Sent: Friday, June 20, 2008 3:01 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] WdfUsbTargetPipeFormatRequestForWrite failed (STATUS_REQUEST_NOT_ACCEPTED).

Thanks Doron. You are right. My solution for this is to create a new request and associate the memory buffer in original request and then send it down. In completion routine, delete the new request and complete the original request.

By the way, is it very helpful to add the explanation for this error code and cause in WDK doc?


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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