Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761567AbXH3SnV (ORCPT ); Thu, 30 Aug 2007 14:43:21 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759377AbXH3SnI (ORCPT ); Thu, 30 Aug 2007 14:43:08 -0400 Received: from wa-out-1112.google.com ([209.85.146.177]:9827 "EHLO wa-out-1112.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759422AbXH3SnF (ORCPT ); Thu, 30 Aug 2007 14:43:05 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Vp8IiO9hCKTGITNHZK0nWcNcimT3vdkK5BKYvF+9VhMidYDDJQID2Ikmtk5DWb/18ZRUm1jKvX5pDvG2PJigZo+MAvCe5KnvgRFl/q9EMdNIJ6dmdqqrZN3dTp22m5i9da5+LPJEs5hQLIhR6iGdeO69mf6M1ngbN9bqkERKDuU= Message-ID: Date: Thu, 30 Aug 2007 21:43:05 +0300 From: "saeed bishara" To: "Williams, Dan J" Subject: Re: [md-accel PATCH 16/19] dmaengine: driver for the iop32x, iop33x, and iop13xx raid engines Cc: linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, neilb@suse.de, "Nelson, Shannon" In-Reply-To: <0C7297FA1D2D244A9C7F6959C0BF1E52025B10E4@azsmsx413.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070627014823.18962.96398.stgit@dwillia2-linux.ch.intel.com> <20070627015155.18962.88413.stgit@dwillia2-linux.ch.intel.com> <0C7297FA1D2D244A9C7F6959C0BF1E52025B10E4@azsmsx413.amr.corp.intel.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1295 Lines: 30 you are right, I've another question regarding the function dma_wait_for_async_tx from async_tx.c, here is the body of the code: /* poll through the dependency chain, return when tx is complete */ 1. do { 2. iter = tx; 3. while (iter->cookie == -EBUSY) 4. iter = iter->parent; 5. 6. status = dma_sync_wait(iter->chan, iter->cookie); 7. } while (status == DMA_IN_PROGRESS || (iter != tx)); assume that: - The interrupt capability is not provided. - Request A was sent to chan 0 - Request B that depends on A is sent to chan 1 - Request C that depends on B is send to chan 2. - Also, assume that when C is handled by async_tx_submit(), B is still not queued to the dmaengine (cookie equals to -EBUSY). In this case, dma_wait_for_async_tx will be called for C, now, it looks for me that the do while will loop forever, even when A gets completed. this is because the iter will point to B after line 4, thus the iter != tx (C) will always become true. saeed - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/