Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/e1000/if_em.c
Show All 25 Lines | |||||
* SUCH DAMAGE. | * SUCH DAMAGE. | ||||
*/ | */ | ||||
/* $FreeBSD$ */ | /* $FreeBSD$ */ | ||||
#include "if_em.h" | #include "if_em.h" | ||||
#include <sys/sbuf.h> | #include <sys/sbuf.h> | ||||
#include <machine/_inttypes.h> | #include <machine/_inttypes.h> | ||||
#define em_mac_min e1000_82547 | #define em_mac_min e1000_82571 | ||||
#define igb_mac_min e1000_82575 | #define igb_mac_min e1000_82575 | ||||
/********************************************************************* | /********************************************************************* | ||||
* Driver version: | * Driver version: | ||||
*********************************************************************/ | *********************************************************************/ | ||||
char em_driver_version[] = "7.6.1-k"; | char em_driver_version[] = "7.6.1-k"; | ||||
/********************************************************************* | /********************************************************************* | ||||
▲ Show 20 Lines • Show All 2,421 Lines • ▼ Show 20 Lines | em_reset(if_ctx_t ctx) | ||||
} | } | ||||
/* | /* | ||||
* Packet Buffer Allocation (PBA) | * Packet Buffer Allocation (PBA) | ||||
* Writing PBA sets the receive portion of the buffer | * Writing PBA sets the receive portion of the buffer | ||||
* the remainder is used for the transmit buffer. | * the remainder is used for the transmit buffer. | ||||
*/ | */ | ||||
switch (hw->mac.type) { | switch (hw->mac.type) { | ||||
/* Total Packet Buffer on these is 48K */ | /* 82547: Total Packet Buffer is 40K */ | ||||
case e1000_82547: | |||||
case e1000_82547_rev_2: | |||||
if (adapter->max_frame_size > 8192) | |||||
pba = E1000_PBA_22K; /* 22K for Rx, 18K for Tx */ | |||||
else | |||||
pba = E1000_PBA_30K; /* 30K for Rx, 10K for Tx */ | |||||
break; | |||||
/* 82571/82572/80003es2lan: Total Packet Buffer is 48K */ | |||||
case e1000_82571: | case e1000_82571: | ||||
case e1000_82572: | case e1000_82572: | ||||
case e1000_80003es2lan: | case e1000_80003es2lan: | ||||
pba = E1000_PBA_32K; /* 32K for Rx, 16K for Tx */ | pba = E1000_PBA_32K; /* 32K for Rx, 16K for Tx */ | ||||
break; | break; | ||||
case e1000_82573: /* 82573: Total Packet Buffer is 32K */ | /* 82573: Total Packet Buffer is 32K */ | ||||
case e1000_82573: | |||||
pba = E1000_PBA_12K; /* 12K for Rx, 20K for Tx */ | pba = E1000_PBA_12K; /* 12K for Rx, 20K for Tx */ | ||||
break; | break; | ||||
case e1000_82574: | case e1000_82574: | ||||
case e1000_82583: | case e1000_82583: | ||||
pba = E1000_PBA_20K; /* 20K for Rx, 20K for Tx */ | pba = E1000_PBA_20K; /* 20K for Rx, 20K for Tx */ | ||||
break; | break; | ||||
case e1000_ich8lan: | case e1000_ich8lan: | ||||
pba = E1000_PBA_8K; | pba = E1000_PBA_8K; | ||||
Show All 28 Lines | case e1000_vfadapt_i350: | ||||
pba = E1000_READ_REG(hw, E1000_RXPBS); | pba = E1000_READ_REG(hw, E1000_RXPBS); | ||||
pba = e1000_rxpbs_adjust_82580(pba); | pba = e1000_rxpbs_adjust_82580(pba); | ||||
break; | break; | ||||
case e1000_i210: | case e1000_i210: | ||||
case e1000_i211: | case e1000_i211: | ||||
pba = E1000_PBA_34K; | pba = E1000_PBA_34K; | ||||
break; | break; | ||||
default: | default: | ||||
/* Remaining devices assumed to have a Packet Buffer of 64K. */ | |||||
if (hw->mac.max_frame_size > 8192) | if (hw->mac.max_frame_size > 8192) | ||||
pba = E1000_PBA_40K; /* 40K for Rx, 24K for Tx */ | pba = E1000_PBA_40K; /* 40K for Rx, 24K for Tx */ | ||||
else | else | ||||
pba = E1000_PBA_48K; /* 48K for Rx, 16K for Tx */ | pba = E1000_PBA_48K; /* 48K for Rx, 16K for Tx */ | ||||
} | } | ||||
/* Special needs in case of Jumbo frames */ | /* Special needs in case of Jumbo frames */ | ||||
if ((hw->mac.type == e1000_82575) && (ifp->if_mtu > ETHERMTU)) { | if ((hw->mac.type == e1000_82575) && (ifp->if_mtu > ETHERMTU)) { | ||||
▲ Show 20 Lines • Show All 2,093 Lines • Show Last 20 Lines |