Files
cubelinux-kernel/drivers/infiniband/hw/ionic/ionic_lif_cfg.h
T
Greg Kroah-Hartman 598cf27219 Linux 6.19.3
Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org
Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com>
Tested-by: Peter Schneider <pschneider1968@googlemail.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Salvatore Bonaccorso <carnil@debian.org>
Tested-by: Brett A C Sheffield <bacs@librecast.net>
Tested-by: Mark Brown <broonie@kernel.org>
Tested-by: Luna Jernberg <droidbittin@gmail.com>
Tested-by: Ronald Warsow <rwarsow@gmx.de>
Tested-by: Justin M. Forbes <jforbes@fedoraproject.org>
Tested-by: Ron Economos <re@w6rz.net>
Tested-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-19 16:33:27 +01:00

67 lines
1.3 KiB
C

/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2018-2025, Advanced Micro Devices, Inc. */
#ifndef _IONIC_LIF_CFG_H_
#define IONIC_VERSION(a, b) (((a) << 16) + ((b) << 8))
#define IONIC_PAGE_SIZE_SUPPORTED 0x40201000 /* 4kb, 2Mb, 1Gb */
#define IONIC_EXPDB_64B_WQE BIT(0)
#define IONIC_EXPDB_128B_WQE BIT(1)
#define IONIC_EXPDB_256B_WQE BIT(2)
#define IONIC_EXPDB_512B_WQE BIT(3)
struct ionic_lif_cfg {
struct device *hwdev;
struct ionic_lif *lif;
int lif_index;
int lif_hw_index;
u32 dbid;
int dbid_count;
u64 __iomem *dbpage;
struct ionic_intr __iomem *intr_ctrl;
phys_addr_t db_phys;
u64 page_size_supported;
u32 npts_per_lif;
u32 nmrs_per_lif;
u32 nahs_per_lif;
u32 aq_base;
u32 cq_base;
u32 eq_base;
int aq_count;
int eq_count;
int cq_count;
int qp_count;
u16 stats_type;
u8 aq_qtype;
u8 sq_qtype;
u8 rq_qtype;
u8 cq_qtype;
u8 eq_qtype;
u8 udma_count;
u8 udma_qgrp_shift;
u8 rdma_version;
u8 qp_opcodes;
u8 admin_opcodes;
u8 max_stride;
bool sq_expdb;
bool rq_expdb;
u8 expdb_mask;
};
void ionic_fill_lif_cfg(struct ionic_lif *lif, struct ionic_lif_cfg *cfg);
struct net_device *ionic_lif_netdev(struct ionic_lif *lif);
void ionic_lif_fw_version(struct ionic_lif *lif, char *str, size_t len);
u8 ionic_lif_asic_rev(struct ionic_lif *lif);
#endif /* _IONIC_LIF_CFG_H_ */