]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.h
liquidio: allocate RX buffers in OOM conditions in PF and VF
[mirror_ubuntu-bionic-kernel.git] / drivers / net / ethernet / cavium / liquidio / cn23xx_pf_device.h
CommitLineData
e86b1ab6 1/**********************************************************************
50579d3d
RV
2 * Author: Cavium, Inc.
3 *
4 * Contact: support@cavium.com
5 * Please include "LiquidIO" in the subject.
6 *
7 * Copyright (c) 2003-2016 Cavium, Inc.
8 *
9 * This file is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License, Version 2, as
11 * published by the Free Software Foundation.
12 *
13 * This file is distributed in the hope that it will be useful, but
14 * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
15 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
16 * NONINFRINGEMENT. See the GNU General Public License for more details.
17 ***********************************************************************/
e86b1ab6
RV
18/*! \file cn23xx_device.h
19 * \brief Host Driver: Routines that perform CN23XX specific operations.
50579d3d 20 */
e86b1ab6
RV
21
22#ifndef __CN23XX_PF_DEVICE_H__
23#define __CN23XX_PF_DEVICE_H__
24
25#include "cn23xx_pf_regs.h"
26
86dea55b
RV
27#define LIO_CMD_WAIT_TM 100
28
e86b1ab6
RV
29/* Register address and configuration for a CN23XX devices.
30 * If device specific changes need to be made then add a struct to include
31 * device specific fields as shown in the commented section
32 */
33struct octeon_cn23xx_pf {
34 /** PCI interrupt summary register */
35 u8 __iomem *intr_sum_reg64;
36
37 /** PCI interrupt enable register */
38 u8 __iomem *intr_enb_reg64;
39
40 /** The PCI interrupt mask used by interrupt handler */
41 u64 intr_mask64;
42
43 struct octeon_config *conf;
44};
72c00912 45
031d4f12
SB
46#define CN23XX_SLI_DEF_BP 0x40
47
72c00912
RV
48int setup_cn23xx_octeon_pf_device(struct octeon_device *oct);
49
50int validate_cn23xx_pf_config_info(struct octeon_device *oct,
51 struct octeon_config *conf23xx);
52
dc3abcbe
RV
53u32 cn23xx_pf_get_oq_ticks(struct octeon_device *oct, u32 time_intr_in_us);
54
72c00912 55void cn23xx_dump_pf_initialized_regs(struct octeon_device *oct);
c0eab5b3
RV
56
57int cn23xx_fw_loaded(struct octeon_device *oct);
86dea55b
RV
58
59void cn23xx_tell_vf_its_macaddr_changed(struct octeon_device *oct, int vfidx,
60 u8 *mac);
e86b1ab6 61#endif