1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

- Fix cards with multiple modules. Prior to this, the ports on the various

modules would have overlapping names.
- Only create /dev/si_control for unit 0.

Tested by:	Joerg Lehners Joerg dot Lehners at informatik dot
		uni-oldenburg dot de (on 6.x)
MFC after:	1 week
This commit is contained in:
John Baldwin 2006-01-06 19:56:12 +00:00
parent 1e1e1fce56
commit 8fa19acad6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=154081

View File

@ -541,7 +541,8 @@ siattach(device_t dev)
pp->sp_pend = IDLE_CLOSE;
pp->sp_state = 0; /* internal flag */
#ifdef SI_DEBUG
sprintf(pp->sp_name, "si%r%r", unit, x);
sprintf(pp->sp_name, "si%r%r", unit,
(int)(pp - sc->sc_ports));
#endif
tp = pp->sp_tty = ttyalloc();
tp->t_sc = pp;
@ -552,7 +553,8 @@ siattach(device_t dev)
tp->t_oproc = si_start;
tp->t_param = siparam;
tp->t_stop = si_stop;
ttycreate(tp, TS_CALLOUT, "A%r%r", unit, x);
ttycreate(tp, TS_CALLOUT, "A%r%r", unit,
(int)(pp - sc->sc_ports));
}
try_next2:
if (modp->sm_next == 0) {
@ -576,7 +578,9 @@ siattach(device_t dev)
done_chartimes = 1;
}
make_dev(&si_Scdevsw, 0, 0, 0, 0600, "si_control");
if (unit == 0)
make_dev(&si_Scdevsw, 0, UID_ROOT, GID_WHEEL, 0600,
"si_control");
return (0);
}