From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aj74A-0005sG-89 for qemu-devel@nongnu.org; Thu, 24 Mar 2016 11:20:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aj745-00047H-7h for qemu-devel@nongnu.org; Thu, 24 Mar 2016 11:20:54 -0400 Received: from mail-db3on0119.outbound.protection.outlook.com ([157.55.234.119]:2357 helo=emea01-db3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aj744-00047D-D2 for qemu-devel@nongnu.org; Thu, 24 Mar 2016 11:20:49 -0400 References: <1458728792-15779-1-git-send-email-den@openvz.org> <1458728792-15779-2-git-send-email-den@openvz.org> <56F2FDE5.5020908@redhat.com> <56F3B249.50605@virtuozzo.com> <56F3CE14.80300@redhat.com> <56F3EDD8.6040602@virtuozzo.com> <56F3F498.30809@redhat.com> <56F40393.20505@virtuozzo.com> <56F403C7.6070901@redhat.com> From: Pavel Butsykin Message-ID: <56F405B7.10803@virtuozzo.com> Date: Thu, 24 Mar 2016 18:20:23 +0300 MIME-Version: 1.0 In-Reply-To: <56F403C7.6070901@redhat.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/3] ide: don't loose pending dma state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , "Denis V. Lunev" , qemu-devel@nongnu.org Cc: John Snow On 24.03.2016 18:12, Paolo Bonzini wrote: > > > On 24/03/2016 16:11, Pavel Butsykin wrote: >>> >> You want something like this: >> dma_cb() >> { >> ... >> if (ret < 0) { >> if (ide_handle_rw_error(s, -ret, ide_dma_cmd_to_retry(s))) { >> return; >> } >> } >> ... >> } >> >> static void ide_bmdma_pre_save(void *opaque) >> { >> ... >> if (!(bm->status & BM_STATUS_DMAING) && bm->dma_cb) { >> bm->bus->error_status = ide_dma_cmd_to_retry(bmdma_active_if(bm)); >> } >> ... >> } > > Yes, that would do. > Well, I can do it, looks quite ok. > Paolo >