qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH for-2.8] megasas: clean up and fix request compl


From: Stefan Hajnoczi
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
User-agent: Mutt/1.7.1 (2016-10-04)

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 <address@hidden>
> ---
>  hw/scsi/megasas.c | 53 ++++++++++++++++++++++++++++-------------------------
>  1 file changed, 28 insertions(+), 25 deletions(-)

Reviewed-by: Stefan Hajnoczi <address@hidden>

> @@ -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: signature.asc
Description: PGP signature


reply via email to

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