Permalink
Browse files

softusb: fix two typos, one of them breaking some error detection

If the OUT token to end a data phase wasn't ack'ed, we didn't notice.

This still leaves the LV3 success rate at 13/25 = 52%.
  • Loading branch information...
1 parent 4ef85a2 commit a0a8914a3a77d5fbce9f39cc92b641bb001510f3 @wpwrak wpwrak committed Mar 4, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 softusb-input/main.c
View
@@ -401,7 +401,7 @@ static int control_transfer(unsigned char addr, struct setup_packet *p,
ep0_size+3);
if(!rxlen)
continue;
- if(rxlen <0)
+ if(rxlen < 0)
return rxlen;
expected_data = toggle(expected_data);
@@ -432,7 +432,7 @@ static int control_transfer(unsigned char addr, struct setup_packet *p,
rxlen = usb_out(addr, usb_buffer, 3);
if(!rxlen)
goto retry;
- if(!rxlen < 0)
+ if(rxlen < 0)
return -1;
}

0 comments on commit a0a8914

Please sign in to comment.