NIC em problem on FreeBSD 10

I have a very old server with two onboard Intel PRO/1000 NICs. On FreeBSD 8.4, they are recognized as em0 and em1. On FreeBSD 10, there are some problems with these NICs.

Any suggestions to this problem? Thanks.

Code:
Dec 25 22:36:25 db2 kernel: Copyright (c) 1992-2014 The FreeBSD Project.
Dec 25 22:36:25 db2 kernel: Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
Dec 25 22:36:25 db2 kernel: The Regents of the University of California. All rights reserved.
Dec 25 22:36:25 db2 kernel: FreeBSD is a registered trademark of The FreeBSD Foundation.
Dec 25 22:36:25 db2 kernel: FreeBSD 10.1-RELEASE #0 r274401: Tue Nov 11 22:51:51 UTC 2014
Dec 25 22:36:25 db2 kernel: root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC i386
Dec 25 22:36:25 db2 kernel: FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
Dec 25 22:36:25 db2 kernel: CPU: Intel(R) Xeon(TM) CPU 2.80GHz (2791.82-MHz 686-class CPU)
Dec 25 22:36:25 db2 kernel: Origin = "GenuineIntel"  Id = 0xf27  Family = 0xf  Model = 0x2  Stepping = 7
Dec 25 22:36:25 db2 kernel: Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
Dec 25 22:36:25 db2 kernel: real memory  = 4294967296 (4096 MB)
Dec 25 22:36:25 db2 kernel: avail memory = 4065067008 (3876 MB)
Dec 25 22:36:25 db2 kernel: Event timer "LAPIC" quality 400
Dec 25 22:36:25 db2 kernel: ACPI APIC Table: <A M I  OEMAPIC >
Dec 25 22:36:25 db2 kernel: FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
Dec 25 22:36:25 db2 kernel: FreeBSD/SMP: 2 package(s) x 1 core(s)
Dec 25 22:36:25 db2 kernel: cpu0 (BSP): APIC ID:  0
Dec 25 22:36:25 db2 kernel: cpu1 (AP): APIC ID:  6
Dec 25 22:36:25 db2 kernel: ioapic0 <Version 2.0> irqs 0-23 on motherboard
Dec 25 22:36:25 db2 kernel: ioapic1 <Version 2.0> irqs 24-47 on motherboard
Dec 25 22:36:25 db2 kernel: ioapic2 <Version 2.0> irqs 48-71 on motherboard
Dec 25 22:36:25 db2 kernel: ioapic3 <Version 2.0> irqs 72-95 on motherboard
Dec 25 22:36:25 db2 kernel: ioapic4 <Version 2.0> irqs 96-119 on motherboard
Dec 25 22:36:25 db2 kernel: kbd1 at kbdmux0
Dec 25 22:36:25 db2 kernel: random: <Software, Yarrow> initialized
Dec 25 22:36:25 db2 kernel: acpi0: <A M I OEMRSDT> on motherboard
Dec 25 22:36:25 db2 kernel: acpi0: Power Button (fixed)
Dec 25 22:36:25 db2 kernel: acpi0: reservation of 0, a0000 (3) failed
Dec 25 22:36:25 db2 kernel: acpi0: reservation of 100000, f7f00000 (3) failed
Dec 25 22:36:25 db2 kernel: cpu0: <ACPI CPU> on acpi0
Dec 25 22:36:25 db2 kernel: cpu1: <ACPI CPU> on acpi0
Dec 25 22:36:25 db2 kernel: attimer0: <AT timer> port 0x40-0x43 irq 0 on acpi0
Dec 25 22:36:25 db2 kernel: Timecounter "i8254" frequency 1193182 Hz quality 0
Dec 25 22:36:25 db2 kernel: Event timer "i8254" frequency 1193182 Hz quality 100
Dec 25 22:36:25 db2 kernel: atrtc0: <AT realtime clock> port 0x70-0x71 irq 8 on acpi0
Dec 25 22:36:25 db2 kernel: Event timer "RTC" frequency 32768 Hz quality 0
Dec 25 22:36:25 db2 kernel: Timecounter "ACPI-fast" frequency 3579545 Hz quality 900
Dec 25 22:36:25 db2 kernel: acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0
Dec 25 22:36:25 db2 kernel: pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
Dec 25 22:36:25 db2 kernel: pci0: <ACPI PCI bus> on pcib0
Dec 25 22:36:25 db2 kernel: pcib1: <ACPI PCI-PCI bridge> at device 3.0 on pci0
Dec 25 22:36:25 db2 kernel: pci6: <ACPI PCI bus> on pcib1
Dec 25 22:36:25 db2 kernel: pcib2: <ACPI PCI-PCI bridge> at device 29.0 on pci6
Dec 25 22:36:25 db2 kernel: pci8: <ACPI PCI bus> on pcib2
Dec 25 22:36:25 db2 kernel: pcib3: <ACPI PCI-PCI bridge> at device 31.0 on pci6
Dec 25 22:36:25 db2 kernel: pcib3: failed to allocate initial I/O port window: 0xc000-0xdfff
Dec 25 22:36:25 db2 kernel: pci7: <ACPI PCI bus> on pcib3
Dec 25 22:36:25 db2 kernel: ahc0: <Adaptec aic7899 Ultra160 SCSI adapter> mem 0xfe8fe000-0xfe8fefff irq 72 at device 6.0 on pci7
Dec 25 22:36:25 db2 kernel: ahc0: 0x100 bytes of rid 0x10 res 4 failed (0, 0xffffffff).
Dec 25 22:36:25 db2 kernel: ahc0: can't allocate register resources
Dec 25 22:36:25 db2 kernel: device_attach: ahc0 attach returned 12
Dec 25 22:36:25 db2 kernel: ahc0: <Adaptec aic7899 Ultra160 SCSI adapter> mem 0xfe8ff000-0xfe8fffff irq 73 at device 6.1 on pci7
Dec 25 22:36:25 db2 kernel: ahc0: 0x100 bytes of rid 0x10 res 4 failed (0, 0xffffffff).
Dec 25 22:36:25 db2 kernel: ahc0: can't allocate register resources
Dec 25 22:36:25 db2 kernel: device_attach: ahc0 attach returned 12
Dec 25 22:36:25 db2 kernel: pcib4: <ACPI PCI-PCI bridge> at device 4.0 on pci0
Dec 25 22:36:25 db2 kernel: pci2: <ACPI PCI bus> on pcib4
Dec 25 22:36:25 db2 kernel: pcib5: <ACPI PCI-PCI bridge> at device 29.0 on pci2
Dec 25 22:36:25 db2 kernel: pcib5: failed to allocate initial I/O port window: 0xb000-0xbfff
Dec 25 22:36:25 db2 kernel: pci5: <ACPI PCI bus> on pcib5
Dec 25 22:36:25 db2 kernel: em0: <Intel(R) PRO/1000 Legacy Network Connection 1.0.5> mem 0xfe680000-0xfe69ffff,0xfe660000-0xfe67ffff irq 48 at device 2.0 on pci5
Dec 25 22:36:25 db2 kernel: em0: 0x20 bytes of rid 0x20 res 4 failed (0, 0xffffffff).
Dec 25 22:36:25 db2 kernel: em0: Unable to allocate bus resource: ioport
Dec 25 22:36:25 db2 kernel: em0: Allocation of PCI resources failed
Dec 25 22:36:25 db2 kernel: device_attach: em0 attach returned 6
Dec 25 22:36:25 db2 kernel: em0: <Intel(R) PRO/1000 Legacy Network Connection 1.0.5> mem 0xfe6e0000-0xfe6fffff,0xfe6c0000-0xfe6dffff irq 49 at device 3.0 on pci5
Dec 25 22:36:25 db2 kernel: em0: 0x20 bytes of rid 0x20 res 4 failed (0, 0xffffffff).
Dec 25 22:36:25 db2 kernel: em0: Unable to allocate bus resource: ioport
Dec 25 22:36:25 db2 kernel: em0: Allocation of PCI resources failed
Dec 25 22:36:25 db2 kernel: device_attach: em0 attach returned 6
Dec 25 22:36:25 db2 kernel: pcib6: <ACPI PCI-PCI bridge> at device 31.0 on pci2
Dec 25 22:36:25 db2 kernel: pci3: <ACPI PCI bus> on pcib6
Dec 25 22:36:25 db2 kernel: pcib7: <PCI-PCI bridge> at device 1.0 on pci3
Dec 25 22:36:25 db2 kernel: pci4: <PCI bus> on pcib7
Dec 25 22:36:25 db2 kernel: mly0: <Mylex AcceleRAID 160> mem 0xff4fe000-0xff4fffff irq 24 at device 1.1 on pci3
Dec 25 22:36:25 db2 kernel: mly0: [GIANT-LOCKED]
Dec 25 22:36:25 db2 kernel: mly0: AcceleRAID 160  , 1 channel, firmware 6.00-8-00 (20010301), 16MB RAM
Dec 25 22:36:25 db2 kernel: uhci0: <Intel 82801CA/CAM (ICH3) USB controller USB-A> port 0xe400-0xe41f irq 16 at device 29.0 on pci0
Dec 25 22:36:25 db2 kernel: uhci0: LegSup = 0x2f00
Dec 25 22:36:25 db2 kernel: usbus0 on uhci0
Dec 25 22:36:25 db2 kernel: uhci1: <Intel 82801CA/CAM (ICH3) USB controller USB-B> port 0xe800-0xe81f irq 19 at device 29.1 on pci0
Dec 25 22:36:25 db2 kernel: uhci1: LegSup = 0x2f00
Dec 25 22:36:25 db2 kernel: usbus1 on uhci1
Dec 25 22:36:25 db2 kernel: pcib8: <ACPI PCI-PCI bridge> at device 30.0 on pci0
Dec 25 22:36:25 db2 kernel: pci1: <ACPI PCI bus> on pcib8
Dec 25 22:36:25 db2 kernel: vgapci0: <VGA-compatible display> port 0xa000-0xa0ff mem 0xfd000000-0xfdffffff,0xfe2ff000-0xfe2fffff irq 18 at device 9.0 on pci1
Dec 25 22:36:25 db2 kernel: vgapci0: Boot video device
Dec 25 22:36:25 db2 kernel: isab0: <PCI-ISA bridge> at device 31.0 on pci0
Dec 25 22:36:25 db2 kernel: isa0: <ISA bus> on isab0
Dec 25 22:36:25 db2 kernel: atapci0: <Intel ICH3 UDMA100 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xffa0-0xffaf at device 31.1 on pci0
Dec 25 22:36:25 db2 kernel: ata0: <ATA channel> at channel 0 on atapci0
Dec 25 22:36:25 db2 kernel: ata1: <ATA channel> at channel 1 on atapci0
Dec 25 22:36:25 db2 kernel: acpi_button0: <Power Button> on acpi0
Dec 25 22:36:25 db2 kernel: uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
Dec 25 22:36:25 db2 kernel: uart1: <16550 or compatible> port 0x2f8-0x2ff irq 3 on acpi0
Dec 25 22:36:25 db2 kernel: fdc0: <floppy drive controller (FDE)> port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0
Dec 25 22:36:25 db2 kernel: fd0: <1440-KB 3.5" drive> on fdc0 drive 0
Dec 25 22:36:25 db2 kernel: ppc0: <Parallel port> port 0x378-0x37f,0x778-0x77f irq 7 drq 3 on acpi0
Dec 25 22:36:25 db2 kernel: ppc0: Generic chipset (ECP/PS2/NIBBLE) in COMPATIBLE mode
Dec 25 22:36:25 db2 kernel: ppc0: FIFO with 16/16/8 bytes threshold
Dec 25 22:36:25 db2 kernel: ppbus0: <Parallel port bus> on ppc0
Dec 25 22:36:25 db2 kernel: lpt0: <Printer> on ppbus0
Dec 25 22:36:25 db2 kernel: lpt0: Interrupt-driven port
Dec 25 22:36:25 db2 kernel: ppi0: <Parallel I/O> on ppbus0
Dec 25 22:36:25 db2 kernel: atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
Dec 25 22:36:25 db2 kernel: atkbd0: <AT Keyboard> irq 1 on atkbdc0
Dec 25 22:36:25 db2 kernel: kbd0 at atkbd0
Dec 25 22:36:25 db2 kernel: atkbd0: [GIANT-LOCKED]
Dec 25 22:36:25 db2 kernel: pmtimer0 on isa0
Dec 25 22:36:25 db2 kernel: orm0: <ISA Option ROMs> at iomem 0xc0000-0xc7fff,0xc8000-0xc97ff,0xc9800-0xcafff,0xcb000-0xce7ff pnpid ORM0000 on isa0
Dec 25 22:36:25 db2 kernel: sc0: <System console> at flags 0x100 on isa0
Dec 25 22:36:25 db2 kernel: sc0: VGA <16 virtual consoles, flags=0x300>
Dec 25 22:36:25 db2 kernel: vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Dec 25 22:36:25 db2 kernel: p4tcc0: <CPU Frequency Thermal Control> on cpu0
Dec 25 22:36:25 db2 kernel: p4tcc1: <CPU Frequency Thermal Control> on cpu1
Dec 25 22:36:25 db2 kernel: Timecounters tick every 1.000 msec
Dec 25 22:36:25 db2 kernel: random: unblocking device.
Dec 25 22:36:25 db2 kernel: usbus0: 12Mbps Full Speed USB v1.0
Dec 25 22:36:25 db2 kernel: usbus1: 12Mbps Full Speed USB v1.0
Dec 25 22:36:25 db2 kernel: ugen1.1: <Intel> at usbus1
Dec 25 22:36:25 db2 kernel: uhub0: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1
Dec 25 22:36:25 db2 kernel: ugen0.1: <Intel> at usbus0
Dec 25 22:36:25 db2 kernel: uhub1: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
Dec 25 22:36:25 db2 kernel: da0 at mly0 bus 1 scbus0 target 0 lun 0
Dec 25 22:36:25 db2 kernel: da0: <RAID 1 online > Fixed Direct Access SCSI-3 device
Dec 25 22:36:25 db2 kernel: da0: 135.168MB/s transfers
Dec 25 22:36:25 db2 kernel: da0: 69984MB (143327232 512 byte sectors: 255H 63S/T 8921C)
Dec 25 22:36:25 db2 kernel: cd0 at ata0 bus 0 scbus2 target 0 lun 0
Dec 25 22:36:25 db2 kernel: cd0: <MITSUMI CD-ROM SR244W T01A> Removable CD-ROM SCSI-0 device
Dec 25 22:36:25 db2 kernel: cd0: 33.300MB/s transfers (UDMA2, ATAPI 12bytes, PIO 65534bytes)
Dec 25 22:36:25 db2 kernel: cd0: Attempt to query device size failed: NOT READY, Medium not present
Dec 25 22:36:25 db2 kernel: SMP: AP CPU #1 Launched!
Dec 25 22:36:25 db2 kernel: uhub0: 2 ports with 2 removable, self powered
Dec 25 22:36:25 db2 kernel: uhub1: 2 ports with 2 removable, self powered
Dec 25 22:36:25 db2 kernel: Trying to mount root from ufs:/dev/da0p2 [rw]...
Dec 25 22:36:26 db2 kernel: .

