From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56292) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDArZ-00028R-VX for qemu-devel@nongnu.org; Wed, 15 Jun 2016 09:28:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDArU-0004W1-TF for qemu-devel@nongnu.org; Wed, 15 Jun 2016 09:28:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59143) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDArU-0004Vx-My for qemu-devel@nongnu.org; Wed, 15 Jun 2016 09:28:04 -0400 References: <1465994350-12256-1-git-send-email-pbonzini@redhat.com> <506b0baf-3bd9-f0fc-2666-825f13b0fe84@redhat.com> From: Paolo Bonzini Message-ID: Date: Wed, 15 Jun 2016 15:27:59 +0200 MIME-Version: 1.0 In-Reply-To: <506b0baf-3bd9-f0fc-2666-825f13b0fe84@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] scsi: esp: clean up handle_ti/esp_do_dma if s->do_cmd List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laszlo Ersek , qemu-devel@nongnu.org Cc: ppandit@redhat.com, qiang6-s@360.cn On 15/06/2016 15:16, Laszlo Ersek wrote: > On 06/15/16 14:39, Paolo Bonzini wrote: >> Finally, assert that the other caller of esp_do_dma (esp_transfer_data) >> only transfers data and not a command. This is true because get_cmd >> cancels the old request synchronously before its caller handle_satn_stop >> sets do_cmd to 1. > > I didn't try to verify why the claim is true, but if the claim is true, > then the assert() is valid, and fits in with the changes in esp_do_dma() > and handle_ti() -- the logic taken over by handle_ti() from esp_do_dma() > is not reached when esp_do_dma() is called by esp_transfer_data(), but > then again, on that call path, the original logic was never reached anyway. > > (If the claim is wrong, we'll quickly find out with the assert() :)) Correct. :) > ... So, I think if you wish, you could lower the "to_device" assignment > a bit more. Will do, thanks. Paolo