Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Set nic speed, before it's started.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
tom!79
n00b
n00b


Joined: 08 Jul 2014
Posts: 12

PostPosted: Tue Jul 08, 2014 8:58 pm    Post subject: Set nic speed, before it's started. Reply with quote

Hi all,
in one of my old latops (HP nx9010 (DJ315A)) that now i use as (f)utility server, i have a problem with the integrate nic a "National Semiconductor Corporation DP83815 (MacPhyter) Ethernet Controller", this nic works only on 10Mbit (FD or HD is the same), if i set it at 100Mb or i leave it in autonegotiation, don't work at all (isn't a gentoo bug, it never worked even in other os).

The faster solution that i have found is writing a script in /etc/local.d called eth0-10Mb.start with these 2 lines:
Code:

#!/bin/bash
mii-tool -F 10baseT-FD eth0


The problem with this workaround is that, this script is executed at the end of all startup scripts, so first that my latop is reachable again after a reboot must wait for about 3Min, as u can see from log:

Code:

[   25.136538] eth0: DSPCFG accepted after 0 usec.
[   25.474944] eth0: Autonegotiation advertising 0x5e1  partner 0x45e1.
[   25.474952] eth0: link up.
[   25.474963] eth0: Setting full-duplex based on negotiated link capability.
[   26.271240] eth0: Autonegotiation advertising 0x5e1  partner 0x00.
[   26.271248] eth0: link down.
[   27.897182] eth0: Autonegotiation advertising 0x5e1  partner 0x45e1.
[   27.897189] eth0: link up.
[   28.693562] eth0: Autonegotiation advertising 0x5e1  partner 0x00.
[   28.693568] eth0: link down.

[******]

[  200.678317] eth0: link down.
[  202.304250] eth0: Autonegotiation advertising 0x5e1  partner 0x45e1.
[  202.304257] eth0: link up.
[  203.031251] eth0: link down.
[  205.384334] eth0: link up.


Someone know if there's a way to setup the natsemi driver to start in a specific way, not in autonegotiation?

Or if there is a way to force 10Mbit somewhere in the boot process to be executed first of other init scripts?

Thaks for all future answers ;)
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Tue Jul 08, 2014 10:14 pm    Post subject: Reply with quote

tom ...

You could add a 'preup()' to /etc/conf.d/net

Code:
preup() {
  if [ ${IFACE} = "eth0" ] ; then
    mii-tool -F 10baseT-FD eth0
  fi
  return 0
}

HTH & best ... khay
Back to top
View user's profile Send private message
tom!79
n00b
n00b


Joined: 08 Jul 2014
Posts: 12

PostPosted: Wed Jul 09, 2014 12:59 pm    Post subject: Reply with quote

Hi Khay,

yeah googling around I had found that workaround, it was my mistake not to mention it, I wanted to see if there was a way to fix things without changing the net init script.

Maybe passing options to the module or anything, just that I have not found much information about it.

Ty anyway ;)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum