#include "../cxgbe_compat.h"
#include "../cxgbe_ofld.h"
#include "t4_regs_values.h"
enum {
#include "../cxgbe_compat.h"
#include "../cxgbe_ofld.h"
#include "t4_regs_values.h"
enum {
short int xact_addr_filt; /* index of exact MAC address filter */
u16 viid; /* associated virtual interface id */
short int xact_addr_filt; /* index of exact MAC address filter */
u16 viid; /* associated virtual interface id */
u8 port_id; /* physical port ID */
u8 pidx; /* port index for this PF */
u8 tx_chan; /* associated channel */
u8 port_id; /* physical port ID */
u8 pidx; /* port index for this PF */
u8 tx_chan; /* associated channel */
- u8 n_rx_qsets; /* # of rx qsets */
- u8 n_tx_qsets; /* # of tx qsets */
- u8 first_qset; /* index of first qset */
+ u16 n_rx_qsets; /* # of rx qsets */
+ u16 n_tx_qsets; /* # of tx qsets */
+ u16 first_rxqset; /* index of first rxqset */
+ u16 first_txqset; /* index of first txqset */
u16 *rss; /* rss table */
u8 rss_mode; /* rss mode */
u16 rss_size; /* size of VI's RSS table slice */
u64 rss_hf; /* RSS Hash Function */
u16 *rss; /* rss table */
u8 rss_mode; /* rss mode */
u16 rss_size; /* size of VI's RSS table slice */
u64 rss_hf; /* RSS Hash Function */
-/* Enable or disable autonegotiation. If this is set to enable,
- * the forced link modes above are completely ignored.
- */
-#define AUTONEG_DISABLE 0x00
-#define AUTONEG_ENABLE 0x01
+ /* viid fields either returned by fw
+ * or decoded by parsing viid by driver.
+ */
+ u8 vin;
+ u8 vivld;
+
+ u8 vi_en_rx; /* Enable/disable VI Rx */
+ u8 vi_en_tx; /* Enable/disable VI Tx */
+};
enum { /* adapter flags */
FULL_INIT_DONE = (1 << 0),
enum { /* adapter flags */
FULL_INIT_DONE = (1 << 0),
unsigned long alloc_failed; /* # of times buffer allocation failed */
unsigned long low; /* # of times momentarily starving */
unsigned long alloc_failed; /* # of times buffer allocation failed */
unsigned long low; /* # of times momentarily starving */
void *va; /* virtual address of first byte */
unsigned int nfrags; /* # of fragments */
unsigned int tot_len; /* total length of fragments */
void *va; /* virtual address of first byte */
unsigned int nfrags; /* # of fragments */
unsigned int tot_len; /* total length of fragments */
struct adapter {
struct rte_pci_device *pdev; /* associated rte pci device */
struct rte_eth_dev *eth_dev; /* first port's rte eth device */
struct adapter {
struct rte_pci_device *pdev; /* associated rte pci device */
struct rte_eth_dev *eth_dev; /* first port's rte eth device */
unsigned int clipt_start; /* CLIP table start */
unsigned int clipt_end; /* CLIP table end */
unsigned int l2t_start; /* Layer 2 table start */
unsigned int l2t_end; /* Layer 2 table end */
struct clip_tbl *clipt; /* CLIP table */
struct l2t_data *l2t; /* Layer 2 table */
unsigned int clipt_start; /* CLIP table start */
unsigned int clipt_end; /* CLIP table end */
unsigned int l2t_start; /* Layer 2 table start */
unsigned int l2t_end; /* Layer 2 table end */
struct clip_tbl *clipt; /* CLIP table */
struct l2t_data *l2t; /* Layer 2 table */
- u32 val = CXGBE_READ_REG(adapter, reg_addr);
-
- CXGBE_DEBUG_REG(adapter, "read register 0x%x value 0x%x\n", reg_addr,
- val);
- return val;
+ return CXGBE_READ_REG(adapter, reg_addr);
- u64 val = CXGBE_READ_REG64(adapter, reg_addr);
-
- CXGBE_DEBUG_REG(adapter, "64-bit read register %#x value %#llx\n",
- reg_addr, (unsigned long long)val);
- return val;
+ return CXGBE_READ_REG64(adapter, reg_addr);
#define t4_os_free(_ptr) t4_free_mem((_ptr))
void t4_os_portmod_changed(const struct adapter *adap, int port_id);
#define t4_os_free(_ptr) t4_free_mem((_ptr))
void t4_os_portmod_changed(const struct adapter *adap, int port_id);
int t4_sge_eth_txq_start(struct sge_eth_txq *txq);
int t4_sge_eth_txq_stop(struct sge_eth_txq *txq);
void t4_sge_eth_txq_release(struct adapter *adap, struct sge_eth_txq *txq);
int t4_sge_eth_txq_start(struct sge_eth_txq *txq);
int t4_sge_eth_txq_stop(struct sge_eth_txq *txq);
void t4_sge_eth_txq_release(struct adapter *adap, struct sge_eth_txq *txq);
-int t4_sge_eth_rxq_start(struct adapter *adap, struct sge_rspq *rq);
-int t4_sge_eth_rxq_stop(struct adapter *adap, struct sge_rspq *rq);
+int t4_sge_eth_rxq_start(struct adapter *adap, struct sge_eth_rxq *rxq);
+int t4_sge_eth_rxq_stop(struct adapter *adap, struct sge_eth_rxq *rxq);
void t4_sge_eth_rxq_release(struct adapter *adap, struct sge_eth_rxq *rxq);
void t4_sge_eth_clear_queues(struct port_info *pi);
void t4_sge_eth_rxq_release(struct adapter *adap, struct sge_eth_rxq *rxq);
void t4_sge_eth_clear_queues(struct port_info *pi);
int cxgb4_set_rspq_intr_params(struct sge_rspq *q, unsigned int us,
unsigned int cnt);
int cxgbe_poll(struct sge_rspq *q, struct rte_mbuf **rx_pkts,
int cxgb4_set_rspq_intr_params(struct sge_rspq *q, unsigned int us,
unsigned int cnt);
int cxgbe_poll(struct sge_rspq *q, struct rte_mbuf **rx_pkts,