From nobody@FreeBSD.ORG  Tue Sep 12 19:10:03 2000
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 826C637B423; Tue, 12 Sep 2000 19:10:03 -0700 (PDT)
Message-Id: <20000913021003.826C637B423@hub.freebsd.org>
Date: Tue, 12 Sep 2000 19:10:03 -0700 (PDT)
From: moride@portside.net
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@FreeBSD.org
Subject: Koutech PCI dual port serial card patch
X-Send-Pr-Version: www-1.0

>Number:         21242
>Category:       kern
>Synopsis:       Koutech PCI dual port serial card patch
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    murray
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 12 19:20:01 PDT 2000
>Closed-Date:    Fri Aug 31 23:00:09 PDT 2001
>Last-Modified:  Fri Aug 31 23:00:49 PDT 2001
>Originator:     Shigeki Moride
>Release:        FreeBSD 4.1-STABLE
>Organization:
>Environment:
FreeBSD ndm 4.1-STABLE FreeBSD 4.1-STABLE #23: Wed Sep  6 20:34:09 JST 2000
  root@portside.net:/usr/src/sys/compile/NDM  i386

>Description:
I was make a Koutech PCI dual port serial card patch.

Its card (http://www.koutech.com/ioflex-2S.htm) has Dual 16550 and shared IRQ.

original boot message was

Aug 28 20:34:00 ndm /kernel: pci0: <unknown card> (vendor=0x1407, dev=0x0110) at 20.0 irq 11
Aug 28 20:34:00 ndm /kernel: pci0: <unknown card> (vendor=0x1407, dev=0x0111) at 20.1 irq 11

after this patch

sio0: <Koutech IOFLEX-2S PCI Dual Port Serial> port 0xa800-0xa807 irq 11 at device 20.0 on pci0
sio0: moving to sio2
sio2: type 16550A
sio0: <Koutech IOFLEX-2S PCI Dual Port Serial> port 0xa400-0xa407 irq 11 at device 20.1 on pci0
sio0: moving to sio3
sio3: type 16550A

>How-To-Repeat:

>Fix:
sio.c probe table modification.

--- /sys/isa/sio.c.orig  Wed Aug 16 06:05:30 2000
+++ /sys/isa/sio.c       Tue Sep  5 21:49:53 2000
@@ -581,6 +581,8 @@
 static struct pci_ids pci_ids[] = {
        { 0x100812b9, "3COM PCI FaxModem", 0x10 },
        { 0x048011c1, "ActionTec 56k FAX PCI Modem", 0x14 },
+       { 0x01101407, "Koutech IOFLEX-2S PCI Dual Port Serial", 0x10 },
+       { 0x01111407, "Koutech IOFLEX-2S PCI Dual Port Serial", 0x10 },
        { 0x00000000, NULL, 0 }
 };


and kernerl configuration file modification.

# Serial (COM) ports
options         COM_MULTIPORT           #code for some cards with shared IRQs
device          sio0    at isa? port IO_COM1 flags 0x10 irq 4
device          sio1    at isa? port IO_COM2 irq 3
device          sio2    at pci? flags 0x201
device          sio3    at pci? flags 0x201

flags 0x201 meaning:
  shared IRQs and minor number of master port was 2.


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed 
State-Changed-By: murray 
State-Changed-When: Fri Aug 31 13:16:10 PDT 2001 
State-Changed-Why:  
Patch committed to -CURRENT, thanks!  It might be too late to get this 
into 4.4, but I will try. 



Responsible-Changed-From-To: freebsd-bugs->murray 
Responsible-Changed-By: murray 
Responsible-Changed-When: Fri Aug 31 13:16:10 PDT 2001 
Responsible-Changed-Why:  
My MFC reminder. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=21242 
State-Changed-From-To: analyzed->closed 
State-Changed-By: murray 
State-Changed-When: Fri Aug 31 23:00:09 PDT 2001 
State-Changed-Why:  
Patch has been applied to -STABLE.  Fix will be in FreeBSD 4.4. 
Thanks! 


http://www.FreeBSD.org/cgi/query-pr.cgi?pr=21242 
>Unformatted:
