From: Stefan Hajnoczi <stefanha@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH for-2.8] megasas: clean up and fix request completion/cancellation
Date: Fri, 11 Nov 2016 12:50:10 +0000 [thread overview]
Message-ID: <20161111125010.GD8930@stefanha-x1.localdomain> (raw)
In-Reply-To: <20161110152751.4267-2-pbonzini@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1048 bytes --]
On Thu, Nov 10, 2016 at 04:27:51PM +0100, Paolo Bonzini wrote:
> megasas_command_cancel is a callback; it should report the abort in
> the frame, not try another abort! Compare for instance with
> mptsas_request_cancelled.
>
> So extract the common bits for request completion in a new function
> megasas_complete_command, call it from both the .complete and .cancel
> callbacks, and remove duplicate pieces from the DCMD path.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> hw/scsi/megasas.c | 53 ++++++++++++++++++++++++++++-------------------------
> 1 file changed, 28 insertions(+), 25 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> @@ -2316,7 +2319,7 @@ static const struct SCSIBusInfo megasas_scsi_info = {
> .transfer_data = megasas_xfer_complete,
> .get_sg_list = megasas_get_sg_list,
> .complete = megasas_command_complete,
> - .cancel = megasas_command_cancel,
> + .cancel = megasas_command_cancelled,
Should .cancel be renamed in a separate patch?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
next prev parent reply other threads:[~2016-11-11 12:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-10 15:27 [Qemu-devel] [PATCH for-2.8] megasas: clean up and fix request completion/cancellation Paolo Bonzini
2016-11-11 12:50 ` Stefan Hajnoczi [this message]
2016-11-11 13:11 ` Paolo Bonzini
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=20161111125010.GD8930@stefanha-x1.localdomain \
--to=stefanha@gmail.com \
--cc=pbonzini@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).