Browse Source

[intel] Expose intel_diag() for use by other Intel NIC drivers

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 9 years ago
parent
commit
28ce9b6cc0
2 changed files with 19 additions and 26 deletions
  1. 0
    26
      src/drivers/net/intel.c
  2. 19
    0
      src/drivers/net/intel.h

+ 0
- 26
src/drivers/net/intel.c View File

250
 	return -ENOENT;
250
 	return -ENOENT;
251
 }
251
 }
252
 
252
 
253
-/******************************************************************************
254
- *
255
- * Diagnostics
256
- *
257
- ******************************************************************************
258
- */
259
-
260
-/**
261
- * Dump diagnostic information
262
- *
263
- * @v intel		Intel device
264
- */
265
-static void __attribute__ (( unused )) intel_diag ( struct intel_nic *intel ) {
266
-
267
-	DBGC ( intel, "INTEL %p TX %04x(%02x)/%04x(%02x) "
268
-	       "RX %04x(%02x)/%04x(%02x)\n", intel,
269
-	       ( intel->tx.cons & 0xffff ),
270
-	       readl ( intel->regs + intel->tx.reg + INTEL_xDH ),
271
-	       ( intel->tx.prod & 0xffff ),
272
-	       readl ( intel->regs + intel->tx.reg + INTEL_xDT ),
273
-	       ( intel->rx.cons & 0xffff ),
274
-	       readl ( intel->regs + intel->rx.reg + INTEL_xDH ),
275
-	       ( intel->rx.prod & 0xffff ),
276
-	       readl ( intel->regs + intel->rx.reg + INTEL_xDT ) );
277
-}
278
-
279
 /******************************************************************************
253
 /******************************************************************************
280
  *
254
  *
281
  * Device reset
255
  * Device reset

+ 19
- 0
src/drivers/net/intel.h View File

259
 	INTEL_VMWARE = 0x0002,
259
 	INTEL_VMWARE = 0x0002,
260
 };
260
 };
261
 
261
 
262
+/**
263
+ * Dump diagnostic information
264
+ *
265
+ * @v intel		Intel device
266
+ */
267
+static inline void intel_diag ( struct intel_nic *intel ) {
268
+
269
+	DBGC ( intel, "INTEL %p TX %04x(%02x)/%04x(%02x) "
270
+	       "RX %04x(%02x)/%04x(%02x)\n", intel,
271
+	       ( intel->tx.cons & 0xffff ),
272
+	       readl ( intel->regs + intel->tx.reg + INTEL_xDH ),
273
+	       ( intel->tx.prod & 0xffff ),
274
+	       readl ( intel->regs + intel->tx.reg + INTEL_xDT ),
275
+	       ( intel->rx.cons & 0xffff ),
276
+	       readl ( intel->regs + intel->rx.reg + INTEL_xDH ),
277
+	       ( intel->rx.prod & 0xffff ),
278
+	       readl ( intel->regs + intel->rx.reg + INTEL_xDT ) );
279
+}
280
+
262
 extern int intel_create_ring ( struct intel_nic *intel,
281
 extern int intel_create_ring ( struct intel_nic *intel,
263
 			       struct intel_ring *ring );
282
 			       struct intel_ring *ring );
264
 extern void intel_destroy_ring ( struct intel_nic *intel,
283
 extern void intel_destroy_ring ( struct intel_nic *intel,

Loading…
Cancel
Save