summaryrefslogblamecommitdiff
path: root/drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.h
blob: 310c9c567152f2eeaa1249a937f87cc971f28116 (plain) (tree)





































                                                                          
/* Broadcom NetXtreme-C/E network driver.
 *
 * Copyright (c) 2016-2017 Broadcom Limited
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation.
 */

#ifndef BNXT_VFR_H
#define BNXT_VFR_H

#define	MAX_CFA_CODE			65536

/* Struct to hold housekeeping info needed by devlink interface */
struct bnxt_dl {
	struct bnxt *bp;	/* back ptr to the controlling dev */
};

static inline struct bnxt *bnxt_get_bp_from_dl(struct devlink *dl)
{
	return ((struct bnxt_dl *)devlink_priv(dl))->bp;
}

static inline void bnxt_link_bp_to_dl(struct devlink *dl, struct bnxt *bp)
{
	struct bnxt_dl *bp_dl = devlink_priv(dl);

	bp_dl->bp = bp;
	if (bp)
		bp->dl = dl;
}

int bnxt_dl_register(struct bnxt *bp);
void bnxt_dl_unregister(struct bnxt *bp);
void bnxt_vf_reps_destroy(struct bnxt *bp);

#endif /* BNXT_VFR_H */