Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - [QNX 6.6] intel e1000 network driver works under startup-bios, not under startup-apic: (12 Items)
   
[QNX 6.6] intel e1000 network driver works under startup-bios, not under startup-apic  
We've been able to isolate this to a minimal test case that reproduces under qemu.

io-pkt-v4-hc and/or e1000.so is able to find the networking hardware while under startup-bios (w/ pci-bios), but not 
under startup-apic (w/ pci-bios-v2 named as pci-bios in the build file as instructed[1])

is there an update to e1000/io-pkt-v4-hc we should obtain to work under apic mode?  Are there any workarounds to enable 
using this network adapter w/ apic?

QNX 6.6, startup-apic mode:

# io-pkt-v4-hc -d e1000 -v
Unable to init devnp-e1000.so: No such device

QNX 6.6, startup-bios mode:

# io-pkt-v4-hc -d e1000 -v 
# ifconfig -a
... heathy output...

QNX7 (x86_64) works for us as well.  It is only qnx 6.6, under startup-apic that it misbehaves.

In both working and "no such device" cases under QNX6.6, /usr/sbin/pci reports:

# pci
PCI version    = 2.10
...
Class          = Network (Ethernet)
Vendor ID      = 8086h, Intel Corporation 
Device ID      = 100eh,  82540EM Gigabit Ethernet Controller
PCI index      = 0h
BAR - 0 [Mem]  = febc0000h enabled
BAR - 1 [I/O]  = c000h enabled
PCI Expansion ROM = feb80000h disabled
PCI Int Pin    = INT A
Interrupt line = 11
CPU Interrupt  = bh

While we have customized startup-* binaries elsewhere, for the above tests we reverted to using vanilla QNX shipped 
startup-{bios,apic} to rule out our unrelated changes.

As a third, rule-violating experiment, to give you another datapoint:  We tried running our system with the forbidden 
combination of startup-apic, and pci-bios-v1.  Under this frankenstein combo, the network driver does load correctly.  
So to the extent that one can separate apic mode from pci-bios-v2 mode, the problem seems to lie within pci-bios-v2.

Additional version info:

# uname -a
QNX localhost 6.6.0 2014/02/22-18:29:34EST x86pc x86

## under startup-bios, w/ pci-bios (v1)
# strings /proc/boot/pci-bios | tail
DESCRIPTION=BIOS PCI server
DATE=2014/02/21-13:06:13-EST
STATE=stable
HOST=sdp-builder-08
USER=builder
VERSION=6.6.0
TAGID=276

## under startup-apic, w/ pci-bios-v2
# strings /proc/boot/pci-bios | tail
DESCRIPTION=BIOS PCI server
DATE=2014/02/21-15:40:42-EST
STATE=stable
HOST=sdp-builder-08
USER=builder
VERSION=6.6.0
TAGID=277

[1] http://www.qnx.com/developers/docs/6.6.0_anm11_wf10/#com.qnx.doc.neutrino.utilities/topic/p/pci-bios.html
Re: [QNX 6.6] intel e1000 network driver works under startup-bios, not under startup-apic  
I have attached the latest 6.6.0 devnp-e1000.so driver to this email for you to try. If it still doesn't work under apic
 mode, will you please do the following and post the sloginfo output:

Make sure that slogger is started with "slogger -s512k"
slay io-pkt-v4-hc
io-pkt-v4-hc -de1000 verbose=4 -p tcpip stacksize=8192
sloginfo > file
post the output "file"

Thanks, Hugh.

On 2018-04-09, 1:22 PM, "Brian Carnes(deleted)" <community-noreply@qnx.com> wrote:

    We've been able to isolate this to a minimal test case that reproduces under qemu.
    
    io-pkt-v4-hc and/or e1000.so is able to find the networking hardware while under startup-bios (w/ pci-bios), but not
 under startup-apic (w/ pci-bios-v2 named as pci-bios in the build file as instructed[1])
    
    is there an update to e1000/io-pkt-v4-hc we should obtain to work under apic mode?  Are there any workarounds to 
