aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/e1000
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2014-09-15 19:53:49 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2014-09-15 19:53:49 +0000
commit1c2427605c4988f9adc2c4d3ebd5bc690bad8171 (patch)
tree8dc081247c0b118c912c314ee75ce91f1c9a3340 /sys/dev/e1000
parentcc47e5ee4f3c141c230a892c2a82f2ac2dc23dac (diff)
downloadsrc-1c2427605c4988f9adc2c4d3ebd5bc690bad8171.tar.gz
src-1c2427605c4988f9adc2c4d3ebd5bc690bad8171.zip
Notes
Diffstat (limited to 'sys/dev/e1000')
-rw-r--r--sys/dev/e1000/if_igb.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/dev/e1000/if_igb.c b/sys/dev/e1000/if_igb.c
index 5f0557833a3f..d6f7162a57c6 100644
--- a/sys/dev/e1000/if_igb.c
+++ b/sys/dev/e1000/if_igb.c
@@ -4712,6 +4712,18 @@ igb_initialize_receive_units(struct adapter *adapter)
rctl |= E1000_RCTL_SZ_2048;
}
+ /*
+ * If TX flow control is disabled and there's >1 queue defined,
+ * enable DROP.
+ *
+ * This drops frames rather than hanging the RX MAC for all queues.
+ */
+ if ((adapter->num_queues > 1) &&
+ (adapter->fc == e1000_fc_none ||
+ adapter->fc == e1000_fc_rx_pause)) {
+ srrctl |= E1000_SRRCTL_DROP_EN;
+ }
+
/* Setup the Base and Length of the Rx Descriptor Rings */
for (int i = 0; i < adapter->num_queues; i++, rxr++) {
u64 bus_addr = rxr->rxdma.dma_paddr;
@@ -6255,6 +6267,7 @@ igb_set_flowcntl(SYSCTL_HANDLER_ARGS)
adapter->hw.fc.current_mode = adapter->hw.fc.requested_mode;
e1000_force_mac_fc(&adapter->hw);
+ /* XXX TODO: update DROP_EN on each RX queue if appropriate */
return (error);
}