Explorar el Código

[intel] Explicitly enable descriptor queues

On i350 the datasheet contradicts itself in stating that the default
value of RXDCTL.ENABLE for queue zero is both set (according to the
"Receive Initialization" section) and unset (according to the "Receive
Descriptor Control - RXDCTL" section).  Empirical evidence suggests
that the default value is unset.

Explicitly enable both transmit and receive queues to avoid any
ambiguity.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown hace 12 años
padre
commit
9f0b2d25a8
Se han modificado 2 ficheros con 10 adiciones y 0 borrados
  1. 6
    0
      src/drivers/net/intel.c
  2. 4
    0
      src/drivers/net/intel.h

+ 6
- 0
src/drivers/net/intel.c Ver fichero

@@ -363,6 +363,7 @@ static void intel_check_link ( struct net_device *netdev ) {
363 363
 static int intel_create_ring ( struct intel_nic *intel,
364 364
 			       struct intel_ring *ring ) {
365 365
 	physaddr_t address;
366
+	uint32_t dctl;
366 367
 
367 368
 	/* Allocate descriptor ring.  Align ring on its own size to
368 369
 	 * prevent any possible page-crossing errors due to hardware
@@ -393,6 +394,11 @@ static int intel_create_ring ( struct intel_nic *intel,
393 394
 	writel ( 0, ( intel->regs + ring->reg + INTEL_xDH ) );
394 395
 	writel ( 0, ( intel->regs + ring->reg + INTEL_xDT ) );
395 396
 
397
+	/* Enable ring */
398
+	dctl = readl ( intel->regs + ring->reg + INTEL_xDCTL );
399
+	dctl |= INTEL_xDCTL_ENABLE;
400
+	writel ( dctl, intel->regs + ring->reg + INTEL_xDCTL );
401
+
396 402
 	DBGC ( intel, "INTEL %p ring %05x is at [%08llx,%08llx)\n",
397 403
 	       intel, ring->reg, ( ( unsigned long long ) address ),
398 404
 	       ( ( unsigned long long ) address + ring->len ) );

+ 4
- 0
src/drivers/net/intel.h Ver fichero

@@ -170,6 +170,10 @@ enum intel_descriptor_status {
170 170
 /** Receive/Transmit Descriptor Tail (offset) */
171 171
 #define INTEL_xDT 0x18
172 172
 
173
+/** Receive/Transmit Descriptor Control (offset) */
174
+#define INTEL_xDCTL 0x28
175
+#define INTEL_xDCTL_ENABLE	0x02000000UL	/**< Queue enable */
176
+
173 177
 /** Receive Descriptor Head */
174 178
 #define INTEL_RDH ( INTEL_RD + INTEL_xDH )
175 179
 

Loading…
Cancelar
Guardar