enable using this network adapter w/ apic?
    
    QNX 6.6, startup-apic mode:
    
    # io-pkt-v4-hc -d e1000 -v
    Unable to init devnp-e1000.so: No such device
    
    QNX 6.6, startup-bios mode:
    
    # io-pkt-v4-hc -d e1000 -v 
    # ifconfig -a
    ... heathy output...
    
    QNX7 (x86_64) works for us as well.  It is only qnx 6.6, under startup-apic that it misbehaves.
    
    In both working and "no such device" cases under QNX6.6, /usr/sbin/pci reports:
    
    # pci
    PCI version    = 2.10
    ...
    Class          = Network (Ethernet)
    Vendor ID      = 8086h, Intel Corporation 
    Device ID      = 100eh,  82540EM Gigabit Ethernet Controller
    PCI index      = 0h
    BAR - 0 [Mem]  = febc0000h enabled
    BAR - 1 [I/O]  = c000h enabled
    PCI Expansion ROM = feb80000h disabled
    PCI Int Pin    = INT A
    Interrupt line = 11
    CPU Interrupt  = bh
    
    While we have customized startup-* binaries elsewhere, for the above tests we reverted to using vanilla QNX shipped 
startup-{bios,apic} to rule out our unrelated changes.
    
    As a third, rule-violating experiment, to give you another datapoint:  We tried running our system with the 
forbidden combination of startup-apic, and pci-bios-v1.  Under this frankenstein combo, the network driver does load 
correctly.  So to the extent that one can separate apic mode from pci-bios-v2 mode, the problem seems to lie within pci-
bios-v2.
    
    Additional version info:
    
    # uname -a
    QNX localhost 6.6.0 2014/02/22-18:29:34EST x86pc x86
    
    ## under startup-bios, w/ pci-bios (v1)
    # strings /proc/boot/pci-bios | tail
    DESCRIPTION=BIOS PCI server
    DATE=2014/02/21-13:06:13-EST
    STATE=stable
    HOST=sdp-builder-08
    USER=builder
    VERSION=6.6.0
    TAGID=276
    
    ## under startup-apic, w/ pci-bios-v2
    # strings /proc/boot/pci-bios | tail
    DESCRIPTION=BIOS PCI server
    DATE=2014/02/21-15:40:42-EST
    STATE=stable
    HOST=sdp-builder-08
    USER=builder
    VERSION=6.6.0
    TAGID=277
    
    [1] http://www.qnx.com/developers/docs/6.6.0_anm11_wf10/#com.qnx.doc.neutrino.utilities/topic/p/pci-bios.html
    
    
    
    _______________________________________________
    
    Networking Drivers
    http://community.qnx.com/sf/go/post118751
    To cancel your subscription to this discussion, please e-mail drivers-networking-unsubscribe@community.qnx.com
    

Attachment: Text devnp-e1000.so.gz 135.43 KB
Re: [QNX 6.6] intel e1000 network driver works under startup-bios, not under startup-apic  
Thank you, Hugh.

With your new driver, I get the same results:

# io-pkt-v4-hc -d /tmp/devnp-e1000.so verbose=4 -p tcpip stacksize=8192

yields

Unable to init /tmp/devnp-e1000.so: No such device

And slogger output of:

Time             Sev Major Minor Args
Apr 09 17:52:52    6    17     0 intrinfo size = 320  entry size = 64  count = 5
Apr 09 17:52:52    6    17     0 base = 0x80010000  num = 6  cascade = 0x7fffffff  intr 48
Apr 09 17:52:52    6    17     0 base = 0x8001ffff  num = 1  cascade = 0x7fffffff  intr 47
Apr 09 17:52:52    6    17     0 base = 0x80000000  num = 3  cascade = 0x7fffffff  intr 2
Apr 09 17:52:52    6    17     0 base = 0x00000000  num = 24  cascade = 0x7fffffff  intr 54
Apr 09 17:52:52    6    17     0 base = 0x00000100  num = 177  cascade = 0x7fffffff  intr 78
Apr 09 17:52:52    6    17     0 find_host_bridge - bridge_count 0 - num_pci_bridges 0
Apr 09 17:52:52    2    17     0 scan_windows: Alloc failed 0xfd000008 - Size 0x1000000
Apr 09 17:52:52    5    14     0 tcpip starting
Apr 09 17:52:52    3    14     0 Using pseudo random generator.  See "random" option
Apr 09 17:52:52    5    14     0 initializing IPsec... done
Apr 09 17:52:52    5    14     0 IPsec: Initialized Security Association Processing.
Apr 09 17:52:52    5    14     0 wm0
Apr 09 17:52:52    2    10     0 pci_attach_device failed
Apr 09 17:52:52    2    14     0 Unable to init devnp-e1000.so: No such device

