Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit acdc79a6 authored by Jing Huang's avatar Jing Huang Committed by James Bottomley
Browse files

[SCSI] bfa: fix comments for header files



This patch addresses the comments from Randy Dunlap (Randy.Dunlap@oracle.com)
regarding comment blocks that begining with "/**". bfa driver comments
currently do not follow kernel-doc convention, we hence replace all
/** with /* and **/ with */.

Signed-off-by: default avatarJing Huang <huangj@brocade.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent e0a08a30
Loading
Loading
Loading
Loading
+14 −14
Original line number Diff line number Diff line
@@ -29,13 +29,13 @@ struct bfa_s;
typedef void (*bfa_isr_func_t) (struct bfa_s *bfa, struct bfi_msg_s *m);
typedef void    (*bfa_cb_cbfn_t) (void *cbarg, bfa_boolean_t complete);

/**
/*
 * Interrupt message handlers
 */
void bfa_isr_unhandled(struct bfa_s *bfa, struct bfi_msg_s *m);
void bfa_isr_bind(enum bfi_mclass mc, bfa_isr_func_t isr_func);

/**
/*
 * Request and response queue related defines
 */
#define BFA_REQQ_NELEMS_MIN	(4)
@@ -76,7 +76,7 @@ void bfa_isr_bind(enum bfi_mclass mc, bfa_isr_func_t isr_func);
	(__index) &= ((__size) - 1);			\
} while (0)

/**
/*
 * Queue element to wait for room in request queue. FIFO order is
 * maintained when fullfilling requests.
 */
@@ -86,7 +86,7 @@ struct bfa_reqq_wait_s {
	void		*cbarg;
};

/**
/*
 * Circular queue usage assignments
 */
enum {
@@ -113,7 +113,7 @@ bfa_reqq_winit(struct bfa_reqq_wait_s *wqe, void (*qresume) (void *cbarg),

#define bfa_reqq(__bfa, __reqq)	(&(__bfa)->reqq_waitq[__reqq])

/**
/*
 * static inline void
 * bfa_reqq_wait(struct bfa_s *bfa, int reqq, struct bfa_reqq_wait_s *wqe)
 */
@@ -130,7 +130,7 @@ bfa_reqq_winit(struct bfa_reqq_wait_s *wqe, void (*qresume) (void *cbarg),
#define bfa_reqq_wcancel(__wqe)	list_del(&(__wqe)->qe)


/**
/*
 * Generic BFA callback element.
 */
struct bfa_cb_qe_s {
@@ -163,7 +163,7 @@ struct bfa_cb_qe_s {
	} while (0)


/**
/*
 * PCI devices supported by the current BFA
 */
struct bfa_pciid_s {
@@ -173,7 +173,7 @@ struct bfa_pciid_s {

extern char     bfa_version[];

/**
/*
 * BFA memory resources
 */
enum bfa_mem_type {
@@ -214,7 +214,7 @@ struct bfa_iocfc_regs_s {
	void __iomem	*rme_q_ctrl[BFI_IOC_MAX_CQS];
};

/**
/*
 * MSIX vector handlers
 */
#define BFA_MSIX_MAX_VECTORS	22
@@ -224,7 +224,7 @@ struct bfa_msix_s {
	bfa_msix_handler_t handler[BFA_MSIX_MAX_VECTORS];
};

/**
/*
 * Chip specific interfaces
 */
struct bfa_hwif_s {
@@ -343,7 +343,7 @@ int bfa_iocfc_get_pbc_vports(struct bfa_s *bfa,
				struct bfi_pbc_vport_s *pbc_vport);


/**
/*
 *----------------------------------------------------------------------
 *		BFA public interfaces
 *----------------------------------------------------------------------
+10 −10
Original line number Diff line number Diff line
@@ -42,13 +42,13 @@ bfad_int_to_lun(u32 luno)
	return lun.bfa_lun;
}

/**
/*
 * Get LUN for the I/O request
 */
#define bfa_cb_ioim_get_lun(__dio)	\
	bfad_int_to_lun(((struct scsi_cmnd *)__dio)->device->lun)

/**
/*
 * Get CDB for the I/O request
 */
static inline u8 *
@@ -59,7 +59,7 @@ bfa_cb_ioim_get_cdb(struct bfad_ioim_s *dio)
	return (u8 *) cmnd->cmnd;
}

/**
/*
 * Get I/O direction (read/write) for the I/O request
 */
static inline enum fcp_iodir
@@ -77,7 +77,7 @@ bfa_cb_ioim_get_iodir(struct bfad_ioim_s *dio)
		return FCP_IODIR_NONE;
}

/**
/*
 * Get IO size in bytes for the I/O request
 */
static inline u32
@@ -88,7 +88,7 @@ bfa_cb_ioim_get_size(struct bfad_ioim_s *dio)
	return scsi_bufflen(cmnd);
}

/**
/*
 * Get timeout for the I/O request
 */
static inline u8
@@ -104,7 +104,7 @@ bfa_cb_ioim_get_timeout(struct bfad_ioim_s *dio)
	return 0;
}

/**
/*
 * Get Command Reference Number for the I/O request. 0 if none.
 */
static inline u8
@@ -113,7 +113,7 @@ bfa_cb_ioim_get_crn(struct bfad_ioim_s *dio)
	return 0;
}

/**
/*
 * Get SAM-3 priority for the I/O request. 0 is default.
 */
static inline u8
@@ -122,7 +122,7 @@ bfa_cb_ioim_get_priority(struct bfad_ioim_s *dio)
	return 0;
}

/**
/*
 * Get task attributes for the I/O request. Default is FCP_TASK_ATTR_SIMPLE(0).
 */
static inline u8
@@ -148,7 +148,7 @@ bfa_cb_ioim_get_taskattr(struct bfad_ioim_s *dio)
	return task_attr;
}

/**
/*
 * Get CDB length in bytes for the I/O request. Default is FCP_CMND_CDB_LEN(16).
 */
static inline u8
@@ -159,7 +159,7 @@ bfa_cb_ioim_get_cdblen(struct bfad_ioim_s *dio)
	return cmnd->cmd_len;
}

