[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] lsi: Reselection needed to remove pending co
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v2] lsi: Reselection needed to remove pending commands from queue |
Date: |
Wed, 24 Oct 2018 00:31:08 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 |
On 24/10/2018 00:11, George Kennedy wrote:
>>>
>> What about "req->hba_private != s->current"? That should cause a call
>> to lsi_queue_req, and then you can check s->want_resel in lsi_queue_req.
>
> For the extended period of time where lsi_queue_req() is not being
> called from lsi_transfer_data(), my debug shows "s->waiting" is not "1"
> and req->hba_private is equal to s->current.
That would mean indeed that no reselection is needed---but that's wrong.
Why didn't lsi_do_command invoke lsi_queue_command? That would set
s->current to NULL (on the SCSI level, that means the bus is freed; on
the QEMU level, the idea is that lsi_transfer_data would then start a
reselection).
Thanks,
Paolo
> req->hba_private is set to NULL in lsi_command_complete() and that's
> where I tried to add a call to lsi_reselect(), but the Scripts are not
> in the correct state to allow the call.
>
> lsi_transfer_data() or lsi_command_complete() are probably the 2
> potential places where a fix could be added if the Script state would
> allow it.