All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Hannes Reinecke <hare@suse.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: [PATCH] megasas: LSI MegaRAID SAS HBA emulation
Date: Tue, 17 Nov 2009 17:39:41 +0100	[thread overview]
Message-ID: <4B02D1CD.7040207@redhat.com> (raw)
In-Reply-To: <4B028048.1030403@suse.de>

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

      reply	other threads:[~2009-11-17 16:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-12 11:48 [Qemu-devel] [PATCH] megasas: LSI MegaRAID SAS HBA emulation Hannes Reinecke
2009-11-17 10:22 ` [Qemu-devel] " Gerd Hoffmann
2009-11-17 10:51   ` Hannes Reinecke
2009-11-17 16:39     ` Gerd Hoffmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B02D1CD.7040207@redhat.com \
    --to=kraxel@redhat.com \
    --cc=hare@suse.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.