/**
/*
 * Assign queue to be used for the I/O request. This value depends on whether
 * the driver wants to use the queues via any specific algorithm. Currently,
 * this is not supported.
+12 −12
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@
 * General Public License for more details.
 */

/**
/*
 *  bfa_cs.h BFA common services
 */

@@ -24,7 +24,7 @@

#include "bfa_os_inc.h"

/**
/*
 * BFA TRC
 */

@@ -73,7 +73,7 @@ enum {
#define BFA_TRC_MOD_SH	10
#define BFA_TRC_MOD(__mod)	((BFA_TRC_ ## __mod) << BFA_TRC_MOD_SH)

/**
/*
 * Define a new tracing file (module). Module should match one defined above.
 */
#define BFA_TRC_FILE(__mod, __submod)					\
@@ -155,7 +155,7 @@ __bfa_trc32(struct bfa_trc_mod_s *trcm, int fileno, int line, u32 data)
#define bfa_trc_fp(_trcp, _data)
#endif

/**
/*
 * @ BFA LOG interfaces
 */
#define bfa_assert(__cond)	do {					\
@@ -249,13 +249,13 @@ bfa_q_is_on_q_func(struct list_head *q, struct list_head *qe)
#define bfa_q_is_on_q(_q, _qe)      \
	bfa_q_is_on_q_func(_q, (struct list_head *)(_qe))

/**
/*
 * @ BFA state machine interfaces
 */

typedef void (*bfa_sm_t)(void *sm, int event);

/**
/*
 * oc - object class eg. bfa_ioc
 * st - state, eg. reset
 * otype - object type, eg. struct bfa_ioc_s
@@ -269,7 +269,7 @@ typedef void (*bfa_sm_t)(void *sm, int event);
#define bfa_sm_get_state(_sm)		((_sm)->sm)
#define bfa_sm_cmp_state(_sm, _state)	((_sm)->sm == (bfa_sm_t)(_state))

/**
/*
 * For converting from state machine function to state encoding.
 */
struct bfa_sm_table_s {
@@ -279,12 +279,12 @@ struct bfa_sm_table_s {
};
#define BFA_SM(_sm)	((bfa_sm_t)(_sm))

/**
/*
 * State machine with entry actions.
 */
typedef void (*bfa_fsm_t)(void *fsm, int event);

/**
/*
 * oc - object class eg. bfa_ioc
 * st - state, eg. reset
 * otype - object type, eg. struct bfa_ioc_s
@@ -314,7 +314,7 @@ bfa_sm_to_state(struct bfa_sm_table_s *smt, bfa_sm_t sm)
	return smt[i].state;
}

/**
/*
 * @ Generic wait counter.
 */

@@ -340,7 +340,7 @@ bfa_wc_down(struct bfa_wc_s *wc)
		wc->wc_resume(wc->wc_cbarg);
}

/**
/*
 * Initialize a waiting counter.
 */
static inline void
@@ -352,7 +352,7 @@ bfa_wc_init(struct bfa_wc_s *wc, bfa_wc_resume_t wc_resume, void *wc_cbarg)
	bfa_wc_up(wc);
}

