qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] scsi: esp: clean up handle_ti/esp_do_dma if s->


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] scsi: esp: clean up handle_ti/esp_do_dma if s->do_cmd
Date: Wed, 15 Jun 2016 15:27:59 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0


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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]