Re: Cause of implementation of IF(totalLength < packetSize) in DispatchReadWrite() of ISOUSB-Sample Driver
- From: "Bernd Wiegand" <bernd.wiegand@xxxxxxxxxxxxxxx>
- Date: 13 Nov 2005 23:37:01 -0800
Thank you Maxim, maybe I begin to understand how the driver implements
this detail of the specification, that I read before.
I managed it to get the driver work as far as the packets are
concerned. But to verify my assumption I'd beg your help once more.
Here is the code snippet, I want you to check:
if(totalLength > packetSize) {
DbgPrint(1, ("TotalLength = %d\n", totalLength));
DbgPrint(1, ("PacketSize = %d\n", packetSize));
DbgPrint(1, ("Atleast packet worth of data."));
ntStatus = STATUS_INVALID_PARAMETER;
goto DispatchReadWrite_Exit;
}
I took the original condition and changed the comparsion operator.
Afterwards the transfer and completion routine run. Failing a transfer
while the packetSize (which is the same as bMaxPacketSize) or Buffer is
bigger than the requested packet didn't make sense to me.
Now I fear, is this USB compliant any more?
.
- Follow-Ups:
- References:
- Prev by Date: Re: Online device driver resources?
- Next by Date: Re: accessing kernel driver from non admin user account
- Previous by thread: Re: Cause of implementation of IF(totalLength < packetSize) in DispatchReadWrite() of ISOUSB-Sample Driver
- Next by thread: Re: Cause of implementation of IF(totalLength < packetSize) in DispatchReadWrite() of ISOUSB-Sample Driver
- Index(es):
Relevant Pages
|