puc(4) not attaching to NM9845-based serial card in 6.3-p5

Darren Pilgrim phi at evilphi.com
Sun Nov 16 16:40:14 PST 2008


Darren Pilgrim wrote:
> I have the following PCI, 4-port serial card:
> 
> none2 at pci6:2:0: class=0x070002 card=0x00041000 chip=0x98459710 rev=0x01 
> hdr=0x00
>      vendor     = 'MosChip Semiconductors (Was: Netmos Technology)'
>      device     = 'Nm9845 Parallel/Serial Port Adapter'
>      class      = simple comms
>      subclass   = UART
> 
> This is supposedly supported by puc(4); however, I'm unable to get the 
> driver to attach to the card.  I tried both uart+puc and sio+puc.  In 
> all both case, the uart/sio drivers attach to only the serial port on 
> the motherboard.  There are a number of hits on the mailing list 
> archives that discuss puc(4) not attaching to this device, but none 
> provide any conclusive answers.

After much searching, I finally found a message from Marcel Moolenaar to 
freebsd-stable date 2008-05-06 regarding PCI serial cards working in 6.2 
but not 6.3.  The issue (and mine) were due to a problem with v1.51.2.3 
of sys/dev/puc/pucdata.c and caused by the commit to add support for the 
six-port version of my card.  The following change:

--- pucdata.c.orig      2006-12-15 14:31:37.000000000 -0800
+++ pucdata.c   2008-11-16 15:34:50.000000000 -0800
@@ -946,7 +946,7 @@

         /* NetMos 4S0P PCI: 4S, 0P */
         {   "NetMos NM9845 Quad UART",
-           {   0x9710, 0x9845, 0,      0x0014  },
+           {   0x9710, 0x9845, 0,      0x0004  },
             {   0xffff, 0xffff, 0,      0xffff  },
             {
                 { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },

Fixes the issue and I now have:

# dmesg | egrep '(uart|puc)'
Preloaded elf module "/boot/kernel/uart.ko" at 0xc08312c4.
Preloaded elf module "/boot/kernel/puc.ko" at 0xc0831370.
puc0: <NetMos NM9845 Quad UART> port 
0x1060-0x1067,0x1058-0x105f,0x1050-0x1057,0
x1048-0x104f,0x1040-0x1047,0x1020-0x102f irq 18 at device 2.0 on pci6
puc: name: NetMos NM9845 Quad UART
puc0: Reserved 0x8 bytes for rid 0x10 type 4 at 0x1060
puc0: Reserved 0x8 bytes for rid 0x14 type 4 at 0x1058
puc0: Reserved 0x8 bytes for rid 0x18 type 4 at 0x1050
puc0: Reserved 0x8 bytes for rid 0x1c type 4 at 0x1048
puc: Using uart0
puc: type 1, bar 10, offset 0
puc_alloc_resource: pdev 0xc4c37d60, looking for t 4, r 0
puc_alloc_resource: pdev 0xc4c37d60, looking for t 4, r 0
uart0: <Non-standard ns8250 class UART with FIFOs> on puc0
puc_alloc_resource: pdev 0xc4c37d60, looking for t 4, r 0
puc_alloc_resource: pdev 0xc4c37d60, looking for t 1, r 0
puc: Using uart1
puc: type 1, bar 14, offset 0
puc_alloc_resource: pdev 0xc4c37ca0, looking for t 4, r 0
puc_alloc_resource: pdev 0xc4c37ca0, looking for t 4, r 0
uart1: <16950 or compatible> on puc0
puc_alloc_resource: pdev 0xc4c37ca0, looking for t 4, r 0
puc_alloc_resource: pdev 0xc4c37ca0, looking for t 1, r 0
puc: Using uart2
puc: type 1, bar 18, offset 0
puc_alloc_resource: pdev 0xc4c37be0, looking for t 4, r 0
puc_alloc_resource: pdev 0xc4c37be0, looking for t 4, r 0
uart2: <16550 or compatible> on puc0
puc_alloc_resource: pdev 0xc4c37be0, looking for t 4, r 0
puc_alloc_resource: pdev 0xc4c37be0, looking for t 1, r 0
puc: Using uart3
puc: type 1, bar 1c, offset 0
puc_alloc_resource: pdev 0xc4c37b20, looking for t 4, r 0
puc_alloc_resource: pdev 0xc4c37b20, looking for t 4, r 0
uart3: <16550 or compatible> on puc0
puc_alloc_resource: pdev 0xc4c37b20, looking for t 4, r 0
puc_alloc_resource: pdev 0xc4c37b20, looking for t 1, r 0
uart4: <16550 or compatible> port 0x3f8-0x3ff irq 4 on acpi0


More information about the freebsd-questions mailing list