/**
/*
 * Wait for counter to reach zero
 */
static inline void
+27 −27
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@
#define BFA_MFG_SERIALNUM_SIZE                  11
#define STRSZ(_n)                               (((_n) + 4) & ~3)

/**
/*
 * Manufacturing card type
 */
enum {
@@ -45,7 +45,7 @@ enum {

#pragma pack(1)

/**
/*
 * Check if Mezz card
 */
#define bfa_mfg_is_mezz(type) (( \
@@ -55,7 +55,7 @@ enum {
	(type) == BFA_MFG_TYPE_LIGHTNING_P0 || \
	(type) == BFA_MFG_TYPE_LIGHTNING))

/**
/*
 * Check if the card having old wwn/mac handling
 */
#define bfa_mfg_is_old_wwn_mac_model(type) (( \
@@ -78,12 +78,12 @@ do { \
	(m)[2] = t & 0xFF;                                      \
} while (0)

/**
/*
 * VPD data length
 */
#define BFA_MFG_VPD_LEN                 512

/**
/*
 * VPD vendor tag
 */
enum {
@@ -97,7 +97,7 @@ enum {
	BFA_MFG_VPD_PCI_BRCD    = 0xf8,  /*  PCI VPD Brocade            */
};

/**
/*
 * All numerical fields are in big-endian format.
 */
struct bfa_mfg_vpd_s {
@@ -112,7 +112,7 @@ struct bfa_mfg_vpd_s {

#pragma pack()

/**
/*
 * Status return values
 */
enum bfa_status {
@@ -167,11 +167,11 @@ enum bfa_boolean {
#define BFA_STRING_32	32
#define BFA_VERSION_LEN 64

/**
/*
 * ---------------------- adapter definitions ------------
 */

/**
/*
 * BFA adapter level attributes.
 */
enum {
@@ -215,7 +215,7 @@ struct bfa_adapter_attr_s {
	u8		trunk_capable;
};

/**
/*
 * ---------------------- IOC definitions ------------
 */

@@ -224,7 +224,7 @@ enum {
	BFA_IOC_CHIP_REV_LEN	= 8,
};

/**
/*
 * Driver and firmware versions.
 */
struct bfa_ioc_driver_attr_s {
@@ -236,7 +236,7 @@ struct bfa_ioc_driver_attr_s {
	char		ob_ver[BFA_VERSION_LEN];	/*  openboot version */
};

/**
/*
 * IOC PCI device attributes
 */
struct bfa_ioc_pci_attr_s {
@@ -249,7 +249,7 @@ struct bfa_ioc_pci_attr_s {
	char		chip_rev[BFA_IOC_CHIP_REV_LEN];	 /*  chip revision */
};

/**
/*
 * IOC states
 */
enum bfa_ioc_state {
@@ -267,7 +267,7 @@ enum bfa_ioc_state {
	BFA_IOC_ENABLING	= 12,	/*  IOC is being enabled */
};

/**
/*
 * IOC firmware stats
 */
struct bfa_fw_ioc_stats_s {
@@ -279,7 +279,7 @@ struct bfa_fw_ioc_stats_s {
	u32	unknown_reqs;
};

/**
/*
 * IOC driver stats
 */
struct bfa_ioc_drv_stats_s {
@@ -296,7 +296,7 @@ struct bfa_ioc_drv_stats_s {
	u32	enable_replies;
};

/**
/*
 * IOC statistics
 */
struct bfa_ioc_stats_s {
@@ -310,7 +310,7 @@ enum bfa_ioc_type_e {
	BFA_IOC_TYPE_LL		= 3,
};

/**
/*
 * IOC attributes returned in queries
 */
struct bfa_ioc_attr_s {
@@ -323,11 +323,11 @@ struct bfa_ioc_attr_s {
	u8				rsvd[7];	/*  64bit align    */
};

/**
/*
 * ---------------------- mfg definitions ------------
 */

/**
/*
 * Checksum size
 */
#define BFA_MFG_CHKSUM_SIZE			16
@@ -340,7 +340,7 @@ struct bfa_ioc_attr_s {

#pragma pack(1)

/**
/*
 * All numerical fields are in big-endian format.
 */
struct bfa_mfg_block_s {
@@ -373,11 +373,11 @@ struct bfa_mfg_block_s {

#pragma pack()

/**
/*
 * ---------------------- pci definitions ------------
 */

/**
/*
 * PCI device and vendor ID information
 */
enum {
@@ -392,14 +392,14 @@ enum {
	((devid) == BFA_PCI_DEVICE_ID_CT ||	\
	 (devid) == BFA_PCI_DEVICE_ID_CT_FC)

/**
/*
 * PCI sub-system device and vendor ID information
 */
enum {
	BFA_PCI_FCOE_SSDEVICE_ID	= 0x14,
};

/**
/*
 * Maximum number of device address ranges mapped through different BAR(s)
 */
#define BFA_PCI_ACCESS_RANGES 1
@@ -430,7 +430,7 @@ enum {
#define BOOT_CFG_REV1   1
#define BOOT_CFG_VLAN   1

/**
/*
 *      Boot options setting. Boot options setting determines from where
 *      to get the boot lun information
 */
@@ -442,7 +442,7 @@ enum bfa_boot_bootopt {
};

#pragma pack(1)
/**
/*
 * Boot lun information.
 */
struct bfa_boot_bootlun_s {
@@ -451,7 +451,7 @@ struct bfa_boot_bootlun_s {
};
#pragma pack()

/**
/*
 * BOOT boot configuraton
 */
struct bfa_boot_pbc_s {
+23 −23
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@
#include "bfa_fc.h"
#include "bfa_defs_svc.h"

/**
/*
 * VF states
 */
enum bfa_vf_state {
@@ -35,7 +35,7 @@ enum bfa_vf_state {
	BFA_VF_ISOLATED  = 7,	/*  port isolated due to vf_id mismatch */
};

/**
/*
 * VF statistics
 */
struct bfa_vf_stats_s {
@@ -55,7 +55,7 @@ struct bfa_vf_stats_s {
	u32	resvd; /*  padding for 64 bit alignment */
};

/**
/*
 * VF attributes returned in queries
 */
struct bfa_vf_attr_s {
@@ -67,7 +67,7 @@ struct bfa_vf_attr_s {
#define BFA_FCS_MAX_LPORTS 256
#define BFA_FCS_FABRIC_IPADDR_SZ  16

/**
/*
 * symbolic names for base port/virtual port
 */
#define BFA_SYMNAME_MAXLEN	128	/* 128 bytes */
@@ -75,7 +75,7 @@ struct bfa_lport_symname_s {
	char	    symname[BFA_SYMNAME_MAXLEN];
};

/**
/*
* Roles of FCS port:
 *     - FCP IM and FCP TM roles cannot be enabled together for a FCS port
 *     - Create multiple ports if both IM and TM functions required.
@@ -86,7 +86,7 @@ enum bfa_lport_role {
	BFA_LPORT_ROLE_FCP_MAX	= BFA_LPORT_ROLE_FCP_IM,
};

/**
/*
 * FCS port configuration.
 */
struct bfa_lport_cfg_s {
@@ -98,7 +98,7 @@ struct bfa_lport_cfg_s {
    u8	     tag[16];	/*  opaque tag from application */
};

/**
/*
 * FCS port states
 */
enum bfa_lport_state {
@@ -108,7 +108,7 @@ enum bfa_lport_state {
	BFA_LPORT_OFFLINE = 3,	/*  No login to fabric */
};

/**
/*
 * FCS port type.
 */
enum bfa_lport_type {
@@ -116,7 +116,7 @@ enum bfa_lport_type {
	BFA_LPORT_TYPE_VIRTUAL,
};

/**
/*
 * FCS port offline reason.
 */
enum bfa_lport_offline_reason {
@@ -128,7 +128,7 @@ enum bfa_lport_offline_reason {
	BFA_LPORT_OFFLINE_FAB_LOGOUT,
};

/**
/*
 * FCS lport info.
 */
struct bfa_lport_info_s {
@@ -150,7 +150,7 @@ struct bfa_lport_info_s {

};

/**
/*
 * FCS port statistics
 */
struct bfa_lport_stats_s {
@@ -222,7 +222,7 @@ struct bfa_lport_stats_s {
					    * (max retry of plogi) */
};

/**
/*
 * BFA port attribute returned in queries
 */
struct bfa_lport_attr_s {
@@ -239,7 +239,7 @@ struct bfa_lport_attr_s {
};


/**
/*
 * VPORT states
 */
enum bfa_vport_state {
@@ -258,7 +258,7 @@ enum bfa_vport_state {
	BFA_FCS_VPORT_MAX_STATE,
};

/**
/*
 * vport statistics
 */
struct bfa_vport_stats_s {
@@ -296,7 +296,7 @@ struct bfa_vport_stats_s {
	u32        rsvd;
};

/**
/*
 * BFA vport attribute returned in queries
 */
struct bfa_vport_attr_s {
@@ -305,7 +305,7 @@ struct bfa_vport_attr_s {
	u32          rsvd;
};

/**
/*
 * FCS remote port states
 */
enum bfa_rport_state {
@@ -321,7 +321,7 @@ enum bfa_rport_state {
	BFA_RPORT_NSDISC	= 9,	/*  re-discover rport */
};

/**
/*
 *  Rport Scsi Function : Initiator/Target.
 */
enum bfa_rport_function {
@@ -329,7 +329,7 @@ enum bfa_rport_function {
	BFA_RPORT_TARGET	= 0x02,	/*  SCSI Target	*/
};

/**
/*
 * port/node symbolic names for rport
 */
#define BFA_RPORT_SYMNAME_MAXLEN	255
@@ -337,7 +337,7 @@ struct bfa_rport_symname_s {
	char            symname[BFA_RPORT_SYMNAME_MAXLEN];
};

/**
/*
 * FCS remote port statistics
 */
struct bfa_rport_stats_s {
@@ -374,7 +374,7 @@ struct bfa_rport_stats_s {
	struct bfa_rport_hal_stats_s	hal_stats;  /*  BFA rport stats    */
};

/**
/*
 * FCS remote port attributes returned in queries
 */
struct bfa_rport_attr_s {
@@ -411,7 +411,7 @@ struct bfa_rport_remote_link_stats_s {
#define BFA_MAX_IO_INDEX 7
#define BFA_NO_IO_INDEX 9

/**
/*
 * FCS itnim states
 */
enum bfa_itnim_state {
@@ -425,7 +425,7 @@ enum bfa_itnim_state {
	BFA_ITNIM_INITIATIOR	= 7,	/*  initiator */
};

/**
/*
 * FCS remote port statistics
 */
struct bfa_itnim_stats_s {
@@ -443,7 +443,7 @@ struct bfa_itnim_stats_s {
	u32	rsvd;		/* padding for 64 bit alignment */
};

/**
/*
 * FCS itnim attributes returned in queries
 */
struct bfa_itnim_attr_s {
Loading