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 <h...@lst.de>
> 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