How to complete URB_FUNCTION_ISOCH_TRANSFER ?

Hi all

I have been trying to complete the URB request URB_FUNCTION_ISOCH_TRANSFER
in my lower level driver . But for some reason , the code shown below does
not accomplish the task . And the upper layer thinks some thing went wrong
and it sends me Abort Pipe and Reset Pipe . Can anybody help me to figure
out what I am doing wrong ?

pActUrb = &pUrb->UrbIsochronousTransfer;

if(pActUrb->TransferBufferMDL)
pUrb->UrbIsochronousTransfer.TransferBufferLength =
pIrp->IoStatus.Information=
MmGetMdlByteCount(pActUrb->TransferBufferMDL);
else
pUrb->UrbIsochronousTransfer.TransferBufferLength =
pIrp->IoStatus.Information=
pActUrb->TransferBufferLength;

pUrb->UrbHeader.Status = USBD_STATUS_SUCCESS;
pUrb->UrbIsochronousTransfer.ErrorCount = 0;

if(pActUrb->TransferFlags & USBD_START_ISO_TRANSFER_ASAP )
pActUrb->StartFrame = GetFrameNumberImmediate(pDevObject);

for(i = 0 ; i < pActUrb->NumberOfPackets;i++)
{
pActUrb->IsoPacket[i].Length =
pActUrb->TransferBufferLength/pActUrb->NumberOfPackets;
pActUrb->IsoPacket[i].Status = USBD_STATUS_SUCCESS;
}

pIrp->IoStatus.Status = STATUS_SUCCESS;
IoCompleteRequest (pIrp, IO_NO_INCREMENT );
return STATUS_SUCCESS;

This is what I do after filling all the parameters as shown above . Is
there
anything I am missing ?

Thanks in advance
srinivasa

Hi all

I still could not figure out what is wrong in completing the IRP .I have
tried lot of options and nothing seems to be working . Can anybody from
Microsoft tell solution for my problem . Or Any pointers to documentation or
articles or anything with which I can find a solution to this problem .

thanks in advance
srinivasa

-----Original Message-----
From: Deevi, Srinivasa [mailto:xxxxx@microtune.com]
Sent: Friday, July 26, 2002 2:13 PM
To: NT Developers Interest List
Subject: [ntdev] How to complete URB_FUNCTION_ISOCH_TRANSFER ?

Hi all

I have been trying to complete the URB request URB_FUNCTION_ISOCH_TRANSFER
in my lower level driver . But for some reason , the code shown below does
not accomplish the task . And the upper layer thinks some thing went wrong
and it sends me Abort Pipe and Reset Pipe . Can anybody help me to figure
out what I am doing wrong ?

pActUrb = &pUrb->UrbIsochronousTransfer;

if(pActUrb->TransferBufferMDL)
pUrb->UrbIsochronousTransfer.TransferBufferLength =
pIrp->IoStatus.Information=
MmGetMdlByteCount(pActUrb->TransferBufferMDL);
else
pUrb->UrbIsochronousTransfer.TransferBufferLength =
pIrp->IoStatus.Information=
pActUrb->TransferBufferLength;

pUrb->UrbHeader.Status = USBD_STATUS_SUCCESS;
pUrb->UrbIsochronousTransfer.ErrorCount = 0;

if(pActUrb->TransferFlags & USBD_START_ISO_TRANSFER_ASAP )
pActUrb->StartFrame = GetFrameNumberImmediate(pDevObject);

for(i = 0 ; i < pActUrb->NumberOfPackets;i++)
{
pActUrb->IsoPacket[i].Length =
pActUrb->TransferBufferLength/pActUrb->NumberOfPackets;
pActUrb->IsoPacket[i].Status = USBD_STATUS_SUCCESS;
}

pIrp->IoStatus.Status = STATUS_SUCCESS;
IoCompleteRequest (pIrp, IO_NO_INCREMENT );
return STATUS_SUCCESS;

This is what I do after filling all the parameters as shown above . Is
there
anything I am missing ?

Thanks in advance
srinivasa


You are currently subscribed to ntdev as: xxxxx@microtune.com
To unsubscribe send a blank email to %%email.unsub%%