# Fatal: Error inserting tg3

## gte881s

I am working with a new installation of gentoo and have been unable to load the ethernet modules.  The proper module is tg3 and on modprobe i receive 

```
FATAL: Error inserting tg3 (/lib/modules/2.6.7-gentoo-r7/kernel/drivers/net/tg3.ko): Invalid module format
```

I would appreciate any and all help that you might give me.  Thanks!

----------

## rinacabj

Have you been able to get it to work compiled in the kernel as opposed to compiling it as a module? I'd be curious to see if it works at all, then figure out the module loading problem.

----------

## gte881s

yes, i have compiled it into kernel and as a module.  when compiled as into the kernel i recieve the error 

```
SIOCSIFFLAGS: Function not implemented
```

 when i run 

```
ifconfig eth0 up
```

in summary the module will not load when in module form and the adapter refuses to activate when compiled into the kernel.

----------

## rinacabj

hmm I think we'll have to leave this one up to someone who's got some tg3 experience. Sorry I couldn't help you out.

----------

## rinacabj

Wait, you've been able to get it to work correctly with the livecd, right? Are you doing modules-update when you recompile the kernel? If it works on livecd it's possible to get it to work.

----------

## rinacabj

https://forums.gentoo.org/viewtopic.php?t=180320

----------

## Janne Pikkarainen

I've been using tg3 driver without a hitch in several IBM xSeries boxes for a long time (=years). The error message about the invalid module format sounds like a compilation problem. Have you tried to recompile your kernel from scratch, giving command make clean in your kernel directory before compiling the kernel?

Also, if you have enabled 4k stacks in kernel config, you may want to try to disable those unless you really need them. 

Tight compiler flags or experimental gcc version could also lead to problems.

----------

## orvtech

ok, i have the same problem.. the only thing is that i change my gcc from 3.3.4 to 3.4.3 and i did recompile my kernel with that vercion os gcc.. lasnight i did  

```
emerge -uvD world --emptytree
```

 just in case.. 

by now i havent have time to see if it works since im at work. as son  as a get home.. i will confirmyou guys if it worked... mean while i wuold like to read some especulations if it have worked or not..  :Very Happy: 

PS: al the problem began when i desite to install ATI-DRIVERS 

```
emerge ati-drivers
```

----------

## orvtech

nop it didn't work I still have the same problem

----------

## js78

Hello, 

I am on amd64 installation 2006.0.

When I install my gentoo with genkernell all works.

After few installations, my network card does not works.

It use tg3 module , I try modprobe tg3 I have the same error like you:

FATAL: Error inserting tg3 (/lib/modules/2.6.15-gentoo-r5/kernel/drivers/net/tg3.ko): Invalid module format

Someone find a solution to this?

[Edit]

I launch a genkernell all and when I reboot all works...

I think it is a problem with the kernel compilation (perhaps SMP support)

[/Edit]

----------