Code:
pciconf -lv
none3@pci0:5:2:0:   class=0x020000 card=0x30001458 chip=0x100d8086 rev=0x02 hdr=0x00
  vendor  = 'Intel Corporation'
  device  = '82544GC Gigabit Ethernet Controller (LOM)'
  class  = network
  subclass  = ethernet
none4@pci0:5:3:0:   class=0x020000 card=0x30001458 chip=0x100d8086 rev=0x02 hdr=0x00
  vendor  = 'Intel Corporation'
  device  = '82544GC Gigabit Ethernet Controller (LOM)'
  class  = network
  subclass  = ethernet
 
I am not sure what your problems are, but Googling for "em0: Unable to allocate bus resource: ioport" yields results indicating you may want to try disable PnP aware OS in your BIOS or set hw.pci.realloc_bars=1 in the /boot/loader.conf file.
 
I am not sure what your problems are, but Googling for "em0: Unable to allocate bus resource: ioport" yields results indicating you may want to try disable PnP aware OS in your BIOS or set hw.pci.realloc_bars=1 in the /boot/loader.conf file.

I have Googled this and tried this before, but it was not helpful. These NICs are fine on FreeBSD 8.4.

Code:
Dec 25 22:36:25 db2 kernel: em0: <Intel(R) PRO/1000 Legacy Network Connection 1.0.5> mem 0xfe680000-0xfe69ffff,0xfe660000-0xfe67ffff irq 48 at device 2.0 on pci5
Dec 25 22:36:25 db2 kernel: em0: 0x20 bytes of rid 0x20 res 4 failed (0, 0xffffffff).
Dec 25 22:36:25 db2 kernel: em0: Unable to allocate bus resource: ioport
Dec 25 22:36:25 db2 kernel: em0: Allocation of PCI resources failed
Dec 25 22:36:25 db2 kernel: device_attach: em0 attach returned 6
 
Using Intel 82573 nic built on my pdsbm-ln2 1U server and only one port will work. And my WIFI PCI card and dual legacy Intel NIC PCI will cause system to HALT on boot. If I pull those cards out the system will boot but only one port will work that is built on the motherboard. If I disable both with jumpers then I can use a PCI card in the system.

Refer to all the notes I did here
https://forum.pfsense.org/index.php?topic=84909.0

Here is my dmesg log
http://pastebin.com/tW9Qe3g2

Code:
em0: <Intel(R) PRO/1000 Network Connection 7.4.2> port 0x4000-0x401f irq 16 at device 0.0 on pci2
pcib0: allocated type 3 (0xd0200000-0xd02fffff) for rid 20 of pcib2
pcib2: allocated initial memory window of 0xd0200000-0xd02fffff
pcib2: allocated memory range (0xd0200000-0xd021ffff) for rid 10 of em0
em0: Lazy allocation of 0x20000 bytes rid 0x10 type 3 at 0xd0200000
em0: attempting to allocate 1 MSI vectors (1 supported)
msi: routing MSI IRQ 256 to local APIC 0 vector 51
em0: using IRQ 256 for MSI
em0: Using an MSI interrupt
em0: Setup of Shared code failed
device_attach: em0 attach returned 6
 
I have this in my loader.conf. I tried your hw.pci.realloc_bars=1 but it didn't seem to fix it.

Keep in mind Ubuntu and FreeBSD 8.1 and other distros do not seem to have any problem with this hardware. I've only found FreeBSD 10.1 to have this issue. What changed from 8.1 to 10.1 to kill my Intel built-in network ports?

Code:
autoboot_delay="3"
vm.kmem_size="435544320"
vm.kmem_size_max="535544320"
hw.acpi.host_mem_start="0xf0000000"
boot_verbose="1"
comconsole_speed="115200"
hw.usb.no_pf="1"
hw.pci.realloc_bars=1
 
I too have the same problem, my older servers (six of them) not running with 10.1. It all started for me after the removal of legacy Xorg and it has been going all downhill since. I'm back to running 8.4 on all of them and they are all running fine. I lost usable support for Intel network cards and video cards plus two Nvidia video cards quit working. I hope you have more luck with your problem then I have.
 
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196501
John Baldwin 2015-01-13 21:23:04 UTC said:
Try setting 'hint.agp.0.disabled=1' in loader.conf. agp0 allocates a page of address space that causes a trickle down effect where em0 and em1 have to allocate different BARs.

That said, em0/1 should be able to cope with the alternate BARs, though it may be that em0 doesn't work because em1's bridge is still decoding those addresses when em0 tries to probe. I bet that if we forced em0 to reattach it would actually work ok (e.g using my devctl thing that isn't in the tree yet).

Ultimately this is a PCI bus bug, not an em(4) issue.
Is 'hint.agp.0.disabled=1' useful on your servers?
 
Thanks for posting this. This resolved my issue with pfSense after upgrading from 2.1.5 to 2.2 (FreeBSD 8.3 to 10.1) on a watchguard XCS570 with dual Intel Pro/1000 onboard ports. Both ports in dmesg appeared named em0 with the same log messages as posted by topper727. Thanks again!
 
Unfortunately, 'hint.agp.0.disabled=1' not helpful for my very old server. After much Google, to disable New PCI-PCI brige driver to solve my problem.

Code:
nooptions  NEW_PCIB

If either 'hw.pci.realloc_bars=1' and 'hint.agp.0.disabled=1' are not helpful, I hope new kernel is helpful.

Should I report this issue on my so old server?
 
I guess you already have the newest BIOS installed etc. You should report it at least but given its very old hardware I don't think may be worth tracking it fully down.
For what its worth, my really old PCI-X dual NIC works fine (sits in a 32-bit PCI slot) out of the box so yours might be a rare fallout.

FreeBSD 11.0-CURRENT #0 r278472 - Old P4 box...

Code:
em0: <Intel(R) PRO/1000 Legacy Network Connection 1.0.6> port 0x2000-0x203f mem 0xd0180000-0xd019ffff,0xd0100000-0xd013ffff irq 21 at device 7.0 on pci6
em0: Ethernet address: 00:14:5e:XX:XX:XX
001.000049 [2718] netmap_attach  success for em0 tx 1/256 rx 1/256 queues/slots
em1: <Intel(R) PRO/1000 Legacy Network Connection 1.0.6> port 0x2040-0x207f mem 0xd01a0000-0xd01bffff,0xd0140000-0xd017ffff irq 22 at device 7.1 on pci6
em1: Ethernet address: 00:14:5e:XX:XX:XX
001.000051 [2718] netmap_attach  success for em1 tx 1/256 rx 1/256 queues/slots

em0@pci0:6:7:0: class=0x020000 card=0x02891014 chip=0x10798086 rev=0x03 hdr=0x00
  vendor  = 'Intel Corporation'
  device  = '82546GB Gigabit Ethernet Controller'
  class  = network
  subclass  = ethernet
em1@pci0:6:7:1: class=0x020000 card=0x02891014 chip=0x10798086 rev=0x03 hdr=0x00
  vendor  = 'Intel Corporation'
  device  = '82546GB Gigabit Ethernet Controller'
  class  = network
  subclass  = ethernet
From what I can tell this is the successor of your controller, IPv6 offloading and some other minor differences.
//Danne
 
Hello everyone,

I meet the same problem. I try to install pfsense 2.2.6 in NetAsq U70 Firewall Appliance. the chip is PC82573L Intel but... don't work :(

I changed a configuration file loader.conf with hw.pci.realloc_bars=1 and hint.agp.0.disabled=1 parameters.
but nothing.
Code:
em0: <Intel(R) PRO/1000 Network Connection 7.4.2> port 0xbf00-0xbf1f mem 0xcfde0000-0xcfdfffff irq 16 at device 0.0 on pci130  
em0: attempting to allocate 1 MSI vectors (1 supported)  
em0: No MSI/MSIX using a Legacy IRQ  
ioapic0: routing intpin 16 (PCI IRQ 16) to lapic 0 vector 57  
em0: bpf attached  
em0: Ethernet address: 00:0d:b4:08:69:cb

Jean-Alexandre
 
Back
Top