From: Sebastian Herbszt <herbszt@gmx.de>
To: James Smart <james.smart@avagotech.com>
Cc: linux-scsi@vger.kernel.org, Sebastian Herbszt <herbszt@gmx.de>
Subject: Re: [PATCH 1/9] lpfc: Check for active portpeerbeacon.
Date: Sun, 24 May 2015 21:50:01 +0200 [thread overview]
Message-ID: <20150524215001.00003bac@localhost> (raw)
In-Reply-To: <555f405b.edV1AAZPf7ciBGhe%james.smart@avagotech.com>
James Smart wrote:
>
> Check for active portpeerbeacon.
>
> LCB requests to set Beacon would fail if the beacon was already enabled
beacon
> internally as the mailbox command used to query the state failes with
fails
> an already-set status.
>
> Correct by enhancing the check so we don't fail if if the already set
if twice
> status comes back.
>
> Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
> Signed-off-by: James Smart <james.smart@avagotech.com>
> ---
> drivers/scsi/lpfc/lpfc_els.c | 19 +++++++++++++++----
> drivers/scsi/lpfc/lpfc_hw4.h | 6 ++++++
> 2 files changed, 21 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
> index 011c8d8..3aad09f 100644
> --- a/drivers/scsi/lpfc/lpfc_els.c
> +++ b/drivers/scsi/lpfc/lpfc_els.c
> @@ -5044,25 +5044,36 @@ lpfc_els_lcb_rsp(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
> struct lpfc_iocbq *elsiocb;
> struct lpfc_nodelist *ndlp;
> struct ls_rjt *stat;
> + union lpfc_sli4_cfg_shdr *shdr;
> struct lpfc_lcb_context *lcb_context;
> struct fc_lcb_res_frame *lcb_res;
> - uint32_t cmdsize;
> + uint32_t cmdsize, shdr_status, shdr_add_status;
> int rc;
>
> mb = &pmb->u.mb;
> -
> lcb_context = (struct lpfc_lcb_context *)pmb->context1;
> ndlp = lcb_context->ndlp;
> pmb->context1 = NULL;
> pmb->context2 = NULL;
>
> - if (mb->mbxStatus) {
> + shdr = (union lpfc_sli4_cfg_shdr *)
> + &pmb->u.mqe.un.beacon_config.header.cfg_shdr;
> + shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response);
> + shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response);
> +
> + lpfc_printf_log(phba, KERN_INFO, LOG_MBOX,
> + "0194 SET_BEACON_CONFIG mailbox "
> + "completed with status x%x add_status x%x,"
> + " mbx status x%x\n",
> + shdr_status, shdr_add_status, mb->mbxStatus);
checkpatch suggests to not split this user-visible string.
Sebastian
next prev parent reply other threads:[~2015-05-24 19:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-22 14:42 [PATCH 1/9] lpfc: Check for active portpeerbeacon James Smart
2015-05-24 19:50 ` Sebastian Herbszt [this message]
2015-05-25 15:13 ` Hannes Reinecke
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=20150524215001.00003bac@localhost \
--to=herbszt@gmx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox