From: Stefan Chulski <stef...@marvell.com>

Spinlock added to MSS shared memory configuration space.

Signed-off-by: Stefan Chulski <stef...@marvell.com>
---
 drivers/net/ethernet/marvell/mvpp2/mvpp2.h      | 5 +++++
 drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 3 +++
 2 files changed, 8 insertions(+)

diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2.h 
b/drivers/net/ethernet/marvell/mvpp2/mvpp2.h
index 9d8993f..f34e260 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2.h
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2.h
@@ -1021,6 +1021,11 @@ struct mvpp2 {
 
        /* CM3 SRAM pool */
        struct gen_pool *sram_pool;
+
+       bool custom_dma_mask;
+
+       /* Spinlocks for CM3 shared memory configuration */
+       spinlock_t mss_spinlock;
 };
 
 struct mvpp2_pcpu_stats {
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c 
b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
index a4933c4..64534f0 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
@@ -7163,6 +7163,9 @@ static int mvpp2_probe(struct platform_device *pdev)
                        priv->hw_version = MVPP23;
        }
 
+       /* Init mss lock */
+       spin_lock_init(&priv->mss_spinlock);
+
        /* Initialize network controller */
        err = mvpp2_init(pdev, priv);
        if (err < 0) {
-- 
1.9.1

Reply via email to