/* Return value: fcp_pkt structure or null on allocation failure. Context: Can be called from process context, no lock is required.  */
static struct fc_fcp_pkt* fc_fcp_pkt_alloc(struct fc_lport *lport, gfp_t gfp)
/* Return value: fcp_pkt structure or null on allocation failure. Context: Can be called from process context, no lock is required.  */
static struct fc_fcp_pkt* fc_fcp_pkt_alloc(struct fc_lport *lport, gfp_t gfp)
{
	struct fc_fcp_internal *si = fc_get_scsi_internal(lport);
	struct fc_fcp_pkt *fsp;
	fsp = mempool_alloc(si->scsi_pkt_pool, gfp);
	if (fsp) {
		memset(fsp, 0, sizeof(*fsp));
		fsp->lp = lport;
		atomic_set(&fsp->ref_cnt, 1);
		init_timer(&fsp->timer);
		INIT_LIST_HEAD(&fsp->list);
		spin_lock_init(&fsp->scsi_pkt_lock);
	}
	return fsp;
}