Skip to content

Commit 7897b07

Browse files
atenartdavem330
authored andcommitted
net: macb: convert to phylink
This patch converts the MACB Ethernet driver to the Phylink framework. The MAC configuration is moved to the Phylink ops and Phylink helpers are now used in the ethtools functions. This helps to access the flow control and pauseparam logic and this will be helpful in the future for boards using this controller with SFP cages. Tested-by: Alexandre Belloni <[email protected]> Signed-off-by: Antoine Tenart <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 6e952d9 commit 7897b07

File tree

3 files changed

+237
-219
lines changed

3 files changed

+237
-219
lines changed

drivers/net/ethernet/cadence/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ if NET_VENDOR_CADENCE
2222
config MACB
2323
tristate "Cadence MACB/GEM support"
2424
depends on HAS_DMA && COMMON_CLK
25-
select PHYLIB
25+
select PHYLINK
2626
---help---
2727
The Cadence MACB ethernet interface is found on many Atmel AT32 and
2828
AT91 parts. This driver also supports the Cadence GEM (Gigabit

drivers/net/ethernet/cadence/macb.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#ifndef _MACB_H
88
#define _MACB_H
99

10-
#include <linux/phy.h>
10+
#include <linux/phylink.h>
1111
#include <linux/ptp_clock_kernel.h>
1212
#include <linux/net_tstamp.h>
1313
#include <linux/interrupt.h>
@@ -1185,15 +1185,14 @@ struct macb {
11851185
struct macb_or_gem_ops macbgem_ops;
11861186

11871187
struct mii_bus *mii_bus;
1188-
struct device_node *phy_node;
1189-
int link;
1190-
int speed;
1191-
int duplex;
1188+
struct phylink *phylink;
1189+
struct phylink_config phylink_config;
11921190

11931191
u32 caps;
11941192
unsigned int dma_burst_length;
11951193

11961194
phy_interface_t phy_interface;
1195+
int speed;
11971196

11981197
/* AT91RM9200 transmit */
11991198
struct sk_buff *skb; /* holds skb until xmit interrupt completes */

0 commit comments

Comments
 (0)