Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Cannot receive packts/interrupts after cable plugged in: (25 Items)
   
Cannot receive packts/interrupts after cable plugged in  
Hi,

I've an i217 Intel onboard controller which is used together with the devnp-e1000 driver on QNX 6.5.0 SP1. The driver is
 from the latest BSP (BSP_x86-generic_..._JBN20).

When I boot QNX, with the network cable pluggin in before hitting the power button, then packets can be received 
normally. I can see the packet reveive couter counting up using "nicinfo wm0".
However, if the PC is startet with no cable plugged in and the cable is plugged in when QNX is up, no packets can be 
received.

I already build the driver by myself and added debug output (see attachement).

Any advice?

Best regards


Attachment: Text sloginfo_1stplugin.log 187.74 KB
Re: Cannot receive packts/interrupts after cable plugged in  
Seeing the packet count incrementing with nicinfo just means that the chip
is receiving data, not necessarily io-pkt. It looks to me as though you
have an interrupt problem. Please make sure that you have a huge slog
buffer (slogger -s512k) and then reboot the machine with the cable plugged
in. After the machine has booted and the network driver is up and running,
unplug the network cable. Please then post the output from sloginfo as
well as Œpci -v¹.

Thanks, Hugh.



On 2016-07-20, 11:36 AM, "Lukas Funke" <community-noreply@qnx.com> wrote:

>Hi,
>
>I've an i217 Intel onboard controller which is used together with the
>devnp-e1000 driver on QNX 6.5.0 SP1. The driver is from the latest BSP
>(BSP_x86-generic_..._JBN20).
>
>When I boot QNX, with the network cable pluggin in before hitting the
>power button, then packets can be received normally. I can see the packet
>reveive couter counting up using "nicinfo wm0".
>However, if the PC is startet with no cable plugged in and the cable is
>plugged in when QNX is up, no packets can be received.
>
>I already build the driver by myself and added debug output (see
>attachement).
>
>Any advice?
>
>Best regards
>
>
>
>
>
>
>_______________________________________________
>
>Networking Drivers
>http://community.qnx.com/sf/go/post116557
>To cancel your subscription to this discussion, please e-mail
>drivers-networking-unsubscribe@community.qnx.com

Re: Cannot receive packts/interrupts after cable plugged in  
You could be right, that there is an interrupt problem. However, I'm wondering why I receive the "link state changes" 
interrupt, but not a receive interrupt. There are broatcast packets on the wire, as well as packets with the controllers
 mac as destination address (verified with wireshark).

I've attached the logs you requested. I'm interested in the "wm0" interface which corresponds to the i217 onboard 
controller (vid=0x8086, did=153a).

Thanks :-)
Attachment: Text slog_plugin_fromstart.log 420.23 KB Text lspci.log 29.8 KB
Re: Cannot receive packts/interrupts after cable plugged in  
Please will you try the attached driver and let us know if it works.

Thanks, Hugh.

‹

On 2016-07-21, 10:49 AM, "Lukas Funke" <community-noreply@qnx.com> wrote:

>You could be right, that there is an interrupt problem. However, I'm
>wondering why I receive the "link state changes" interrupt, but not a
>receive interrupt. There are broatcast packets on the wire, as well as
>packets with the controllers mac as destination address (verified with
>wireshark).
>
>I've attached the logs you requested. I'm interested in the "wm0"
>interface which corresponds to the i217 onboard controller (vid=0x8086,
>did=153a).
>
>Thanks :-)
>
>
>
>_______________________________________________
>
>Networking Drivers
>http://community.qnx.com/sf/go/post116559
>To cancel your subscription to this discussion, please e-mail
>drivers-networking-unsubscribe@community.qnx.com

Attachment: Text devnp-e1000.so.650 336.24 KB
Re: Cannot receive packts/interrupts after cable plugged in  
I get an unresolved symbol error:

"ldd:FATAL: Unresolved symbol "stk_context_callback_2" called from devnp-e1000.so"
Re: Cannot receive packts/interrupts after cable plugged in  
OK, I¹ll take a look at the source in the BSP, as the driver I gave you
requires an updated io-pkt. Please can you post the full name of the BSP
that you downloaded?

Thanks, Hugh.

On 2016-07-21, 11:28 AM, "Lukas Funke" <community-noreply@qnx.com> wrote:


