[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Re: [PATCH] megasas: LSI MegaRAID SAS HBA emulation
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] Re: [PATCH] megasas: LSI MegaRAID SAS HBA emulation |
Date: |
Tue, 17 Nov 2009 17:39:41 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20091014 Fedora/3.0-2.8.b4.fc11 Lightning/1.0pre Thunderbird/3.0b4 |
On 11/17/09 11:51, Hannes Reinecke wrote:
Grand. Meanwhile I've dug up some more register definitions,
so I'll doing some more updates to the driver.
Feel free to send updates (both incremental and replacement are fine).
Meanwhile I've stumbled across another issue:
The megasas HBA insists on returning some data like inquiry
or VPD pages during init/configuration.
I can't really use the normal command completion here,
as eg on megasas configuration command requires me
to issue several requests to the underlying device.
Well, you can, but it probably isn't very convenient ...
Easy way out would be calling qemu_aio_wait(), when it returns you can
be sure the request is finished (and the completion callback was
called). You probably have to flag the request as being special
somewhere in req->hba_private so your completion callback will not apply
the usual processing.
Calling qemu_aio_wait() is only needed if there is actually something in
flight asynchronously. req->status is initialized to -1 and set to a
status code on completion, so you can use that to figure whenever the
request is still being processed. All commands emulated by scsi-disk
will complete instantly, i.e. the completion callback will be called
before scsi_req_{buf,sgl} returns. Only with scsi-generic you'll find
INQUIRY being processed really asynchronously.
cheers,
Gerd