running the same experiment under pci-bios (v1), with the original devnp-e1000.so, where things work, produces logging 
info of:

Time             Sev Major Minor Args
Apr 09 17:52:48    6    17     0 intrinfo size = 320  entry size = 64  count = 5
Apr 09 17:52:48    6    17     0 base = 0x80010000  num = 6  cascade = 07fffffff  intr 48
Apr 09 17:52:48    6    17     0 base = 0x8001ffff  num = 1  cascade = 07fffffff  intr 47
Apr 09 17:52:48    6    17     0 base = 0x80000000  num = 3  cascade = 07fffffff  intr 2
Apr 09 17:52:48    6    17     0 base = 0x00000000  num = 24  cascade = 07fffffff  intr 54
Apr 09 17:52:48    6    17     0 base = 0x00000100  num = 177  cascade = 07fffffff  intr 78
Apr 09 17:52:48    6    17     0 scan_device exiting
Apr 09 17:52:48    6    17     0 scan_device exiting
Apr 09 17:52:48    6    17     0 scan_device exiting
Apr 09 17:52:48    2    17     0 scan_windows: Alloc failed fd000008 - Size 1000000
Apr 09 17:52:49    5    14     0 tcpip starting
Apr 09 17:52:49    3    14     0 Using pseudo random generator.  See "random" option
Apr 09 17:52:49    5    14     0 initializing IPsec... done
Apr 09 17:52:49    5    14     0 IPsec: Initialized Security Association Processing.
Apr 09 17:52:49    5    14     0 wm0
Apr 09 17:52:49    6    10     0 e1000_set_mac_type
Apr 09 17:52:49    6    10     0 e1000_init_mac_ops_generic
...


Interestingly, doing a quick run of your experimental driver from within pci-bios (v1) mode, it no longer works as the 
shipping devnp-e1000.so does, but instead yields an abort:

# io-pkt-v4-hc -d /tmp/devnp-e1000.so verbose=4 -p tcpip stacksize=8192 -v
Abort

# sloginfo
Time             Sev Major Minor Args
Apr 09 17:53:09    6    17     0 intrinfo size = 320  entry size = 64  count = 5
Apr 09 17:53:09    6    17     0 base = 0x80010000  num = 6  cascade = 07fffffff  intr 48
Apr 09 17:53:09    6    17     0 base = 0x8001ffff  num = 1  cascade = 07fffffff  intr 47
Apr 09 17:53:09    6    17     0 base = 0x80000000  num = 3  cascade = 07fffffff  intr 2
Apr 09 17:53:09    6    17     0 base = 0x00000000  num = 24  cascade = 07fffffff  intr 54
Apr 09 17:53:09    6    17     0 base = 0x00000100  num = 177  cascade = 07fffffff  intr 78
Apr 09 17:53:09    6    17     0 scan_device exiting
Apr 09 17:53:09    6    17     0 scan_device exiting
Apr 09 17:53:09    6    17     0 scan_device exiting
Apr 09 17:53:09    2    17     0 scan_windows: Alloc failed fd000008 - Size 1000000
Apr 09 17:53:09    5    14     0 tcpip...
View Full Message
Re: [QNX 6.6] intel e1000 network driver works under startup-bios, not under startup-apic  
I have inserted some debug code into the driver to try and determine what is happening, so please run the attached 
driver as before and post the sloginfo output.

Thanks, Hugh.