>I get an unresolved symbol error:
>
>"ldd:FATAL: Unresolved symbol "stk_context_callback_2" called from
>devnp-e1000.so"
>
>
>
>_______________________________________________
>
>Networking Drivers
>http://community.qnx.com/sf/go/post116563
>To cancel your subscription to this discussion, please e-mail
>drivers-networking-unsubscribe@community.qnx.com

Re: Cannot receive packts/interrupts after cable plugged in  
I've downloaded this BSP:

BSP_x86-generic_br-650_be-650sp1_SVN800138_JBN20.zip

from here:

http://community.qnx.com/sf/go/projects.bsp/frs.x86_bios.bsp_nto650_x86_bios_trunk
Re: Cannot receive packts/interrupts after cable plugged in  
Please can you try the driver that I sent you together with the attached
io-pkt and let me know if that works.

Thanks, Hugh.



On 2016-07-21, 11:53 AM, "Lukas Funke" <community-noreply@qnx.com> wrote:

>I've downloaded this BSP:
>
>BSP_x86-generic_br-650_be-650sp1_SVN800138_JBN20.zip
>
>from here:
>
>http://community.qnx.com/sf/go/projects.bsp/frs.x86_bios.bsp_nto650_x86_bi
>os_trunk
>
>
>
>
>_______________________________________________
>
>Networking Drivers
>http://community.qnx.com/sf/go/post116565
>To cancel your subscription to this discussion, please e-mail
>drivers-networking-unsubscribe@community.qnx.com

Attachment: Text io-pkt-v4-hc.650 1.18 MB
Re: Cannot receive packts/interrupts after cable plugged in  
it's not working; sloginfo output is attached.
Attachment: Text slog_plugin_qnxfix.log 413.11 KB
Re: Cannot receive packts/interrupts after cable plugged in  
Please can you post the output from ³pidin irq², ³pidin arg² and
³ifconfig²?
Thanks.



On 2016-07-21, 1:01 PM, "Lukas Funke" <community-noreply@qnx.com> wrote:

>it's not working; sloginfo output is attached.
>
>
>
>_______________________________________________
>
>Networking Drivers
>http://community.qnx.com/sf/go/post116568
>To cancel your subscription to this discussion, please e-mail
>drivers-networking-unsubscribe@community.qnx.com

Re: Cannot receive packts/interrupts after cable plugged in  
Hugh,

I've attached the requested logs. The zip file contains a log for each tool before and after the cable has been plugged 
in.
Attachment: Compressed file qnxafterfix.zip 11.16 KB
Re: Cannot receive packts/interrupts after cable plugged in  
Hugh,

I added the logs of a ported "ethregs" version. Hopefully this will bring some light to the case.
Attachment: Text ethregs_before_plugin.log 7.82 KB Text ethregs_plugin_fromboot.log 7.82 KB Text ethregs_after_plugin.log 7.82 KB
Re: Cannot receive packts/interrupts after cable plugged in  
Lucas,

Are you using the startup-apic and pci-bios-v2 that came with the BSP? If
so, have you tried just running the board with startup-bios and pci-bios
to see if that works?
Hugh.



On 2016-07-22, 5:09 AM, "Lukas Funke" <community-noreply@qnx.com> wrote:

>Hugh,
>
>I added the logs of a ported "ethregs" version. Hopefully this will bring
>some light to the case.
>
>
>
>_______________________________________________
>
>Networking Drivers
>http://community.qnx.com/sf/go/post116577
>To cancel your subscription to this discussion, please e-mail
>drivers-networking-unsubscribe@community.qnx.com

Re: Cannot receive packts/interrupts after cable plugged in  
Hugh,

yes, I'm using the startup-apic, together with the pci-bios-v2. Is there any reason why it should work with the statup-
bios/pci-bios, but doesn't work with the startup-apic/pci-bios-v2?

I'm asking, because exchaning these components would require greater effort in order to run the rest of our firmware.
Re: Cannot receive packts/interrupts after cable plugged in  
Lucas,

I¹m just trying to narrow down the problem, as using startup-bios and
pci-bios will use the interrupts configured by the BIOS. This is just for
a test.



On 2016-07-22, 8:23 AM, "Lukas Funke" <community-noreply@qnx.com> wrote:

