Pasted as Plain Text [Remove this paste ]
Description: No description
URL: http://rafb.ath.cx/pastes/xcOElp91.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
static int usb_reset_port(volatile struct ehci_ops *c, int i)
{
	u32 temp;
 
	/* Device present? */
	if(!(c->port[i] & PORT_CONNECTED))
		return -1;
 
	/* Reset port */
	c->port[i] = PORT_RESET;
 
	mdelay(50);
 
	/* Finish reset and clear 'device changed' notification */
	c->port[i] = PORT_CONN_CHANGE;
 
	mdelay(10);
 
	temp = c->port[i];
	if (temp & 1)
		kprintf("    Port %d: %s speed\n", i, (temp & PORT_ENABLED) ? "High" : "Full");
	else
		return -1;
 
	return 0;
}