diff options
author | ache <ache@FreeBSD.org> | 1998-09-28 23:27:57 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1998-09-28 23:27:57 +0000 |
commit | e232864ddfc0f8d019363ef5a3f2d9ce9d62b91d (patch) | |
tree | cb1c163426546fcb9b32a6c57da94c7e4ad30670 /sys/dev/rc | |
parent | b7f776d8de4a0d0bcd1f5aabea85c04e28377484 (diff) | |
download | FreeBSD-src-e232864ddfc0f8d019363ef5a3f2d9ce9d62b91d.zip FreeBSD-src-e232864ddfc0f8d019363ef5a3f2d9ce9d62b91d.tar.gz |
fix handling more than one cards
Submitted by: "Sergey V.Dorokhov" <svd@kbtelecom.nalnet.ru>
Diffstat (limited to 'sys/dev/rc')
-rw-r--r-- | sys/dev/rc/rc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c index 5f845c6..e946c58 100644 --- a/sys/dev/rc/rc.c +++ b/sys/dev/rc/rc.c @@ -237,8 +237,9 @@ rcattach(dvp) rcb->rcb_addr = nec; rcb->rcb_dtr = 0; rcb->rcb_baserc = rc; + rcb->rcb_unit = dvp->id_unit; /*rcb->rcb_chipid = 0x10 + dvp->id_unit;*/ - printf("rc%d: %d chans, firmware rev. %c\n", dvp->id_unit, + printf("rc%d: %d chans, firmware rev. %c\n", rcb->rcb_unit, CD180_NCHAN, (rcin(CD180_GFRCR) & 0xF) + 'A'); for (chan = 0; chan < CD180_NCHAN; chan++, rc++) { @@ -253,7 +254,7 @@ rcattach(dvp) rc->rc_dtrwait = 3 * hz; rc->rc_dcdwaits= 0; rc->rc_hotchar = 0; - tp = rc->rc_tp = &rc_tty[chan]; + tp = rc->rc_tp = &rc_tty[chan + (dvp->id_unit * CD180_NCHAN)]; ttychars(tp); tp->t_lflag = tp->t_iflag = tp->t_oflag = 0; tp->t_cflag = TTYDEF_CFLAG; |