>Hugh,
>
>yes, I'm using the startup-apic, together with the pci-bios-v2. Is there
>any reason why it should work with the statup-bios/pci-bios, but doesn't
>work with the startup-apic/pci-bios-v2?
>
>I'm asking, because exchaning these components would require greater
>effort in order to run the rest of our firmware.
>
>
>
>_______________________________________________
>
>Networking Drivers
>http://community.qnx.com/sf/go/post116579
>To cancel your subscription to this discussion, please e-mail
>drivers-networking-unsubscribe@community.qnx.com

Re: Cannot receive packts/interrupts after cable plugged in  
I've exchanges pci-bios-v2 by pci-bios and startup-apic by startup-bios. Still no luck.

pidin arg, pidin irq and pidin syspage attached. Have you compared the register contents I attached? Is there anything 
noticeable?
Attachment: Text pidin_syspage_fromboot.log 7.71 KB Text pidin_arg_fromboot.log 1.9 KB Text pidin_irq_fromboot.log 4.01 KB
Re: Cannot receive packts/interrupts after cable plugged in  
Lucas,

I really don¹t have time to go into this too deeply right now, so if this
is urgent for you, I suggest that you contact your sales rep to escalate
the problem.

Hugh.

On 2016-07-22, 9:40 AM, "Lukas Funke" <community-noreply@qnx.com> wrote:


>I've exchanges pci-bios-v2 by pci-bios and startup-apic by startup-bios.
>Still no luck.
>
>pidin arg, pidin irq and pidin syspage attached. Have you compared the
>register contents I attached? Is there anything noticeable?
>
>
>
>_______________________________________________
>
>Networking Drivers
>http://community.qnx.com/sf/go/post116581
>To cancel your subscription to this discussion, please e-mail
>drivers-networking-unsubscribe@community.qnx.com

Re: Cannot receive packts/interrupts after cable plugged in  
I have 2 machines in my office with e1000 device ID 0x153b, which is also
an I217, and both work fine. Do you have more than one board to test the
driver, and does the interface work with another O/S (Linux?).



On 2016-07-22, 9:40 AM, "Lukas Funke" <community-noreply@qnx.com> wrote:

>I've exchanges pci-bios-v2 by pci-bios and startup-apic by startup-bios.
>Still no luck.
>
>pidin arg, pidin irq and pidin syspage attached. Have you compared the
>register contents I attached? Is there anything noticeable?
>
>
>
>_______________________________________________
>
>Networking Drivers
>http://community.qnx.com/sf/go/post116581
>To cancel your subscription to this discussion, please e-mail
>drivers-networking-unsubscribe@community.qnx.com

Re: Cannot receive packts/interrupts after cable plugged in  
The interface works with Linux. What's also interesting: a soft reboot (hitting the reset button) does not fix the 
problem. To get the network working I've to switch the PC off and on again with the cable plugged in.

It's like some register values are messed up. After a hard reset their initial values seem to be fine.
Re: Cannot receive packts/interrupts after cable plugged in  
Do you have more than one board? Is it possible to send us a board?



On 2016-08-02, 11:15 AM, "Lukas Funke" <community-noreply@qnx.com> wrote:

>The interface works with Linux. What's also interesting: a soft reboot
>(hitting the reset button) does not fix the problem. To get the network
>working I've to switch the PC off and on again with the cable plugged in.
>
>It's like some register values are messed up. After a hard reset their
>initial values seem to be fine.
>
>
>
>
>_______________________________________________
>
>Networking Drivers
>http://community.qnx.com/sf/go/post116623
>To cancel your subscription to this discussion, please e-mail
>drivers-networking-unsubscribe@community.qnx.com

Re: Cannot receive packts/interrupts after cable plugged in  
I've tested this with two identical boards. It would not be no issue to send you one of the machines.

I also gained more insights by dumping the phy registers:

- A) directly after the PC boots, with no cable plugged in
- B) after the cable has been plugged in for the first time
- C) after the cable has been unplugged and plugged in for the second time ( <-- sometimes it works from here)

Take a look at the general diagnostic status register (phy addr 02, page 0, reg 31). 

In case (A) its 0x03fc, which means the cable length is unknown. which is okay, because no cable is plugged in. 

In case (B) its 0x4000, which seems not(!) okay to me, because I'm pretty sure that the receive pairs have not been 
swapped.

