# ethernet adapter pick up[solved]

## romalong

please help me to pick up proper driver for my ethernet adapter to compile kernel.

i've got:

```

# lspci

Ethernet controller: Marvell Technology Group Ltd. Gigabit Ethernet Controller (rev 13)

```

Last edited by romalong on Fri Jul 22, 2005 7:58 am; edited 1 time in total

----------

## katsiki

I don't know which driver would be best, but it may be helpful toemerge gentoo-sources; and then

inspect the file, /usr/src/linux-<your-choice-of-kernel-version>/drivers/net/Kconfig

For the linux-2.6.11-gentoo-r11 kernel, this file shows at least six possible modules associated with Marvell Gigabit NICs, including an EXPERIMENTAL module, and a depricated one.  You might need to check for the specific chipset.  For example,

```
config SKGE

        tristate "New SysKonnect GigaEthernet support (EXPERIMENTAL)" 

        depends on PCI && EXPERIMENTAL

        select CRC32 

        ---help--- 

          This driver support the Marvell Yukon or SysKonnect SK-98xx/SK-95xx

          and related Gigabit Ethernet adapters. It is a new smaller driver

          driver with better performance and more complete ethtool support.

           

          It does not support the link failover and network management

          features that "portable" vendor supplied sk98lin driver does.

config MV643XX_ETH

        tristate "MV-643XX Ethernet support"

        depends on MOMENCO_OCELOT_C || MOMENCO_JAGUAR_ATX

        help

          This driver supports the gigabit Ethernet on the Marvell MV643XX

          chipset which is used in the Momenco Ocelot C and Jaguar ATX.

 

config MV643XX_ETH_0

        bool "MV-643XX Port 0"

        depends on MV643XX_ETH

        help

          This enables support for Port 0 of the Marvell MV643XX Gigabit

          Ethernet.

 

config MV643XX_ETH_1

        bool "MV-643XX Port 1"

        depends on MV643XX_ETH

        help

          This enables support for Port 1 of the Marvell MV643XX Gigabit

          Ethernet.

 

config MV643XX_ETH_2

        bool "MV-643XX Port 2"

        depends on MV643XX_ETH

        help

          This enables support for Port 2 of the Marvell MV643XX Gigabit

          Ethernet.

```

----------

## romalong

1. can you explain me what eth(x) is? is that last digit constant or it might vary depending on my choice?

2. do i get the latest drivers when i # emerge gentoo-soures?

3. do i need to pay attention on port number? if so, how to find out appropriate one?

PS my chipset is 865PE

----------

## dsd

i think the driver you want is skge (post "lspci -n" output if you want confirmation)

----------

## trossachs

 *Quote:*   

> 1. can you explain me what eth(x) is? is that last digit constant or it might vary depending on my choice? 

 

The last digit indicates the position of the ethernet card in the machine. If you have three network cards, they are identified as:

```
eth0

eth1

eth2

```

----------

## katsiki

The "xx" in "SK-98xx", is a place holder denoting two consecutive symbols.  For example, "SK-9801" or "SK-9888".  There must be entire series of adapters named similarly, just the last two digits of the model numbers vary.

I'm still new to this, so I don't know if I have my facts straight, but here is my understanding.  Every kernel has an accompanying set of potential plugable modules; those drivers are intimately associated with that particular version, though as kernels and drivers stabilize, probably the modules might not change between kernel versions.

If you emerge gentoo-sources, you will download the ebuilds (source code, patches, build info, query info, etc.) associated with the latest 2.4.x and 2.6.x kernels, and the emerge will setup a default symbolic link for /usr/src/linux, pointing to the latest version appropriate for your portage profile.  You will get the ingredients to build the latest drivers for each of the 2.4.x and 2.6.x kernels in the stable branch of the portage tree.  You could select other versions, including in the "~" unstable branch, or you could select older versions.  For example, take a look at the currently available versions of this package.  You can also select a different package for building other kernels, such as vanilla-sources, etc.

Maybe you could repost asking about the ports.  I don't know the answer, and am going to grab some shuteye now before daybreak.

----------

## romalong

 *JulesF wrote:*   

>  *Quote:*   1. can you explain me what eth(x) is? is that last digit constant or it might vary depending on my choice?  
> 
> The last digit indicates the position of the ethernet card in the machine. If you have three network cards, they are identified as:
> 
> ```
> ...

 

okay, how to find out the number of my card?

----------

## romalong

 *katsiki wrote:*   

> The "xx" in "SK-98xx", is a place holder denoting two consecutive symbols.  For example, "SK-9801" or "SK-9888".  There must be entire series of adapters named similarly, just the last two digits of the model numbers vary.
> 
> I'm still new to this, so I don't know if I have my facts straight, but here is my understanding.  Every kernel has an accompanying set of potential plugable modules; those drivers are intimately associated with that particular version, though as kernels and drivers stabilize, probably the modules might not change between kernel versions.
> 
> If you emerge gentoo-sources, you will download the ebuilds (source code, patches, build info, query info, etc.) associated with the latest 2.4.x and 2.6.x kernels, and the emerge will setup a default symbolic link for /usr/src/linux, pointing to the latest version appropriate for your portage profile.  You will get the ingredients to build the latest drivers for each of the 2.4.x and 2.6.x kernels in the stable branch of the portage tree.  You could select other versions, including in the "~" unstable branch, or you could select older versions.  For example, take a look at the currently available versions of this package.  You can also select a different package for building other kernels, such as vanilla-sources, etc.
> ...

 

i didn't ask you regarding these placeholders, but thank you anyway!

----------

## romalong

 *dsd wrote:*   

> i think the driver you want is skge (post "lspci -n" output if you want confirmation)

 

here you're:

```

