こんばんは、ひろひとです。

先日、インターフェース社の2ポートRS-232拡張カード PCI-4141Pを
FreeBSDで扱う機会がありましたので、結果を報告します。


■結果
 PUC(4)経由で、2ポートとも使うことができる。

■潰せなかった問題点
 高速で通信を行うと、 搭載されているハードウェアFIFO (64byte)以上の
 データを、ごくまれに取りこぼす。

■環境
 CPU: Celeron4  2.1GHz
 ChipSet: i845E
 OS: FreeBSD 6.2R

■pciconf
 初期状態では、以下の通りです。
 [EMAIL PROTECTED]:2:0: class=0xff0000 card=0x00011147 chip=0x102d1147 rev=0x03 
hdr=0x00
     vendor   = 'Interface Corp'

■使い方
 /usr/src/sys/dev/puc/pucdata.c ファイルへ、以下のパッチを当てます。


*** pucdata.c.orig      Tue Sep  5 03:52:09 2006
--- pucdata.c   Tue Apr 24 23:42:24 2007
***************
*** 1294,1298 ****
--- 1294,1308 ----
            },
        },
  
+       /* Interface corp. for industrial PCI serial card */
+       {   "Interface PCI-4141P Dual port RS-232 card",
+           {   0x1147, 0x102d, 0,      0       },
+           {   0xffff, 0xffff, 0,      0       },
+           {
+               { PUC_PORT_TYPE_COM, 0x14, 0x00, COM_FREQ },
+               { PUC_PORT_TYPE_COM, 0x18, 0x00, COM_FREQ },
+           },
+       },
+ 
        { 0 }
  };

/usr/share/misc/pci_vendors ファイルへ、以下のエントリを追加します。
1147    Interface Corp
        102d    PCI-4141P Dual port RS-232 interface

GENERICカーネルコンフィグファイルをベースに、以下の変更を加えて
カーネルのコンパイル&インストールします。
     device puc                 # コメントアウトされている
     options PUC_FASTINTR       # 追加する

インストールが終わったら、リブートすればsio4とsio5で使えるようになります。


■リブート後
(dmesg)
puc0: <Interface PCI-4141P Dual port RS-232 card> port 
0x9000-0x900f,0x9400-0x9407,0x9800-0x9807 irq 22 at device 2.0 on pci2
sio4: <Interface PCI-4141P Dual port RS-232 card> on puc0
sio4: type 16550A
sio5: <Interface PCI-4141P Dual port RS-232 card> on puc0
sio5: type 16550A

(pciconf -lv)
[EMAIL PROTECTED]:2:0: class=0xff0000 card=0x00011147 chip=0x102d1147 rev=0x03 
hdr=0x00
    vendor   = 'Interface Corp'
    device   = 'PCI-4141P Dual port RS-232 interface'



p.s.
こういうFA系ボードのFreeBSDドライバって、需要はあるんでしょうか?

--
ひろひと

メールによる返信