In case (C), after the cable has been plugged in for the second time, the diag status register is 0x0000. This is there 
case where the connections is working. Its a very short cable, so the cable length register bits are zero.



Attachment: Text phydump_B.log 3.73 KB Text phydump_C.log 3.73 KB Text phydump_A.log 3.73 KB
Re: Cannot receive packts/interrupts after cable plugged in  
It would be a lot easier if you sent us a machine, so that I could debug
this issue. Please speak to your QNX sales manager so that this work can
be scheduled.

Thanks, Hugh.



On 2016-08-04, 3:44 AM, "Lukas Funke" <community-noreply@qnx.com> wrote:

>I've tested this with two identical boards. It would not be no issue to
>send you one of the machines.
>
>I also gained more insights by dumping the phy registers:
>
>- A) directly after the PC boots, with no cable plugged in
>- B) after the cable has been plugged in for the first time
>- C) after the cable has been unplugged and plugged in for the second
>time ( <-- sometimes it works from here)
>
>Take a look at the general diagnostic status register (phy addr 02, page
>0, reg 31). 
>
>In case (A) its 0x03fc, which means the cable length is unknown. which is
>okay, because no cable is plugged in.
>
>In case (B) its 0x4000, which seems not(!) okay to me, because I'm pretty
>sure that the receive pairs have not been swapped.
>
>In case (C), after the cable has been plugged in for the second time, the
>diag status register is 0x0000. This is there case where the connections
>is working. Its a very short cable, so the cable length register bits are
>zero.
>
>
>
>
>
>
>
>_______________________________________________
>
>Networking Drivers
>http://community.qnx.com/sf/go/post116630
>To cancel your subscription to this discussion, please e-mail
>drivers-networking-unsubscribe@community.qnx.com

Re: Cannot receive packts/interrupts after cable plugged in  
Hugh,

apparently the bug hast already been fixed in the linux drivers.

@see

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/patch/drivers/net/ethernet/intel/e1000e?id=
b20a774495671f037e7160ea2ce8789af6b61533

Here is a small patch to enable the workaround for i217 controllers in the latest BSP:

--- init.c      2016-03-31 17:29:56.000000000 +0200
+++ init.fix.c  2016-08-09 17:08:02.763404800 +0200
@@ -1720,7 +1720,7 @@
                E1000_WRITE_REG (hw, E1000_RXDCTL (0), rxdctl);
                }

-       if (hw->mac.type == e1000_pch2lan) {
+       if (hw->mac.type >= e1000_pch2lan) {
                if (i82544->cfg.mtu > ETH_MAX_PKT_LEN)
                        e1000_lv_jumbo_workaround_ich8lan(hw, TRUE);
                else



Best regards
Lukas
Re: Cannot receive packts/interrupts after cable plugged in  
Did that fix the problem for you?



On 2016-08-09, 11:16 AM, "Lukas Funke" <community-noreply@qnx.com> wrote:

>Hugh,
>
>apparently the bug hast already been fixed in the linux drivers.
>
>@see
>
>https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/patch/driv
>ers/net/ethernet/intel/e1000e?id=b20a774495671f037e7160ea2ce8789af6b61533
>
>Here is a small patch to enable the workaround for i217 controllers in
>the latest BSP:
>
>--- init.c      2016-03-31 17:29:56.000000000 +0200
>+++ init.fix.c  2016-08-09 17:08:02.763404800 +0200
>@@ -1720,7 +1720,7 @@
>                E1000_WRITE_REG (hw, E1000_RXDCTL (0), rxdctl);
>                }
>
>-       if (hw->mac.type == e1000_pch2lan) {
>+       if (hw->mac.type >= e1000_pch2lan) {
>                if (i82544->cfg.mtu > ETH_MAX_PKT_LEN)
>                        e1000_lv_jumbo_workaround_ich8lan(hw, TRUE);
>                else
>
>
>
>Best regards
>Lukas
>
>
>
>
>_______________________________________________
>
>Networking Drivers
>http://community.qnx.com/sf/go/post116643
>To cancel your subscription to this discussion, please e-mail
>drivers-networking-unsubscribe@community.qnx.com

Re: Cannot receive packts/interrupts after cable plugged in  
> Did that fix the problem for you?

Replying on Lukas' behalf: yes it did! ;-)