0000:02:05.0  Class  0200:  11ab:4320  (rev13)

```

----------

## trossachs

 *Quote:*   

> okay, how to find out the number of my card?

 

When you look in:

```
/etc/init.d
```

What reference is there to "net.eth(?)?" It will tell you. How many network cards do you have in your box?

----------

## romalong

 *JulesF wrote:*   

>  *Quote:*   okay, how to find out the number of my card? 
> 
> When you look in:
> 
> ```
> ...

 

there is: net.eth0 -> net.lo

i've got one ethernet adapter that alocated on my motherboard

----------

## trossachs

Are you planning on installing any further adapters? So long as you have one nic then you will only ever need net.eth0. I have just this moment, enabled net.eth1 on my own machine. I always had two cards, but only net.eth0 was in use.

----------

## romalong

 *JulesF wrote:*   

> Are you planning on installing any further adapters? So long as you have one nic then you will only ever need net.eth0. I have just this moment, enabled net.eth1 on my own machine. I always had two cards, but only net.eth0 was in use.

 

no, i don't.

----------

## romalong

 *katsiki wrote:*   

> I don't know which driver would be best, but it may be helpful toemerge gentoo-sources; and then
> 
> inspect the file, /usr/src/linux-<your-choice-of-kernel-version>/drivers/net/Kconfig
> 
> For the linux-2.6.11-gentoo-r11 kernel, this file shows at least six possible modules associated with Marvell Gigabit NICs, including an EXPERIMENTAL module, and a depricated one.  You might need to check for the specific chipset.  For example,
> ...

 

if there're few drivers available in this config, why can't i see them in # make menuconfig?

----------

## dsd

 *romalong wrote:*   

> here you're:
> 
> ```
> 
> 0000:02:05.0  Class  0200:  11ab:4320  (rev13)
> ...

 

yep, you want skge.

----------

## romalong

 *dsd wrote:*   

>  *romalong wrote:*   here you're:
> 
> ```
> 
> 0000:02:05.0  Class  0200:  11ab:4320  (rev13)
> ...

 

sorry, but i can't find it in # make menuconfig

----------

## dsd

you havent said which kernel you are trying to configure, but type /skge<enter> inside menuconfig, and it'll tell you exactly where to look

----------

## romalong

i've got kernel-2.6.11-gentoo-r11

----------

## romalong

 *dsd wrote:*   

> you havent said which kernel you are trying to configure, but type /skge<enter> inside menuconfig, and it'll tell you exactly where to look

 

Got it!

enlighten me please:

1. how do you find out that this driver is appropriate for my harware as its name hasn't any relation with my NIC.

2. can i uncheck the rest of options?Last edited by romalong on Fri Jul 22, 2005 7:43 am; edited 1 time in total

----------

## dsd

the name might not be similar, but the help text gives some insight:

 *Quote:*   

> Ethernet controller: Marvell Technology Group Ltd. Gigabit Ethernet Controller (rev 13) 

 

 *Quote:*   

>        This driver support the Marvell Yukon or SysKonnect SK-98xx/SK-95xx
> 
>           and related Gigabit Ethernet adapters. It is a new smaller driver
> 
>           driver with better performance and more complete ethtool support. 

 

i also know this because i've had to deal with a few bugs with this driver recently.

as for how i can get it from this:

 *Quote:*   

> 0000:02:05.0  Class  0200:  11ab:4320  (rev13) 

 

11ab is the vendor code, which linux knows as PCI_VENDOR_ID_MARVELL:

 */usr/src/linux/include/linux/pci_ids.h wrote:*   

> #define PCI_VENDOR_ID_MARVELL           0x11ab

 

4320 is the product code which right now doesn't have a fancy name.

now take a look at the skge driver : http://ahbl.org/~coywolf/lxr/source/drivers/net/skge.c#L80

theres an entry in the "supported devices" list:

 *Quote:*   

>  80         { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4320) },

 

next up you have to figure out which menuconfig option builds "skge.c". i knew this already, but one way you can find out is by looking at /usr/src/linux/drivers/net/Makefile : 

 *Quote:*   

> obj-$(CONFIG_SKGE) += skge.o

 

which cryptically means that the CONFIG_SKGE setting will build skge.c into skge.o

you can then search for a symbol called SKGE inside menuconfig by typing /SKGE<enter>

it can be quite scary, but once you've done it a few times, it gets easier  :Smile: 

as for unselecting other options, you generally shouldnt do that unless you know exactly what you are unselecting. if its just support for network cards that you dont own (such as the realtek driver which is on by default) then its usually safe to turn off.

----------

## katsiki

Wow!  You all got a lot done while I was dozing!

----------

## romalong

 *dsd wrote:*   

> the name might not be similar, but the help text gives some insight:
> 
>  *Quote:*   Ethernet controller: Marvell Technology Group Ltd. Gigabit Ethernet Controller (rev 13)  
> 
>  *Quote:*          This driver support the Marvell Yukon or SysKonnect SK-98xx/SK-95xx
> ...

 

dsd,

i'd like to thank you for your great help!

my eth0 is working now!

cheers!

----------

