Date: Mon, 25 Mar 2002 07:44:09 +0000 (UTC)
From: Valentin Davydov <val@sqdp.trc-net.co.jp>
Newsgroups: fido7.ru.unix.bsd
Subject: [FreeBSD] Патч для преодаления ограничения в 32 порта в sio
>У меня уже стоит четыре восьмипортовки в тачке (Zelax MAK-82) (FreeBSD 3.5).
>Хотел вставить еще одну, но напоролся на ограничение: 32 порта в sio.
>Можно как-нибудь побороть это ограничение?
Попробуй пропатчить три файла (результат не гарантирую!!!):
*** /usr/src/sys/isa/sio.c Thu Dec 6 16:32:33 2001
--- sio.c Fri Mar 22 16:14:26 2002
***************
*** 106,115 ****
#define LOTS_OF_EVENTS 64 /* helps separate urgent events from input */
*** /usr/src/share/man/man4/sio.4 Wed Mar 1 17:50:19 2000
--- sio.4 Fri Mar 22 17:04:39 2002
***************
*** 86,92 ****
device is reserved for low-level IO (e. g. for remote kernel debugging)
.It 0x00080
use this port for remote kernel debugging
! .It 0x0 Ns Em ?? Ns 00
minor number of master port
.It 0x20000
device is assumed to use a 16650A-type (extended FIFO) chip
--- 86,92 ----
device is reserved for low-level IO (e. g. for remote kernel debugging)
.It 0x00080
use this port for remote kernel debugging
! .It 0x Ns Em ??? Ns 00
minor number of master port
.It 0x20000
device is assumed to use a 16650A-type (extended FIFO) chip
***************
*** 94,100 ****
.Pp
Minor numbering:
.br
! 0bfIOLIMMMMMfR
.br
callfBOfRut
.br
--- 94,100 ----
.Pp
Minor numbering:
.br
! 0bfIOLIMMMMMMfR
.br
callfBOfRut
.br
***************
*** 191,197 ****
.Nm sio
driver can be used for both `callin' and `callout'.
For each port there is a callin device and a callout device.
! The minor number of the callout device is 128 higher
than that of the corresponding callin port.
The callin device is general purpose.
Processes opening it normally wait for carrier
--- 191,197 ----
.Nm sio
driver can be used for both `callin' and `callout'.
For each port there is a callin device and a callout device.
! The minor number of the callout device is 256 higher
than that of the corresponding callin port.
The callin device is general purpose.
Processes opening it normally wait for carrier
***************
*** 209,217 ****
.Nm sio
driver also supports an initial-state and a lock-state control
device for each of the callin and the callout "data" devices.
! The minor number of the initial-state device is 32 higher
than that of the corresponding data device.
! The minor number of the lock-state device is 64 higher
than that of the corresponding data device.
The termios settings of a data device are copied
from those of the corresponding initial-state device
--- 209,217 ----
.Nm sio
driver also supports an initial-state and a lock-state control
device for each of the callin and the callout "data" devices.
! The minor number of the initial-state device is 64 higher
than that of the corresponding data device.
! The minor number of the lock-state device is 128 higher
than that of the corresponding data device.
The termios settings of a data device are copied
from those of the corresponding initial-state device
***************
*** 266,272 ****
examples of setting the initial-state and lock-state devices
.El
.Pp
! The devices numbers are made from the set [0-9a-v] so that more than
10 ports can be supported.
.Sh DIAGNOSTICS
.Bl -diag
--- 266,272 ----
examples of setting the initial-state and lock-state devices
.El
.Pp
! The devices numbers are made from the set [0-9a-zA-Z@_] so that more than
10 ports can be supported.
.Sh DIAGNOSTICS
.Bl -diag
*** /usr/src/etc/MAKEDEV Thu Dec 6 16:16:40 2001
--- MAKEDEV Fri Mar 22 16:47:43 2002
***************
*** 206,212 ****
a) m=10;; b) m=11;; c) m=12;; d) m=13;; e) m=14;; f) m=15;; g) m=16;;
h) m=17;; i) m=18;; j) m=19;; k) m=20;; l) m=21;; m) m=22;; n) m=23;;
o) m=24;; p) m=25;; q) m=26;; r) m=27;; s) m=28;; t) m=29;; u) m=30;;
! v) m=31;;
*) m="?";;
esac
echo $m
--- 206,216 ----
a) m=10;; b) m=11;; c) m=12;; d) m=13;; e) m=14;; f) m=15;; g) m=16;;
h) m=17;; i) m=18;; j) m=19;; k) m=20;; l) m=21;; m) m=22;; n) m=23;;
o) m=24;; p) m=25;; q) m=26;; r) m=27;; s) m=28;; t) m=29;; u) m=30;;
! v) m=31;; w) m=32;; x) m=33;; y) m=34;; z) m=35;; A) m=36;; B) m=37;;
! C) m=38;; D) m=39;; E) m=40;; F) m=41;; G) m=42;; H) m=43;; I) m=44;;
! J) m=45;; K) m=46;; L) m=47;; M) m=48;; N) m=49;; O) m=50;; P) m=51;;
! Q) m=52;; R) m=53;; S) m=54;; T) m=55;; U) m=56;; V) m=57;; W) m=58;;
! X) m=59;; Y) m=60;; Z) m=61;; @) m=62;; _) m=63;;
*) m="?";;
esac
echo $m
***************
*** 991,999 ****
umask 7
unit=`expr $i : 'cua.*(.)$'`
m=`ttyminor $unit`
! mknod cuaa$unit c 28 `expr $m + 128` uucp:dialer
! mknod cuaia$unit c 28 `expr $m + 32 + 128` uucp:dialer
! mknod cuala$unit c 28 `expr $m + 64 + 128` uucp:dialer
umask 77
;;