Re: [PATCH v2 03/15] lpfc: Add support for ELS LCB.

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

 



James Smart wrote:
> 
> Add support for ELS LCB.
> 
> Also has a little whitespace fixing.
> 
> Signed-off-by: Dick Kennedy <dick.kennedy@xxxxxxxxxxxxx>
> Signed-off-by: James Smart <james.smart@xxxxxxxxxxxxx>
> ---
>  drivers/scsi/lpfc/lpfc.h      |   1 +
>  drivers/scsi/lpfc/lpfc_els.c  | 239 +++++++++++++++++++++++++++++++++++++++++-
>  drivers/scsi/lpfc/lpfc_hw.h   |  32 ++++++
>  drivers/scsi/lpfc/lpfc_hw4.h  |  27 ++++-
>  drivers/scsi/lpfc/lpfc_init.c |   2 +
>  drivers/scsi/lpfc/lpfc_sli4.h |  11 ++
>  6 files changed, 306 insertions(+), 6 deletions(-)

snip

> +/**
> + * lpfc_els_rcv_lcb - Process an unsolicited LCB
> + * @vport: pointer to a host virtual N_Port data structure.
> + * @cmdiocb: pointer to lpfc command iocb data structure.
> + * @ndlp: pointer to a node-list data structure.
> + *
> + * This routine processes an unsolicited LCB(LINK CABLE BEACON) IOCB.
> + * First, the payload of the unsolicited LCB is checked.
> + * Then based on Subcommand beacon will either turn on or off.
> + *
> + * Return code
> + * 0 - Sent the acc response
> + * 1 - Sent the reject response.
> + **/
> +static int
> +lpfc_els_rcv_lcb(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
> +		 struct lpfc_nodelist *ndlp)
> +{
> +	struct lpfc_hba *phba = vport->phba;
> +	struct lpfc_dmabuf *pcmd;
> +	IOCB_t *icmd;
> +	uint8_t *lp;
> +	struct fc_lcb_request_frame *beacon;
> +	struct lpfc_lcb_context *lcb_context;
> +	uint8_t state, rjt_err;
> +	struct ls_rjt stat;
> +
> +	icmd = &cmdiocb->iocb;
> +	pcmd = (struct lpfc_dmabuf *)cmdiocb->context2;
> +	lp = (uint8_t *)pcmd->virt;
> +	beacon = (struct fc_lcb_request_frame *)pcmd->virt;
> +
> +	lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS,
> +			"0192 ELS LCB Data x%x x%x x%x x%x sub x%x "
> +			"type x%x frequency %x duration x%x\n",
> +			lp[0], lp[1], lp[2],
> +			beacon->lcb_command,
> +			beacon->lcb_sub_command,
> +			beacon->lcb_type,
> +			beacon->lcb_frequency,
> +			be16_to_cpu(beacon->lcb_duration));
> +

checkpatch suggests to not split this user-visible string.

Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux