Hi,

I recently bought a PCI express card[1] with two UARTs, but OpenBSD/amd64
4.9-beta doesn't recognize it.

pcidump says following:
 2:0:0: Oxford unknown
        0x0000: Vendor ID: 1415 Product ID: c158
        0x0004: Command: 0107 Status ID: 0010
        0x0008: Class: 07 Subclass: 00 Interface: 02 Revision: 00
        0x000c: BIST: 00 Header Type: 00 Latency Timer: 00 Cache Line Size: 10
        0x0010: BAR mem 32bit addr: 0xfe9fc000/0x00004000
        0x0014: BAR mem 32bit addr: 0xfe600000/0x00200000
        0x0018: BAR mem 32bit addr: 0xfe400000/0x00200000
        0x001c: BAR empty (00000000)
        0x0020: BAR empty (00000000)
        0x0024: BAR empty (00000000)
        0x0028: Cardbus CIS: 00000000
        0x002c: Subsystem Vendor ID: 1415 Product ID: c158
        0x0030: Expansion ROM Base Address: 00000000
        0x0038: 00000000
        0x003c: Interrupt Pin: 01 Line: 0b Min Gnt: 00 Max Lat: 00
        0x0040: Capability 0x01: Power Management
        0x0070: Capability 0x10: PCI Express
                Link Speed: 2.5 / 2.5 Gb/s Link Width: x1 / x1
        0x00b0: Capability 0x11: Extended Message Signaled Interrupts (MSI-X)

The card seems to use some Oxford chip. I tried to add the product id to
the pcidevs list and to pucdata.c, but whole system freezes in a few seconds
after boot (keyboard/mouse/network/ssh not working). Usually at the point
when xdm had been started.

Does anyone have any idea what I should put to pucdata.c? My current
entry was a pure guess. (Is there any datasheet about the chipset
available?)

The card itself seems to be ok, since Fedora 14 recognizes it and
both UARTs work as expected.

dmesg (without any patches) and my patching attempt below.
OpenBSD 4.9-beta (GENERIC.MP) #780: Thu Jan 20 17:21:34 MST 2011
    t...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 3487105024 (3325MB)
