Просмотр исходного кода

[skel] Remove MII interface

Most drivers do not utilise an MII interface, since the link state is
typically available directly from a memory-mapped register.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 6 лет назад
Родитель
Сommit
329202691f
2 измененных файлов: 0 добавлений и 60 удалений
  1. 0
    58
      src/drivers/net/skeleton.c
  2. 0
    2
      src/drivers/net/skeleton.h

+ 0
- 58
src/drivers/net/skeleton.c Просмотреть файл

@@ -34,7 +34,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
34 34
 #include <ipxe/iobuf.h>
35 35
 #include <ipxe/malloc.h>
36 36
 #include <ipxe/pci.h>
37
-#include <ipxe/mii.h>
38 37
 #include "skeleton.h"
39 38
 
40 39
 /** @file
@@ -43,54 +42,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
43 42
  *
44 43
  */
45 44
 
46
-/******************************************************************************
47
- *
48
- * MII interface
49
- *
50
- ******************************************************************************
51
- */
52
-
53
-/**
54
- * Read from MII register
55
- *
56
- * @v mii		MII interface
57
- * @v reg		Register address
58
- * @ret value		Data read, or negative error
59
- */
60
-static int skeleton_mii_read ( struct mii_interface *mii, unsigned int reg ) {
61
-	struct skeleton_nic *skel =
62
-		container_of ( mii, struct skeleton_nic, mii );
63
-
64
-	DBGC ( skel, "SKELETON %p does not yet support MII read\n", skel );
65
-	( void ) reg;
66
-	return -ENOTSUP;
67
-}
68
-
69
-/**
70
- * Write to MII register
71
- *
72
- * @v mii		MII interface
73
- * @v reg		Register address
74
- * @v data		Data to write
75
- * @ret rc		Return status code
76
- */
77
-static int skeleton_mii_write ( struct mii_interface *mii, unsigned int reg,
78
-				unsigned int data) {
79
-	struct skeleton_nic *skel =
80
-		container_of ( mii, struct skeleton_nic, mii );
81
-
82
-	DBGC ( skel, "SKELETON %p does not yet support MII write\n", skel );
83
-	( void ) reg;
84
-	( void ) data;
85
-	return -ENOTSUP;
86
-}
87
-
88
-/** Skeleton MII operations */
89
-static struct mii_operations skeleton_mii_operations = {
90
-	.read = skeleton_mii_read,
91
-	.write = skeleton_mii_write,
92
-};
93
-
94 45
 /******************************************************************************
95 46
  *
96 47
  * Device reset
@@ -254,14 +205,6 @@ static int skeleton_probe ( struct pci_device *pci ) {
254 205
 	if ( ( rc = skeleton_reset ( skel ) ) != 0 )
255 206
 		goto err_reset;
256 207
 
257
-	/* Initialise and reset MII interface */
258
-	mii_init ( &skel->mii, &skeleton_mii_operations );
259
-	if ( ( rc = mii_reset ( &skel->mii ) ) != 0 ) {
260
-		DBGC ( skel, "SKELETON %p could not reset MII: %s\n",
261
-		       skel, strerror ( rc ) );
262
-		goto err_mii_reset;
263
-	}
264
-
265 208
 	/* Register network device */
266 209
 	if ( ( rc = register_netdev ( netdev ) ) != 0 )
267 210
 		goto err_register_netdev;
@@ -273,7 +216,6 @@ static int skeleton_probe ( struct pci_device *pci ) {
273 216
 
274 217
 	unregister_netdev ( netdev );
275 218
  err_register_netdev:
276
- err_mii_reset:
277 219
 	skeleton_reset ( skel );
278 220
  err_reset:
279 221
 	iounmap ( skel->regs );

+ 0
- 2
src/drivers/net/skeleton.h Просмотреть файл

@@ -16,8 +16,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
16 16
 struct skeleton_nic {
17 17
 	/** Registers */
18 18
 	void *regs;
19
-	/** MII interface */
20
-	struct mii_interface mii;
21 19
 };
22 20
 
23 21
 #endif /* _SKELETON_H */

Загрузка…
Отмена
Сохранить