From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QV2Ho-0002GV-WC for qemu-devel@nongnu.org; Fri, 10 Jun 2011 10:02:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QV2Hm-0005jn-Vd for qemu-devel@nongnu.org; Fri, 10 Jun 2011 10:02:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23222) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QV2Hm-0005jZ-9U for qemu-devel@nongnu.org; Fri, 10 Jun 2011 10:02:06 -0400 Message-ID: <4DF22487.400@redhat.com> Date: Fri, 10 Jun 2011 16:04:55 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <20110519085748.GA3650@lst.de> <20110519085819.GC3679@lst.de> In-Reply-To: <20110519085819.GC3679@lst.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/3] ide: add TRIM support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christoph Hellwig Cc: qemu-devel@nongnu.org Am 19.05.2011 10:58, schrieb Christoph Hellwig: > Add support for TRIM sub function of the data set management command, > and wire it up to the qemu discard infrastructure. > > Signed-off-by: Christoph Hellwig > Index: qemu/hw/ide/pci.c > =================================================================== > --- qemu.orig/hw/ide/pci.c 2011-05-18 20:28:17.153625872 +0200 > +++ qemu/hw/ide/pci.c 2011-05-18 20:33:06.102141553 +0200 > @@ -205,6 +205,9 @@ static void bmdma_restart_bh(void *opaqu > } > } else if (bm->status & BM_STATUS_RETRY_FLUSH) { > ide_flush_cache(bmdma_active_if(bm)); > + } else if (bm->status & BM_STATUS_RETRY_TRIM) { > + bm->status &= ~BM_STATUS_RETRY_TRIM; > + bmdma_restart_dma(bm, IDE_DMA_TRIM); > } > } Just noticed that this is wrong. BM_STATUS_DMA_RETRY is always set at the same time, so this is dead code. Kevin