# problem with tg3 and broadcom modules in system.d

## emc

Hi,

I have system.d and I got no eth0 working after boot. tg3 module is loaded.

```
# lspci -k

03:00.0 Ethernet controller: Broadcom Corporation NetLink BCM57780 Gigabit Ethernet PCIe (rev 01)

        Subsystem: Dell Device 040f

        Kernel driver in use: tg3

        Kernel modules: tg3
```

But I need to do after boot:

```
rmmod tg3

modprobe broadcom

modprobe tg4
```

and then dhcpcd asign ip address to iface eth0. How to autoload broadcom module before tg3 in system.d system?

----------

## emc

I've added:

```
# cat /etc/modules-load.d/broadcom.conf 

broadcom
```

But it doesn't help broadcom module is loaded after boot but not eth0 in ifconfig printout. Maybe it's loaded after tg3? Anybody has idea?

----------

## sebB

Try adding broadcom and tg3 to modules-load.d and create a modules-load.d/blacklist.conf with blacklist tg3

----------

## emc

dosen't helped:

```
lady modules-load.d # cat blacklist.conf 

blacklist tg3

lady modules-load.d # cat broadcom.conf 

broadcom

lady modules-load.d # cat tg3.conf 

tg3
```

Still I need manuall remove and load modules

----------

## emc

any idea, how can I do automatically after reboot do:

```
rmmod tg3 

modprobe broadcom 

modprobe tg3
```

in systemd system.

----------

## ferreirafm

Hi emc,

This problem drove me crazy for a while. I don't have a reasonable explanation to that. Have a look:

```
root@higgs:lspc1 -k

04:00.0 Ethernet controller: Broadcom Corporation NetLink BCM57780 Gigabit Ethernet PCIe (rev 01)

   Subsystem: Acer Incorporated [ALI] Device 0712

   Kernel modules: tg3

root@higgs:~ $ifconfig -a

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

        inet 127.0.0.1  netmask 255.0.0.0

        inet6 ::1  prefixlen 128  scopeid 0x10<host>

        loop  txqueuelen 0  (Loopback Local)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp9s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.46.11  netmask 255.255.224.0  broadcast 192.168.63.255

        inet6 fe80::a3e:8eff:fe22:5825  prefixlen 64  scopeid 0x20<link>

        ether 08:3e:8e:22:58:25  txqueuelen 1000  (Ethernet)

        RX packets 2132  bytes 255299 (249.3 KiB)

        RX errors 0  dropped 55  overruns 0  frame 0

        TX packets 18  bytes 2063 (2.0 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

root@higgs:~ $modprobe -r tg3

root@higgs:~ $modprobe tg3

root@higgs:~ $ifconfig -a

enp4s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500

        ether 08:9e:01:5b:a4:0c  txqueuelen 1000  (Ethernet)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

        device interrupt 18  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

        inet 127.0.0.1  netmask 255.0.0.0

        inet6 ::1  prefixlen 128  scopeid 0x10<host>

        loop  txqueuelen 0  (Loopback Local)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp9s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.46.11  netmask 255.255.224.0  broadcast 192.168.63.255

        inet6 fe80::a3e:8eff:fe22:5825  prefixlen 64  scopeid 0x20<link>

        ether 08:3e:8e:22:58:25  txqueuelen 1000  (Ethernet)

        RX packets 2664  bytes 322040 (314.4 KiB)

        RX errors 0  dropped 70  overruns 0  frame 0

        TX packets 18  bytes 2063 (2.0 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
```

A possible overcome is to put the following script in /etc/local:

```
#!/bin/bash

modprobe -r tg3

modprobe tg3
```

and 

```
rc-update add local default
```

Hope it helps.

----------

## emc

yes in openRC it's (for me) easy, but on my additional machine I have Sabayone and systemd. I need specific information how to do it in systemd environment.

----------

## ferreirafm

emc, 

It doesn't matter. If you create such script, you gonna see the corresponding systemd.service like: 

```
 higgs ~ # systemctl status gentoo-local-tg3.service

● gentoo-local-tg3.service - Service for local.d/tg3.*

   Loaded: loaded (/run/systemd/generator/gentoo-local-tg3.service)

   Active: active (exited) since Qui 2014-08-21 09:55:39 BRT; 1h 56min ago

  Process: 1557 ExecStart=/usr/bin/env /etc/local.d/tg3.start (code=exited, status=0/SUCCESS)
```

￼	￼	￼	￼

￼G'Luck

￼

----------

## FishB8

First remember that

  - /etc/modprobe.d is to specify modules options

  - /etc/modules-load.d is to specify modules to load at boot

in /etc/modprobe.d/broadcom.conf

```
softdep tg3 pre: broadcom
```

Be sure to read the modprobe.d manpage

----------

## ferreirafm

Hi FishB8, 

I agreed with you. However, that's not seems my case. 

I have tried to load tg3 before broadcom as suggested in a bunch of thread. Also, I have played with several options and tried load them as built-in and/or as module. The only way I got the eth0 and wireless devices was loading the corresponding modules from local.d.

Anyway,  thanks for helping.

Best.

EDIT: fix typo

----------

