net: thunderx: Force to load octeon-mdio before bgx driver.
authorThanneeru Srinivasulu <tsrinivasulu@caviumnetworks.com>
Wed, 2 Dec 2015 10:06:13 +0000 (15:36 +0530)
committerDavid S. Miller <davem@davemloft.net>
Wed, 2 Dec 2015 20:58:49 +0000 (15:58 -0500)
Signed-off-by: Thanneeru Srinivasulu <tsrinivasulu@caviumnetworks.com>
Signed-off-by: Sunil Goutham <sgoutham@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cavium/thunder/thunder_bgx.c
drivers/net/ethernet/cavium/thunder/thunder_bgx.h

index 180aa9fabf4820df042f18cba8c39d5ce1668e9d..2574a7ea1c0e5c07dfb01bc7a3cbd00c1b16328a 100644 (file)
@@ -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;
index 07b7ec66c60db8dd398b7ff60321598c9317c4c9..89a02fa26f797ee4b87fc569c228d780979a20d1 100644 (file)
@@ -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);