avail mem = 3380256768 (3223MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.5 @ 0x9f000 (68 entries)
bios0: vendor American Megatrends Inc. version "2103" date 06/18/2010
bios0: ASUSTeK Computer INC. M4A785TD-V EVO
acpi at bios0 not configured
mpbios0 at bios0: Intel MP Specification 1.4
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD Phenom(tm) II X4 965 Processor, 3415.69 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,CX16,POPCNT,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 
16-way L2 cache
cpu0: ITLB 32 4KB entries fully associative, 16 4MB entries fully associative
cpu0: DTLB 48 4KB entries fully associative, 48 4MB entries fully associative
cpu0: apic clock running at 200MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD Phenom(tm) II X4 965 Processor, 3415.23 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,CX16,POPCNT,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW
cpu1: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 
16-way L2 cache
cpu1: ITLB 32 4KB entries fully associative, 16 4MB entries fully associative
cpu1: DTLB 48 4KB entries fully associative, 48 4MB entries fully associative
cpu2 at mainbus0: apid 2 (application processor)
cpu2: AMD Phenom(tm) II X4 965 Processor, 3415.23 MHz
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,CX16,POPCNT,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW
cpu2: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 
16-way L2 cache
cpu2: ITLB 32 4KB entries fully associative, 16 4MB entries fully associative
cpu2: DTLB 48 4KB entries fully associative, 48 4MB entries fully associative
cpu3 at mainbus0: apid 3 (application processor)
cpu3: AMD Phenom(tm) II X4 965 Processor, 3415.23 MHz
cpu3: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,CX16,POPCNT,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW
cpu3: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 
16-way L2 cache
cpu3: ITLB 32 4KB entries fully associative, 16 4MB entries fully associative
cpu3: DTLB 48 4KB entries fully associative, 48 4MB entries fully associative
mpbios0: bus 0 is type PCI   
mpbios0: bus 1 is type PCI   
mpbios0: bus 2 is type PCI   
mpbios0: bus 3 is type PCI   
mpbios0: bus 4 is type PCI   
mpbios0: bus 5 is type ISA   
ioapic0 at mainbus0: apid 4 pa 0xfec00000, version 21, 24 pins
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "AMD RS780 Host" rev 0x00
ppb0 at pci0 dev 2 function 0 "AMD RS780 PCIE" rev 0x00: apic 4 int 18 (irq 10)
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "ATI Radeon HD 4890" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
radeondrm0 at vga1: apic 4 int 18 (irq 10)
drm0 at radeondrm0
azalia0 at pci1 dev 0 function 1 "ATI Radeon HD 48xx HD Audio" rev 0x00: apic 4 
int 19 (irq 10)
azalia0: no supported codecs
azalia0: initialization failure, detaching
ppb1 at pci0 dev 4 function 0 "AMD RS780 PCIE" rev 0x00: apic 4 int 16 (irq 11)
pci2 at ppb1 bus 2
vendor "Oxford", unknown product 0xc158 (class communications subclass serial, 
rev 0x00) at pci2 dev 0 function 0 not configured
ppb2 at pci0 dev 10 function 0 "AMD RS780 PCIE" rev 0x00: apic 4 int 18 (irq 10)
pci3 at ppb2 bus 3
re0 at pci3 dev 0 function 0 "Realtek 8168" rev 0x03: RTL8168D/8111D (0x2800), 
apic 4 int 18 (irq 10), address e0:cb:4e:ba:49:d2
rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 2
ahci0 at pci0 dev 17 function 0 "ATI SBx00 SATA" rev 0x00: apic 4 int 22 (irq 
10), AHCI 1.1
ahci0: ccb in slot 1 errored
ahci0: timed out 1, active 0, count 0
ahci0: ccb in slot 1 errored
ahci0: timed out 1, active 0, count 0
ahci0: ccb in slot 1 errored
ahci0: timed out 1, active 0, count 0
ahci0: ccb in slot 1 errored
ahci0: timed out 1, active 0, count 0
ahci0: ccb in slot 1 errored
ahci0: timed out 1, active 0, count 0
ahci0: ccb in slot 1 errored
ahci0: timed out 1, active 0, count 0
scsibus0 at ahci0: 32 targets
sd0 at scsibus0 targ 0 lun 0: <ATA, Kingston SSDNow, B090> SCSI3 0/direct fixed
sd0: 61057MB, 512 bytes/sec, 125045424 sec total
sd1 at scsibus0 targ 1 lun 0: <ATA, WDC WD1500HLFS-0, 04.0> SCSI3 0/direct fixed
sd1: 143089MB, 512 bytes/sec, 293046768 sec total
sd2 at scsibus0 targ 2 lun 0: <ATA, WDC WD1500HLFS-0, 04.0> SCSI3 0/direct fixed
sd2: 143089MB, 512 bytes/sec, 293046768 sec total
ohci0 at pci0 dev 18 function 0 "ATI SB700 USB" rev 0x00: apic 4 int 16 (irq 
11), version 1.0, legacy support
ohci1 at pci0 dev 18 function 1 "ATI SB700 USB" rev 0x00: apic 4 int 16 (irq 
11), version 1.0, legacy support
ehci0 at pci0 dev 18 function 2 "ATI SB700 USB2" rev 0x00: apic 4 int 17 (irq 
11)
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "ATI EHCI root hub" rev 2.00/1.00 addr 1
ohci2 at pci0 dev 19 function 0 "ATI SB700 USB" rev 0x00: apic 4 int 18 (irq 
10), version 1.0, legacy support
ohci3 at pci0 dev 19 function 1 "ATI SB700 USB" rev 0x00: apic 4 int 18 (irq 
10), version 1.0, legacy support
ehci1 at pci0 dev 19 function 2 "ATI SB700 USB2" rev 0x00: apic 4 int 19 (irq 
10)
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 "ATI EHCI root hub" rev 2.00/1.00 addr 1
piixpm0 at pci0 dev 20 function 0 "ATI SBx00 SMBus" rev 0x3c: SMI
iic0 at piixpm0
iic0: addr 0x20 01=19 02=24 03=2e 04=00 05=00 06=00 07=00 08=00 09=00 0a=10 
0b=10 0c=10 0d=10 0e=28 0f=8c 10=3d 11=00 12=00 13=00 14=0a 15=0a 16=38 17=a4 
18=e0 1a=ae 1b=a4 1c=b3 1d=00 1e=0c 1f=01 20=01 21=01 22=01 23=bb 3e=bb b2=09 
b3=27 b5=09 words 00=ff19 01=1924 02=242e 03=2e00 04=0000 05=0000 06=0000 
07=0000
spdmem0 at iic0 addr 0x52: 2GB DDR3 SDRAM PC3-10600
spdmem1 at iic0 addr 0x53: 2GB DDR3 SDRAM PC3-10600
pciide0 at pci0 dev 20 function 1 "ATI SB700 IDE" rev 0x00: DMA, channel 0 
configured to compatibility, channel 1 configured to compatibility
atapiscsi0 at pciide0 channel 1 drive 0
scsibus1 at atapiscsi0: 2 targets
cd0 at scsibus1 targ 0 lun 0: <HL-DT-ST, DVDRAM GH22LS50, TL02> ATAPI 5/cdrom 
removable
wd0 at pciide0 channel 1 drive 1: <ST3500418AS>
wd0: 16-sector PIO, LBA48, 476940MB, 976773168 sectors
cd0(pciide0:1:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 5
wd0(pciide0:1:1): using PIO mode 4, DMA mode 2, Ultra-DMA mode 6
azalia1 at pci0 dev 20 function 2 "ATI SBx00 HD Audio" rev 0x00: apic 4 int 16 
(irq 11)
azalia1: codecs: VIA/0x0397
audio0 at azalia1
pcib0 at pci0 dev 20 function 3 "ATI SB700 ISA" rev 0x00
ppb3 at pci0 dev 20 function 4 "ATI SB600 PCI" rev 0x00
pci4 at ppb3 bus 4
em0 at pci4 dev 7 function 0 "Intel PRO/1000GT (82541GI)" rev 0x05: apic 4 int 
22 (irq 10), address 00:1b:21:54:4b:8d
"VIA VT6306 FireWire" rev 0xc0 at pci4 dev 8 function 0 not configured
ohci4 at pci0 dev 20 function 5 "ATI SB700 USB" rev 0x00: apic 4 int 18 (irq 
10), version 1.0, legacy support
pchb1 at pci0 dev 24 function 0 "AMD AMD64 10h HyperTransport" rev 0x00
pchb2 at pci0 dev 24 function 1 "AMD AMD64 10h Address Map" rev 0x00
pchb3 at pci0 dev 24 function 2 "AMD AMD64 10h DRAM Cfg" rev 0x00
km0 at pci0 dev 24 function 3 "AMD AMD64 10h Misc Cfg" rev 0x00
pchb4 at pci0 dev 24 function 4 "AMD AMD64 10h Link Cfg" rev 0x00
usb2 at ohci0: USB revision 1.0
uhub2 at usb2 "ATI OHCI root hub" rev 1.00/1.00 addr 1
usb3 at ohci1: USB revision 1.0
uhub3 at usb3 "ATI OHCI root hub" rev 1.00/1.00 addr 1
usb4 at ohci2: USB revision 1.0
uhub4 at usb4 "ATI OHCI root hub" rev 1.00/1.00 addr 1
usb5 at ohci3: USB revision 1.0
uhub5 at usb5 "ATI OHCI root hub" rev 1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
it0 at isa0 port 0x2e/2: IT8712F rev 8, EC port 0x290
usb6 at ohci4: USB revision 1.0
uhub6 at usb6 "ATI OHCI root hub" rev 1.00/1.00 addr 1
mtrr: Pentium Pro MTRR support
rum0 at uhub0 port 1 "Ralink Technology RT2573" rev 2.00/0.01 addr 2
rum0: MAC/BBP RT2573 (rev 0x2573a), RF RT2528, address 00:0e:2e:c4:a9:de
ulpt0 at uhub2 port 2 configuration 1 interface 0 "Brother HL-1450 series" rev 
1.00/1.00 addr 2
ulpt0: using bi-directional mode
uhidev0 at uhub3 port 2 configuration 1 interface 0 "Logitech USB Optical 
Mouse" rev 2.00/43.01 addr 2
uhidev0: iclass 3/1
ums0 at uhidev0: 3 buttons, Z dir
wsmouse0 at ums0 mux 0
uhidev1 at uhub3 port 3 configuration 1 interface 0 "BTC USB Multimedia 
Keyboard" rev 1.10/1.00 addr 3
uhidev1: iclass 3/1
ukbd0 at uhidev1: 8 modifier keys, 6 key codes
wskbd1 at ukbd0 mux 1
wskbd1: connecting to wsdisplay0
uhidev2 at uhub3 port 3 configuration 1 interface 1 "BTC USB Multimedia 
Keyboard" rev 1.10/1.00 addr 3
uhidev2: iclass 3/0, 3 report ids
uhid0 at uhidev2 reportid 1: input=1, output=0, feature=0
uhid1 at uhidev2 reportid 2: input=3, output=0, feature=0
uhid2 at uhidev2 reportid 3: input=3, output=0, feature=8
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
softraid0: sd3 was not shutdown properly
scsibus3 at softraid0: 1 targets
sd3 at scsibus3 targ 0 lun 0: <OPENBSD, SR RAID 0, 004> SCSI2 0/direct fixed
sd3: 286172MB, 512 bytes/sec, 586082048 sec total
root on sd0a swap on sd0b dump on sd0b
WARNING: / was not properly unmounted
umass0 at uhub0 port 4 configuration 1 interface 0 "JMicron USB to ATA/ATAPI 
Bridge" rev 2.00/1.00 addr 3
umass0: using SCSI over Bulk-Only
scsibus4 at umass0: 2 targets, initiator 0
sd4 at scsibus4 targ 1 lun 0: <ST350041, 8AS, > SCSI2 0/direct fixed
sd4: 476940MB, 512 bytes/sec, 976773168 sec total


Index: dev/pci/pcidevs
===================================================================
RCS file: /cvs/src/sys/dev/pci/pcidevs,v
retrieving revision 1.1590
diff -u -p -r1.1590 pcidevs
--- dev/pci/pcidevs     26 Jan 2011 07:09:09 -0000      1.1590
+++ dev/pci/pcidevs     7 Mar 2011 19:35:44 -0000
@@ -4481,6 +4481,7 @@ product OXFORD2 EXSYS_EX41098     0x9511  Exs
 product OXFORD2 OX16PCI954P    0x9513  OX16PCI954 Parallel
 product OXFORD2 OX16PCI952     0x9521  OX16PCI952
 product OXFORD2 OX16PCI952P    0x9523  OX16PCI952 Parallel
+product OXFORD2 OX16PCIE952    0xc158  OX16PCIE952
 
 /* Pacific Data products */
 product PDC QSTOR_SATA         0x2068  QStor SATA
Index: dev/pci/pcidevs.h
===================================================================
RCS file: /cvs/src/sys/dev/pci/pcidevs.h,v
retrieving revision 1.1587
diff -u -p -r1.1587 pcidevs.h
--- dev/pci/pcidevs.h   26 Jan 2011 07:10:53 -0000      1.1587
+++ dev/pci/pcidevs.h   7 Mar 2011 19:35:46 -0000
@@ -4486,6 +4486,7 @@
 #define        PCI_PRODUCT_OXFORD2_OX16PCI954P 0x9513          /* OX16PCI954 
Parallel */
 #define        PCI_PRODUCT_OXFORD2_OX16PCI952  0x9521          /* OX16PCI952 */
 #define        PCI_PRODUCT_OXFORD2_OX16PCI952P 0x9523          /* OX16PCI952 
Parallel */
+#define        PCI_PRODUCT_OXFORD2_OX16PCIE952 0xc158          /* OX16PCIE952 
*/
 
 /* Pacific Data products */
 #define        PCI_PRODUCT_PDC_QSTOR_SATA      0x2068          /* QStor SATA */
Index: dev/pci/pcidevs_data.h
===================================================================
RCS file: /cvs/src/sys/dev/pci/pcidevs_data.h,v
retrieving revision 1.1582
diff -u -p -r1.1582 pcidevs_data.h
--- dev/pci/pcidevs_data.h      26 Jan 2011 07:10:53 -0000      1.1582
+++ dev/pci/pcidevs_data.h      7 Mar 2011 19:35:49 -0000
@@ -15040,6 +15040,10 @@ static const struct pci_known_product pc
            "OX16PCI952 Parallel",
        },
        {
+           PCI_VENDOR_OXFORD2, PCI_PRODUCT_OXFORD2_OX16PCIE952,
+           "OX16PCIE952",
+       },
+       {
            PCI_VENDOR_PDC, PCI_PRODUCT_PDC_QSTOR_SATA,
            "QStor SATA",
        },
Index: dev/pci/pucdata.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/pucdata.c,v
retrieving revision 1.72
diff -u -p -r1.72 pucdata.c
--- dev/pci/pucdata.c   22 Jul 2010 17:16:10 -0000      1.72
+++ dev/pci/pucdata.c   7 Mar 2011 19:35:50 -0000
@@ -897,6 +897,17 @@ const struct puc_device_description puc_
                { PUC_PORT_TYPE_COM, 0x14, 0x00, COM_FREQ },
            },
        },
+#if 1  
+       /* Oxford Semiconductor OX16PCIE952 PCIe `950 UARTs - 128 byte FIFOs */
+       {   /* "Oxford Semiconductor OX16PCIE952 UARTs", */
+           {   PCI_VENDOR_OXFORD2, PCI_PRODUCT_OXFORD2_OX16PCIE952,    0, 0 },
+           {   0xffff, 0xffff,                                         0, 0 },
+           {
+               { PUC_PORT_TYPE_COM, 0x10, 0x200, COM_FREQ },
+               { PUC_PORT_TYPE_COM, 0x14, 0x200, COM_FREQ },
+           },
+       },
+#endif
 
        /* Oxford Semiconductor OX16PCI952 PCI Parallel port */
        {   /* "Oxford Semiconductor OX16PCI952 Parallel port", */


-- 
Tero Koskinen <tero.koski...@iki.fi>

[1] 
http://www.delock.com/produkte/gruppen/pci-express/Delock_PCI_Express_2_x_Serial_89220.html

Reply via email to