Skip to contentSkip to conversation

net: thunderx: Force to load octeon-mdio before bgx driver.

PATCH Superseded Sunil Goutham 2 participants 3 messages Dec 1, 2015

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/6 net: thunderx: Force to load octeon-mdio before bgx driver.

From: Thanneeru Srinivasulu <[email protected]>

---
 drivers/net/ethernet/cavium/thunder/thunder_bgx.c |    3 +++
 drivers/net/ethernet/cavium/thunder/thunder_bgx.h |    1 +
 2 files changed, 4 insertions(+), 0 deletions(-)
drivers/net/ethernet/cavium/thunder/thunder_bgx.c +3 -0
index 180aa9f..1fb72dd 100644
@@ -1009,6 +1009,9 @@ static int bgx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	struct bgx *bgx = NULL;
 	u8 lmac;
 
+	/*Load octeon mdio driver*/
+	octeon_mdiobus_force_mod_depencency();
+
 	bgx = devm_kzalloc(dev, sizeof(*bgx), GFP_KERNEL);
 	if (!bgx)
 		return -ENOMEM;
drivers/net/ethernet/cavium/thunder/thunder_bgx.h +1 -0
index 07b7ec6..89a02fa 100644
@@ -182,6 +182,7 @@ enum MCAST_MODE {
 #define BCAST_ACCEPT	1
 #define CAM_ACCEPT	1
 
+void octeon_mdiobus_force_mod_depencency(void);
 void bgx_add_dmac_addr(u64 dmac, int node, int bgx_idx, int lmac);
 unsigned bgx_get_map(int node);
 int bgx_get_lmac_count(int node, int bgx);
Signature · 1 line
1.7.1
#1 lore raw

Hello.

Quoted 14 lines · Sunil Goutham

From: Thanneeru Srinivasulu <[email protected]>

---
  drivers/net/ethernet/cavium/thunder/thunder_bgx.c |    3 +++
  drivers/net/ethernet/cavium/thunder/thunder_bgx.h |    1 +
  2 files changed, 4 insertions(+), 0 deletions(-)
drivers/net/ethernet/cavium/thunder/thunder_bgx.c +0 -0
index 180aa9f..1fb72dd 100644

drivers/net/ethernet/cavium/thunder/thunder_bgx.c static int bgx_probe(struct pci_dev *pdev, const struct pci_device_id *ent) · line 1012

Quoted 4 lines
drivers/net/ethernet/cavium/thunder/thunder_bgx.c +1 -0
@@ -1009,6 +1009,9 @@ static int bgx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
  	struct bgx *bgx = NULL;
  	u8 lmac;
 
+	/*Load octeon mdio driver*/

Please insert spaces after /* and before */ (unless it's a common comment
style in this driver).

[...]

MBR, Sergei

#2 lore raw

Thanks a lot, will fix and repost the patch.

Quoted 33 lines · Sergei Shtylyov

Hello.

Quoted 15 lines · Sunil Goutham

From: Thanneeru Srinivasulu <[email protected]>

---
  drivers/net/ethernet/cavium/thunder/thunder_bgx.c |    3 +++
  drivers/net/ethernet/cavium/thunder/thunder_bgx.h |    1 +
  2 files changed, 4 insertions(+), 0 deletions(-)
drivers/net/ethernet/cavium/thunder/thunder_bgx.c +0 -0
index 180aa9f..1fb72dd 100644

drivers/net/ethernet/cavium/thunder/thunder_bgx.c static int bgx_probe(struct pci_dev *pdev, const · line 1013

Quoted 5 lines
drivers/net/ethernet/cavium/thunder/thunder_bgx.c +1 -0
@@ -1009,6 +1009,9 @@ static int bgx_probe(struct pci_dev *pdev, const
 struct pci_device_id *ent)
        struct bgx *bgx = NULL;
        u8 lmac;
 
+       /*Load octeon mdio driver*/

Please insert spaces after /* and before */ (unless it's a common comment
style in this driver).

[...]

MBR, Sergei