linux/drivers/scsi/csiostor/csio_lnode.h

/*
 * This file is part of the Chelsio FCoE driver for Linux.
 *
 * Copyright (c) 2008-2012 Chelsio Communications, Inc. All rights reserved.
 *
 * This software is available to you under a choice of one of two
 * licenses.  You may choose to be licensed under the terms of the GNU
 * General Public License (GPL) Version 2, available from the file
 * COPYING in the main directory of this source tree, or the
 * OpenIB.org BSD license below:
 *
 *     Redistribution and use in source and binary forms, with or
 *     without modification, are permitted provided that the following
 *     conditions are met:
 *
 *      - Redistributions of source code must retain the above
 *        copyright notice, this list of conditions and the following
 *        disclaimer.
 *
 *      - Redistributions in binary form must reproduce the above
 *        copyright notice, this list of conditions and the following
 *        disclaimer in the documentation and/or other materials
 *        provided with the distribution.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

#ifndef __CSIO_LNODE_H__
#define __CSIO_LNODE_H__

#include <linux/kref.h>
#include <linux/timer.h>
#include <linux/workqueue.h>
#include <scsi/fc/fc_els.h>


#include "csio_defs.h"
#include "csio_hw.h"

#define CSIO_FCOE_MAX_NPIV
#define CSIO_FCOE_MAX_RNODES

/* FDMI port attribute unknown speed */
#define CSIO_HBA_PORTSPEED_UNKNOWN

extern int csio_fcoe_rnodes;
extern int csio_fdmi_enable;

struct csio_fcf_info {};

/* Defines for flags */
#define CSIO_LNF_FIPSUPP
#define CSIO_LNF_NPIVSUPP
#define CSIO_LNF_LINK_ENABLE
#define CSIO_LNF_FDMI_ENABLE

/* Transport events */
enum csio_ln_fc_evt {};

/* Lnode stats */
struct csio_lnode_stats {};

/* Common Lnode params */
struct csio_lnode_params {};

struct csio_service_parms {};

/* Lnode */
struct csio_lnode {};

#define csio_lnode_to_hw(ln)
#define csio_root_lnode(ln)
#define csio_parent_lnode(ln)
#define csio_ln_flowid(ln)
#define csio_ln_wwpn(ln)
#define csio_ln_wwnn(ln)

#define csio_is_root_ln(ln)
#define csio_is_phys_ln(ln)
#define csio_is_npiv_ln(ln)


#define csio_ln_dbg(_ln, _fmt, ...)

#define csio_ln_err(_ln, _fmt, ...)

#define csio_ln_warn(_ln, _fmt, ...)

/* HW->Lnode notifications */
enum csio_ln_notify {};

void csio_fcoe_fwevt_handler(struct csio_hw *,  __u8 cpl_op, __be64 *);
int csio_is_lnode_ready(struct csio_lnode *);
void csio_lnode_state_to_str(struct csio_lnode *ln, int8_t *str);
struct csio_lnode *csio_lnode_lookup_by_wwpn(struct csio_hw *, uint8_t *);
int csio_get_phy_port_stats(struct csio_hw *, uint8_t ,
				      struct fw_fcoe_port_stats *);
int csio_scan_done(struct csio_lnode *, unsigned long, unsigned long,
		   unsigned long, unsigned long);
void csio_notify_lnodes(struct csio_hw *, enum csio_ln_notify);
void csio_disable_lnodes(struct csio_hw *, uint8_t, bool);
void csio_lnode_async_event(struct csio_lnode *, enum csio_ln_fc_evt);
int csio_ln_fdmi_start(struct csio_lnode *, void *);
int csio_lnode_start(struct csio_lnode *);
void csio_lnode_stop(struct csio_lnode *);
void csio_lnode_close(struct csio_lnode *);
int csio_lnode_init(struct csio_lnode *, struct csio_hw *,
			      struct csio_lnode *);
void csio_lnode_exit(struct csio_lnode *);

#endif /* ifndef __CSIO_LNODE_H__ */