aboutsummaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2012-07-10 09:32:58 +0100
committerMichael Brown <mcb30@ipxe.org>2012-07-10 09:32:58 +0100
commit8391ff3ee00583071def824231539004cc07fecb (patch)
tree4a49375dc5d5b9e498e6ea5fe164b2e51cae8fb7 /src/drivers
parent2c72ce04aef5cf3856ac822d182823847996bbc6 (diff)
downloadipxe-8391ff3ee00583071def824231539004cc07fecb.zip
ipxe-8391ff3ee00583071def824231539004cc07fecb.tar.gz
ipxe-8391ff3ee00583071def824231539004cc07fecb.tar.bz2
[intel] Refill receive ring only after enabling receiver
On 82576 (and probably others), the datasheet states that "the tail register of the queue (RDT[n]) should not be bumped until the queue is enabled". There is some confusion over exactly what constitutes "enabled": the initialisation blurb says that we should "poll the RXDCTL register until the ENABLE bit is set", while the description for the RXDCTL register says that the ENABLE bit is set by default (for queue zero). Empirical evidence suggests that the ENABLE bit reads as set immediately after writing to RCTL.EN, and so polling is not necessary. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/net/intel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/drivers/net/intel.c b/src/drivers/net/intel.c
index 3eb1a37..8153e09 100644
--- a/src/drivers/net/intel.c
+++ b/src/drivers/net/intel.c
@@ -491,9 +491,6 @@ static int intel_open ( struct net_device *netdev ) {
if ( ( rc = intel_create_ring ( intel, &intel->rx ) ) != 0 )
goto err_create_rx;
- /* Fill receive ring */
- intel_refill_rx ( intel );
-
/* Program MAC address */
memset ( &mac, 0, sizeof ( mac ) );
memcpy ( mac.raw, netdev->ll_addr, sizeof ( mac.raw ) );
@@ -515,6 +512,9 @@ static int intel_open ( struct net_device *netdev ) {
INTEL_RCTL_BAM | INTEL_RCTL_BSIZE_2048 | INTEL_RCTL_SECRC );
writel ( rctl, intel->regs + INTEL_RCTL );
+ /* Fill receive ring */
+ intel_refill_rx ( intel );
+
/* Update link state */
intel_check_link ( netdev );