Re: OpenBSD 6.1 ix Intel 82598EB issue

2017-04-24 Thread Robert Blacquiere
On Mon, Apr 24, 2017 at 08:39:52PM +1000, Jonathan Gray wrote:
> On Mon, Apr 24, 2017 at 12:31:52PM +0200, Robert Blacquiere wrote:
> > 
> > Hi,
> > 
> > I have updated one of our machines from 6.0 to 6.1. 
> > It has 2  dual 10 gb interfaces . One of them a  Intel 82598EB based
> > dual card will not initialize any more. 
> > 
> > The other 10gig works and is based on Intel 82599. 
> > 
> > from dmesg: 
> > 
> > ix0 at pci2 dev 0 function 0 "Intel 82598EB" rev 0x01: mmba is not mem
> > space
> > ix1 at pci2 dev 0 function 1 "Intel 82598EB" rev 0x01: mmba is not mem
> > space
> > 
> > pcidump:
> > 
> > $ doas pcidump -v 2:0:0  
> >  2:0:0: Intel 82598EB
> > 0x: Vendor ID: 8086 Product ID: 10dd
> > 0x0004: Command: 0007 Status: 0010
> > 0x0008: Class: 02 Subclass: 00 Interface: 00 Revision: 01
> > 0x000c: BIST: 00 Header Type: 80 Latency Timer: 00 Cache Line
> > Size: 10
> > 0x0010: BAR mem 32bit addr: 0xfb22/0x0002
> > 0x0014: BAR mem 32bit addr: 0xfb1c/0x0004
> > 0x0018: BAR io addr: 0xe020/0x0020
> > 0x001c: BAR mem 32bit addr: 0xfb244000/0x4000
> > 0x0020: BAR empty ()
> > 0x0024: BAR empty ()
> > 0x0028: Cardbus CIS: 
> > 0x002c: Subsystem Vendor ID: 15d9 Product ID: af80
> > 0x0030: Expansion ROM Base Address: fb18
> > 0x0038: 
> > 0x003c: Interrupt Pin: 01 Line: 0b Min Gnt: 00 Max Lat: 00
> > 0x0040: Capability 0x01: Power Management
> > State: D0
> > 0x0050: Capability 0x05: Message Signalled Interrupts (MSI)
> > 0x0060: Capability 0x11: Extended Message Signalled Interrupts
> > (MSI-X)
> > 0x00a0: Capability 0x10: PCI Express
> > Link Speed: 2.5 / 2.5 GT/s Link Width: x4 / x8
> > 0x0100: Enhanced Capability 0x01: Advanced Error Reporting
> > 0x0140: Enhanced Capability 0x03: Device Serial Number
> > 
> > 
> > Any clues on how to enable them again?
> 
> Try this patch to not require a 64 bit BAR:
> 
> Index: sys/dev/pci/if_ix.c
> ===
> RCS file: /cvs/src/sys/dev/pci/if_ix.c,v
> retrieving revision 1.150
> diff -u -p -r1.150 if_ix.c
> --- sys/dev/pci/if_ix.c   24 Jan 2017 03:57:35 -  1.150
> +++ sys/dev/pci/if_ix.c   24 Apr 2017 10:37:09 -
> @@ -1550,8 +1550,7 @@ ixgbe_allocate_pci_resources(struct ix_s
>   int  val;
>  
>   val = pci_conf_read(pa->pa_pc, pa->pa_tag, PCIR_BAR(0));
> - if (PCI_MAPREG_TYPE(val) != PCI_MAPREG_TYPE_MEM ||
> - PCI_MAPREG_MEM_TYPE(val) != PCI_MAPREG_MEM_TYPE_64BIT) {
> + if (PCI_MAPREG_TYPE(val) != PCI_MAPREG_TYPE_MEM) {
>   printf(": mmba is not mem space\n");
>   return (ENXIO);
>   }
> 

With this patch the interfaces attach and are usable again. 

After you patch I looked at the BAR info it looks like the 82598EB uses
32bit BAR and the working 82599 use 62bit BAR. 

ix0 at pci2 dev 0 function 0 "Intel 82598EB" rev 0x01: msi, address
00:25:90:c2:04:06
ix1 at pci2 dev 0 function 1 "Intel 82598EB" rev 0x01: msi, address
00:25:90:c2:04:07
ix2 at pci4 dev 0 function 0 "Intel 82599" rev 0x01: msi, address
90:e2:ba:d9:eb:30
ix3 at pci4 dev 0 function 1 "Intel 82599" rev 0x01: msi, address
90:e2:ba:d9:eb:31


Will there be patch for this in stable? 


Regards

Robert Blacquiere



Re: OpenBSD 6.1 ix Intel 82598EB issue

2017-04-24 Thread Jonathan Gray
On Mon, Apr 24, 2017 at 12:31:52PM +0200, Robert Blacquiere wrote:
> 
> Hi,
> 
> I have updated one of our machines from 6.0 to 6.1. 
> It has 2  dual 10 gb interfaces . One of them a  Intel 82598EB based
> dual card will not initialize any more. 
> 
> The other 10gig works and is based on Intel 82599. 
> 
> from dmesg: 
> 
> ix0 at pci2 dev 0 function 0 "Intel 82598EB" rev 0x01: mmba is not mem
> space
> ix1 at pci2 dev 0 function 1 "Intel 82598EB" rev 0x01: mmba is not mem
> space
> 
> pcidump:
> 
> $ doas pcidump -v 2:0:0  
>  2:0:0: Intel 82598EB
> 0x: Vendor ID: 8086 Product ID: 10dd
> 0x0004: Command: 0007 Status: 0010
> 0x0008: Class: 02 Subclass: 00 Interface: 00 Revision: 01
> 0x000c: BIST: 00 Header Type: 80 Latency Timer: 00 Cache Line
> Size: 10
> 0x0010: BAR mem 32bit addr: 0xfb22/0x0002
> 0x0014: BAR mem 32bit addr: 0xfb1c/0x0004
> 0x0018: BAR io addr: 0xe020/0x0020
> 0x001c: BAR mem 32bit addr: 0xfb244000/0x4000
> 0x0020: BAR empty ()
> 0x0024: BAR empty ()
> 0x0028: Cardbus CIS: 
> 0x002c: Subsystem Vendor ID: 15d9 Product ID: af80
> 0x0030: Expansion ROM Base Address: fb18
> 0x0038: 
> 0x003c: Interrupt Pin: 01 Line: 0b Min Gnt: 00 Max Lat: 00
> 0x0040: Capability 0x01: Power Management
> State: D0
> 0x0050: Capability 0x05: Message Signalled Interrupts (MSI)
> 0x0060: Capability 0x11: Extended Message Signalled Interrupts
> (MSI-X)
> 0x00a0: Capability 0x10: PCI Express
> Link Speed: 2.5 / 2.5 GT/s Link Width: x4 / x8
> 0x0100: Enhanced Capability 0x01: Advanced Error Reporting
> 0x0140: Enhanced Capability 0x03: Device Serial Number
> 
> 
> Any clues on how to enable them again?

Try this patch to not require a 64 bit BAR:

Index: sys/dev/pci/if_ix.c
===
RCS file: /cvs/src/sys/dev/pci/if_ix.c,v
retrieving revision 1.150
diff -u -p -r1.150 if_ix.c
--- sys/dev/pci/if_ix.c 24 Jan 2017 03:57:35 -  1.150
+++ sys/dev/pci/if_ix.c 24 Apr 2017 10:37:09 -
@@ -1550,8 +1550,7 @@ ixgbe_allocate_pci_resources(struct ix_s
int  val;
 
val = pci_conf_read(pa->pa_pc, pa->pa_tag, PCIR_BAR(0));
-   if (PCI_MAPREG_TYPE(val) != PCI_MAPREG_TYPE_MEM ||
-   PCI_MAPREG_MEM_TYPE(val) != PCI_MAPREG_MEM_TYPE_64BIT) {
+   if (PCI_MAPREG_TYPE(val) != PCI_MAPREG_TYPE_MEM) {
printf(": mmba is not mem space\n");
return (ENXIO);
}



OpenBSD 6.1 ix Intel 82598EB issue

2017-04-24 Thread Robert Blacquiere

Hi,

I have updated one of our machines from 6.0 to 6.1. 
It has 2  dual 10 gb interfaces . One of them a  Intel 82598EB based
dual card will not initialize any more. 

The other 10gig works and is based on Intel 82599. 

from dmesg: 

ix0 at pci2 dev 0 function 0 "Intel 82598EB" rev 0x01: mmba is not mem
space
ix1 at pci2 dev 0 function 1 "Intel 82598EB" rev 0x01: mmba is not mem
space

pcidump:

$ doas pcidump -v 2:0:0  
 2:0:0: Intel 82598EB
0x: Vendor ID: 8086 Product ID: 10dd
0x0004: Command: 0007 Status: 0010
0x0008: Class: 02 Subclass: 00 Interface: 00 Revision: 01
0x000c: BIST: 00 Header Type: 80 Latency Timer: 00 Cache Line
Size: 10
0x0010: BAR mem 32bit addr: 0xfb22/0x0002
0x0014: BAR mem 32bit addr: 0xfb1c/0x0004
0x0018: BAR io addr: 0xe020/0x0020
0x001c: BAR mem 32bit addr: 0xfb244000/0x4000
0x0020: BAR empty ()
0x0024: BAR empty ()
0x0028: Cardbus CIS: 
0x002c: Subsystem Vendor ID: 15d9 Product ID: af80
0x0030: Expansion ROM Base Address: fb18
0x0038: 
0x003c: Interrupt Pin: 01 Line: 0b Min Gnt: 00 Max Lat: 00
0x0040: Capability 0x01: Power Management
State: D0
0x0050: Capability 0x05: Message Signalled Interrupts (MSI)
0x0060: Capability 0x11: Extended Message Signalled Interrupts
(MSI-X)
0x00a0: Capability 0x10: PCI Express
Link Speed: 2.5 / 2.5 GT/s Link Width: x4 / x8
0x0100: Enhanced Capability 0x01: Advanced Error Reporting
0x0140: Enhanced Capability 0x03: Device Serial Number


Any clues on how to enable them again?

Regards

Robert 

dmesg output:

OpenBSD 6.1 (GENERIC.MP) #20: Sat Apr  1 13:45:56 MDT 2017
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 17044955136 (16255MB)
avail mem = 16523698176 (15758MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.0 @ 0xec9b0 (60 entries)
bios0: vendor American Megatrends Inc. version "2.0a" date 08/01/2016
bios0: Supermicro Super Server
acpi0 at bios0: rev 2
acpi0: sleep states S0 S4 S5
acpi0: tables DSDT FACP APIC FPDT FIDT SPMI MCFG UEFI HPET WDDT SSDT
NITR SSDT SSDT PRAD DMAR
acpi0: wakeup devices IP2P(S4) EHC1(S4) EHC2(S4) RP01(S4) RP02(S4)
RP03(S4) RP04(S4) RP05(S4) RP06(S4) RP07(S4) RP08(S4) BR1A(S4) BR1B(S4)
BR2A(S4) BR2B(S4) BR2C(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Xeon(R) CPU E5-1620 v4 @ 3.50GHz, 3500.50 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,PQM,RDSEED,ADX,SMAP,PT,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: TSC frequency 3500503920 Hz
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 100MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Xeon(R) CPU E5-1620 v4 @ 3.50GHz, 3500.01 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,PQM,RDSEED,ADX,SMAP,PT,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Xeon(R) CPU E5-1620 v4 @ 3.50GHz, 3500.01 MHz
cpu2:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,PQM,RDSEED,ADX,SMAP,PT,SENSOR,ARAT
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Xeon(R) CPU E5-1620 v4 @ 3.50GHz, 3500.01 MHz
cpu3:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RD