On 2018-04-09, 2:30 PM, "Brian Carnes(deleted)" <community-noreply@qnx.com> wrote:

    Thank you, Hugh.
    
    With your new driver, I get the same results:
    
    # io-pkt-v4-hc -d /tmp/devnp-e1000.so verbose=4 -p tcpip stacksize=8192
    
    yields
    
    Unable to init /tmp/devnp-e1000.so: No such device
    
    And slogger output of:
    
    Time             Sev Major Minor Args
    Apr 09 17:52:52    6    17     0 intrinfo size = 320  entry size = 64  count = 5
    Apr 09 17:52:52    6    17     0 base = 0x80010000  num = 6  cascade = 0x7fffffff  intr 48
    Apr 09 17:52:52    6    17     0 base = 0x8001ffff  num = 1  cascade = 0x7fffffff  intr 47
    Apr 09 17:52:52    6    17     0 base = 0x80000000  num = 3  cascade = 0x7fffffff  intr 2
    Apr 09 17:52:52    6    17     0 base = 0x00000000  num = 24  cascade = 0x7fffffff  intr 54
    Apr 09 17:52:52    6    17     0 base = 0x00000100  num = 177  cascade = 0x7fffffff  intr 78
    Apr 09 17:52:52    6    17     0 find_host_bridge - bridge_count 0 - num_pci_bridges 0
    Apr 09 17:52:52    2    17     0 scan_windows: Alloc failed 0xfd000008 - Size 0x1000000
    Apr 09 17:52:52    5    14     0 tcpip starting
    Apr 09 17:52:52    3    14     0 Using pseudo random generator.  See "random" option
    Apr 09 17:52:52    5    14     0 initializing IPsec... done
    Apr 09 17:52:52    5    14     0 IPsec: Initialized Security Association Processing.
    Apr 09 17:52:52    5    14     0 wm0
    Apr 09 17:52:52    2    10     0 pci_attach_device failed
    Apr 09 17:52:52    2    14     0 Unable to init devnp-e1000.so: No such device
    
    running the same experiment under pci-bios (v1), with the original devnp-e1000.so, where things work, produces 
logging info of:
    
    Time             Sev Major Minor Args
    Apr 09 17:52:48    6    17     0 intrinfo size = 320  entry size = 64  count = 5
    Apr 09 17:52:48    6    17     0 base = 0x80010000  num = 6  cascade = 07fffffff  intr 48
    Apr 09 17:52:48    6    17     0 base = 0x8001ffff  num = 1  cascade = 07fffffff  intr 47
    Apr 09 17:52:48    6    17     0 base = 0x80000000  num = 3  cascade = 07fffffff  intr 2
    Apr 09 17:52:48    6    17     0 base = 0x00000000  num = 24  cascade = 07fffffff  intr 54
    Apr 09 17:52:48    6    17     0 base = 0x00000100  num = 177  cascade = 07fffffff  intr 78
    Apr 09 17:52:48    6    17     0 scan_device exiting
    Apr 09 17:52:48    6    17     0 scan_device exiting
    Apr 09 17:52:48    6    17     0 scan_device exiting
    Apr 09 17:52:48    2    17     0 scan_windows: Alloc failed fd000008 - Size 1000000
    Apr 09 17:52:49    5    14     0 tcpip starting
    Apr 09 17:52:49    3    14     0 Using pseudo random generator.  See "random" option
    Apr 09 17:52:49    5    14     0 initializing IPsec... done
    Apr 09 17:52:49    5    14     0 IPsec: Initialized Security Association Processing.
    Apr 09 17:52:49    5    14     0 wm0
    Apr 09 17:52:49    6    10     0 e1000_set_mac_type
    Apr 09 17:52:49    6    10     0 e1000_init_mac_ops_generic
    ...
    
    
    Interestingly, doing a quick run of your experimental driver from within pci-bios (v1) mode, it no longer works as 
the shipping devnp-e1000.so does, but instead yields an abort:
    
    # io-pkt-v4-hc -d /tmp/devnp-e1000.so verbose=4 -p tcpip stacksize=8192 -v
    Abort
    
    # sloginfo
    Time             Sev Major Minor Args
    Apr 09 17:53:09    6    17     0 intrinfo size = 320  entry size = 64  count = 5
    Apr 09 17:53:09    6    17     0 base = 0x80010000  num = 6  cascade = 07fffffff  intr 48
    Apr 09 17:53:09    6    17     0 base = 0x8001ffff  num = 1  cascade = 07fffffff  intr 47
    Apr 09 17:53:09    6    17     0 base...
View Full Message
Attachment: Text devnp-e1000.so.gz 135.57 KB
Re: [QNX 6.6] intel e1000 network driver works under startup-bios, not under startup-apic  
Your latest driver with extra logging, under pci-bios-v2:

Time             Sev Major Minor Args
Apr 09 19:35:32    5    14     0 tcpip starting
Apr 09 19:35:32    3    14     0 Using pseudo random generator.  See "random" option
Apr 09 19:35:32    5    14     0 initializing IPsec... done
Apr 09 19:35:32    5    14     0 IPsec: Initialized Security Association Processing.
Apr 09 19:35:32    5    14     0 wm0
Apr 09 19:35:32    6    10     0 i82544_pci_attach1
Apr 09 19:35:32    6    10     0 i82544_pci_attach2 - media_rate -1 - duplex -1
Apr 09 19:35:32    6    10     0 i82544_pci_attach3 - busdevice 0x100e
Apr 09 19:35:32    6    10     0 i82544_pci_attach4
Apr 09 19:35:32    6    10     0 i82544_pci_attach5
Apr 09 19:35:32    6    10     0 i82544_pci_attach6
Apr 09 19:35:32    2    10     0 pci_attach_device failed
Apr 09 19:35:32    2    14     0 Unable to init /tmp/devnp-e1000.so: No such device


And running this same driver under pci-bios (v1) still gives an Abort that is not present in the original 6.6.0 devnp-
e1000.so, but shows that it makes it past pci_attach_device():

Time             Sev Major Minor Args
Apr 09 19:35:42    6    17     0 intrinfo size = 320  entry size = 64  count = 5Apr 09 19:35:42    6    17     0 base = 
0x80010000  num = 6  cascade = 07fffffff  intr 48
Apr 09 19:35:42    6    17     0 base = 0x8001ffff  num = 1  cascade = 07fffffff  intr 47
Apr 09 19:35:42    6    17     0 base = 0x80000000  num = 3  cascade = 07fffffff  intr 2
Apr 09 19:35:42    6    17     0 base = 0x00000000  num = 24  cascade = 07fffffff  intr 54
Apr 09 19:35:42    6    17     0 base = 0x00000100  num = 177  cascade = 07fffffff  intr 78
Apr 09 19:35:42    6    17     0 scan_device exiting
Apr 09 19:35:42    6    17     0 scan_device exiting
Apr 09 19:35:42    6    17     0 scan_device exiting
Apr 09 19:35:42    2    17     0 scan_windows: Alloc failed fd000008 - Size 1000000
Apr 09 19:35:42    5    14     0 tcpip starting
Apr 09 19:35:42    3    14     0 Using pseudo random generator.  See "random" option
Apr 09 19:35:42    5    14     0 initializing IPsec... done
Apr 09 19:35:42    5    14     0 IPsec: Initialized Security Association Processing.
Apr 09 19:35:42    5    14     0 wm0
Apr 09 19:35:42    6    10     0 i82544_pci_attach1
Apr 09 19:35:42    6    10     0 i82544_pci_attach2 - media_rate -1 - duplex -1
Apr 09 19:35:42    6    10     0 i82544_pci_attach3 - busdevice 0x100e
Apr 09 19:35:42    6    10     0 i82544_pci_attach4
Apr 09 19:35:42    6    10     0 i82544_pci_attach5
Apr 09 19:35:42    6    10     0 i82544_pci_attach6
Apr 09 19:35:42    6    10     0 i82544_pci_attach7
Apr 09 19:35:42    6    10     0 i82544_pci_attach8
Apr 09 19:35:42    6    10     0 e1000_set_mac_type
Apr 09 19:35:42    6    10     0 e1000_init_mac_ops_generic
...
Apr 09 19:35:42    1    14     0 nic_delay() called from proc0!

Re: [QNX 6.6] intel e1000 network driver works under startup-bios, not under startup-apic  
Please can you rebuild your boot image and make sure that you have "slogger -s512k" and also "pci-bios -vvv". I need to 
get the full output from both the driver and the PCI server, as it appears that the pci_attach_device() is failing on 
MSI interrupts for some reason. Please post the complete sloginfo output.

Thanks, Hugh.

On 2018-04-09, 3:46 PM, "Brian Carnes(deleted)" <community-noreply@qnx.com> wrote:

    Your latest driver with extra logging, under pci-bios-v2:
    
    Time             Sev Major Minor Args
    Apr 09 19:35:32    5    14     0 tcpip starting
    Apr 09 19:35:32    3    14     0 Using pseudo random generator.  See "random" option
    Apr 09 19:35:32    5    14     0 initializing IPsec... done
    Apr 09 19:35:32    5    14     0 IPsec: Initialized Security Association Processing.
    Apr 09 19:35:32    5    14     0 wm0
    Apr 09 19:35:32    6    10     0 i82544_pci_attach1
    Apr 09 19:35:32    6    10     0 i82544_pci_attach2 - media_rate -1 - duplex -1
    Apr 09 19:35:32    6    10     0 i82544_pci_attach3 - busdevice 0x100e
    Apr 09 19:35:32    6    10     0 i82544_pci_attach4
    Apr 09 19:35:32    6    10     0 i82544_pci_attach5
    Apr 09 19:35:32    6    10     0 i82544_pci_attach6
    Apr 09 19:35:32    2    10     0 pci_attach_device failed
    Apr 09 19:35:32    2    14     0 Unable to init /tmp/devnp-e1000.so: No such device
    
    
    And running this same driver under pci-bios (v1) still gives an Abort that is not present in the original 6.6.0 
devnp-e1000.so, but shows that it makes it past pci_attach_device():
    
    Time             Sev Major Minor Args
    Apr 09 19:35:42    6    17     0 intrinfo size = 320  entry size = 64  count = 5Apr 09 19:35:42    6    17     0 
base = 0x80010000  num = 6  cascade = 07fffffff  intr 48
    Apr 09 19:35:42    6    17     0 base = 0x8001ffff  num = 1  cascade = 07fffffff  intr 47
    Apr 09 19:35:42    6    17     0 base = 0x80000000  num = 3  cascade = 07fffffff  intr 2
    Apr 09 19:35:42    6    17     0 base = 0x00000000  num = 24  cascade = 07fffffff  intr 54
    Apr 09 19:35:42    6    17     0 base = 0x00000100  num = 177  cascade = 07fffffff  intr 78
    Apr 09 19:35:42    6    17     0 scan_device exiting
    Apr 09 19:35:42    6    17     0 scan_device exiting
    Apr 09 19:35:42    6    17     0 scan_device exiting
    Apr 09 19:35:42    2    17     0 scan_windows: Alloc failed fd000008 - Size 1000000
    Apr 09 19:35:42    5    14     0 tcpip starting
    Apr 09 19:35:42    3    14     0 Using pseudo random generator.  See "random" option
    Apr 09 19:35:42    5    14     0 initializing IPsec... done
    Apr 09 19:35:42    5    14     0 IPsec: Initialized Security Association Processing.
    Apr 09 19:35:42    5    14     0 wm0
    Apr 09 19:35:42    6    10     0 i82544_pci_attach1
    Apr 09 19:35:42    6    10     0 i82544_pci_attach2 - media_rate -1 - duplex -1
    Apr 09 19:35:42    6    10     0 i82544_pci_attach3 - busdevice 0x100e
    Apr 09 19:35:42    6    10     0 i82544_pci_attach4
    Apr 09 19:35:42    6    10     0 i82544_pci_attach5
    Apr 09 19:35:42    6    10     0 i82544_pci_attach6
    Apr 09 19:35:42    6    10     0 i82544_pci_attach7
    Apr 09 19:35:42    6    10     0 i82544_pci_attach8
    Apr 09 19:35:42    6    10     0 e1000_set_mac_type
    Apr 09 19:35:42    6    10     0 e1000_init_mac_ops_generic
    ...
    Apr 09 19:35:42    1    14     0 nic_delay() called from proc0!
    
    
    
    
    
    _______________________________________________
    
    Networking Drivers
    http://community.qnx.com/sf/go/post118755
    To cancel your subscription to this discussion, please e-mail drivers-networking-unsubscribe@community.qnx.com
    

Re: [QNX 6.6] intel e1000 network driver works under startup-bios, not under startup-apic  
sloginfo w/ "pci-bios* -vvv" output attached as files to this post.

The significant part seems to be:

Apr 10 22:05:25    6    17     0 get_an_irq Requested MSI[X] vectors 0
Apr 10 22:05:25    2    17     0 get_an_irq: No irq2
Apr 10 22:05:25    2    10     0 pci_attach_device failed

We see an identical failure when running w/ "pci-bios[-v2] -M -vvv", to disable MSI and MSI-X completely, so the problem
 appears to be in the fallback, non-MSI interrupt handling logic.

From earlier, note that /sbin/pci output shows it is sitting on IRQ11.  It's been a long time since I've had to think 
about such things, but this sounds like something in the IRQ2 -> IRQ8-IRQ15 slave PIC logic.

