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

2000/0618/alphapc/sdscsi.c (diff list | history)

2000/0515/sys/src/9/alphapc/sdscsi.c:217,2222000/0618/sys/src/9/alphapc/sdscsi.c:217,230 (short | long | prev | next)
2000/0515    
			 */ 
			unit->sectors++; 
			unit->secsize = (p[4]<<24)|(p[5]<<16)|(p[6]<<8)|p[7]; 
2000/0618    
 
			/* 
			 * Some ATAPI CD readers lie about the block size. 
			 * Since we don't read audio via this interface 
			 * it's okay to always fudge this. 
			 */ 
			if((unit->inquiry[0] & 0x1F) == 0x05 && unit->secsize == 2352) 
				unit->secsize = 2048; 
2000/0515    
			ok = 1; 
			break; 
		case 1: 
2000/0515/sys/src/9/alphapc/sdscsi.c:230,2362000/0618/sys/src/9/alphapc/sdscsi.c:238,247
2000/0515    
	free(p); 
	free(r); 
 
	return ok; 
2000/0618    
	if(ok) 
		return ok+retries; 
	else 
		return 0; 
2000/0515    
} 
 
int 
2000/0515/sys/src/9/alphapc/sdscsi.c:331,3452000/0618/sys/src/9/alphapc/sdscsi.c:342,354
2000/0515    
		case 0x06:		/* check condition */ 
			/* 
			 * Check for a removeable media change. 
			 * If so, mark it and zap the geometry info 
2000/0618    
			 * If so, mark it by zapping the geometry info 
2000/0515    
			 * to force an online request. 
			 */ 
			if(r->sense[12] != 0x28 || r->sense[13] != 0) 
				break; 
			if(unit->inquiry[1] & 0x80){ 
				unit->changed = 1; 
2000/0618    
			if(unit->inquiry[1] & 0x80) 
2000/0515    
				unit->sectors = 0; 
			} 
			break; 
		case 0x02:		/* not ready */ 
			/* 


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