How to complete the Isochronous IRP ?

Hi all

I am having some trouble in completing Isochronous IRP . In this case after
copying the data from the URB , I want to pretend as if the host controller
completed the request . But for some reason , USB audio driver ( which is an
upper layer ) thinks that the request is not completed and it sends Abort
Pipe and Reset Pipe after that . Does anybody know how to satisfy the
request exactly like Host controller does ? Or Any pointers to solve this
problem .

thanks in advance
srinivasa

I guess you have to process/(modify the data in) the URB. e.g. set
packet status for each packet in the URB.

Norbert

I am having some trouble in completing Isochronous IRP . In this case after
copying the data from the URB , I want to pretend as if the host controller
completed the request . But for some reason , USB audio driver ( which is an
upper layer ) thinks that the request is not completed and it sends Abort
Pipe and Reset Pipe after that . Does anybody know how to satisfy the
request exactly like Host controller does ? Or Any pointers to solve this
problem .

Hi Norbert

I did that too . I was doing it as shown below :

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;
}

Do you think I need to do any more ?

Thanks in advance
srinivasa

-----Original Message-----
From: Norbert Kawulski [mailto:xxxxx@stollmann.de]
Sent: Friday, July 26, 2002 1:48 AM
To: NT Developers Interest List
Subject: [ntdev] Re: How to complete the Isochronous IRP ?

I guess you have to process/(modify the data in) the URB. e.g. set
packet status for each packet in the URB.

Norbert

I am having some trouble in completing Isochronous IRP . In this case
after
copying the data from the URB , I want to pretend as if the host
controller
completed the request . But for some reason , USB audio driver ( which is
an
upper layer ) thinks that the request is not completed and it sends Abort
Pipe and Reset Pipe after that . Does anybody know how to satisfy the
request exactly like Host controller does ? Or Any pointers to solve this
problem .


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

Silly question, are you calling IoCompleteRequest in the dispatch
routine? Returning STATUS_SUCCESS is not enough, you must complete the
request as well.

D

This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: Deevi, Srinivasa [mailto:xxxxx@microtune.com]
Sent: Friday, July 26, 2002 9:39 AM
To: NT Developers Interest List
Subject: [ntdev] Re: How to complete the Isochronous IRP ?

Hi Norbert

I did that too . I was doing it as shown below :

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;
}

Do you think I need to do any more ?

Thanks in advance
srinivasa

-----Original Message-----
From: Norbert Kawulski [mailto:xxxxx@stollmann.de]
Sent: Friday, July 26, 2002 1:48 AM
To: NT Developers Interest List
Subject: [ntdev] Re: How to complete the Isochronous IRP ?

I guess you have to process/(modify the data in) the URB. e.g. set
packet status for each packet in the URB.

Norbert

I am having some trouble in completing Isochronous IRP . In this case
after
copying the data from the URB , I want to pretend as if the host
controller
completed the request . But for some reason , USB audio driver ( which

is
an
upper layer ) thinks that the request is not completed and it sends
Abort Pipe and Reset Pipe after that . Does anybody know how to
satisfy the request exactly like Host controller does ? Or Any
pointers to solve this problem .


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


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

Hi doron

Thanks for the reply . Ofcourse I am completing the request . sorry for not
putting that part of code . I do like this

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 below . Is there
anything I am missing ?

Thanks in advance
srinivasa

-----Original Message-----
From: Doron Holan [mailto:xxxxx@windows.microsoft.com]
Sent: Friday, July 26, 2002 10:11 AM
To: NT Developers Interest List
Subject: [ntdev] Re: How to complete the Isochronous IRP ?

Silly question, are you calling IoCompleteRequest in the dispatch
routine? Returning STATUS_SUCCESS is not enough, you must complete the
request as well.

D

This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: Deevi, Srinivasa [mailto:xxxxx@microtune.com]
Sent: Friday, July 26, 2002 9:39 AM
To: NT Developers Interest List
Subject: [ntdev] Re: How to complete the Isochronous IRP ?

Hi Norbert

I did that too . I was doing it as shown below :

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;
}

Do you think I need to do any more ?

Thanks in advance
srinivasa

-----Original Message-----
From: Norbert Kawulski [mailto:xxxxx@stollmann.de]
Sent: Friday, July 26, 2002 1:48 AM
To: NT Developers Interest List
Subject: [ntdev] Re: How to complete the Isochronous IRP ?

I guess you have to process/(modify the data in) the URB. e.g. set
packet status for each packet in the URB.

Norbert

I am having some trouble in completing Isochronous IRP . In this case
after
copying the data from the URB , I want to pretend as if the host
controller
completed the request . But for some reason , USB audio driver ( which

is
an
upper layer ) thinks that the request is not completed and it sends
Abort Pipe and Reset Pipe after that . Does anybody know how to
satisfy the request exactly like Host controller does ? Or Any
pointers to solve this problem .


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


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


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

Hmmm, looks OK.
What about the the result of the IoCallDriver call in your dispatch
routine ?
Maybe the upper layer is written to accept only STATUS_PENDING from
IoCallDriver(for ISO-Urbs) or gets confused about a
STATUS_SUCCESS(sounds silly, or?).

Norbert.

Hi

Thanks for the reply . I am not sure whether your suggestion worked or not .
When I started sending STATUS_PENDING and completing the IRP through some
other mechanism , Abort Pipe and Reset Pipe are stopped . But the system
freezes .
Any idea what is happening ?

Thanks in advance
srinivasa

-----Original Message-----
From: Norbert Kawulski [mailto:xxxxx@stollmann.de]
Sent: Monday, July 29, 2002 1:17 AM
To: NT Developers Interest List
Subject: [ntdev] Re: How to complete the Isochronous IRP ?

Hmmm, looks OK.
What about the the result of the IoCallDriver call in your dispatch
routine ?
Maybe the upper layer is written to accept only STATUS_PENDING from
IoCallDriver(for ISO-Urbs) or gets confused about a
STATUS_SUCCESS(sounds silly, or?).

Norbert.


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

The upper layer typically calls IoCallDriver with a new ISO-Urb from
its completion routine. So maybe you have reentrancy problems
somewhere that will lead to a deadlock ?

Norbert.