mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
kernel: bump 6.1 to 6.1.20 (#11013)
This commit is contained in:
parent
d6511c3f65
commit
4bb2f2f4d3
@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-6.1 = .19
|
||||
LINUX_KERNEL_HASH-6.1.19 = 9e991c6e5f6c1ca45eea98c55e82ef6ae3dccc73b3e8a655c8665e585f5a8647
|
||||
LINUX_VERSION-6.1 = .20
|
||||
LINUX_KERNEL_HASH-6.1.20 = 76322de8c01a3c63b42c4d1e9b9e7d1897ddb91276e10d73d1f9df3562f031f0
|
||||
|
@ -1155,7 +1155,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
stats->tx_bytes = _bytes;
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -865,7 +865,7 @@ static void mtk_get_stats64(struct net_d
|
||||
@@ -866,7 +866,7 @@ static void mtk_get_stats64(struct net_d
|
||||
}
|
||||
|
||||
do {
|
||||
@ -1164,7 +1164,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
storage->rx_packets = hw_stats->rx_packets;
|
||||
storage->tx_packets = hw_stats->tx_packets;
|
||||
storage->rx_bytes = hw_stats->rx_bytes;
|
||||
@@ -877,7 +877,7 @@ static void mtk_get_stats64(struct net_d
|
||||
@@ -878,7 +878,7 @@ static void mtk_get_stats64(struct net_d
|
||||
storage->rx_crc_errors = hw_stats->rx_fcs_errors;
|
||||
storage->rx_errors = hw_stats->rx_checksum_errors;
|
||||
storage->tx_aborted_errors = hw_stats->tx_skip;
|
||||
@ -1173,7 +1173,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
storage->tx_errors = dev->stats.tx_errors;
|
||||
storage->rx_dropped = dev->stats.rx_dropped;
|
||||
@@ -3707,13 +3707,13 @@ static void mtk_get_ethtool_stats(struct
|
||||
@@ -3708,13 +3708,13 @@ static void mtk_get_ethtool_stats(struct
|
||||
|
||||
do {
|
||||
data_dst = data;
|
||||
|
@ -50,9 +50,9 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
/**************************************************
|
||||
* MII
|
||||
**************************************************/
|
||||
@@ -1542,6 +1554,14 @@ int bgmac_enet_probe(struct bgmac *bgmac
|
||||
/* Omit FCS from max MTU size */
|
||||
net_dev->max_mtu = BGMAC_RX_MAX_FRAME_SIZE - ETH_FCS_LEN;
|
||||
@@ -1546,6 +1558,14 @@ int bgmac_enet_probe(struct bgmac *bgmac
|
||||
|
||||
bgmac->in_init = false;
|
||||
|
||||
+ if ((bgmac->feature_flags & BGMAC_FEAT_SRAB) && !bgmac_b53_pdata.regs) {
|
||||
+ bgmac_b53_pdata.regs = ioremap(0x18007000, 0x1000);
|
||||
@ -65,7 +65,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
err = register_netdev(bgmac->net_dev);
|
||||
if (err) {
|
||||
dev_err(bgmac->dev, "Cannot register net device\n");
|
||||
@@ -1564,6 +1584,10 @@ EXPORT_SYMBOL_GPL(bgmac_enet_probe);
|
||||
@@ -1568,6 +1588,10 @@ EXPORT_SYMBOL_GPL(bgmac_enet_probe);
|
||||
|
||||
void bgmac_enet_remove(struct bgmac *bgmac)
|
||||
{
|
||||
@ -86,7 +86,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
|
||||
struct bgmac_slot_info {
|
||||
union {
|
||||
@@ -493,6 +494,9 @@ struct bgmac {
|
||||
@@ -495,6 +496,9 @@ struct bgmac {
|
||||
void (*cmn_maskset32)(struct bgmac *bgmac, u16 offset, u32 mask,
|
||||
u32 set);
|
||||
int (*phy_connect)(struct bgmac *bgmac);
|
||||
|
@ -29,7 +29,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support
|
||||
|
||||
#define QUECTEL_VENDOR_ID 0x2c7c
|
||||
/* These Quectel products use Quectel's vendor ID */
|
||||
@@ -1164,6 +1166,11 @@ static const struct usb_device_id option
|
||||
@@ -1165,6 +1167,11 @@ static const struct usb_device_id option
|
||||
.driver_info = ZLP },
|
||||
{ USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96),
|
||||
.driver_info = RSVD(4) },
|
||||
|
@ -29,7 +29,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/fs/locks.c
|
||||
+++ b/fs/locks.c
|
||||
@@ -2908,6 +2908,8 @@ static const struct seq_operations locks
|
||||
@@ -2909,6 +2909,8 @@ static const struct seq_operations locks
|
||||
|
||||
static int __init proc_locks_init(void)
|
||||
{
|
||||
@ -330,7 +330,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/core/sock.c
|
||||
+++ b/net/core/sock.c
|
||||
@@ -4087,6 +4087,8 @@ static __net_initdata struct pernet_oper
|
||||
@@ -4088,6 +4088,8 @@ static __net_initdata struct pernet_oper
|
||||
|
||||
static int __init proto_init(void)
|
||||
{
|
||||
|
@ -299,7 +299,7 @@ Signed-off-by: Zhi Chen <zhichen@codeaurora.org>
|
||||
void nf_conntrack_ecache_work(struct net *net, enum nf_ct_ecache_state state)
|
||||
--- a/net/netfilter/nf_conntrack_netlink.c
|
||||
+++ b/net/netfilter/nf_conntrack_netlink.c
|
||||
@@ -717,12 +717,19 @@ static size_t ctnetlink_nlmsg_size(const
|
||||
@@ -718,12 +718,19 @@ static size_t ctnetlink_nlmsg_size(const
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -2858,8 +2858,8 @@ static irqreturn_t mtk_handle_irq_rx(int
|
||||
@@ -2859,8 +2859,8 @@ static irqreturn_t mtk_handle_irq_rx(int
|
||||
|
||||
eth->rx_events++;
|
||||
if (likely(napi_schedule_prep(ð->rx_napi))) {
|
||||
@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
|
||||
return IRQ_HANDLED;
|
||||
@@ -2871,8 +2871,8 @@ static irqreturn_t mtk_handle_irq_tx(int
|
||||
@@ -2872,8 +2872,8 @@ static irqreturn_t mtk_handle_irq_tx(int
|
||||
|
||||
eth->tx_events++;
|
||||
if (likely(napi_schedule_prep(ð->tx_napi))) {
|
||||
@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
|
||||
return IRQ_HANDLED;
|
||||
@@ -4193,6 +4193,8 @@ static int mtk_probe(struct platform_dev
|
||||
@@ -4194,6 +4194,8 @@ static int mtk_probe(struct platform_dev
|
||||
* for NAPI to work
|
||||
*/
|
||||
init_dummy_netdev(ð->dummy_dev);
|
||||
|
@ -15,7 +15,7 @@ Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
|
||||
|
||||
--- a/drivers/net/dsa/mt7530.c
|
||||
+++ b/drivers/net/dsa/mt7530.c
|
||||
@@ -2196,6 +2196,10 @@ mt7530_setup(struct dsa_switch *ds)
|
||||
@@ -2199,6 +2199,10 @@ mt7530_setup(struct dsa_switch *ds)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -938,7 +938,7 @@ static int mtk_init_fq_dma(struct mtk_et
|
||||
@@ -939,7 +939,7 @@ static int mtk_init_fq_dma(struct mtk_et
|
||||
{
|
||||
const struct mtk_soc_data *soc = eth->soc;
|
||||
dma_addr_t phy_ring_tail;
|
||||
@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
dma_addr_t dma_addr;
|
||||
int i;
|
||||
|
||||
@@ -2202,19 +2202,25 @@ static int mtk_tx_alloc(struct mtk_eth *
|
||||
@@ -2203,19 +2203,25 @@ static int mtk_tx_alloc(struct mtk_eth *
|
||||
struct mtk_tx_ring *ring = ð->tx_ring;
|
||||
int i, sz = soc->txrx.txd_size;
|
||||
struct mtk_tx_dma_v2 *txd;
|
||||
@ -51,7 +51,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
u32 next_ptr = ring->phys + next * sz;
|
||||
|
||||
txd = ring->dma + i * sz;
|
||||
@@ -2234,22 +2240,22 @@ static int mtk_tx_alloc(struct mtk_eth *
|
||||
@@ -2235,22 +2241,22 @@ static int mtk_tx_alloc(struct mtk_eth *
|
||||
* descriptors in ring->dma_pdma.
|
||||
*/
|
||||
if (!MTK_HAS_CAPS(soc->caps, MTK_QDMA)) {
|
||||
@ -79,7 +79,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
ring->thresh = MAX_SKB_FRAGS;
|
||||
|
||||
/* make sure that all changes to the dma ring are flushed before we
|
||||
@@ -2261,14 +2267,14 @@ static int mtk_tx_alloc(struct mtk_eth *
|
||||
@@ -2262,14 +2268,14 @@ static int mtk_tx_alloc(struct mtk_eth *
|
||||
mtk_w32(eth, ring->phys, soc->reg_map->qdma.ctx_ptr);
|
||||
mtk_w32(eth, ring->phys, soc->reg_map->qdma.dtx_ptr);
|
||||
mtk_w32(eth,
|
||||
@ -96,7 +96,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
mtk_w32(eth, 0, MT7628_TX_CTX_IDX0);
|
||||
mtk_w32(eth, MT7628_PST_DTX_IDX0, soc->reg_map->pdma.rst_idx);
|
||||
}
|
||||
@@ -2286,7 +2292,7 @@ static void mtk_tx_clean(struct mtk_eth
|
||||
@@ -2287,7 +2293,7 @@ static void mtk_tx_clean(struct mtk_eth
|
||||
int i;
|
||||
|
||||
if (ring->buf) {
|
||||
@ -105,7 +105,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
mtk_tx_unmap(eth, &ring->buf[i], NULL, false);
|
||||
kfree(ring->buf);
|
||||
ring->buf = NULL;
|
||||
@@ -2294,14 +2300,14 @@ static void mtk_tx_clean(struct mtk_eth
|
||||
@@ -2295,14 +2301,14 @@ static void mtk_tx_clean(struct mtk_eth
|
||||
|
||||
if (ring->dma) {
|
||||
dma_free_coherent(eth->dma_dev,
|
||||
@ -122,7 +122,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
ring->dma_pdma, ring->phys_pdma);
|
||||
ring->dma_pdma = NULL;
|
||||
}
|
||||
@@ -2823,7 +2829,7 @@ static void mtk_dma_free(struct mtk_eth
|
||||
@@ -2824,7 +2830,7 @@ static void mtk_dma_free(struct mtk_eth
|
||||
netdev_reset_queue(eth->netdev[i]);
|
||||
if (eth->scratch_ring) {
|
||||
dma_free_coherent(eth->dma_dev,
|
||||
|
@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -4269,7 +4269,7 @@ static const struct mtk_soc_data mt7621_
|
||||
@@ -4270,7 +4270,7 @@ static const struct mtk_soc_data mt7621_
|
||||
.hw_features = MTK_HW_FEATURES,
|
||||
.required_clks = MT7621_CLKS_BITMAP,
|
||||
.required_pctl = false,
|
||||
@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
.hash_offset = 2,
|
||||
.foe_entry_size = sizeof(struct mtk_foe_entry) - 16,
|
||||
.txrx = {
|
||||
@@ -4308,7 +4308,7 @@ static const struct mtk_soc_data mt7623_
|
||||
@@ -4309,7 +4309,7 @@ static const struct mtk_soc_data mt7623_
|
||||
.hw_features = MTK_HW_FEATURES,
|
||||
.required_clks = MT7623_CLKS_BITMAP,
|
||||
.required_pctl = true,
|
||||
|
@ -54,7 +54,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
},
|
||||
.gdm1_cnt = 0x1c00,
|
||||
.gdma_to_ppe = 0x3333,
|
||||
@@ -613,6 +617,75 @@ static void mtk_mac_link_down(struct phy
|
||||
@@ -614,6 +618,75 @@ static void mtk_mac_link_down(struct phy
|
||||
mtk_w32(mac->hw, mcr, MTK_MAC_MCR(mac->id));
|
||||
}
|
||||
|
||||
@ -130,7 +130,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
static void mtk_mac_link_up(struct phylink_config *config,
|
||||
struct phy_device *phy,
|
||||
unsigned int mode, phy_interface_t interface,
|
||||
@@ -638,6 +711,8 @@ static void mtk_mac_link_up(struct phyli
|
||||
@@ -639,6 +712,8 @@ static void mtk_mac_link_up(struct phyli
|
||||
break;
|
||||
}
|
||||
|
||||
@ -139,7 +139,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
/* Configure duplex */
|
||||
if (duplex == DUPLEX_FULL)
|
||||
mcr |= MAC_MCR_FORCE_DPX;
|
||||
@@ -1099,7 +1174,8 @@ static void mtk_tx_set_dma_desc_v1(struc
|
||||
@@ -1100,7 +1175,8 @@ static void mtk_tx_set_dma_desc_v1(struc
|
||||
|
||||
WRITE_ONCE(desc->txd1, info->addr);
|
||||
|
||||
@ -149,7 +149,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
if (info->last)
|
||||
data |= TX_DMA_LS0;
|
||||
WRITE_ONCE(desc->txd3, data);
|
||||
@@ -1133,9 +1209,6 @@ static void mtk_tx_set_dma_desc_v2(struc
|
||||
@@ -1134,9 +1210,6 @@ static void mtk_tx_set_dma_desc_v2(struc
|
||||
data |= TX_DMA_LS0;
|
||||
WRITE_ONCE(desc->txd3, data);
|
||||
|
||||
@ -159,7 +159,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
data = (mac->id + 1) << TX_DMA_FPORT_SHIFT_V2; /* forward port */
|
||||
data |= TX_DMA_SWC_V2 | QID_BITS_V2(info->qid);
|
||||
WRITE_ONCE(desc->txd4, data);
|
||||
@@ -1179,11 +1252,12 @@ static int mtk_tx_map(struct sk_buff *sk
|
||||
@@ -1180,11 +1253,12 @@ static int mtk_tx_map(struct sk_buff *sk
|
||||
.gso = gso,
|
||||
.csum = skb->ip_summed == CHECKSUM_PARTIAL,
|
||||
.vlan = skb_vlan_tag_present(skb),
|
||||
@ -173,7 +173,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
struct mtk_mac *mac = netdev_priv(dev);
|
||||
struct mtk_eth *eth = mac->hw;
|
||||
const struct mtk_soc_data *soc = eth->soc;
|
||||
@@ -1191,8 +1265,10 @@ static int mtk_tx_map(struct sk_buff *sk
|
||||
@@ -1192,8 +1266,10 @@ static int mtk_tx_map(struct sk_buff *sk
|
||||
struct mtk_tx_dma *itxd_pdma, *txd_pdma;
|
||||
struct mtk_tx_buf *itx_buf, *tx_buf;
|
||||
int i, n_desc = 1;
|
||||
@ -184,7 +184,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
itxd = ring->next_free;
|
||||
itxd_pdma = qdma_to_pdma(ring, itxd);
|
||||
if (itxd == ring->last_free)
|
||||
@@ -1241,7 +1317,7 @@ static int mtk_tx_map(struct sk_buff *sk
|
||||
@@ -1242,7 +1318,7 @@ static int mtk_tx_map(struct sk_buff *sk
|
||||
memset(&txd_info, 0, sizeof(struct mtk_tx_dma_desc_info));
|
||||
txd_info.size = min_t(unsigned int, frag_size,
|
||||
soc->txrx.dma_max_len);
|
||||
@ -193,7 +193,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
txd_info.last = i == skb_shinfo(skb)->nr_frags - 1 &&
|
||||
!(frag_size - txd_info.size);
|
||||
txd_info.addr = skb_frag_dma_map(eth->dma_dev, frag,
|
||||
@@ -1280,7 +1356,7 @@ static int mtk_tx_map(struct sk_buff *sk
|
||||
@@ -1281,7 +1357,7 @@ static int mtk_tx_map(struct sk_buff *sk
|
||||
txd_pdma->txd2 |= TX_DMA_LS1;
|
||||
}
|
||||
|
||||
@ -202,7 +202,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
skb_tx_timestamp(skb);
|
||||
|
||||
ring->next_free = mtk_qdma_phys_to_virt(ring, txd->txd2);
|
||||
@@ -1292,8 +1368,7 @@ static int mtk_tx_map(struct sk_buff *sk
|
||||
@@ -1293,8 +1369,7 @@ static int mtk_tx_map(struct sk_buff *sk
|
||||
wmb();
|
||||
|
||||
if (MTK_HAS_CAPS(soc->caps, MTK_QDMA)) {
|
||||
@ -212,7 +212,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
mtk_w32(eth, txd->txd2, soc->reg_map->qdma.ctx_ptr);
|
||||
} else {
|
||||
int next_idx;
|
||||
@@ -1362,7 +1437,7 @@ static void mtk_wake_queue(struct mtk_et
|
||||
@@ -1363,7 +1438,7 @@ static void mtk_wake_queue(struct mtk_et
|
||||
for (i = 0; i < MTK_MAC_COUNT; i++) {
|
||||
if (!eth->netdev[i])
|
||||
continue;
|
||||
@ -221,7 +221,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1386,7 +1461,7 @@ static netdev_tx_t mtk_start_xmit(struct
|
||||
@@ -1387,7 +1462,7 @@ static netdev_tx_t mtk_start_xmit(struct
|
||||
|
||||
tx_num = mtk_cal_txd_req(eth, skb);
|
||||
if (unlikely(atomic_read(&ring->free_count) <= tx_num)) {
|
||||
@ -230,7 +230,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
netif_err(eth, tx_queued, dev,
|
||||
"Tx Ring full when queue awake!\n");
|
||||
spin_unlock(ð->page_lock);
|
||||
@@ -1412,7 +1487,7 @@ static netdev_tx_t mtk_start_xmit(struct
|
||||
@@ -1413,7 +1488,7 @@ static netdev_tx_t mtk_start_xmit(struct
|
||||
goto drop;
|
||||
|
||||
if (unlikely(atomic_read(&ring->free_count) <= ring->thresh))
|
||||
@ -239,7 +239,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
spin_unlock(ð->page_lock);
|
||||
|
||||
@@ -1579,10 +1654,12 @@ static int mtk_xdp_submit_frame(struct m
|
||||
@@ -1580,10 +1655,12 @@ static int mtk_xdp_submit_frame(struct m
|
||||
struct skb_shared_info *sinfo = xdp_get_shared_info_from_frame(xdpf);
|
||||
const struct mtk_soc_data *soc = eth->soc;
|
||||
struct mtk_tx_ring *ring = ð->tx_ring;
|
||||
@ -252,7 +252,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
};
|
||||
int err, index = 0, n_desc = 1, nr_frags;
|
||||
struct mtk_tx_buf *htx_buf, *tx_buf;
|
||||
@@ -1632,6 +1709,7 @@ static int mtk_xdp_submit_frame(struct m
|
||||
@@ -1633,6 +1710,7 @@ static int mtk_xdp_submit_frame(struct m
|
||||
memset(&txd_info, 0, sizeof(struct mtk_tx_dma_desc_info));
|
||||
txd_info.size = skb_frag_size(&sinfo->frags[index]);
|
||||
txd_info.last = index + 1 == nr_frags;
|
||||
@ -260,7 +260,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
data = skb_frag_address(&sinfo->frags[index]);
|
||||
|
||||
index++;
|
||||
@@ -1986,8 +2064,46 @@ rx_done:
|
||||
@@ -1987,8 +2065,46 @@ rx_done:
|
||||
return done;
|
||||
}
|
||||
|
||||
@ -308,7 +308,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
{
|
||||
const struct mtk_reg_map *reg_map = eth->soc->reg_map;
|
||||
struct mtk_tx_ring *ring = ð->tx_ring;
|
||||
@@ -2019,12 +2135,9 @@ static int mtk_poll_tx_qdma(struct mtk_e
|
||||
@@ -2020,12 +2136,9 @@ static int mtk_poll_tx_qdma(struct mtk_e
|
||||
break;
|
||||
|
||||
if (tx_buf->data != (void *)MTK_DMA_DUMMY_DESC) {
|
||||
@ -323,7 +323,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
budget--;
|
||||
}
|
||||
mtk_tx_unmap(eth, tx_buf, &bq, true);
|
||||
@@ -2043,7 +2156,7 @@ static int mtk_poll_tx_qdma(struct mtk_e
|
||||
@@ -2044,7 +2157,7 @@ static int mtk_poll_tx_qdma(struct mtk_e
|
||||
}
|
||||
|
||||
static int mtk_poll_tx_pdma(struct mtk_eth *eth, int budget,
|
||||
@ -332,7 +332,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
{
|
||||
struct mtk_tx_ring *ring = ð->tx_ring;
|
||||
struct mtk_tx_buf *tx_buf;
|
||||
@@ -2061,12 +2174,8 @@ static int mtk_poll_tx_pdma(struct mtk_e
|
||||
@@ -2062,12 +2175,8 @@ static int mtk_poll_tx_pdma(struct mtk_e
|
||||
break;
|
||||
|
||||
if (tx_buf->data != (void *)MTK_DMA_DUMMY_DESC) {
|
||||
@ -347,7 +347,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
budget--;
|
||||
}
|
||||
mtk_tx_unmap(eth, tx_buf, &bq, true);
|
||||
@@ -2088,26 +2197,15 @@ static int mtk_poll_tx(struct mtk_eth *e
|
||||
@@ -2089,26 +2198,15 @@ static int mtk_poll_tx(struct mtk_eth *e
|
||||
{
|
||||
struct mtk_tx_ring *ring = ð->tx_ring;
|
||||
struct dim_sample dim_sample = {};
|
||||
@ -379,7 +379,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
dim_update_sample(eth->tx_events, eth->tx_packets, eth->tx_bytes,
|
||||
&dim_sample);
|
||||
@@ -2117,7 +2215,7 @@ static int mtk_poll_tx(struct mtk_eth *e
|
||||
@@ -2118,7 +2216,7 @@ static int mtk_poll_tx(struct mtk_eth *e
|
||||
(atomic_read(&ring->free_count) > ring->thresh))
|
||||
mtk_wake_queue(eth);
|
||||
|
||||
@ -388,7 +388,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
|
||||
static void mtk_handle_status_irq(struct mtk_eth *eth)
|
||||
@@ -2203,6 +2301,7 @@ static int mtk_tx_alloc(struct mtk_eth *
|
||||
@@ -2204,6 +2302,7 @@ static int mtk_tx_alloc(struct mtk_eth *
|
||||
int i, sz = soc->txrx.txd_size;
|
||||
struct mtk_tx_dma_v2 *txd;
|
||||
int ring_size;
|
||||
@ -396,7 +396,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
if (MTK_HAS_CAPS(soc->caps, MTK_QDMA))
|
||||
ring_size = MTK_QDMA_RING_SIZE;
|
||||
@@ -2270,8 +2369,25 @@ static int mtk_tx_alloc(struct mtk_eth *
|
||||
@@ -2271,8 +2370,25 @@ static int mtk_tx_alloc(struct mtk_eth *
|
||||
ring->phys + ((ring_size - 1) * sz),
|
||||
soc->reg_map->qdma.crx_ptr);
|
||||
mtk_w32(eth, ring->last_free_ptr, soc->reg_map->qdma.drx_ptr);
|
||||
@ -424,7 +424,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
} else {
|
||||
mtk_w32(eth, ring->phys_pdma, MT7628_TX_BASE_PTR0);
|
||||
mtk_w32(eth, ring_size, MT7628_TX_MAX_CNT0);
|
||||
@@ -2938,7 +3054,7 @@ static int mtk_start_dma(struct mtk_eth
|
||||
@@ -2939,7 +3055,7 @@ static int mtk_start_dma(struct mtk_eth
|
||||
if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2))
|
||||
val |= MTK_MUTLI_CNT | MTK_RESV_BUF |
|
||||
MTK_WCOMP_EN | MTK_DMAD_WR_WDONE |
|
||||
@ -433,7 +433,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
else
|
||||
val |= MTK_RX_BT_32DWORDS;
|
||||
mtk_w32(eth, val, reg_map->qdma.glo_cfg);
|
||||
@@ -2984,6 +3100,45 @@ static void mtk_gdm_config(struct mtk_et
|
||||
@@ -2985,6 +3101,45 @@ static void mtk_gdm_config(struct mtk_et
|
||||
mtk_w32(eth, 0, MTK_RST_GL);
|
||||
}
|
||||
|
||||
@ -479,7 +479,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
static int mtk_open(struct net_device *dev)
|
||||
{
|
||||
struct mtk_mac *mac = netdev_priv(dev);
|
||||
@@ -3026,7 +3181,8 @@ static int mtk_open(struct net_device *d
|
||||
@@ -3027,7 +3182,8 @@ static int mtk_open(struct net_device *d
|
||||
refcount_inc(ð->dma_refcnt);
|
||||
|
||||
phylink_start(mac->phylink);
|
||||
@ -489,7 +489,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -3561,8 +3717,12 @@ static int mtk_unreg_dev(struct mtk_eth
|
||||
@@ -3562,8 +3718,12 @@ static int mtk_unreg_dev(struct mtk_eth
|
||||
int i;
|
||||
|
||||
for (i = 0; i < MTK_MAC_COUNT; i++) {
|
||||
@ -502,7 +502,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
unregister_netdev(eth->netdev[i]);
|
||||
}
|
||||
|
||||
@@ -3778,6 +3938,23 @@ static int mtk_set_rxnfc(struct net_devi
|
||||
@@ -3779,6 +3939,23 @@ static int mtk_set_rxnfc(struct net_devi
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -526,7 +526,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
static const struct ethtool_ops mtk_ethtool_ops = {
|
||||
.get_link_ksettings = mtk_get_link_ksettings,
|
||||
.set_link_ksettings = mtk_set_link_ksettings,
|
||||
@@ -3813,6 +3990,7 @@ static const struct net_device_ops mtk_n
|
||||
@@ -3814,6 +3991,7 @@ static const struct net_device_ops mtk_n
|
||||
.ndo_setup_tc = mtk_eth_setup_tc,
|
||||
.ndo_bpf = mtk_xdp,
|
||||
.ndo_xdp_xmit = mtk_xdp_xmit,
|
||||
@ -534,7 +534,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
};
|
||||
|
||||
static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
|
||||
@@ -3822,6 +4000,7 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||
@@ -3823,6 +4001,7 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||
struct phylink *phylink;
|
||||
struct mtk_mac *mac;
|
||||
int id, err;
|
||||
@ -542,7 +542,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
if (!_id) {
|
||||
dev_err(eth->dev, "missing mac id\n");
|
||||
@@ -3839,7 +4018,10 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||
@@ -3840,7 +4019,10 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -554,7 +554,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
if (!eth->netdev[id]) {
|
||||
dev_err(eth->dev, "alloc_etherdev failed\n");
|
||||
return -ENOMEM;
|
||||
@@ -3936,6 +4118,11 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||
@@ -3937,6 +4119,11 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||
else
|
||||
eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH_2K - MTK_RX_ETH_HLEN;
|
||||
|
||||
@ -628,7 +628,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
/* PDMA on MT7628 */
|
||||
#define TX_DMA_DONE BIT(31)
|
||||
@@ -930,6 +949,7 @@ struct mtk_reg_map {
|
||||
@@ -931,6 +950,7 @@ struct mtk_reg_map {
|
||||
} pdma;
|
||||
struct {
|
||||
u32 qtx_cfg; /* tx queue configuration */
|
||||
@ -636,7 +636,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
u32 rx_ptr; /* rx base pointer */
|
||||
u32 rx_cnt_cfg; /* rx max count configuration */
|
||||
u32 qcrx_ptr; /* rx cpu pointer */
|
||||
@@ -947,6 +967,7 @@ struct mtk_reg_map {
|
||||
@@ -948,6 +968,7 @@ struct mtk_reg_map {
|
||||
u32 fq_tail; /* fq tail pointer */
|
||||
u32 fq_count; /* fq free page count */
|
||||
u32 fq_blen; /* fq free page buffer length */
|
||||
@ -644,7 +644,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
} qdma;
|
||||
u32 gdm1_cnt;
|
||||
u32 gdma_to_ppe;
|
||||
@@ -1138,6 +1159,7 @@ struct mtk_mac {
|
||||
@@ -1139,6 +1160,7 @@ struct mtk_mac {
|
||||
__be32 hwlro_ip[MTK_MAX_LRO_IP_CNT];
|
||||
int hwlro_ip_cnt;
|
||||
unsigned int syscfg0;
|
||||
|
@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
|
||||
@@ -895,7 +895,13 @@ enum mkt_eth_capabilities {
|
||||
@@ -896,7 +896,13 @@ enum mkt_eth_capabilities {
|
||||
#define MTK_MUX_GMAC12_TO_GEPHY_SGMII \
|
||||
(MTK_ETH_MUX_GMAC12_TO_GEPHY_SGMII | MTK_MUX)
|
||||
|
||||
|
@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
#include "mtk_eth_soc.h"
|
||||
#include "mtk_wed.h"
|
||||
@@ -2015,16 +2016,22 @@ static int mtk_poll_rx(struct napi_struc
|
||||
@@ -2016,16 +2017,22 @@ static int mtk_poll_rx(struct napi_struc
|
||||
htons(RX_DMA_VPID(trxd.rxd4)),
|
||||
RX_DMA_VID(trxd.rxd4));
|
||||
} else if (trxd.rxd2 & RX_DMA_VTAG) {
|
||||
@ -52,7 +52,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
|
||||
skb_record_rx_queue(skb, 0);
|
||||
@@ -2849,15 +2856,30 @@ static netdev_features_t mtk_fix_feature
|
||||
@@ -2850,15 +2857,30 @@ static netdev_features_t mtk_fix_feature
|
||||
|
||||
static int mtk_set_features(struct net_device *dev, netdev_features_t features)
|
||||
{
|
||||
@ -88,7 +88,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
|
||||
/* wait for DMA to finish whatever it is doing before we start using it again */
|
||||
@@ -3139,11 +3161,45 @@ found:
|
||||
@@ -3140,11 +3162,45 @@ found:
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
||||
@ -135,7 +135,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0);
|
||||
if (err) {
|
||||
@@ -3506,6 +3562,10 @@ static int mtk_hw_init(struct mtk_eth *e
|
||||
@@ -3507,6 +3563,10 @@ static int mtk_hw_init(struct mtk_eth *e
|
||||
*/
|
||||
val = mtk_r32(eth, MTK_CDMQ_IG_CTRL);
|
||||
mtk_w32(eth, val | MTK_CDMQ_STAG_EN, MTK_CDMQ_IG_CTRL);
|
||||
@ -146,7 +146,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
/* Enable RX VLan Offloading */
|
||||
mtk_w32(eth, 1, MTK_CDMP_EG_CTRL);
|
||||
@@ -3709,6 +3769,12 @@ static int mtk_free_dev(struct mtk_eth *
|
||||
@@ -3710,6 +3770,12 @@ static int mtk_free_dev(struct mtk_eth *
|
||||
free_netdev(eth->netdev[i]);
|
||||
}
|
||||
|
||||
@ -181,7 +181,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
/* CDMP Ingress Control Register */
|
||||
#define MTK_CDMP_IG_CTRL 0x400
|
||||
#define MTK_CDMP_STAG_EN BIT(0)
|
||||
@@ -1139,6 +1145,8 @@ struct mtk_eth {
|
||||
@@ -1140,6 +1146,8 @@ struct mtk_eth {
|
||||
|
||||
int ip_align;
|
||||
|
||||
|
@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -1442,12 +1442,28 @@ static void mtk_wake_queue(struct mtk_et
|
||||
@@ -1443,12 +1443,28 @@ static void mtk_wake_queue(struct mtk_et
|
||||
}
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
bool gso = false;
|
||||
int tx_num;
|
||||
|
||||
@@ -1469,6 +1485,17 @@ static netdev_tx_t mtk_start_xmit(struct
|
||||
@@ -1470,6 +1486,17 @@ static netdev_tx_t mtk_start_xmit(struct
|
||||
return NETDEV_TX_BUSY;
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
/* TSO: fill MSS info in tcp checksum field */
|
||||
if (skb_is_gso(skb)) {
|
||||
if (skb_cow_head(skb, 0)) {
|
||||
@@ -1484,8 +1511,13 @@ static netdev_tx_t mtk_start_xmit(struct
|
||||
@@ -1485,8 +1512,13 @@ static netdev_tx_t mtk_start_xmit(struct
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -2041,29 +2041,16 @@ static int mtk_poll_rx(struct napi_struc
|
||||
@@ -2042,29 +2042,16 @@ static int mtk_poll_rx(struct napi_struc
|
||||
if (reason == MTK_PPE_CPU_REASON_HIT_UNBIND_RATE_REACHED)
|
||||
mtk_ppe_check_skb(eth->ppe[0], skb, hash);
|
||||
|
||||
@ -50,7 +50,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
|
||||
skb_record_rx_queue(skb, 0);
|
||||
@@ -2888,29 +2875,11 @@ static netdev_features_t mtk_fix_feature
|
||||
@@ -2889,29 +2876,11 @@ static netdev_features_t mtk_fix_feature
|
||||
|
||||
static int mtk_set_features(struct net_device *dev, netdev_features_t features)
|
||||
{
|
||||
@ -80,7 +80,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -3209,30 +3178,6 @@ static int mtk_open(struct net_device *d
|
||||
@@ -3210,30 +3179,6 @@ static int mtk_open(struct net_device *d
|
||||
struct mtk_eth *eth = mac->hw;
|
||||
int i, err;
|
||||
|
||||
@ -111,7 +111,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0);
|
||||
if (err) {
|
||||
netdev_err(dev, "%s: could not attach PHY: %d\n", __func__,
|
||||
@@ -3271,6 +3216,35 @@ static int mtk_open(struct net_device *d
|
||||
@@ -3272,6 +3217,35 @@ static int mtk_open(struct net_device *d
|
||||
phylink_start(mac->phylink);
|
||||
netif_tx_start_all_queues(dev);
|
||||
|
||||
@ -147,7 +147,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -3597,10 +3571,9 @@ static int mtk_hw_init(struct mtk_eth *e
|
||||
@@ -3598,10 +3572,9 @@ static int mtk_hw_init(struct mtk_eth *e
|
||||
if (!MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) {
|
||||
val = mtk_r32(eth, MTK_CDMP_IG_CTRL);
|
||||
mtk_w32(eth, val | MTK_CDMP_STAG_EN, MTK_CDMP_IG_CTRL);
|
||||
@ -160,7 +160,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
/* set interrupt delays based on current Net DIM sample */
|
||||
mtk_dim_rx(ð->rx_dim.work);
|
||||
@@ -4204,7 +4177,7 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||
@@ -4205,7 +4178,7 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||
eth->netdev[id]->hw_features |= NETIF_F_LRO;
|
||||
|
||||
eth->netdev[id]->vlan_features = eth->soc->hw_features &
|
||||
|
@ -1,8 +1,6 @@
|
||||
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
|
||||
index 6b69d05e2..a50391b0a 100644
|
||||
--- a/drivers/usb/serial/option.c
|
||||
+++ b/drivers/usb/serial/option.c
|
||||
@@ -266,6 +266,7 @@
|
||||
@@ -264,6 +264,7 @@ static void option_instat_callback(struc
|
||||
#define QUECTEL_PRODUCT_EM12 0x0512
|
||||
#define QUECTEL_PRODUCT_RM500Q 0x0800
|
||||
#define QUECTEL_PRODUCT_RM520N 0x0801
|
||||
@ -10,11 +8,11 @@ index 6b69d05e2..a50391b0a 100644
|
||||
#define QUECTEL_PRODUCT_EC200U 0x0901
|
||||
#define QUECTEL_PRODUCT_EC200S_CN 0x6002
|
||||
#define QUECTEL_PRODUCT_EC200T 0x6026
|
||||
@@ -1207,6 +1208,7 @@
|
||||
@@ -1202,6 +1203,7 @@ static const struct usb_device_id option
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200S_CN, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200T, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500K, 0xff, 0x00, 0x00) },
|
||||
+ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500U, 0xff, 0x00, 0x00) },
|
||||
|
||||
|
||||
{ USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) },
|
||||
{ USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CMU_300) },
|
||||
|
@ -27,7 +27,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
/* YT8521/YT8531S Register Overview
|
||||
* UTP Register space | FIBER Register space
|
||||
@@ -1804,7 +1804,7 @@ static const struct mdio_device_id __maybe_unused motorcomm_tbl[] = {
|
||||
@@ -1804,7 +1804,7 @@ static const struct mdio_device_id __may
|
||||
{ PHY_ID_MATCH_EXACT(PHY_ID_YT8511) },
|
||||
{ PHY_ID_MATCH_EXACT(PHY_ID_YT8521) },
|
||||
{ PHY_ID_MATCH_EXACT(PHY_ID_YT8531S) },
|
||||
|
@ -60,11 +60,10 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
struct yt8521_priv {
|
||||
/* combo_advertising is used for case of YT8521 in combo mode,
|
||||
* this means that yt8521 may work in utp or fiber mode which depends
|
||||
@@ -640,6 +633,142 @@ static int yt8521_write_page(struct phy_device *phydev, int page)
|
||||
return ytphy_modify_ext(phydev, YT8521_REG_SPACE_SELECT_REG, mask, set);
|
||||
@@ -641,6 +634,142 @@ static int yt8521_write_page(struct phy_
|
||||
};
|
||||
|
||||
+/**
|
||||
/**
|
||||
+ * struct ytphy_cfg_reg_map - map a config value to a register value
|
||||
+ * @cfg: value in device configuration
|
||||
+ * @reg: value in the register
|
||||
@ -200,10 +199,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
+ return ytphy_modify_ext(phydev, YT8521_RGMII_CONFIG1_REG, mask, val);
|
||||
+}
|
||||
+
|
||||
/**
|
||||
+/**
|
||||
* yt8521_probe() - read chip config then set suitable polling_mode
|
||||
* @phydev: a pointer to a &struct phy_device
|
||||
@@ -648,9 +777,12 @@ static int yt8521_write_page(struct phy_device *phydev, int page)
|
||||
*
|
||||
@@ -648,9 +777,12 @@ static int yt8521_write_page(struct phy_
|
||||
*/
|
||||
static int yt8521_probe(struct phy_device *phydev)
|
||||
{
|
||||
@ -216,7 +216,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
int ret;
|
||||
|
||||
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
|
||||
@@ -695,7 +827,45 @@ static int yt8521_probe(struct phy_device *phydev)
|
||||
@@ -695,7 +827,45 @@ static int yt8521_probe(struct phy_devic
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -263,7 +263,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1180,61 +1350,36 @@ static int yt8521_resume(struct phy_device *phydev)
|
||||
@@ -1180,61 +1350,36 @@ static int yt8521_resume(struct phy_devi
|
||||
*/
|
||||
static int yt8521_config_init(struct phy_device *phydev)
|
||||
{
|
||||
|
@ -28,7 +28,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
/* Extended Register end */
|
||||
|
||||
@@ -858,7 +856,32 @@ static int yt8521_probe(struct phy_device *phydev)
|
||||
@@ -858,7 +856,32 @@ static int yt8521_probe(struct phy_devic
|
||||
return -EINVAL;
|
||||
}
|
||||
} else if (phydev->drv->phy_id == PHY_ID_YT8531S) {
|
||||
@ -62,11 +62,10 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
} else {
|
||||
phydev_warn(phydev, "PHY id err\n");
|
||||
return -EINVAL;
|
||||
@@ -868,26 +891,6 @@ static int yt8521_probe(struct phy_device *phydev)
|
||||
val);
|
||||
@@ -869,26 +892,6 @@ static int yt8521_probe(struct phy_devic
|
||||
}
|
||||
|
||||
-/**
|
||||
/**
|
||||
- * yt8531s_probe() - read chip config then set suitable polling_mode
|
||||
- * @phydev: a pointer to a &struct phy_device
|
||||
- *
|
||||
@ -86,10 +85,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
- return yt8521_probe(phydev);
|
||||
-}
|
||||
-
|
||||
/**
|
||||
-/**
|
||||
* ytphy_utp_read_lpa() - read LPA then setup lp_advertising for utp
|
||||
* @phydev: a pointer to a &struct phy_device
|
||||
@@ -1970,7 +1973,7 @@ static struct phy_driver motorcomm_phy_drvs[] = {
|
||||
*
|
||||
@@ -1970,7 +1973,7 @@ static struct phy_driver motorcomm_phy_d
|
||||
PHY_ID_MATCH_EXACT(PHY_ID_YT8531S),
|
||||
.name = "YT8531S Gigabit Ethernet",
|
||||
.get_features = yt8521_get_features,
|
||||
|
@ -28,8 +28,6 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
config NATIONAL_PHY
|
||||
tristate "National Semiconductor PHYs"
|
||||
diff --git a/drivers/net/phy/motorcomm.c b/drivers/net/phy/motorcomm.c
|
||||
index bdc6a55d59f19..ee7c37dfdca01 100644
|
||||
--- a/drivers/net/phy/motorcomm.c
|
||||
+++ b/drivers/net/phy/motorcomm.c
|
||||
@@ -1,6 +1,6 @@
|
||||
@ -48,7 +46,7 @@ index bdc6a55d59f19..ee7c37dfdca01 100644
|
||||
#define PHY_ID_YT8531S 0x4f51e91a
|
||||
|
||||
/* YT8521/YT8531S Register Overview
|
||||
@@ -517,6 +518,61 @@ static int ytphy_set_wol(struct phy_device *phydev, struct ethtool_wolinfo *wol)
|
||||
@@ -517,6 +518,61 @@ err_restore_page:
|
||||
return phy_restore_page(phydev, old_page, ret);
|
||||
}
|
||||
|
||||
@ -110,7 +108,7 @@ index bdc6a55d59f19..ee7c37dfdca01 100644
|
||||
static int yt8511_read_page(struct phy_device *phydev)
|
||||
{
|
||||
return __phy_read(phydev, YT8511_PAGE_SELECT);
|
||||
@@ -767,6 +823,17 @@ static int ytphy_rgmii_clk_delay_config(struct phy_device *phydev)
|
||||
@@ -767,6 +823,17 @@ static int ytphy_rgmii_clk_delay_config(
|
||||
return ytphy_modify_ext(phydev, YT8521_RGMII_CONFIG1_REG, mask, val);
|
||||
}
|
||||
|
||||
@ -128,7 +126,7 @@ index bdc6a55d59f19..ee7c37dfdca01 100644
|
||||
/**
|
||||
* yt8521_probe() - read chip config then set suitable polling_mode
|
||||
* @phydev: a pointer to a &struct phy_device
|
||||
@@ -891,6 +958,43 @@ static int yt8521_probe(struct phy_device *phydev)
|
||||
@@ -891,6 +958,43 @@ static int yt8521_probe(struct phy_devic
|
||||
val);
|
||||
}
|
||||
|
||||
@ -172,7 +170,7 @@ index bdc6a55d59f19..ee7c37dfdca01 100644
|
||||
/**
|
||||
* ytphy_utp_read_lpa() - read LPA then setup lp_advertising for utp
|
||||
* @phydev: a pointer to a &struct phy_device
|
||||
@@ -1387,6 +1491,94 @@ static int yt8521_config_init(struct phy_device *phydev)
|
||||
@@ -1387,6 +1491,94 @@ err_restore_page:
|
||||
return phy_restore_page(phydev, old_page, ret);
|
||||
}
|
||||
|
||||
@ -267,11 +265,10 @@ index bdc6a55d59f19..ee7c37dfdca01 100644
|
||||
/**
|
||||
* yt8521_prepare_fiber_features() - A small helper function that setup
|
||||
* fiber's features.
|
||||
@@ -1969,6 +2161,17 @@ static struct phy_driver motorcomm_phy_drvs[] = {
|
||||
.suspend = yt8521_suspend,
|
||||
@@ -1970,6 +2162,17 @@ static struct phy_driver motorcomm_phy_d
|
||||
.resume = yt8521_resume,
|
||||
},
|
||||
+ {
|
||||
{
|
||||
+ PHY_ID_MATCH_EXACT(PHY_ID_YT8531),
|
||||
+ .name = "YT8531 Gigabit Ethernet",
|
||||
+ .probe = yt8531_probe,
|
||||
@ -282,10 +279,11 @@ index bdc6a55d59f19..ee7c37dfdca01 100644
|
||||
+ .set_wol = yt8531_set_wol,
|
||||
+ .link_change_notify = yt8531_link_change_notify,
|
||||
+ },
|
||||
{
|
||||
+ {
|
||||
PHY_ID_MATCH_EXACT(PHY_ID_YT8531S),
|
||||
.name = "YT8531S Gigabit Ethernet",
|
||||
@@ -1990,7 +2193,7 @@ static struct phy_driver motorcomm_phy_drvs[] = {
|
||||
.get_features = yt8521_get_features,
|
||||
@@ -1990,7 +2193,7 @@ static struct phy_driver motorcomm_phy_d
|
||||
|
||||
module_phy_driver(motorcomm_phy_drvs);
|
||||
|
||||
|
@ -18,7 +18,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/drivers/net/phy/motorcomm.c
|
||||
+++ b/drivers/net/phy/motorcomm.c
|
||||
@@ -1533,10 +1533,10 @@ static int yt8531_config_init(struct phy_device *phydev)
|
||||
@@ -1533,10 +1533,10 @@ static int yt8531_config_init(struct phy
|
||||
static void yt8531_link_change_notify(struct phy_device *phydev)
|
||||
{
|
||||
struct device_node *node = phydev->mdio.dev.of_node;
|
||||
|
Loading…
Reference in New Issue
Block a user