summaryrefslogtreecommitdiffstats
path: root/src/drivers/net
diff options
context:
space:
mode:
authorMichael Brown2018-01-14 22:16:36 +0100
committerMichael Brown2018-01-14 22:16:36 +0100
commit329202691fa38558e234480571184321f69139eb (patch)
tree09ef908f3a40604ac763794b5f28ace894d24415 /src/drivers/net
parent[ena] Add driver for Amazon ENA virtual function NIC (diff)
downloadipxe-329202691fa38558e234480571184321f69139eb.tar.gz
ipxe-329202691fa38558e234480571184321f69139eb.tar.xz
ipxe-329202691fa38558e234480571184321f69139eb.zip
[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>
Diffstat (limited to 'src/drivers/net')
-rw-r--r--src/drivers/net/skeleton.c58
-rw-r--r--src/drivers/net/skeleton.h2
2 files changed, 0 insertions, 60 deletions
diff --git a/src/drivers/net/skeleton.c b/src/drivers/net/skeleton.c
index 0435b9d0..0bae3089 100644
--- a/src/drivers/net/skeleton.c
+++ b/src/drivers/net/skeleton.c
@@ -34,7 +34,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <ipxe/iobuf.h>
#include <ipxe/malloc.h>
#include <ipxe/pci.h>
-#include <ipxe/mii.h>
#include "skeleton.h"
/** @file
@@ -45,54 +44,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
/******************************************************************************
*
- * MII interface
- *
- ******************************************************************************
- */
-
-/**
- * Read from MII register
- *
- * @v mii MII interface
- * @v reg Register address
- * @ret value Data read, or negative error
- */
-static int skeleton_mii_read ( struct mii_interface *mii, unsigned int reg ) {
- struct skeleton_nic *skel =
- container_of ( mii, struct skeleton_nic, mii );
-
- DBGC ( skel, "SKELETON %p does not yet support MII read\n", skel );
- ( void ) reg;
- return -ENOTSUP;
-}
-
-/**
- * Write to MII register
- *
- * @v mii MII interface
- * @v reg Register address
- * @v data Data to write
- * @ret rc Return status code
- */
-static int skeleton_mii_write ( struct mii_interface *mii, unsigned int reg,
- unsigned int data) {
- struct skeleton_nic *skel =
- container_of ( mii, struct skeleton_nic, mii );
-
- DBGC ( skel, "SKELETON %p does not yet support MII write\n", skel );
- ( void ) reg;
- ( void ) data;
- return -ENOTSUP;
-}
-
-/** Skeleton MII operations */
-static struct mii_operations skeleton_mii_operations = {
- .read = skeleton_mii_read,
- .write = skeleton_mii_write,
-};
-
-/******************************************************************************
- *
* Device reset
*
******************************************************************************
@@ -254,14 +205,6 @@ static int skeleton_probe ( struct pci_device *pci ) {
if ( ( rc = skeleton_reset ( skel ) ) != 0 )
goto err_reset;
- /* Initialise and reset MII interface */
- mii_init ( &skel->mii, &skeleton_mii_operations );
- if ( ( rc = mii_reset ( &skel->mii ) ) != 0 ) {
- DBGC ( skel, "SKELETON %p could not reset MII: %s\n",
- skel, strerror ( rc ) );
- goto err_mii_reset;
- }
-
/* Register network device */
if ( ( rc = register_netdev ( netdev ) ) != 0 )
goto err_register_netdev;
@@ -273,7 +216,6 @@ static int skeleton_probe ( struct pci_device *pci ) {
unregister_netdev ( netdev );
err_register_netdev:
- err_mii_reset:
skeleton_reset ( skel );
err_reset:
iounmap ( skel->regs );
diff --git a/src/drivers/net/skeleton.h b/src/drivers/net/skeleton.h
index 2ab01bd5..03092280 100644
--- a/src/drivers/net/skeleton.h
+++ b/src/drivers/net/skeleton.h
@@ -16,8 +16,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
struct skeleton_nic {
/** Registers */
void *regs;
- /** MII interface */
- struct mii_interface mii;
};
#endif /* _SKELETON_H */