fix handling more than one cards

Submitted by: "Sergey V.Dorokhov" <svd@kbtelecom.nalnet.ru>
This commit is contained in:
Andrey A. Chernov 1998-09-28 23:27:57 +00:00
parent abe7f210b5
commit 83eda2d885
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=39736
2 changed files with 6 additions and 4 deletions

View File

@ -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;

View File

@ -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;