You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
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 <alexandre.belloni@bootlin.com> Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
6e952d95ca
commit
7897b071ac
@@ -22,7 +22,7 @@ if NET_VENDOR_CADENCE
|
||||
config MACB
|
||||
tristate "Cadence MACB/GEM support"
|
||||
depends on HAS_DMA && COMMON_CLK
|
||||
select PHYLIB
|
||||
select PHYLINK
|
||||
---help---
|
||||
The Cadence MACB ethernet interface is found on many Atmel AT32 and
|
||||
AT91 parts. This driver also supports the Cadence GEM (Gigabit
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#ifndef _MACB_H
|
||||
#define _MACB_H
|
||||
|
||||
#include <linux/phy.h>
|
||||
#include <linux/phylink.h>
|
||||
#include <linux/ptp_clock_kernel.h>
|
||||
#include <linux/net_tstamp.h>
|
||||
#include <linux/interrupt.h>
|
||||
@@ -1185,15 +1185,14 @@ struct macb {
|
||||
struct macb_or_gem_ops macbgem_ops;
|
||||
|
||||
struct mii_bus *mii_bus;
|
||||
struct device_node *phy_node;
|
||||
int link;
|
||||
int speed;
|
||||
int duplex;
|
||||
struct phylink *phylink;
|
||||
struct phylink_config phylink_config;
|
||||
|
||||
u32 caps;
|
||||
unsigned int dma_burst_length;
|
||||
|
||||
phy_interface_t phy_interface;
|
||||
int speed;
|
||||
|
||||
/* AT91RM9200 transmit */
|
||||
struct sk_buff *skb; /* holds skb until xmit interrupt completes */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user