From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 Message-ID: From: "kernel panic" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Date: Thu, 11 Apr 2013 15:09:18 +0200 In-Reply-To: <89ec832d7e467386a2f36d83033d0c6b@kw.quanstro.net> References: , <89ec832d7e467386a2f36d83033d0c6b@kw.quanstro.net> Subject: Re: [9fans] Tdmaxpkt in usbehci (no html) Topicbox-Message-UUID: 40d287fc-ead8-11e9-9d60-3106f5b1d025 yes, that would work too. -- cinap > Gesendet: Donnerstag, 11. April 2013 um 15:05 Uhr > Von: "erik quanstrom" > An: 9fans@9fans.net > Betreff: Re: [9fans] Tdmaxpkt in usbehci (no html) > > > in the ehci driver, it uses: > > > > Tdmaxpkt = 0x5000, /* max buffer for a Td */ > > > > a td has 5*4K pages giving the 20K above, but i think this only applies if the > > first pointer is page aligned (page offset = 0) so all the pages can be filled > > completely. > > > > The EHCI spec says this: > > "The buffer pointer list in the qTD is long enough to support a maximum transfer size of 20K bytes. This case > > occurs when all five buffer pointers are used and the first offset is zero. A qTD handles a 16Kbyte buffer > > with any starting buffer alignment." > > > > The buffer pointer isnt page aligned as far as i can see, so make Tdmaxpkt = 0x4000 instead? > > i wonder if it would make more sense to align the buffer. > > (the unaligned case for iso->data looks wierd, too.) > > - erik > >