Re: [PATCH v5 15/31] elx: libefc: Extended link Service IO handling

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

 



Hi James,

On Sun, Jan 03, 2021 at 09:11:18AM -0800, James Smart wrote:
> +void efc_disc_io_complete(struct efc_disc_io *io, u32 len, u32 status,
> +			  u32 ext_status)
> +{
> +	struct efc_els_io_req *els =
> +				container_of(io, struct efc_els_io_req, io);
> +
> +	WARN_ON(!els->cb);


Could this be a filling up the logs? Maybe the the once version of it
would be enough.

> +
> +	((efc_hw_srrs_cb_t) els->cb) (els, len, status, ext_status);
> +}

[...]

> +int
> +efc_send_plogi(struct efc_node *node)
> +{
> +	struct efc_els_io_req *els;
> +	struct efc *efc = node->efc;
> +	struct fc_els_flogi  *plogi;
> +
> +	node_els_trace();
> +
> +	els = efc_els_io_alloc(node, sizeof(*plogi));
> +	if (!els) {
> +		efc_log_err(efc, "IO alloc failed\n");
> +		return EFC_FAIL;
> +	}
> +	els->display_name = "plogi";
> +
> +	/* Build PLOGI request */
> +	plogi = els->io.req.virt;
> +
> +	memcpy(plogi, node->nport->service_params, sizeof(*plogi));
> +
> +	plogi->fl_cmd = ELS_PLOGI;
> +	memset(plogi->_fl_resvd, 0, sizeof(plogi->_fl_resvd));
> +
> +	efc_els_send_req(node, els, EFC_DISC_IO_ELS_REQ);
> +
> +	return EFC_SUCCESS;

Just wondering it would be a good idea to efc_els_send_req() return a
error status and use it here. At least efc_els_send_req() can fail.

The same comment is true for the rest of the file. There are a bunch
more of those send functions with the 'fire and forget' semantic.

Thanks,
Daniel



[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