I have been able to find very little on this error on the net, so I am hoping
the experience of this developer community might be able to help. We
developed and are using a high-speed capable device based on the philips
isp1582 USB device controller/transciever and a DSP. We have been
unsuccessful in getting any success when sending URBs targeted at any
endpoint other than the control endpoint. After exhaustive firmware search,
we have determined that the problem is in fact on the host PC side. All
control transfers work, but I can not make Bulk or interrupt transfers work.
Every attempt results in the same failure:
IoCallDriver fails with error code 0xC0000001 and Urbheader.Status holds
0xC0000011 (USBD_STATUS_XACT_ERROR). I have been unsuccessful in finding ANY
information about the MEANING of this error. What are the possible things
that cause it? I am convinced the problem is not in the firmware of the
device.
Here is some more information (and source):
My pdx->BulkInPipe is a bulk IN pipe with the following attributes:
endpoint address: 129 (0x81)
Interval: right now, it's 0xFF, but I've varied it with no success
MaximumPacketSize: 64 bytes (0x40)
//--------------------------------------------------------------------------------------------
//a bit from DispatchControl (with Debug prints removed) that concerns a
BULK IN IOCTL:
NTSTATUS DispatchControl(PDEVICE_OBJECT fdo, PIRP Irp)
{
PAGED_CODE();
PDEVICE_EXTENSION pdx = (PDEVICE_EXTENSION) fdo->DeviceExtension;
NTSTATUS status = STATUS_SUCCESS;
ULONG info = 0;
UNICODE_STRING sd;
USHORT NewFrequency, AnalogIndex;
status = IoAcquireRemoveLock(&pdx->RemoveLock, Irp);
if (!NT_SUCCESS(status))
return CompleteRequest(Irp, status, 0);
PIO_STACK_LOCATION stack = IoGetCurrentIrpStackLocation(Irp);
ULONG cbin = stack->Parameters.DeviceIoControl.InputBufferLength;
ULONG cbout = stack->Parameters.DeviceIoControl.OutputBufferLength;
ULONG code = stack->Parameters.DeviceIoControl.IoControlCode;
URB Urb;
switch (code)
{ // process request
case IOCTL_READ_BUFFERED:
UsbBuildInterruptOrBulkTransferRequest(&Urb,
sizeof(_URB_BULK_OR_INTERRUPT_TRANSFER),
pdx->BulkInPipe,
Irp->AssociatedIrp.SystemBuffer, NULL, cbout,
USBD_TRANSFER_DIRECTION_IN | USBD_SHORT_TRANSFER_OK, NULL);
status = SendAwaitUrb(fdo, &Urb);
break;
}
}
//--------------------------------------------------------------------------------------------
//Modified version of Walter Oney's SendAwaitUrb routine (again, shortened
to show only relevant parts):
NTSTATUS SendAwaitUrb(PDEVICE_OBJECT fdo, PURB urb)
{ // SendAwaitUrb
PAGED_CODE();
ASSERT(KeGetCurrentIrql() == PASSIVE_LEVEL);
PDEVICE_EXTENSION pdx = (PDEVICE_EXTENSION) fdo->DeviceExtension;
KEVENT event;
KeInitializeEvent(&event, NotificationEvent, FALSE);
IO_STATUS_BLOCK iostatus;
PIRP Irp = IoBuildDeviceIoControlRequest(IOCTL_INTERNAL_USB_SUBMIT_URB,
pdx->LowerDeviceObject, NULL, 0, NULL, 0, TRUE, &event, &iostatus);
if (!Irp)
{
return STATUS_INSUFFICIENT_RESOURCES;
}
PIO_STACK_LOCATION stack = IoGetNextIrpStackLocation(Irp);
stack->Parameters.Others.Argument1 = (PVOID) urb;
NTSTATUS status = IoCallDriver(pdx->LowerDeviceObject, Irp);
if (status == STATUS_PENDING)
{
KeWaitForSingleObject(&event, Executive, KernelMode, FALSE, NULL);
status = iostatus.Status;
}
return status;
} // SendAwaitUrb
//--------------------------------------------------------------------------------------------
Irp->AssociatedIrp.SystemBuffer contains 64 bytes at the call to
UsbBuildInterruptOrBulkTransferRequest. The call to IoCallDriver returns
iostatus.status = 0xC0000001
(STATUS_UNSUCCESSFUL - wonderfully descriptive) and the Urb.Urbheader.Status
yeilds 0xC0000011 (USBD_STATUS_XACT_ERROR). Neither of these tell me anything
that can help me
trace this error down. Any help would be appreciated! Thanks in advance,
Jason Martin