plan 9 kernel history: overview | file list | diff list

2001/1019/pc/devusb.c (diff list | history)

2001/1017/sys/src/9/pc/devusb.c:116,1232001/1019/sys/src/9/pc/devusb.c:116,124 (short | long | prev | next)
1999/1005    
	StatusChange = 1<<1,	/* write 1 to clear */ 
	DevicePresent = 1<<0, 
 
	FRAMESIZE=	4096,	/* fixed by hardware; aligned to same */ 
2001/1006    
	NFRAME = 	(FRAMESIZE/4), 
2001/1019    
	NFRAME = 	1024, 
	FRAMESIZE=	NFRAME*sizeof(ulong),	/* fixed by hardware; aligned to same */ 
	FRAMEMASK=	FRAMESIZE-1,	/* fixed by hardware; aligned to same */ 
2001/0916    
	NISOTD = 4,			/* number of TDs for isochronous io per frame */ 
1999/1005    
 
	Vf = 1<<2,	/* TD only */ 
2001/1017/sys/src/9/pc/devusb.c:214,2212001/1019/sys/src/9/pc/devusb.c:215,222
2001/1010    
	uchar	active;	/* listed for examination by interrupts */ 
2001/1007    
	int		setin; 
	/* ISO related: */ 
2001/1010    
	uchar*	tdalloc; 
	uchar*	bpalloc; 
2001/1019    
	void*	tdalloc; 
	void*	bpalloc; 
2001/0916    
	int		hz; 
2001/1007    
	int		remain;	/* for packet size calculations */ 
2001/0916    
	int		samplesz; 
2001/1017/sys/src/9/pc/devusb.c:1350,13612001/1019/sys/src/9/pc/devusb.c:1351,1362
2001/0626    
	intrenable(cfg->intl, interrupt, ub, cfg->tbdf, "usb"); 
 
	ub->io = port; 
2001/1006    
	ub->tdpool = xspanalloc(128*sizeof(TD), 16, 0); 
2001/1019    
	ub->tdpool = (TD*)(((ulong)xalloc(128*sizeof(TD) + 0x10) + 0xf) & ~0xf); 
2001/1006    
	for(i=128; --i>=0;){ 
2001/0626    
		ub->tdpool[i].next = ub->freetd; 
		ub->freetd = &ub->tdpool[i]; 
	} 
	ub->qhpool = xspanalloc(32*sizeof(QH), 16, 0); 
2001/1019    
	ub->qhpool = (QH*)(((ulong)xalloc(32*sizeof(QH) + 0x10) + 0xf) & ~0xf); 
2001/0626    
	for(i=32; --i>=0;){ 
		ub->qhpool[i].next = ub->freeqh; 
		ub->freeqh = &ub->qhpool[i]; 
2001/1017/sys/src/9/pc/devusb.c:1388,13952001/1019/sys/src/9/pc/devusb.c:1389,1396
2001/0626    
	XPRINT("frbaseadd\t0x%.4x\nsofmod\t0x%x\nportsc1\t0x%.4x\nportsc2\t0x%.4x\n", 
		IN(Flbaseadd), inb(port+SOFMod), IN(Portsc0), IN(Portsc1)); 
	OUT(Cmd, 0);	/* stop */ 
	ub->frames = xspanalloc(FRAMESIZE, FRAMESIZE, 0); 
2001/0916    
	ub->frameld = mallocz(FRAMESIZE, 1); 
2001/1019    
	ub->frames = (ulong*)(((ulong)xalloc(2*FRAMESIZE) + FRAMEMASK) & ~FRAMEMASK); 
	ub->frameld = xallocz(FRAMESIZE, 1); 
2001/0916    
 
2001/1006    
	for (i = 0; i < NFRAME; i++) 
		ub->frames[i] = PADDR(ub->ctlq) | IsQH; 
2001/1017/sys/src/9/pc/devusb.c:1781,17862001/1019/sys/src/9/pc/devusb.c:1782,1789
2001/1008    
				panic("usb iso: can't happen"); 
			break; 
		} 
2001/1019    
		if(w) 
			td->offset = offset + (p-(uchar*)a) - (((td->dev >> 21) + 1) & 0x7ff); 
2001/1008    
		td->status = ErrLimit3 | Active | IsoSelect | IOC; 
		e->etd = td->next; 
		e->off = 0; 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)