All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: James Smart <james.smart@avagotech.com>, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 09/17] lpfc: Fix RDP ACC being too long.
Date: Thu, 17 Dec 2015 09:25:49 +0100	[thread overview]
Message-ID: <5672718D.808@suse.de> (raw)
In-Reply-To: <5671efc0.SB0qVbj8lP/LNAjA%james.smart@avagotech.com>

On 12/17/2015 12:12 AM, James Smart wrote:
>
> Fix RDP ACC being too long.
>
> Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
> Signed-off-by: James Smart <james.smart@avagotech.com>
> ---
>   drivers/scsi/lpfc/lpfc_els.c | 10 ++++++++++
>   1 file changed, 10 insertions(+)
>
> diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
> index f7a2967..817cdfc 100644
> --- a/drivers/scsi/lpfc/lpfc_els.c
> +++ b/drivers/scsi/lpfc/lpfc_els.c
> @@ -4824,6 +4824,7 @@ lpfc_els_rdp_cmpl(struct lpfc_hba *phba, struct lpfc_rdp_context *rdp_context,
>   	struct lpfc_nodelist *ndlp = rdp_context->ndlp;
>   	struct lpfc_vport *vport = ndlp->vport;
>   	struct lpfc_iocbq *elsiocb;
> +	struct ulp_bde64 *bpl;
>   	IOCB_t *icmd;
>   	uint8_t *pcmd;
>   	struct ls_rjt *stat;
> @@ -4833,6 +4834,8 @@ lpfc_els_rdp_cmpl(struct lpfc_hba *phba, struct lpfc_rdp_context *rdp_context,
>
>   	if (status != SUCCESS)
>   		goto error;
> +
> +	/* This will change once we know the true size of the RDP payload */
>   	cmdsize = sizeof(struct fc_rdp_res_frame);
>
>   	elsiocb = lpfc_prep_els_iocb(vport, 0, cmdsize,
> @@ -4874,6 +4877,13 @@ lpfc_els_rdp_cmpl(struct lpfc_hba *phba, struct lpfc_rdp_context *rdp_context,
>   	rdp_res->length = cpu_to_be32(fec_size + RDP_DESC_PAYLOAD_SIZE);
>   	elsiocb->iocb_cmpl = lpfc_cmpl_els_rsp;
>
> +	/* Now that we know the true size of the payload, update the BPL */
> +	bpl = (struct ulp_bde64 *)
> +		(((struct lpfc_dmabuf *)(elsiocb->context3))->virt);
> +	bpl->tus.f.bdeSize = (fec_size + RDP_DESC_PAYLOAD_SIZE + 8);
> +	bpl->tus.f.bdeFlags = 0;
> +	bpl->tus.w = le32_to_cpu(bpl->tus.w);
> +
>   	phba->fc_stat.elsXmitACC++;
>   	rc = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0);
>   	if (rc == IOCB_ERROR)
>
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		               zSeries & Storage
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2015-12-17  8:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-16 23:12 [PATCH 09/17] lpfc: Fix RDP ACC being too long James Smart
2015-12-17  8:25 ` Hannes Reinecke [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=5672718D.808@suse.de \
    --to=hare@suse.de \
    --cc=james.smart@avagotech.com \
    --cc=linux-scsi@vger.kernel.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.