kernels/linux-2.4.0/drivers/usb/uhci.h
/*
 * Search tree for determining where <interval> fits in the
 * skelqh[] skeleton.
 *
 * An interrupt request should be placed into the slowest skelqh[]
 * which meets the interval/period/frequency requirement.
 * An interrupt request is allowed to be faster than <interval> but not slower.
 *
 * For a given <interval>, this function returns the appropriate/matching
 * skelqh[] index value.
 *
 * NOTE: For UHCI, we don't really need int256_qh since the maximum interval
 * is 255 ms.  However, we do need an int1_qh since 1 is a valid interval
 * and we should meet that frequency when requested to do so.
 * This will require some change(s) to the UHCI skeleton.
 */
Search tree for determining where  fits in the
skelqh[] skeleton.

An interrupt request should be placed into the slowest skelqh[]
which meets the interval/period/frequency requirement.
An interrupt request is allowed to be faster than  but not slower.

For a given , this function returns the appropriate/matching
skelqh[] index value.

For UHCI, we don't really need int256_qh since the maximum interval
is 255 ms.  However, we do need an int1_qh since 1 is a valid interval
and we should meet that frequency when requested to do so.
This will require some change(s) to the UHCI skeleton.
Search tree for determining where fits in the skelqh [] skeleton . An interrupt request should be placed into the slowest skelqh [] which meets the interval / period / frequency requirement . An interrupt request is allowed to be faster than but not slower . For a given this function returns the appropriate / matching skelqh [] index value . For UHCI we don ' t really need int256_qh since the maximum interval is 255 ms . However we do need an int1_qh since 1 is a valid interval and we should meet that frequency when requested to do so . This will require some change ( s ) to the UHCI skeleton .
static inline int __interval_to_skel(int interval)
{
	if (interval < 16) {
		if (interval < 4) {
			if (interval < 2)
				return 0;	
			return 1;		
		}
		if (interval < 8)
			return 2;		
		return 3;			
	}
	if (interval < 64) {
		if (interval < 32)
			return 4;		
		return 5;			
	}
	if (interval < 128)
		return 6;			
	return 7;				
}
static inline int __interval_to_skel ( int interval ) { if ( interval < 16 ) { if ( interval < 4 ) { if ( interval < 2 ) return 0 ; return 1 ; } if ( interval < 8 ) return 2 ; return 3 ; } if ( interval < 64 ) { if ( interval < 32 ) return 4 ; return 5 ; } if ( interval < 128 ) return 6 ; return 7 ; }
Search tree for determining where <interval> fits in the
 skelqh[] skeleton.
Search tree for determining where <interval > fits in the skelqh [] skeleton .
/* int1 for 0-1 ms */ /* int2 for 2-3 ms */ /* int4 for 4-7 ms */ /* int8 for 8-15 ms */ /* int16 for 16-31 ms */ /* int32 for 32-63 ms */ /* int64 for 64-127 ms */ /* int128 for 128-255 ms (Max.) */