Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

USB: retry address setting

  • Loading branch information...
commit fe5b41eec930672ada8d33dbb439d8476494e8dc 1 parent 0d3a651
Sébastien Bourdeauducq authored November 14, 2011

Showing 1 changed file with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. 5  softusb-input/main.c
5  softusb-input/main.c
@@ -81,11 +81,11 @@ static void usb_tx(unsigned char *buf, unsigned char len)
81 81
 	unsigned char i;
82 82
 
83 83
 	wio8(SIE_TX_DATA, 0x80); /* send SYNC */
84  
-	while(rio8(SIE_TX_PENDING));
85 84
 	for(i=0;i<len;i++) {
86  
-		wio8(SIE_TX_DATA, buf[i]);
87 85
 		while(rio8(SIE_TX_PENDING));
  86
+		wio8(SIE_TX_DATA, buf[i]);
88 87
 	}
  88
+	while(rio8(SIE_TX_PENDING));
89 89
 	wio8(SIE_TX_VALID, 0);
90 90
 	while(rio8(SIE_TX_BUSY));
91 91
 }
@@ -477,6 +477,7 @@ static void port_service(struct port_status *p, char name)
477 477
 				else
478 478
 					wio8(SIE_TX_BUSRESET, rio8(SIE_TX_BUSRESET) & 0x01);
479 479
 				p->state = PORT_STATE_SET_ADDRESS;
  480
+				p->retry_count = 0;
480 481
 			}
481 482
 			break;
482 483
 		case PORT_STATE_SET_ADDRESS: {

0 notes on commit fe5b41e

Please sign in to comment.
Something went wrong with that request. Please try again.