Commit dc926051 authored by Kevin Bowling's avatar Kevin Bowling
Browse files

e1000: Rename 'struct adapter' to 'struct e1000_sc'

Rename the 'struct adapter' to 'struct e1000_sc' to avoid type ambiguity
in things like kgdb.

Reviewed by:	jhb, markj
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D32129
parent f73c2bbf
...@@ -42,9 +42,9 @@ ...@@ -42,9 +42,9 @@
/********************************************************************* /*********************************************************************
* Local Function prototypes * Local Function prototypes
*********************************************************************/ *********************************************************************/
static int em_tso_setup(struct adapter *adapter, if_pkt_info_t pi, u32 *txd_upper, static int em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi, u32 *txd_upper,
u32 *txd_lower); u32 *txd_lower);
static int em_transmit_checksum_setup(struct adapter *adapter, if_pkt_info_t pi, static int em_transmit_checksum_setup(struct e1000_softc *sc, if_pkt_info_t pi,
u32 *txd_upper, u32 *txd_lower); u32 *txd_upper, u32 *txd_lower);
static int em_isc_txd_encap(void *arg, if_pkt_info_t pi); static int em_isc_txd_encap(void *arg, if_pkt_info_t pi);
static void em_isc_txd_flush(void *arg, uint16_t txqid, qidx_t pidx); static void em_isc_txd_flush(void *arg, uint16_t txqid, qidx_t pidx);
...@@ -91,9 +91,9 @@ struct if_txrx lem_txrx = { ...@@ -91,9 +91,9 @@ struct if_txrx lem_txrx = {
extern if_shared_ctx_t em_sctx; extern if_shared_ctx_t em_sctx;
void void
em_dump_rs(struct adapter *adapter) em_dump_rs(struct e1000_softc *sc)
{ {
if_softc_ctx_t scctx = adapter->shared; if_softc_ctx_t scctx = sc->shared;
struct em_tx_queue *que; struct em_tx_queue *que;
struct tx_ring *txr; struct tx_ring *txr;
qidx_t i, ntxd, qid, cur; qidx_t i, ntxd, qid, cur;
...@@ -102,8 +102,8 @@ em_dump_rs(struct adapter *adapter) ...@@ -102,8 +102,8 @@ em_dump_rs(struct adapter *adapter)
printf("\n"); printf("\n");
ntxd = scctx->isc_ntxd[0]; ntxd = scctx->isc_ntxd[0];
for (qid = 0; qid < adapter->tx_num_queues; qid++) { for (qid = 0; qid < sc->tx_num_queues; qid++) {
que = &adapter->tx_queues[qid]; que = &sc->tx_queues[qid];
txr = &que->txr; txr = &que->txr;
rs_cidx = txr->tx_rs_cidx; rs_cidx = txr->tx_rs_cidx;
if (rs_cidx != txr->tx_rs_pidx) { if (rs_cidx != txr->tx_rs_pidx) {
...@@ -132,10 +132,10 @@ em_dump_rs(struct adapter *adapter) ...@@ -132,10 +132,10 @@ em_dump_rs(struct adapter *adapter)
* *
**********************************************************************/ **********************************************************************/
static int static int
em_tso_setup(struct adapter *adapter, if_pkt_info_t pi, u32 *txd_upper, u32 *txd_lower) em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi, u32 *txd_upper, u32 *txd_lower)
{ {
if_softc_ctx_t scctx = adapter->shared; if_softc_ctx_t scctx = sc->shared;
struct em_tx_queue *que = &adapter->tx_queues[pi->ipi_qsidx]; struct em_tx_queue *que = &sc->tx_queues[pi->ipi_qsidx];
struct tx_ring *txr = &que->txr; struct tx_ring *txr = &que->txr;
struct e1000_context_desc *TXD; struct e1000_context_desc *TXD;
int cur, hdr_len; int cur, hdr_len;
...@@ -178,7 +178,7 @@ em_tso_setup(struct adapter *adapter, if_pkt_info_t pi, u32 *txd_upper, u32 *txd ...@@ -178,7 +178,7 @@ em_tso_setup(struct adapter *adapter, if_pkt_info_t pi, u32 *txd_upper, u32 *txd
TXD->tcp_seg_setup.fields.mss = htole16(pi->ipi_tso_segsz); TXD->tcp_seg_setup.fields.mss = htole16(pi->ipi_tso_segsz);
TXD->tcp_seg_setup.fields.hdr_len = hdr_len; TXD->tcp_seg_setup.fields.hdr_len = hdr_len;
TXD->cmd_and_length = htole32(adapter->txd_cmd | TXD->cmd_and_length = htole32(sc->txd_cmd |
E1000_TXD_CMD_DEXT | /* Extended descr */ E1000_TXD_CMD_DEXT | /* Extended descr */
E1000_TXD_CMD_TSE | /* TSE context */ E1000_TXD_CMD_TSE | /* TSE context */
E1000_TXD_CMD_IP | /* Do IP csum */ E1000_TXD_CMD_IP | /* Do IP csum */
...@@ -189,7 +189,7 @@ em_tso_setup(struct adapter *adapter, if_pkt_info_t pi, u32 *txd_upper, u32 *txd ...@@ -189,7 +189,7 @@ em_tso_setup(struct adapter *adapter, if_pkt_info_t pi, u32 *txd_upper, u32 *txd
if (++cur == scctx->isc_ntxd[0]) { if (++cur == scctx->isc_ntxd[0]) {
cur = 0; cur = 0;
} }
DPRINTF(iflib_get_dev(adapter->ctx), "%s: pidx: %d cur: %d\n", __FUNCTION__, pi->ipi_pidx, cur); DPRINTF(iflib_get_dev(sc->ctx), "%s: pidx: %d cur: %d\n", __FUNCTION__, pi->ipi_pidx, cur);
return (cur); return (cur);
} }
...@@ -215,11 +215,11 @@ em_tso_setup(struct adapter *adapter, if_pkt_info_t pi, u32 *txd_upper, u32 *txd ...@@ -215,11 +215,11 @@ em_tso_setup(struct adapter *adapter, if_pkt_info_t pi, u32 *txd_upper, u32 *txd
**********************************************************************/ **********************************************************************/
static int static int
em_transmit_checksum_setup(struct adapter *adapter, if_pkt_info_t pi, u32 *txd_upper, u32 *txd_lower) em_transmit_checksum_setup(struct e1000_softc *sc, if_pkt_info_t pi, u32 *txd_upper, u32 *txd_lower)
{ {
struct e1000_context_desc *TXD = NULL; struct e1000_context_desc *TXD = NULL;
if_softc_ctx_t scctx = adapter->shared; if_softc_ctx_t scctx = sc->shared;
struct em_tx_queue *que = &adapter->tx_queues[pi->ipi_qsidx]; struct em_tx_queue *que = &sc->tx_queues[pi->ipi_qsidx];
struct tx_ring *txr = &que->txr; struct tx_ring *txr = &que->txr;
int csum_flags = pi->ipi_csum_flags; int csum_flags = pi->ipi_csum_flags;
int cur, hdr_len; int cur, hdr_len;
...@@ -227,7 +227,7 @@ em_transmit_checksum_setup(struct adapter *adapter, if_pkt_info_t pi, u32 *txd_u ...@@ -227,7 +227,7 @@ em_transmit_checksum_setup(struct adapter *adapter, if_pkt_info_t pi, u32 *txd_u
cur = pi->ipi_pidx; cur = pi->ipi_pidx;
hdr_len = pi->ipi_ehdrlen + pi->ipi_ip_hlen; hdr_len = pi->ipi_ehdrlen + pi->ipi_ip_hlen;
cmd = adapter->txd_cmd; cmd = sc->txd_cmd;
/* /*
* The 82574L can only remember the *last* context used * The 82574L can only remember the *last* context used
...@@ -237,7 +237,7 @@ em_transmit_checksum_setup(struct adapter *adapter, if_pkt_info_t pi, u32 *txd_u ...@@ -237,7 +237,7 @@ em_transmit_checksum_setup(struct adapter *adapter, if_pkt_info_t pi, u32 *txd_u
* second note. * second note.
*/ */
if (DONT_FORCE_CTX && if (DONT_FORCE_CTX &&
adapter->tx_num_queues == 1 && sc->tx_num_queues == 1 &&
txr->csum_lhlen == pi->ipi_ehdrlen && txr->csum_lhlen == pi->ipi_ehdrlen &&
txr->csum_iphlen == pi->ipi_ip_hlen && txr->csum_iphlen == pi->ipi_ip_hlen &&
txr->csum_flags == csum_flags) { txr->csum_flags == csum_flags) {
...@@ -293,7 +293,7 @@ em_transmit_checksum_setup(struct adapter *adapter, if_pkt_info_t pi, u32 *txd_u ...@@ -293,7 +293,7 @@ em_transmit_checksum_setup(struct adapter *adapter, if_pkt_info_t pi, u32 *txd_u
if (++cur == scctx->isc_ntxd[0]) { if (++cur == scctx->isc_ntxd[0]) {
cur = 0; cur = 0;
} }
DPRINTF(iflib_get_dev(adapter->ctx), "checksum_setup csum_flags=%x txd_upper=%x txd_lower=%x hdr_len=%d cmd=%x\n", DPRINTF(iflib_get_dev(sc->ctx), "checksum_setup csum_flags=%x txd_upper=%x txd_lower=%x hdr_len=%d cmd=%x\n",
csum_flags, *txd_upper, *txd_lower, hdr_len, cmd); csum_flags, *txd_upper, *txd_lower, hdr_len, cmd);
return (cur); return (cur);
} }
...@@ -301,7 +301,7 @@ em_transmit_checksum_setup(struct adapter *adapter, if_pkt_info_t pi, u32 *txd_u ...@@ -301,7 +301,7 @@ em_transmit_checksum_setup(struct adapter *adapter, if_pkt_info_t pi, u32 *txd_u
static int static int
em_isc_txd_encap(void *arg, if_pkt_info_t pi) em_isc_txd_encap(void *arg, if_pkt_info_t pi)
{ {
struct adapter *sc = arg; struct e1000_softc *sc = arg;
if_softc_ctx_t scctx = sc->shared; if_softc_ctx_t scctx = sc->shared;
struct em_tx_queue *que = &sc->tx_queues[pi->ipi_qsidx]; struct em_tx_queue *que = &sc->tx_queues[pi->ipi_qsidx];
struct tx_ring *txr = &que->txr; struct tx_ring *txr = &que->txr;
...@@ -348,7 +348,7 @@ em_isc_txd_encap(void *arg, if_pkt_info_t pi) ...@@ -348,7 +348,7 @@ em_isc_txd_encap(void *arg, if_pkt_info_t pi)
} }
DPRINTF(iflib_get_dev(sc->ctx), "encap: set up tx: nsegs=%d first=%d i=%d\n", nsegs, first, i); DPRINTF(iflib_get_dev(sc->ctx), "encap: set up tx: nsegs=%d first=%d i=%d\n", nsegs, first, i);
/* XXX adapter->pcix_82544 -- lem_fill_descriptors */ /* XXX sc->pcix_82544 -- lem_fill_descriptors */
/* Set up our transmit descriptors */ /* Set up our transmit descriptors */
for (j = 0; j < nsegs; j++) { for (j = 0; j < nsegs; j++) {
...@@ -416,19 +416,19 @@ em_isc_txd_encap(void *arg, if_pkt_info_t pi) ...@@ -416,19 +416,19 @@ em_isc_txd_encap(void *arg, if_pkt_info_t pi)
static void static void
em_isc_txd_flush(void *arg, uint16_t txqid, qidx_t pidx) em_isc_txd_flush(void *arg, uint16_t txqid, qidx_t pidx)
{ {
struct adapter *adapter = arg; struct e1000_softc *sc = arg;
struct em_tx_queue *que = &adapter->tx_queues[txqid]; struct em_tx_queue *que = &sc->tx_queues[txqid];
struct tx_ring *txr = &que->txr; struct tx_ring *txr = &que->txr;
E1000_WRITE_REG(&adapter->hw, E1000_TDT(txr->me), pidx); E1000_WRITE_REG(&sc->hw, E1000_TDT(txr->me), pidx);
} }
static int static int
em_isc_txd_credits_update(void *arg, uint16_t txqid, bool clear) em_isc_txd_credits_update(void *arg, uint16_t txqid, bool clear)
{ {
struct adapter *adapter = arg; struct e1000_softc *sc = arg;
if_softc_ctx_t scctx = adapter->shared; if_softc_ctx_t scctx = sc->shared;
struct em_tx_queue *que = &adapter->tx_queues[txqid]; struct em_tx_queue *que = &sc->tx_queues[txqid];
struct tx_ring *txr = &que->txr; struct tx_ring *txr = &que->txr;
qidx_t processed = 0; qidx_t processed = 0;
...@@ -461,7 +461,7 @@ em_isc_txd_credits_update(void *arg, uint16_t txqid, bool clear) ...@@ -461,7 +461,7 @@ em_isc_txd_credits_update(void *arg, uint16_t txqid, bool clear)
if (delta < 0) if (delta < 0)
delta += ntxd; delta += ntxd;
MPASS(delta > 0); MPASS(delta > 0);
DPRINTF(iflib_get_dev(adapter->ctx), DPRINTF(iflib_get_dev(sc->ctx),
"%s: cidx_processed=%u cur=%u clear=%d delta=%d\n", "%s: cidx_processed=%u cur=%u clear=%d delta=%d\n",
__FUNCTION__, prev, cur, clear, delta); __FUNCTION__, prev, cur, clear, delta);
...@@ -483,7 +483,7 @@ em_isc_txd_credits_update(void *arg, uint16_t txqid, bool clear) ...@@ -483,7 +483,7 @@ em_isc_txd_credits_update(void *arg, uint16_t txqid, bool clear)
static void static void
lem_isc_rxd_refill(void *arg, if_rxd_update_t iru) lem_isc_rxd_refill(void *arg, if_rxd_update_t iru)
{ {
struct adapter *sc = arg; struct e1000_softc *sc = arg;
if_softc_ctx_t scctx = sc->shared; if_softc_ctx_t scctx = sc->shared;
struct em_rx_queue *que = &sc->rx_queues[iru->iru_qsidx]; struct em_rx_queue *que = &sc->rx_queues[iru->iru_qsidx];
struct rx_ring *rxr = &que->rxr; struct rx_ring *rxr = &que->rxr;
...@@ -511,7 +511,7 @@ lem_isc_rxd_refill(void *arg, if_rxd_update_t iru) ...@@ -511,7 +511,7 @@ lem_isc_rxd_refill(void *arg, if_rxd_update_t iru)
static void static void
em_isc_rxd_refill(void *arg, if_rxd_update_t iru) em_isc_rxd_refill(void *arg, if_rxd_update_t iru)
{ {
struct adapter *sc = arg; struct e1000_softc *sc = arg;
if_softc_ctx_t scctx = sc->shared; if_softc_ctx_t scctx = sc->shared;
uint16_t rxqid = iru->iru_qsidx; uint16_t rxqid = iru->iru_qsidx;
struct em_rx_queue *que = &sc->rx_queues[rxqid]; struct em_rx_queue *que = &sc->rx_queues[rxqid];
...@@ -540,7 +540,7 @@ em_isc_rxd_refill(void *arg, if_rxd_update_t iru) ...@@ -540,7 +540,7 @@ em_isc_rxd_refill(void *arg, if_rxd_update_t iru)
static void static void
em_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, qidx_t pidx) em_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, qidx_t pidx)
{ {
struct adapter *sc = arg; struct e1000_softc *sc = arg;
struct em_rx_queue *que = &sc->rx_queues[rxqid]; struct em_rx_queue *que = &sc->rx_queues[rxqid];
struct rx_ring *rxr = &que->rxr; struct rx_ring *rxr = &que->rxr;
...@@ -550,7 +550,7 @@ em_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, qidx_t pidx) ...@@ -550,7 +550,7 @@ em_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, qidx_t pidx)
static int static int
lem_isc_rxd_available(void *arg, uint16_t rxqid, qidx_t idx, qidx_t budget) lem_isc_rxd_available(void *arg, uint16_t rxqid, qidx_t idx, qidx_t budget)
{ {
struct adapter *sc = arg; struct e1000_softc *sc = arg;
if_softc_ctx_t scctx = sc->shared; if_softc_ctx_t scctx = sc->shared;
struct em_rx_queue *que = &sc->rx_queues[rxqid]; struct em_rx_queue *que = &sc->rx_queues[rxqid];
struct rx_ring *rxr = &que->rxr; struct rx_ring *rxr = &que->rxr;
...@@ -575,7 +575,7 @@ lem_isc_rxd_available(void *arg, uint16_t rxqid, qidx_t idx, qidx_t budget) ...@@ -575,7 +575,7 @@ lem_isc_rxd_available(void *arg, uint16_t rxqid, qidx_t idx, qidx_t budget)
static int static int
em_isc_rxd_available(void *arg, uint16_t rxqid, qidx_t idx, qidx_t budget) em_isc_rxd_available(void *arg, uint16_t rxqid, qidx_t idx, qidx_t budget)
{ {
struct adapter *sc = arg; struct e1000_softc *sc = arg;
if_softc_ctx_t scctx = sc->shared; if_softc_ctx_t scctx = sc->shared;
struct em_rx_queue *que = &sc->rx_queues[rxqid]; struct em_rx_queue *que = &sc->rx_queues[rxqid];
struct rx_ring *rxr = &que->rxr; struct rx_ring *rxr = &que->rxr;
...@@ -600,9 +600,9 @@ em_isc_rxd_available(void *arg, uint16_t rxqid, qidx_t idx, qidx_t budget) ...@@ -600,9 +600,9 @@ em_isc_rxd_available(void *arg, uint16_t rxqid, qidx_t idx, qidx_t budget)
static int static int
lem_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) lem_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri)
{ {
struct adapter *adapter = arg; struct e1000_softc *sc = arg;
if_softc_ctx_t scctx = adapter->shared; if_softc_ctx_t scctx = sc->shared;
struct em_rx_queue *que = &adapter->rx_queues[ri->iri_qsidx]; struct em_rx_queue *que = &sc->rx_queues[ri->iri_qsidx];
struct rx_ring *rxr = &que->rxr; struct rx_ring *rxr = &que->rxr;
struct e1000_rx_desc *rxd; struct e1000_rx_desc *rxd;
u16 len; u16 len;
...@@ -628,7 +628,7 @@ lem_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) ...@@ -628,7 +628,7 @@ lem_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri)
/* Make sure bad packets are discarded */ /* Make sure bad packets are discarded */
if (errors & E1000_RXD_ERR_FRAME_ERR_MASK) { if (errors & E1000_RXD_ERR_FRAME_ERR_MASK) {
adapter->dropped_pkts++; sc->dropped_pkts++;
/* XXX fixup if common */ /* XXX fixup if common */
return (EBADMSG); return (EBADMSG);
} }
...@@ -645,7 +645,7 @@ lem_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) ...@@ -645,7 +645,7 @@ lem_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri)
} while (!eop); } while (!eop);
/* XXX add a faster way to look this up */ /* XXX add a faster way to look this up */
if (adapter->hw.mac.type >= e1000_82543) if (sc->hw.mac.type >= e1000_82543)
em_receive_checksum(status, errors, ri); em_receive_checksum(status, errors, ri);
if (status & E1000_RXD_STAT_VP) { if (status & E1000_RXD_STAT_VP) {
...@@ -661,9 +661,9 @@ lem_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) ...@@ -661,9 +661,9 @@ lem_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri)
static int static int
em_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) em_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri)
{ {
struct adapter *adapter = arg; struct e1000_softc *sc = arg;
if_softc_ctx_t scctx = adapter->shared; if_softc_ctx_t scctx = sc->shared;
struct em_rx_queue *que = &adapter->rx_queues[ri->iri_qsidx]; struct em_rx_queue *que = &sc->rx_queues[ri->iri_qsidx];
struct rx_ring *rxr = &que->rxr; struct rx_ring *rxr = &que->rxr;
union e1000_rx_desc_extended *rxd; union e1000_rx_desc_extended *rxd;
...@@ -691,7 +691,7 @@ em_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) ...@@ -691,7 +691,7 @@ em_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri)
/* Make sure bad packets are discarded */ /* Make sure bad packets are discarded */
if (staterr & E1000_RXDEXT_ERR_FRAME_ERR_MASK) { if (staterr & E1000_RXDEXT_ERR_FRAME_ERR_MASK) {
adapter->dropped_pkts++; sc->dropped_pkts++;
return EBADMSG; return EBADMSG;
} }
......
This diff is collapsed.
...@@ -27,6 +27,10 @@ ...@@ -27,6 +27,10 @@
*/ */
/*$FreeBSD$*/ /*$FreeBSD$*/
#ifndef _EM_H_DEFINED_
#define _EM_H_DEFINED_
#include "opt_ddb.h" #include "opt_ddb.h"
#include "opt_inet.h" #include "opt_inet.h"
#include "opt_inet6.h" #include "opt_inet6.h"
...@@ -42,9 +46,7 @@ ...@@ -42,9 +46,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <ddb/ddb.h> #include <ddb/ddb.h>
#endif #endif
#if __FreeBSD_version >= 800000
#include <sys/buf_ring.h> #include <sys/buf_ring.h>
#endif
#include <sys/bus.h> #include <sys/bus.h>
#include <sys/endian.h> #include <sys/endian.h>
#include <sys/kernel.h> #include <sys/kernel.h>
...@@ -95,11 +97,6 @@ ...@@ -95,11 +97,6 @@
#include "e1000_82571.h" #include "e1000_82571.h"
#include "ifdi_if.h" #include "ifdi_if.h"
#ifndef _EM_H_DEFINED_
#define _EM_H_DEFINED_
/* Tunables */ /* Tunables */
/* /*
...@@ -114,11 +111,11 @@ ...@@ -114,11 +111,11 @@
* desscriptors should meet the following condition. * desscriptors should meet the following condition.
* (num_tx_desc * sizeof(struct e1000_tx_desc)) % 128 == 0 * (num_tx_desc * sizeof(struct e1000_tx_desc)) % 128 == 0
*/ */
#define EM_MIN_TXD 128 #define EM_MIN_TXD 128
#define EM_MAX_TXD 4096 #define EM_MAX_TXD 4096
#define EM_DEFAULT_TXD 1024 #define EM_DEFAULT_TXD 1024
#define EM_DEFAULT_MULTI_TXD 4096 #define EM_DEFAULT_MULTI_TXD 4096
#define IGB_MAX_TXD 4096 #define IGB_MAX_TXD 4096
/* /*
* EM_MAX_RXD - Maximum number of receive Descriptors * EM_MAX_RXD - Maximum number of receive Descriptors
...@@ -133,11 +130,11 @@ ...@@ -133,11 +130,11 @@
* desscriptors should meet the following condition. * desscriptors should meet the following condition.
* (num_tx_desc * sizeof(struct e1000_tx_desc)) % 128 == 0 * (num_tx_desc * sizeof(struct e1000_tx_desc)) % 128 == 0
*/ */
#define EM_MIN_RXD 128 #define EM_MIN_RXD 128
#define EM_MAX_RXD 4096 #define EM_MAX_RXD 4096
#define EM_DEFAULT_RXD 1024 #define EM_DEFAULT_RXD 1024
#define EM_DEFAULT_MULTI_RXD 4096 #define EM_DEFAULT_MULTI_RXD 4096
#define IGB_MAX_RXD 4096 #define IGB_MAX_RXD 4096
/* /*
* EM_TIDV - Transmit Interrupt Delay Value * EM_TIDV - Transmit Interrupt Delay Value
...@@ -149,7 +146,7 @@ ...@@ -149,7 +146,7 @@
* system is reporting dropped transmits, this value may be set too high * system is reporting dropped transmits, this value may be set too high
* causing the driver to run out of available transmit descriptors. * causing the driver to run out of available transmit descriptors.
*/ */
#define EM_TIDV 64 #define EM_TIDV 64
/* /*
* EM_TADV - Transmit Absolute Interrupt Delay Value * EM_TADV - Transmit Absolute Interrupt Delay Value
...@@ -163,7 +160,7 @@ ...@@ -163,7 +160,7 @@
* along with EM_TIDV, may improve traffic throughput in specific * along with EM_TIDV, may improve traffic throughput in specific
* network conditions. * network conditions.
*/ */
#define EM_TADV 64 #define EM_TADV 64
/* /*
* EM_RDTR - Receive Interrupt Delay Timer (Packet Timer) * EM_RDTR - Receive Interrupt Delay Timer (Packet Timer)
...@@ -184,7 +181,7 @@ ...@@ -184,7 +181,7 @@
* restoring the network connection. To eliminate the potential * restoring the network connection. To eliminate the potential
* for the hang ensure that EM_RDTR is set to 0. * for the hang ensure that EM_RDTR is set to 0.
*/ */
#define EM_RDTR 0 #define EM_RDTR 0
/* /*
* Receive Interrupt Absolute Delay Timer (Not valid for 82542/82543/82544) * Receive Interrupt Absolute Delay Timer (Not valid for 82542/82543/82544)
...@@ -197,14 +194,14 @@ ...@@ -197,14 +194,14 @@
* along with EM_RDTR, may improve traffic throughput in specific network * along with EM_RDTR, may improve traffic throughput in specific network
* conditions. * conditions.
*/ */
#define EM_RADV 64 #define EM_RADV 64
/* /*
* This parameter controls whether or not autonegotation is enabled. * This parameter controls whether or not autonegotation is enabled.
* 0 - Disable autonegotiation * 0 - Disable autonegotiation
* 1 - Enable autonegotiation * 1 - Enable autonegotiation
*/ */
#define DO_AUTO_NEG 1 #define DO_AUTO_NEG 1
/* /*
* This parameter control whether or not the driver will wait for * This parameter control whether or not the driver will wait for
...@@ -212,13 +209,13 @@ ...@@ -212,13 +209,13 @@
* 1 - Wait for autonegotiation to complete * 1 - Wait for autonegotiation to complete
* 0 - Don't wait for autonegotiation to complete * 0 - Don't wait for autonegotiation to complete
*/ */
#define WAIT_FOR_AUTO_NEG_DEFAULT 0 #define WAIT_FOR_AUTO_NEG_DEFAULT 0
/* Tunables -- End */ /* Tunables -- End */
#define AUTONEG_ADV_DEFAULT (ADVERTISE_10_HALF | ADVERTISE_10_FULL | \ #define AUTONEG_ADV_DEFAULT (ADVERTISE_10_HALF | ADVERTISE_10_FULL | \
ADVERTISE_100_HALF | ADVERTISE_100_FULL | \ ADVERTISE_100_HALF | ADVERTISE_100_FULL | \
ADVERTISE_1000_FULL) ADVERTISE_1000_FULL)
#define AUTO_ALL_MODES 0 #define AUTO_ALL_MODES 0
...@@ -226,38 +223,37 @@ ...@@ -226,38 +223,37 @@
#define EM_MASTER_SLAVE e1000_ms_hw_default #define EM_MASTER_SLAVE e1000_ms_hw_default
/* /*
* Micellaneous constants * Miscellaneous constants
*/ */
#define EM_VENDOR_ID 0x8086 #define EM_VENDOR_ID 0x8086
#define EM_FLASH 0x0014 #define EM_FLASH 0x0014
#define EM_JUMBO_PBA 0x00000028 #define EM_JUMBO_PBA 0x00000028
#define EM_DEFAULT_PBA 0x00000030 #define EM_DEFAULT_PBA 0x00000030
#define EM_SMARTSPEED_DOWNSHIFT 3 #define EM_SMARTSPEED_DOWNSHIFT 3
#define EM_SMARTSPEED_MAX 15 #define EM_SMARTSPEED_MAX 15
#define EM_MAX_LOOP 10 #define EM_MAX_LOOP 10
#define MAX_NUM_MULTICAST_ADDRESSES 128 #define MAX_NUM_MULTICAST_ADDRESSES 128
#define PCI_ANY_ID (~0U) #define PCI_ANY_ID (~0U)
#define ETHER_ALIGN 2 #define ETHER_ALIGN 2
#define EM_FC_PAUSE_TIME 0x0680 #define EM_FC_PAUSE_TIME 0x0680
#define EM_EEPROM_APME 0x400; #define EM_EEPROM_APME 0x400;
#define EM_82544_APME 0x0004; #define EM_82544_APME 0x0004;
/* Support AutoMediaDetect for Marvell M88 PHY in i354 */ /* Support AutoMediaDetect for Marvell M88 PHY in i354 */
#define IGB_MEDIA_RESET (1 << 0) #define IGB_MEDIA_RESET (1 << 0)
/* Define the starting Interrupt rate per Queue */ /* Define the starting Interrupt rate per Queue */
#define IGB_INTS_PER_SEC 8000 #define IGB_INTS_PER_SEC 8000
#define IGB_DEFAULT_ITR ((1000000/IGB_INTS_PER_SEC) << 2) #define IGB_DEFAULT_ITR ((1000000/IGB_INTS_PER_SEC) << 2)
#define IGB_LINK_ITR 2000 #define IGB_LINK_ITR 2000
#define I210_LINK_DELAY 1000 #define I210_LINK_DELAY 1000
#define IGB_TXPBSIZE 20408 #define IGB_TXPBSIZE 20408
#define IGB_HDR_BUF 128 #define IGB_HDR_BUF 128
#define IGB_PKTTYPE_MASK 0x0000FFF0 #define IGB_PKTTYPE_MASK 0x0000FFF0
#define IGB_DMCTLX_DCFLUSH_DIS 0x80000000 /* Disable DMA Coalesce Flush */ #define IGB_DMCTLX_DCFLUSH_DIS 0x80000000 /* Disable DMA Coalesce Flush */
/* /*
...@@ -272,22 +268,22 @@ ...@@ -272,22 +268,22 @@
#define EM_TX_IDLE 0x00000000 #define EM_TX_IDLE 0x00000000
#define EM_TX_BUSY 0x00000001 #define EM_TX_BUSY 0x00000001
#define EM_TX_HUNG 0x80000000 #define EM_TX_HUNG 0x80000000
#define EM_TX_MAXTRIES 10 #define EM_TX_MAXTRIES 10