Bug 3604

Summary: HS_USECS / HS_USECS_ISO in drivers/usb/core/hcd.h is incorrect
Product: Drivers Reporter: Huah Tu (huah)
Component: USBAssignee: David Brownell (dbrownell)
Status: RESOLVED CODE_FIX    
Severity: low CC: greg
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.9 Subsystem:
Regression: --- Bisected commit-id:
Bug Depends on:    
Bug Blocks: 5089    
Attachments: 2.6.13-rc4 patch

Description Huah Tu 2004-10-20 22:43:16 UTC
from Linux 2.4.22 --> 2.6.9, HS_USECS / HS_USECS_ISO are defined as
#define HS_USECS(bytes) NS_TO_US ( ((55 * 8 * 2083)/1000) \
	+ ((2083UL * (3167 + BitTime (bytes)))/1000) \
	+ USB2_HOST_DELAY)
#define HS_USECS_ISO(bytes) NS_TO_US ( ((38 * 8 * 2083)/1000) \
	+ ((2083UL * (3167 + BitTime (bytes)))/1000) \
	+ USB2_HOST_DELAY)
no matter from USB 2.0 spec., or other calculations in usb_calc_bus_time(), 
the term ((2083UL * (3167 + BitTime (bytes)))/1000) is wrong, it is not close 
to (2.083 * (3.167 + BitTime (bytes))).
Comment 1 David Brownell 2004-11-10 15:59:24 UTC
Feel free to submit a patch that can be reviewed ... 
 
Comment 2 David Brownell 2004-11-18 23:09:36 UTC
low priority bug, the high speed scheduling code doesn't even 
share entries yet. 
Comment 3 David Brownell 2005-08-02 14:39:16 UTC
Created attachment 5484 [details]
2.6.13-rc4 patch
Comment 4 Greg Kroah-Hartman 2005-08-18 21:37:55 UTC
accepted into the -mm kernel tree and will go into 2.6.14 when it comes out.