ENTER("pPtr xDest ibToggle pCb pCbData pData iLength", Ptr, Dest, bToggle, Cb, CbData, Buf, Length);
- while( Length > MAX_PACKET_SIZE )
- {
- LOG("MaxPacket (rem = %i)", Length);
- td = UHCI_int_CreateTD(Cont, Dest, PID_OUT, bToggle, NULL, NULL, src, MAX_PACKET_SIZE);
- UHCI_int_AppendTD(Cont, qh, td);
-
- bToggle = !bToggle;
- Length -= MAX_PACKET_SIZE;
- src += MAX_PACKET_SIZE;
+ if( Length > MAX_PACKET_SIZE ) {
+ Log_Error("UHCI", "Passed an oversized packet by the USB code (%i > %i)", Length, MAX_PACKET_SIZE);
+ LEAVE('n');
}
-
- LOG("Final");
+
td = UHCI_int_CreateTD(Cont, Dest, PID_OUT, bToggle, Cb, CbData, src, Length);
UHCI_int_AppendTD(Cont, qh, td);
char *dst = Buf;
ENTER("pPtr xDest ibToggle pCb pCbData pData iLength", Ptr, Dest, bToggle, Cb, CbData, Buf, Length);
- while( Length > MAX_PACKET_SIZE )
- {
- LOG("MaxPacket (rem = %i)", Length);
- td = UHCI_int_CreateTD(Cont, Dest, PID_IN, bToggle, NULL, NULL, dst, MAX_PACKET_SIZE);
- UHCI_int_AppendTD(Cont, qh, td);
-
- bToggle = !bToggle;
- Length -= MAX_PACKET_SIZE;
- dst += MAX_PACKET_SIZE;
+ if( Length > MAX_PACKET_SIZE ) {
+ Log_Error("UHCI", "Passed an oversized packet by the USB code (%i > %i)", Length, MAX_PACKET_SIZE);
+ LEAVE('n');
}
- LOG("Final");
td = UHCI_int_CreateTD(Cont, Dest, PID_IN, bToggle, Cb, CbData, dst, Length);
UHCI_int_AppendTD(Cont, qh, td);