From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13448 invoked by alias); 26 Dec 2012 15:06:16 -0000 Received: (qmail 13434 invoked by uid 22791); 26 Dec 2012 15:06:15 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 26 Dec 2012 15:06:06 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id 423A64680018 for ; Wed, 26 Dec 2012 15:06:04 +0000 (GMT) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (hagrid.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QaA5JZWpX2+r; Wed, 26 Dec 2012 15:06:02 +0000 (GMT) From: bugzilla-daemon@bugs.ecos.sourceware.org To: ecos-patches@ecos.sourceware.org Subject: [Bug 1001397] I2C driver for Kinetic microcontrollers X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: Patches and contributions X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: ilijak@siva.com.mk X-Bugzilla-Status: NEEDINFO X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: In-Reply-To: References: X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Wed, 26 Dec 2012 15:06:00 -0000 Message-Id: <20121226150602.CB713468000D@mail.ecoscentric.com> Mailing-List: contact ecos-patches-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-patches-owner@ecos.sourceware.org X-SW-Source: 2012-12/txt/msg00033.txt.bz2 Please do not reply to this email. Use the web interface provided at: http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001397 --- Comment #32 from Ilija Kocho 2012-12-26 15:05:59 GMT --- (In reply to comment #31) > I think that looping on bus ready is probably ok if there is a SMBus like > timeout of 25ms to 30ms, and as long as the scheduler can break in switch > tasks. If the wait can't be interrupted by the scheduler it is more problematic > when the bus is stuck. I2C thread normally shall be pre-empted by threads with higher priority than itself. With current code this implies that I2C thread has to run with relatively low priority. Probably it would be better if the priority is (dynamically) decreased during spinning. > > A worst case scenario might have a task for ALERTB and one for telemetry. The > second master hogs the bus and the first master is having trouble getting in. > The the ALERTB comes along and needs immediate service. The ALERTB task may > flip a GPIO bit and kill power, or it may wait for the timeout and then attempt > to use the bus. > > All that matters to me is that it the driver waits for the bus to be free, > times out, and allows a higher priority task do its job while waiting. I would > not want it to just return because the bus is busy and force me to write my own > timeout. And I would not want it to hang forever if a second master was beating > the bus to death. Timeout may be useful in general and it can be added as well. Ilija -- Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.