Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/e1000/if_igb.c
Show First 20 Lines • Show All 608 Lines • ▼ Show 20 Lines | SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), | ||||
adapter, 0, igb_sysctl_dmac, "I", "DMA Coalesce"); | adapter, 0, igb_sysctl_dmac, "I", "DMA Coalesce"); | ||||
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), | SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), | ||||
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), | SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), | ||||
OID_AUTO, "eee_disabled", CTLTYPE_INT|CTLFLAG_RW, | OID_AUTO, "eee_disabled", CTLTYPE_INT|CTLFLAG_RW, | ||||
adapter, 0, igb_sysctl_eee, "I", | adapter, 0, igb_sysctl_eee, "I", | ||||
"Disable Energy Efficient Ethernet"); | "Disable Energy Efficient Ethernet"); | ||||
if (adapter->hw.phy.media_type == e1000_media_type_copper) { | if (adapter->hw.phy.media_type == e1000_media_type_copper) { | ||||
if (adapter->hw.mac.type == e1000_i354) | if (adapter->hw.mac.type == e1000_i354) | ||||
e1000_set_eee_i354(&adapter->hw); | e1000_set_eee_i354(&adapter->hw, TRUE, TRUE); | ||||
else | else | ||||
e1000_set_eee_i350(&adapter->hw); | e1000_set_eee_i350(&adapter->hw, TRUE, TRUE); | ||||
} | } | ||||
} | } | ||||
/* | /* | ||||
** Start from a known state, this is | ** Start from a known state, this is | ||||
** important in reading the nvm and | ** important in reading the nvm and | ||||
** mac from that. | ** mac from that. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 770 Lines • ▼ Show 20 Lines | #endif /* DEVICE_POLLING */ | ||||
{ | { | ||||
igb_enable_intr(adapter); | igb_enable_intr(adapter); | ||||
E1000_WRITE_REG(&adapter->hw, E1000_ICS, E1000_ICS_LSC); | E1000_WRITE_REG(&adapter->hw, E1000_ICS, E1000_ICS_LSC); | ||||
} | } | ||||
/* Set Energy Efficient Ethernet */ | /* Set Energy Efficient Ethernet */ | ||||
if (adapter->hw.phy.media_type == e1000_media_type_copper) { | if (adapter->hw.phy.media_type == e1000_media_type_copper) { | ||||
if (adapter->hw.mac.type == e1000_i354) | if (adapter->hw.mac.type == e1000_i354) | ||||
e1000_set_eee_i354(&adapter->hw); | e1000_set_eee_i354(&adapter->hw, TRUE, TRUE); | ||||
else | else | ||||
e1000_set_eee_i350(&adapter->hw); | e1000_set_eee_i350(&adapter->hw, TRUE, TRUE); | ||||
} | } | ||||
} | } | ||||
static void | static void | ||||
igb_init(void *arg) | igb_init(void *arg) | ||||
{ | { | ||||
struct adapter *adapter = arg; | struct adapter *adapter = arg; | ||||
▲ Show 20 Lines • Show All 4,568 Lines • ▼ Show 20 Lines | for (int i = 0; i < adapter->num_queues; i++, rxr++, txr++) { | ||||
SYSCTL_ADD_QUAD(ctx, queue_list, OID_AUTO, "rx_bytes", | SYSCTL_ADD_QUAD(ctx, queue_list, OID_AUTO, "rx_bytes", | ||||
CTLFLAG_RD, &rxr->rx_bytes, | CTLFLAG_RD, &rxr->rx_bytes, | ||||
"Queue Bytes Received"); | "Queue Bytes Received"); | ||||
SYSCTL_ADD_UINT(ctx, queue_list, OID_AUTO, "lro_queued", | SYSCTL_ADD_UINT(ctx, queue_list, OID_AUTO, "lro_queued", | ||||
CTLFLAG_RD, &lro->lro_queued, 0, | CTLFLAG_RD, &lro->lro_queued, 0, | ||||
"LRO Queued"); | "LRO Queued"); | ||||
SYSCTL_ADD_UINT(ctx, queue_list, OID_AUTO, "lro_flushed", | SYSCTL_ADD_UINT(ctx, queue_list, OID_AUTO, "lro_flushed", | ||||
CTLFLAG_RD, &lro->lro_flushed, 0, | CTLFLAG_RD, &lro->lro_flushed, 0, | ||||
"LRO Flushed"); | "LRO Flushed"); | ||||
sbruno: This code block does not apply cleanly. Can you update it to match head when you get a chance? | |||||
Not Done Inline ActionsAre you sure you're using something that's newer than rS294327? LRO statistics were made 64-bit in that commit, so you can't use the 32-bit sysctl's anymore. erj: Are you sure you're using something that's newer than rS294327? LRO statistics were made 64-bit… | |||||
Not Done Inline ActionsWait, nvm, you're right -- upstream got changed to U64. I'll update this revision. erj: Wait, nvm, you're right -- upstream got changed to U64. I'll update this revision. | |||||
} | } | ||||
/* MAC stats get their own sub node */ | /* MAC stats get their own sub node */ | ||||
stat_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "mac_stats", | stat_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "mac_stats", | ||||
CTLFLAG_RD, NULL, "MAC Statistics"); | CTLFLAG_RD, NULL, "MAC Statistics"); | ||||
stat_list = SYSCTL_CHILDREN(stat_node); | stat_list = SYSCTL_CHILDREN(stat_node); | ||||
▲ Show 20 Lines • Show All 463 Lines • Show Last 20 Lines |
This code block does not apply cleanly. Can you update it to match head when you get a chance?