--- v12
+++ v4
@@ -6,14 +6,13 @@
No functional changes in this stage.
Signed-off-by: Stefan Chulski <stefanc@marvell.com>
-Acked-by: Marcin Wojtas <mw@semihalf.com>
---
drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 24 ++++++++++++--------
- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 15 ++++++++----
- 2 files changed, 24 insertions(+), 15 deletions(-)
+ drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 17 +++++++++-----
+ 2 files changed, 25 insertions(+), 16 deletions(-)
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2.h b/drivers/net/ethernet/marvell/mvpp2/mvpp2.h
-index 56e90ab..ce08086 100644
+index aec9179..89b3ede 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2.h
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2.h
@@ -60,6 +60,9 @@
@@ -62,7 +61,7 @@
#define MVPP22_XPCS_BASE(port) (0x7400 + (port) * 0x1000)
#define MVPP22_XPCS_CFG0 0x0
#define MVPP22_XPCS_CFG0_RESET_DIS BIT(0)
-@@ -927,15 +930,16 @@ struct mvpp2 {
+@@ -930,15 +933,16 @@ struct mvpp2 {
void __iomem *iface_base;
void __iomem *cm3_base;
@@ -82,7 +81,7 @@
*/
struct regmap *sysctrl_base;
-@@ -977,7 +981,7 @@ struct mvpp2 {
+@@ -980,7 +984,7 @@ struct mvpp2 {
u32 tclk;
/* HW version */
@@ -91,7 +90,7 @@
/* Maximum number of RXQs per port */
unsigned int max_port_rxqs;
-@@ -1221,7 +1225,7 @@ struct mvpp21_rx_desc {
+@@ -1227,7 +1231,7 @@ struct mvpp21_rx_desc {
__le32 reserved8;
};
@@ -100,7 +99,7 @@
struct mvpp22_tx_desc {
__le32 command;
u8 packet_offset;
-@@ -1233,7 +1237,7 @@ struct mvpp22_tx_desc {
+@@ -1239,7 +1243,7 @@ struct mvpp22_tx_desc {
__le64 buf_cookie_misc;
};
@@ -110,10 +109,10 @@
__le32 status;
__le16 reserved1;
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
-index 17cd161..5730900 100644
+index 4b07f6c..4f482ad 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
-@@ -384,7 +384,7 @@ static int mvpp2_bm_pool_create(struct device *dev, struct mvpp2 *priv,
+@@ -395,7 +395,7 @@ static int mvpp2_bm_pool_create(struct device *dev, struct mvpp2 *priv,
if (!IS_ALIGNED(size, 16))
return -EINVAL;
@@ -122,7 +121,16 @@
* bytes per buffer pointer
*/
if (priv->hw_version == MVPP21)
-@@ -5456,7 +5456,7 @@ static void mvpp2_rx_irqs_setup(struct mvpp2_port *port)
+@@ -1183,7 +1183,7 @@ static void mvpp2_interrupts_unmask(void *arg)
+ u32 val;
+ int i;
+
+- if (port->priv->hw_version != MVPP22)
++ if (port->priv->hw_version == MVPP21)
+ return;
+
+ if (mask)
+@@ -5467,7 +5467,7 @@ static void mvpp2_rx_irqs_setup(struct mvpp2_port *port)
return;
}
@@ -131,7 +139,7 @@
for (i = 0; i < port->nqvecs; i++) {
struct mvpp2_queue_vector *qv = port->qvecs + i;
-@@ -5633,7 +5633,7 @@ static bool mvpp22_port_has_legacy_tx_irqs(struct device_node *port_node,
+@@ -5644,7 +5644,7 @@ static bool mvpp22_port_has_legacy_tx_irqs(struct device_node *port_node,
/* Checks if the port dt description has the required Tx interrupts:
* - PPv2.1: there are no such interrupts.
@@ -140,7 +148,7 @@
* - The old DTs have: "rx-shared", "tx-cpuX" with X in [0...3]
* - The new ones have: "hifX" with X in [0..8]
*
-@@ -6621,7 +6621,7 @@ static void mvpp22_rx_fifo_set_hw(struct mvpp2 *priv, int port, int data_size)
+@@ -6632,7 +6632,7 @@ static void mvpp22_rx_fifo_set_hw(struct mvpp2 *priv, int port, int data_size)
mvpp2_write(priv, MVPP2_RX_ATTR_FIFO_SIZE_REG(port), attr_size);
}
@@ -149,7 +157,7 @@
* 4kB fixed space must be assigned for the loopback port.
* Redistribute remaining avialable 44kB space among all active ports.
* Guarantee minimum 32kB for 10G port and 8kB for port 1, capable of 2.5G
-@@ -6678,7 +6678,7 @@ static void mvpp22_tx_fifo_set_hw(struct mvpp2 *priv, int port, int size)
+@@ -6689,7 +6689,7 @@ static void mvpp22_tx_fifo_set_hw(struct mvpp2 *priv, int port, int size)
mvpp2_write(priv, MVPP22_TX_FIFO_THRESH_REG(port), threshold);
}
@@ -158,7 +166,7 @@
* 3kB fixed space must be assigned for the loopback port.
* Redistribute remaining avialable 16kB space among all active ports.
* The 10G interface should use 10kB (which is maximum possible size
-@@ -7049,6 +7049,11 @@ static int mvpp2_probe(struct platform_device *pdev)
+@@ -7081,6 +7081,11 @@ static int mvpp2_probe(struct platform_device *pdev)
priv->port_map |= BIT(i);
}