You should be able to reproduce this all under qemu-system-x86_64 over there.  Things work under QNX6.6/startup-bios, 
QNX7, and Linux.  They do not work under QNX6.6/startup-apic.

Thanks.
Attachment: Text shipping-driver-v1-ok.txt 60.86 KB Text hugh-driver-v2-dashM.txt 7.33 KB Text high-driver-v1-abort.txt 7.35 KB Text hugh-driver-v2.txt 7.16 KB
Re: [QNX 6.6] intel e1000 network driver works under startup-bios, not under startup-apic  
Just to be clear, this problem only occurs running under qemu?

Thanks, Hugh.

On 2018-04-11, 10:29 AM, "Brian Carnes(deleted)" <community-noreply@qnx.com> wrote:

    sloginfo w/ "pci-bios* -vvv" output attached as files to this post.
    
    The significant part seems to be:
    
    Apr 10 22:05:25    6    17     0 get_an_irq Requested MSI[X] vectors 0
    Apr 10 22:05:25    2    17     0 get_an_irq: No irq2
    Apr 10 22:05:25    2    10     0 pci_attach_device failed
    
    We see an identical failure when running w/ "pci-bios[-v2] -M -vvv", to disable MSI and MSI-X completely, so the 
problem appears to be in the fallback, non-MSI interrupt handling logic.
    
    From earlier, note that /sbin/pci output shows it is sitting on IRQ11.  It's been a long time since I've had to 
think about such things, but this sounds like something in the IRQ2 -> IRQ8-IRQ15 slave PIC logic.
    
    You should be able to reproduce this all under qemu-system-x86_64 over there.  Things work under QNX6.6/startup-bios
, QNX7, and Linux.  They do not work under QNX6.6/startup-apic.
    
    Thanks.
    
    
    
    
    _______________________________________________
    
    Networking Drivers
    http://community.qnx.com/sf/go/post118759
    To cancel your subscription to this discussion, please e-mail drivers-networking-unsubscribe@community.qnx.com
    

Re: [QNX 6.6] intel e1000 network driver works under startup-bios, not under startup-apic  
The original bug report was from real hardware.  In brief, it was "USB works reliably under only one of startup-bios/
startup-apic under qnx 6.6, networking only works under the other..."

These rapid iterations running your experimental drivers, etc. are happening on our regression testing testbed, which is
 using qemu for "VM-in-the-loop continuous integration/testing", pending enough HW being present for true "HW-in-the-
loop CI/testing..."

Since we have a nice clean failure example in qemu, I hadn't pushed your requests back to the team w/ hardware.

Based on your question, I've now pinged the original team that reported this on hardware.

Even if we're seeing two types of failures here (TBD), it'd be nice to fix the original issue and the running-under-qemu
 issue.

If you can't triage or fix the issue directly, can you post the snippet of code that is failing inside of pci-bios-v2? 
We have folks with qemu-innards-expertise over here.

I'll let you know when I hear back from the on-hardware original bug folks.

Thanks
Re: [QNX 6.6] intel e1000 network driver works under startup-bios, not under startup-apic  
Why are you running QNX6.6 with qemu-system-x86_64? Surely you should be running qemu-system-i386?


On 2018-04-11, 10:29 AM, "Brian Carnes(deleted)" <community-noreply@qnx.com> wrote:

    sloginfo w/ "pci-bios* -vvv" output attached as files to this post.
    
    The significant part seems to be:
    
    Apr 10 22:05:25    6    17     0 get_an_irq Requested MSI[X] vectors 0
    Apr 10 22:05:25    2    17     0 get_an_irq: No irq2
    Apr 10 22:05:25    2    10     0 pci_attach_device failed
    
    We see an identical failure when running w/ "pci-bios[-v2] -M -vvv", to disable MSI and MSI-X completely, so the 
problem appears to be in the fallback, non-MSI interrupt handling logic.
    
    From earlier, note that /sbin/pci output shows it is sitting on IRQ11.  It's been a long time since I've had to 
think about such things, but this sounds like something in the IRQ2 -> IRQ8-IRQ15 slave PIC logic.
    
    You should be able to reproduce this all under qemu-system-x86_64 over there.  Things work under QNX6.6/startup-bios
