linux/drivers/scsi/snic/vnic_devcmd.h

/* SPDX-License-Identifier: GPL-2.0-only */
/* Copyright 2014 Cisco Systems, Inc.  All rights reserved. */

#ifndef _VNIC_DEVCMD_H_
#define _VNIC_DEVCMD_H_

#define _CMD_NBITS
#define _CMD_VTYPEBITS
#define _CMD_FLAGSBITS
#define _CMD_DIRBITS

#define _CMD_NMASK
#define _CMD_VTYPEMASK
#define _CMD_FLAGSMASK
#define _CMD_DIRMASK

#define _CMD_NSHIFT
#define _CMD_VTYPESHIFT
#define _CMD_FLAGSSHIFT
#define _CMD_DIRSHIFT

/*
 * Direction bits (from host perspective).
 */
#define _CMD_DIR_NONE
#define _CMD_DIR_WRITE
#define _CMD_DIR_READ
#define _CMD_DIR_RW

/*
 * Flag bits.
 */
#define _CMD_FLAGS_NONE
#define _CMD_FLAGS_NOWAIT

/*
 * vNIC type bits.
 */
#define _CMD_VTYPE_NONE
#define _CMD_VTYPE_ENET
#define _CMD_VTYPE_FC
#define _CMD_VTYPE_SCSI
#define _CMD_VTYPE_ALL

/*
 * Used to create cmds..
*/
#define _CMDCF(dir, flags, vtype, nr)
#define _CMDC(dir, vtype, nr)
#define _CMDCNW(dir, vtype, nr)

/*
 * Used to decode cmds..
*/
#define _CMD_DIR(cmd)
#define _CMD_FLAGS(cmd)
#define _CMD_VTYPE(cmd)
#define _CMD_N(cmd)

enum vnic_devcmd_cmd {};

/* flags for CMD_OPEN */
#define CMD_OPENF_OPROM

/* flags for CMD_INIT */
#define CMD_INITF_DEFAULT_MAC

/* flags for CMD_PACKET_FILTER */
#define CMD_PFILTER_DIRECTED
#define CMD_PFILTER_MULTICAST
#define CMD_PFILTER_BROADCAST
#define CMD_PFILTER_PROMISCUOUS
#define CMD_PFILTER_ALL_MULTICAST

enum vnic_devcmd_status {};

enum vnic_devcmd_error {};

struct vnic_devcmd_fw_info {};

struct vnic_devcmd_notify {};
#define VNIC_STF_FATAL_ERR

struct vnic_devcmd_provinfo {};

/*
 * Writing cmd register causes STAT_BUSY to get set in status register.
 * When cmd completes, STAT_BUSY will be cleared.
 *
 * If cmd completed successfully STAT_ERROR will be clear
 * and args registers contain cmd-specific results.
 *
 * If cmd error, STAT_ERROR will be set and args[0] contains error code.
 *
 * status register is read-only.  While STAT_BUSY is set,
 * all other register contents are read-only.
 */

/* Make sizeof(vnic_devcmd) a power-of-2 for I/O BAR. */
#define VNIC_DEVCMD_NARGS
struct vnic_devcmd {};


/*
 * Version 2 of the interface.
 *
 * Some things are carried over, notably the vnic_devcmd_cmd enum.
 */

/*
 * Flags for vnic_devcmd2.flags
 */

#define DEVCMD2_FNORESULT

#define VNIC_DEVCMD2_NARGS
struct vnic_devcmd2 {};

#define VNIC_DEVCMD2_NRESULTS
struct devcmd2_result {};

#define DEVCMD2_RING_SIZE
#define DEVCMD2_DESC_SIZE

#define DEVCMD2_RESULTS_SIZE_MAX

#endif /* _VNIC_DEVCMD_H_ */