LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-22-2019, 09:17 AM   #1
yoro
LQ Newbie
 
Registered: Feb 2019
Posts: 7

Rep: Reputation: Disabled
Unhappy No Internet access through Ethernet with Linux Kernel 4.14


Hi,

I am upgrading my custom board which uses a Cyclone V SoCFPGA from linux 3.10-ltsi to linux 4.14.73-ltsi and I am having difficulties in getting it connected to the internet.

It seems to be a network configuration issue and that's why I am writing on this forum. (The official support is also extremely slow/close to non-existent).

I get the message "failed to bring up eth0" when dhcp tries to assign an IP to the unit.

It only works in one case as described below. Also some other observations are written below;

NOTE: we have 2 sectors on the flash memory where we can store images.

a) If we boot from the 1st sector (containing kernel version 3.10-ltsi), ethernet connection and access to the internet is established successfully. If we do a warm reboot (i.e rebooting just the SoC) and boot to sector 2 (containing the linux kernel version 4.14.73-ltsi) the ethernet connection and access to the internet is established successfully.

b) if we keep warm rebooting the unit with kernel 4.14, the internet connection is always established properly.

c) If we do a cold reset (i.e resetting the EMAC, QSPI etc… just like a pulling the power plug) and boot straight to the linux kernel 4.14.73-ltsi then the ethernet connection is established but when dhcp runs we get the error message “Failed to bring up eth0”. Setting a static IP does not work either. So no packets get out!

d) Putting down eth0 by using commands like (ifconfig eth0 down or ifdown --force eth0) will cause the system to immediately COLD RESET! which is very strange.

Here is my dmesg log https://0bin.net/paste/PkLJgwlBFOuAz...OXVJJuNdFLD2Qn

I would be really grateful if someone could point me to what could be the issue. I have been struggling with this for a while now.
 
Old 10-22-2019, 09:55 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,427

Rep: Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339
According to dmesg, it finds eth0, loads the module after giving out about it, and then loses it.

1st guess: firmware. That is a binary blob the manufacturers can update. It is not locally compiled and not kernel-version dependent, so if you find it in kernel 3.10, you can copy it to /lib/firmware in 4.14. /var/log/messages or other long log files usually record firmware errors, but you're probably not keeping those.

Otherwise, what's the story behind the module?
 
1 members found this post helpful.
Old 10-22-2019, 10:00 AM   #3
uteck
Senior Member
 
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: Ubuntu based stuff for the most part
Posts: 1,177

Rep: Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501
Is the same network driver and options being used in the working 3.10 kernel as 4.14?
If DHCP is failing, then how is ifconfig reporting an address when you bring eth0 up?

I am thinking the wrong driver module might be getting loaded, or it is missing an option.
 
Old 10-23-2019, 09:51 AM   #4
yoro
LQ Newbie
 
Registered: Feb 2019
Posts: 7

Original Poster
Rep: Reputation: Disabled
Thanks for your replies;

@business_kid
You are correct about loading the module, finding eth0 and losing it. If I make the driver as a loadable module, it is not possible to find eth0 after loading the driver modules during run time.

We use the Micrel KSZ9021 chip as PHY and they do not have any binary blobs that we can add to our firmware. We have also not used that in kernel 3.10. We are building our firmware with buildroot.

I am not sure what you mean by the story behind the module, could you please elaborate?

@uteck
Yes they are the same drivers albeit the updated one.

We have a script that assign a static ip address in case DHCP fails but if we remove the script, eth0 will be up without an IP address.

we have also enabled all options possible and made a lot of combinations with the options. Also I think if the driver was wrong, it should not have worked at all.
 
Old 10-24-2019, 04:39 AM   #5
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,427

Rep: Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339
Quote:
Originally Posted by business_kid
I am not sure what you mean by the story behind the module, could you please elaborate?
Surely - that's poor help. In kernel versions,3.x.x -->4.x.x signals a compatibility break, so it's quite possible that the module that works in 3.10.x will not work in 4.14.x. Is it an external module, or one from the kernel tree?

The usual way I go about this is to get the pci id with lspci, and then google for a module that supports it. Is your 4.14 module prepared for a 4.x.x kernel?
 
Old 10-31-2019, 07:09 AM   #6
yoro
LQ Newbie
 
Registered: Feb 2019
Posts: 7

Original Poster
Rep: Reputation: Disabled
The module is from the kernel tree and I am pretty sure it is prepared for kernel 4.x.x.

Our EMAC is connected to the MDIO bus and not pci. We have also tried from the mainline kernel but nothing seems to work yet
 
Old 11-01-2019, 05:51 AM   #7
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,427

Rep: Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339
Maybe we can bothget back to basics. If your nic module is in the United, there's a script in mzny distros to load them. If the module is not in the United, it will be loaded probably with firmware. Your logs should note that for 3.x & 4.x kernels. Why not Clare what happens?
 
Old 11-04-2019, 04:10 AM   #8
yoro
LQ Newbie
 
Registered: Feb 2019
Posts: 7

Original Poster
Rep: Reputation: Disabled
Hi business_kid,

I am not too sure what you meant but if I understood correctly, You want me to use the mainline kernel of 3 and 4 and try to load the modules manually and see what happens.

We have already tried that and the results are the same, unfortunately. We also build our own firmware with Buildroot. It is not a generic one that we use.
 
Old 11-04-2019, 10:06 AM   #9
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,427

Rep: Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339
I get it that the 3.x kernel module works, but the 4.x doesn't. We need to see logs of the module, kernel, & card talking during the boot sequence. Does the module recognise the card, load firmware, assign I/O or throw a strop?.

Check files like dmesg, /var/log/messages or any other you think has info of value.
 
Old 11-05-2019, 02:35 AM   #10
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,427

Rep: Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339
The critical bit that tells you why is the card/kernel/module negotiation. To give you an example, one nic wouldn't work because it got the wrong IRQ, and I had to configure it to land jammy side up.

EDIT: The fact that the buildroot and the project behave the same to my mind validates the behaviour of the buildroot here.

The fact that the 4.x kernel doesn't work is yielding information you are missing. But it's in the logs of the kernel boot, and you need to post the relevant section. Don't paste in 1G like some guys try.

Last edited by business_kid; 11-05-2019 at 03:00 AM.
 
  


Reply

Tags
ethernet



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to share Internet Access through ethernet cable prompt32 Linux - Networking 7 11-16-2014 06:33 PM
PCMCIA ethernet driver loaded --now what? How do I access ethernet? KWTm Linux - Hardware 3 07-10-2006 01:07 PM
Debian Woody: Can't access internet through router, but can access network computers marales314 Linux - Networking 3 06-09-2006 12:33 PM
Internet Access & Internet Sharing Through Wi-Fi. Be.Gurmeet.Be Linux - Networking 0 04-13-2006 03:07 PM
transparent internet/lan access through crossover through linux box Golovko Linux - Networking 3 03-04-2005 01:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration