Hi Alan: 2014-01-31 2:23 GMT+08:00 Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>: > On Fri, 31 Jan 2014, vichy wrote: > >> Hi all: >> I have some questions about bandwidth calculation >> 1. why tt time need to include one maxp bus time ? >> qh->tt_usecs = NS_TO_US (think_time + >> usb_calc_bus_time (urb->dev->speed, >> is_input, 0, max_packet (maxp))); > > Because tt_usecs is the time required to send a maximum-size packet. > So of course you have to include the maxp bus time. is it the requirement defined in spec? if so, would you please tell me where I can find it? > >> 2. in tt_available, below is used to check whether tt time is bigger than 125us >> if (125 < usecs) { >> int ufs = (usecs / 125); >> int i; >> for (i = uframe; i < (uframe + ufs) && i < 8; i++) >> if (0 < tt_usecs[i]) { >> ehci_vdbg(ehci, >> "multi-uframe xfer can't fit " >> "in frame %d uframe %d\n", >> frame, i); >> return 0; >> } >> } >> is it possible tt time bigger than 1 uframe? > > Yes. Any isochronous transfer that is longer than 188 bytes will > require more than one uframe. > >> 3. below is the fomula to calculate bus time >> Full-speed (Input) >> Non-Isochronous Transfer (Handshake Included) >> = 9107 + (83.54 * Floor(3.167 + BitStuffTime(Data_bc))) + Host_Delay >> what is 9107 and 3.167 used for? >> (9102 is not equal to FS bit time * FS protocol overhead) > > 9107 is the overhead. It includes things like inter-packet delays, the > IN or OUT token packet, the ACK packet, and so on. in spec I only find the formula, but spec didn't tell where this 9107 come from? take Full buck for example, which is non-iso, the protocol overhead is only 13Bytes. appreciate your help, -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html