Received: from list by lists.gnu.org with archive (Exim 4.71) id 1SZmhU-0002Ix-Mg for mharc-grub-devel@gnu.org; Wed, 30 May 2012 13:28:48 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39242) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SZmhS-0002HL-DP for grub-devel@gnu.org; Wed, 30 May 2012 13:28:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SZmhL-00087K-Sx for grub-devel@gnu.org; Wed, 30 May 2012 13:28:45 -0400 Received: from smtp.volny.cz ([62.44.29.27]:48500) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SZmhL-000867-Ie for grub-devel@gnu.org; Wed, 30 May 2012 13:28:39 -0400 Received: from [192.168.4.250] (unknown [193.86.90.90]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.volny.cz (Postfix) with ESMTP id 3280CC0516 for ; Wed, 30 May 2012 19:28:38 +0200 (CEST) Subject: Re: EHCI driver From: =?UTF-8?Q?Ale=C5=A1?= Nesrsta To: The development of GNU GRUB In-Reply-To: <4FC61184.2020109@gmail.com> References: <4FC491EC.8010808@weinigel.se> <1338331586.6016.156.camel@king.jenpiliny.cz> <4FC61184.2020109@gmail.com> Content-Type: text/plain; charset="ISO-8859-2" Date: Wed, 30 May 2012 19:28:36 +0200 Message-ID: <1338398916.10187.78.camel@pracovna> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 62.44.29.27 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 May 2012 17:28:47 -0000 Hi Vladimir and Chris: Chris: Thank You for the research, correction of my mistakes (classical copy-paste mistake... :-) ) and the patch. As I see, Vladimir is currently discussing Your patch to be accepted, so I am writing only some notes below mainly for Vladimir. Vladimir: 1. > interrupt transfers have nothing to do with CPU interrupts per se. You > can check whether PCI interrupt occurred without having to enable CPU > interrupts. Yes, I know, of course. I mentioned CPU interrupt only because doing such things via CPU interrupt is/could be easier... :-) Without interrupt You need to have some program loop which will guarantee periodic polling with frequency higher than USB interrupt transfer frequency - in opposite case You can loose data from some transfers. (I think it cannot happen in GRUB bulk "emulation" of interrupt transfer working on UHCI/OHCI - because when bulk trasfer is used, no new transfer is started before data are overtaken from old transfer. But interrupt transfers are initiated by *HCI periodically independently even if program overtake data or not.) I was not sure if such fast-enough program loop can be fulfilled in GRUB - probably yes. Butmaybe with some exceptions - ? - e.g. during some large file-disk operations on slow media?. 2. >> + /* low speed interrupt transfers are linked to the periodic >> + * scheudle, everything else to the asynchronous schedule */ >> + if (transfer->dev->speed == GRUB_USB_SPEED_LOW && >> + transfer->type != GRUB_USB_TRANSACTION_TYPE_CONTROL) >> + head = &qh[0]; >> + else >> + head = &qh[1]; > > Wouldn't it be easier to have a range reserved for interrupt transfer? > It's not like if we were short on QHs. It is probably not necessary - I think, really there will be "allocated" the same total number of QHs during communication by this new algorithm as with old algorithm. The reason is: Now will be used more "sync. QHs" but less "async. QHs" (because some "async. QHs" were "allocated" before to "emulate" interrupt transfer via bulk) - so the total sum should be the same now as before. BR, Ales