Ver código fonte

[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 anos atrás
pai
commit
28ce9b6cc0
2 arquivos alterados com 19 adições e 26 exclusões
  1. 0
    26
      src/drivers/net/intel.c
  2. 19
    0
      src/drivers/net/intel.h

+ 0
- 26
src/drivers/net/intel.c Ver arquivo

@@ -250,32 +250,6 @@ static int intel_fetch_mac ( struct intel_nic *intel, uint8_t *hw_addr ) {
250 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 255
  * Device reset

+ 19
- 0
src/drivers/net/intel.h Ver arquivo

@@ -259,6 +259,25 @@ enum intel_flags {
259 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 281
 extern int intel_create_ring ( struct intel_nic *intel,
263 282
 			       struct intel_ring *ring );
264 283
 extern void intel_destroy_ring ( struct intel_nic *intel,

Carregando…
Cancelar
Salvar