, QNX7, and Linux.  They do not work under QNX6.6/startup-apic.
    
    Thanks.
    
    
    
    
    _______________________________________________
    
    Networking Drivers
    http://community.qnx.com/sf/go/post118759
    To cancel your subscription to this discussion, please e-mail drivers-networking-unsubscribe@community.qnx.com
    

Re: [QNX 6.6] intel e1000 network driver works under startup-bios, not under startup-apic  
> Why are you running QNX6.6 with qemu-system-x86_64? Surely you should be running qemu-system-i386?

No.  We run everything (Linux, qnx 6.6, qnx 7.0) under qemu-system-x86_64.

It works for the same reason that you can boot qnx6.6 (or any 32-bit only OS) on 64-bit 86 hardware.

Since we have been deploying qnx 6.6 to 64-bit hardware since the beginning, it’d actually be inappropriate to test it 
under qemu-system-i386…

> Even if we're seeing two types of failures here (TBD)

Two types of failures, with identical symptoms.

Seen-on-hardware failure is related to a supermicro server (as opposed to advantech), and is presumably a BSP issue.

qemu failure is described below.

> If you can't triage or fix the issue directly, can you post the snippet of code that is failing inside of pci-bios-v2?
 

You didn’t respond to this, but we found pci-bios-v2 source code publicly available at:

http://community.qnx.com/sf/wiki/do/viewPage/projects.bsp/wiki/X86Bios

The problem occurs in bios-v2.c , in function bios_avail_irq().  With no support for PIIX3, get_LPC_vendorId() returns 
0xffff, the originally assigned IRQ gets blown away on line 442,  and everything errors out at the switch’s default 
block.    

We added rudimentary support for PIIX3 and preserving the IRQ assignment, and now see networking running fine under qemu
 for qnx6.6, whether in bios or apic mode.

I don’t believe your users have access to QNX7’s pci-server source code (do we?) - I’d be interested in your 
assessment of why things work under QNX7…. Was there a fix in QNX7 that could get back ported into QNX6/pci-bios-v2?

Regards,

  Brian
Re: [QNX 6.6] intel e1000 network driver works under startup-bios, not under startup-apic  
Good news that you have it working! The QNX7 PCI server is a completely new driver and bears no resemblance to the QNX6 
PCI server. The PCI source code that you have should be the latest, as there haven't been any changes to the code for a 
long time.

Hugh.

On 2018-04-12, 12:36 PM, "Brian Carnes(deleted)" <community-noreply@qnx.com> wrote:

    > Why are you running QNX6.6 with qemu-system-x86_64? Surely you should be running qemu-system-i386?
    
    No.  We run everything (Linux, qnx 6.6, qnx 7.0) under qemu-system-x86_64.
    
    It works for the same reason that you can boot qnx6.6 (or any 32-bit only OS) on 64-bit 86 hardware.
    
    Since we have been deploying qnx 6.6 to 64-bit hardware since the beginning, it’d actually be inappropriate to test
 it under qemu-system-i386…
    
    > Even if we're seeing two types of failures here (TBD)
    
    Two types of failures, with identical symptoms.
    
    Seen-on-hardware failure is related to a supermicro server (as opposed to advantech), and is presumably a BSP issue.

    
    qemu failure is described below.
    
    > If you can't triage or fix the issue directly, can you post the snippet of code that is failing inside of pci-bios
-v2? 
    
    You didn’t respond to this, but we found pci-bios-v2 source code publicly available at:
    
    http://community.qnx.com/sf/wiki/do/viewPage/projects.bsp/wiki/X86Bios
    
    The problem occurs in bios-v2.c , in function bios_avail_irq().  With no support for PIIX3, get_LPC_vendorId() 
returns 0xffff, the originally assigned IRQ gets blown away on line 442,  and everything errors out at the switch’s 
default block.    
    
    We added rudimentary support for PIIX3 and preserving the IRQ assignment, and now see networking running fine under 
qemu for qnx6.6, whether in bios or apic mode.
    
    I don’t believe your users have access to QNX7’s pci-server source code (do we?) - I’d be interested in your 
assessment of why things work under QNX7…. Was there a fix in QNX7 that could get back ported into QNX6/pci-bios-v2?
    
    Regards,
    
      Brian
    
    
    
    
    _______________________________________________
    
    Networking Drivers
    http://community.qnx.com/sf/go/post118765
    To cancel your subscription to this discussion, please e-mail drivers-networking-unsubscribe@community.qnx.com