linux/drivers/scsi/lpfc/lpfc_bsg.h

/*******************************************************************
 * This file is part of the Emulex Linux Device Driver for         *
 * Fibre Channel Host Bus Adapters.                                *
 * Copyright (C) 2017-2022 Broadcom. All Rights Reserved. The term *
 * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.     *
 * Copyright (C) 2010-2015 Emulex.  All rights reserved.           *
 * EMULEX and SLI are trademarks of Emulex.                        *
 * www.broadcom.com                                                *
 *                                                                 *
 * This program is free software; you can redistribute it and/or   *
 * modify it under the terms of version 2 of the GNU General       *
 * Public License as published by the Free Software Foundation.    *
 * This program is distributed in the hope that it will be useful. *
 * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND          *
 * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,  *
 * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE      *
 * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
 * TO BE LEGALLY INVALID.  See the GNU General Public License for  *
 * more details, a copy of which can be found in the file COPYING  *
 * included with this package.                                     *
 *******************************************************************/
/* bsg definitions
 * No pointers to user data are allowed, all application buffers and sizes will
 * derived through the bsg interface.
 *
 * These are the vendor unique structures passed in using the bsg
 * FC_BSG_HST_VENDOR message code type.
 */
#define LPFC_BSG_VENDOR_SET_CT_EVENT
#define LPFC_BSG_VENDOR_GET_CT_EVENT
#define LPFC_BSG_VENDOR_SEND_MGMT_RESP
#define LPFC_BSG_VENDOR_DIAG_MODE
#define LPFC_BSG_VENDOR_DIAG_RUN_LOOPBACK
#define LPFC_BSG_VENDOR_GET_MGMT_REV
#define LPFC_BSG_VENDOR_MBOX
#define LPFC_BSG_VENDOR_DIAG_MODE_END
#define LPFC_BSG_VENDOR_LINK_DIAG_TEST
#define LPFC_BSG_VENDOR_FORCED_LINK_SPEED
#define LPFC_BSG_VENDOR_RAS_GET_LWPD
#define LPFC_BSG_VENDOR_RAS_GET_FWLOG
#define LPFC_BSG_VENDOR_RAS_GET_CONFIG
#define LPFC_BSG_VENDOR_RAS_SET_CONFIG
#define LPFC_BSG_VENDOR_GET_TRUNK_INFO
#define LPFC_BSG_VENDOR_GET_CGNBUF_INFO

struct set_ct_event {};

struct get_ct_event {};

struct get_ct_event_reply {};

struct send_mgmt_resp {};


#define DISABLE_LOOP_BACK
#define INTERNAL_LOOP_BACK
#define EXTERNAL_LOOP_BACK

struct diag_mode_set {};

struct sli4_link_diag {};

struct diag_mode_test {};

struct diag_status {};

#define LPFC_WWNN_TYPE
#define LPFC_WWPN_TYPE

struct get_mgmt_rev {};

#define MANAGEMENT_MAJOR_REV
#define MANAGEMENT_MINOR_REV

/* the MgmtRevInfo structure */
struct MgmtRevInfo {};

struct get_mgmt_rev_reply {};

#define BSG_MBOX_SIZE

/* BSG mailbox request header */
struct dfc_mbox_req {};

/*
 * macros and data structures for handling sli-config mailbox command
 * pass-through support, this header file is shared between user and
 * kernel spaces, note the set of macros are duplicates from lpfc_hw4.h,
 * with macro names prefixed with bsg_, as the macros defined in
 * lpfc_hw4.h are not accessible from user space.
 */

/* Macros to deal with bit fields. Each bit field must have 3 #defines
 * associated with it (_SHIFT, _MASK, and _WORD).
 * EG. For a bit field that is in the 7th bit of the "field4" field of a
 * structure and is 2 bits in size the following #defines must exist:
 *      struct temp {
 *              uint32_t        field1;
 *              uint32_t        field2;
 *              uint32_t        field3;
 *              uint32_t        field4;
 *      #define example_bit_field_SHIFT         7
 *      #define example_bit_field_MASK          0x03
 *      #define example_bit_field_WORD          field4
 *              uint32_t        field5;
 *      };
 * Then the macros below may be used to get or set the value of that field.
 * EG. To get the value of the bit field from the above example:
 *      struct temp t1;
 *      value = bsg_bf_get(example_bit_field, &t1);
 * And then to set that bit field:
 *      bsg_bf_set(example_bit_field, &t1, 2);
 * Or clear that bit field:
 *      bsg_bf_set(example_bit_field, &t1, 0);
 */
#define bsg_bf_get_le32(name, ptr)
#define bsg_bf_get(name, ptr)
#define bsg_bf_set_le32(name, ptr, value)
#define bsg_bf_set(name, ptr, value)

/*
 * The sli_config structure specified here is based on the following
 * restriction:
 *
 * -- SLI_CONFIG EMB=0, carrying MSEs, will carry subcommands without
 *    carrying HBD.
 * -- SLI_CONFIG EMB=1, not carrying MSE, will carry subcommands with or
 *    without carrying HBDs.
 */

struct lpfc_sli_config_mse {};

struct lpfc_sli_config_hbd {};

struct lpfc_sli_config_hdr {};

#define LPFC_CSF_BOOT_DEV
#define LPFC_CSF_QUERY
#define LPFC_CSF_SAVE

struct lpfc_sli_config_emb0_subsys {};

struct lpfc_sli_config_emb1_subsys {};

struct lpfc_sli_config_mbox {};

#define LPFC_FORCED_LINK_SPEED_NOT_SUPPORTED
#define LPFC_FORCED_LINK_SPEED_SUPPORTED
struct get_forced_link_speed_support {};
struct forced_link_speed_support_reply {};

struct lpfc_bsg_ras_req {};

struct lpfc_bsg_get_fwlog_req {};

struct lpfc_bsg_get_ras_lwpd {};

struct lpfc_bsg_set_ras_config_req {};

struct lpfc_bsg_get_ras_config_reply {};

struct lpfc_trunk_info {};

struct get_trunk_info_req {};

struct get_cgnbuf_info_req {};

/* driver only */
#define SLI_CONFIG_NOT_HANDLED
#define SLI_CONFIG_HANDLED