[BACK]Return to dcm.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / arch / hp300 / dev

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/arch/hp300/dev/dcm.c between version 1.78 and 1.78.14.1

version 1.78, 2007/11/19 18:51:39 version 1.78.14.1, 2008/04/03 12:42:15
Line 282  static const char iconv[16] = {
Line 282  static const char iconv[16] = {
 #define NDCMPORT        4  #define NDCMPORT        4
   
 struct  dcm_softc {  struct  dcm_softc {
         struct  device sc_dev;          /* generic device glue */          device_t sc_dev;                /* generic device glue */
   
         bus_space_tag_t sc_bst;          bus_space_tag_t sc_bst;
         bus_space_handle_t sc_bsh;          bus_space_handle_t sc_bsh;
Line 334  static void dcmcnputc(dev_t, int);
Line 334  static void dcmcnputc(dev_t, int);
   
 int     dcmcnattach(bus_space_tag_t, bus_addr_t, int);  int     dcmcnattach(bus_space_tag_t, bus_addr_t, int);
   
 static int      dcmmatch(struct device *, struct cfdata *, void *);  static int      dcmmatch(device_t, cfdata_t, void *);
 static void     dcmattach(struct device *, struct device *, void *);  static void     dcmattach(device_t, device_t, void *);
   
 CFATTACH_DECL(dcm, sizeof(struct dcm_softc),  CFATTACH_DECL_NEW(dcm, sizeof(struct dcm_softc),
     dcmmatch, dcmattach, NULL, NULL);      dcmmatch, dcmattach, NULL, NULL);
   
 /*  /*
Line 346  CFATTACH_DECL(dcm, sizeof(struct dcm_sof
Line 346  CFATTACH_DECL(dcm, sizeof(struct dcm_sof
  */   */
 static  struct dcmdevice *dcm_cn = NULL;        /* pointer to hardware */  static  struct dcmdevice *dcm_cn = NULL;        /* pointer to hardware */
 static  int dcmconsinit;                        /* has been initialized */  static  int dcmconsinit;                        /* has been initialized */
 /* static       int dcm_lastcnpri = CN_DEAD; */ /* XXX last priority */  #if 0
   static  int dcm_lastcnpri = CN_DEAD;    /* XXX last priority */
   #endif
   
 static struct consdev dcm_cons = {  static struct consdev dcm_cons = {
         NULL,          NULL,
Line 379  const struct cdevsw dcm_cdevsw = {
Line 381  const struct cdevsw dcm_cdevsw = {
 };  };
   
 static int  static int
 dcmmatch(struct device *parent, struct cfdata *match, void *aux)  dcmmatch(device_t parent, cfdata_t cf, void *aux)
 {  {
         struct dio_attach_args *da = aux;          struct dio_attach_args *da = aux;
   
Line 393  dcmmatch(struct device *parent, struct c
Line 395  dcmmatch(struct device *parent, struct c
 }  }
   
 static void  static void
 dcmattach(struct device *parent, struct device *self, void *aux)  dcmattach(device_t parent, device_t self, void *aux)
 {  {
         struct dcm_softc *sc = (struct dcm_softc *)self;          struct dcm_softc *sc = device_private(self);
         struct dio_attach_args *da = aux;          struct dio_attach_args *da = aux;
         struct dcmdevice *dcm;          struct dcmdevice *dcm;
         int brd = device_unit(self);          int brd = device_unit(self);
         int scode = da->da_scode;          int scode = da->da_scode;
         int i, mbits, code;          int i, mbits, code;
   
           sc->sc_dev = self;
         sc->sc_flags = 0;          sc->sc_flags = 0;
   
         if (scode == dcmconscode) {          if (scode == dcmconscode) {
Line 414  dcmattach(struct device *parent, struct 
Line 417  dcmattach(struct device *parent, struct 
                  * Note that we always assume port 1 on the board.                   * Note that we always assume port 1 on the board.
                  */                   */
                 cn_tab->cn_dev = makedev(cdevsw_lookup_major(&dcm_cdevsw),                  cn_tab->cn_dev = makedev(cdevsw_lookup_major(&dcm_cdevsw),
                                          (brd << 2) | DCMCONSPORT);                      (brd << 2) | DCMCONSPORT);
         } else {          } else {
                 sc->sc_bst = da->da_bst;                  sc->sc_bst = da->da_bst;
                 if (bus_space_map(sc->sc_bst, da->da_addr, da->da_size,                  if (bus_space_map(sc->sc_bst, da->da_addr, da->da_size,
                     BUS_SPACE_MAP_LINEAR, &sc->sc_bsh)) {                      BUS_SPACE_MAP_LINEAR, &sc->sc_bsh)) {
                         printf("\n%s: can't map registers\n",                          aprint_error(": can't map registers\n");
                             sc->sc_dev.dv_xname);  
                         return;                          return;
                 }                  }
                 dcm = (struct dcmdevice *)bus_space_vaddr(sc->sc_bst,                  dcm = bus_space_vaddr(sc->sc_bst, sc->sc_bsh);
                     sc->sc_bsh);  
         }          }
   
         sc->sc_dcm = dcm;          sc->sc_dcm = dcm;
Line 434  dcmattach(struct device *parent, struct 
Line 435  dcmattach(struct device *parent, struct 
          * autoconfig messages.           * autoconfig messages.
          */           */
         if ((sc->sc_flags & DCM_ISCONSOLE) && dcmselftest(sc)) {          if ((sc->sc_flags & DCM_ISCONSOLE) && dcmselftest(sc)) {
                 printf("\n%s: self-test failed\n", sc->sc_dev.dv_xname);                  aprint_normal("\n");
                   aprint_error_dev(self, "self-test failed\n");
                 return;                  return;
         }          }
   
Line 446  dcmattach(struct device *parent, struct 
Line 448  dcmattach(struct device *parent, struct 
         sc->sc_flags |= DCM_ACTIVE;          sc->sc_flags |= DCM_ACTIVE;
   
         /* Establish the interrupt handler. */          /* Establish the interrupt handler. */
         (void) dio_intr_establish(dcmintr, sc, da->da_ipl, IPL_TTY);          (void)dio_intr_establish(dcmintr, sc, da->da_ipl, IPL_TTY);
   
         if (dcmistype == DIS_TIMER)          if (dcmistype == DIS_TIMER)
                 dcmsetischeme(brd, DIS_RESET|DIS_TIMER);                  dcmsetischeme(brd, DIS_RESET|DIS_TIMER);
Line 488  dcmattach(struct device *parent, struct 
Line 490  dcmattach(struct device *parent, struct 
         if (sc->sc_flags & DCM_ISCONSOLE) {          if (sc->sc_flags & DCM_ISCONSOLE) {
                 dcmconsinit = 0;                  dcmconsinit = 0;
                 sc->sc_softCAR |= (1 << DCMCONSPORT);                  sc->sc_softCAR |= (1 << DCMCONSPORT);
                 printf(": console on port %d\n", DCMCONSPORT);                  aprint_normal(": console on port %d\n", DCMCONSPORT);
         } else          } else
                 printf("\n");                  aprint_normal("\n");
   
 #ifdef KGDB  #ifdef KGDB
         if (cdevsw_lookup(kgdb_dev) == &dcm_cdevsw &&          if (cdevsw_lookup(kgdb_dev) == &dcm_cdevsw &&
Line 506  dcmattach(struct device *parent, struct 
Line 508  dcmattach(struct device *parent, struct 
                         dcminit(dcm, DCMPORT(DCMUNIT(kgdb_dev)),                          dcminit(dcm, DCMPORT(DCMUNIT(kgdb_dev)),
                             kgdb_rate);                              kgdb_rate);
                         if (kgdb_debug_init) {                          if (kgdb_debug_init) {
                                 printf("%s port %d: ", sc->sc_dev.dv_xname,                                  aprint_normal_dev(self, "port %d: ",
                                     DCMPORT(DCMUNIT(kgdb_dev)));                                      DCMPORT(DCMUNIT(kgdb_dev)));
                                 kgdb_connect(1);                                  kgdb_connect(1);
                         } else                          } else
                                 printf("%s port %d: kgdb enabled\n",                                  aprint_normal_dev(self,
                                     sc->sc_dev.dv_xname,                                      "port %d: kgdb enabled\n",
                                     DCMPORT(DCMUNIT(kgdb_dev)));                                      DCMPORT(DCMUNIT(kgdb_dev)));
                 }                  }
                 /* end could be replaced */                  /* end could be replaced */
Line 534  dcmopen(dev_t dev, int flag, int mode, s
Line 536  dcmopen(dev_t dev, int flag, int mode, s
         port = DCMPORT(unit);          port = DCMPORT(unit);
   
         if (brd >= dcm_cd.cd_ndevs || port >= NDCMPORT ||          if (brd >= dcm_cd.cd_ndevs || port >= NDCMPORT ||
             (sc = dcm_cd.cd_devs[brd]) == NULL)              (sc = device_private(dcm_cd.cd_devs[brd])) == NULL)
                 return ENXIO;                  return ENXIO;
   
         if ((sc->sc_flags & DCM_ACTIVE) == 0)          if ((sc->sc_flags & DCM_ACTIVE) == 0)
Line 591  dcmopen(dev_t dev, int flag, int mode, s
Line 593  dcmopen(dev_t dev, int flag, int mode, s
 #ifdef DEBUG  #ifdef DEBUG
         if (dcmdebug & DDB_MODEM)          if (dcmdebug & DDB_MODEM)
                 printf("%s: dcmopen port %d softcarr %c\n",                  printf("%s: dcmopen port %d softcarr %c\n",
                        sc->sc_dev.dv_xname, port,                      device_xname(sc->sc_dev), port,
                        (tp->t_state & TS_CARR_ON) ? '1' : '0');                      (tp->t_state & TS_CARR_ON) ? '1' : '0');
 #endif  #endif
   
         error = ttyopen(tp, DCMDIALOUT(dev), (flag & O_NONBLOCK));          error = ttyopen(tp, DCMDIALOUT(dev), (flag & O_NONBLOCK));
Line 602  dcmopen(dev_t dev, int flag, int mode, s
Line 604  dcmopen(dev_t dev, int flag, int mode, s
 #ifdef DEBUG  #ifdef DEBUG
         if (dcmdebug & DDB_OPENCLOSE)          if (dcmdebug & DDB_OPENCLOSE)
                 printf("%s port %d: dcmopen: st %x fl %x\n",                  printf("%s port %d: dcmopen: st %x fl %x\n",
                         sc->sc_dev.dv_xname, port, tp->t_state, tp->t_flags);                      device_xname(sc->sc_dev), port, tp->t_state, tp->t_flags);
 #endif  #endif
         error = (*tp->t_linesw->l_open)(dev, tp);          error = (*tp->t_linesw->l_open)(dev, tp);
   
Line 622  dcmclose(dev_t dev, int flag, int mode, 
Line 624  dcmclose(dev_t dev, int flag, int mode, 
         board = DCMBOARD(unit);          board = DCMBOARD(unit);
         port = DCMPORT(unit);          port = DCMPORT(unit);
   
         sc = dcm_cd.cd_devs[board];          sc = device_private(dcm_cd.cd_devs[board]);
         tp = sc->sc_tty[port];          tp = sc->sc_tty[port];
   
         (*tp->t_linesw->l_close)(tp, flag);          (*tp->t_linesw->l_close)(tp, flag);
Line 635  dcmclose(dev_t dev, int flag, int mode, 
Line 637  dcmclose(dev_t dev, int flag, int mode, 
 #ifdef DEBUG  #ifdef DEBUG
         if (dcmdebug & DDB_OPENCLOSE)          if (dcmdebug & DDB_OPENCLOSE)
                 printf("%s port %d: dcmclose: st %x fl %x\n",                  printf("%s port %d: dcmclose: st %x fl %x\n",
                         sc->sc_dev.dv_xname, port, tp->t_state, tp->t_flags);                      device_xname(sc->sc_dev), port, tp->t_state, tp->t_flags);
 #endif  #endif
         splx(s);          splx(s);
         ttyclose(tp);          ttyclose(tp);
Line 658  dcmread(dev_t dev, struct uio *uio, int 
Line 660  dcmread(dev_t dev, struct uio *uio, int 
         board = DCMBOARD(unit);          board = DCMBOARD(unit);
         port = DCMPORT(unit);          port = DCMPORT(unit);
   
         sc = dcm_cd.cd_devs[board];          sc = device_private(dcm_cd.cd_devs[board]);
         tp = sc->sc_tty[port];          tp = sc->sc_tty[port];
   
         return (*tp->t_linesw->l_read)(tp, uio, flag);          return (*tp->t_linesw->l_read)(tp, uio, flag);
Line 675  dcmwrite(dev_t dev, struct uio *uio, int
Line 677  dcmwrite(dev_t dev, struct uio *uio, int
         board = DCMBOARD(unit);          board = DCMBOARD(unit);
         port = DCMPORT(unit);          port = DCMPORT(unit);
   
         sc = dcm_cd.cd_devs[board];          sc = device_private(dcm_cd.cd_devs[board]);
         tp = sc->sc_tty[port];          tp = sc->sc_tty[port];
   
         return (*tp->t_linesw->l_write)(tp, uio, flag);          return (*tp->t_linesw->l_write)(tp, uio, flag);
Line 692  dcmpoll(dev_t dev, int events, struct lw
Line 694  dcmpoll(dev_t dev, int events, struct lw
         board = DCMBOARD(unit);          board = DCMBOARD(unit);
         port = DCMPORT(unit);          port = DCMPORT(unit);
   
         sc = dcm_cd.cd_devs[board];          sc = device_private(dcm_cd.cd_devs[board]);
         tp = sc->sc_tty[port];          tp = sc->sc_tty[port];
   
         return (*tp->t_linesw->l_poll)(tp, events, l);          return (*tp->t_linesw->l_poll)(tp, events, l);
Line 708  dcmtty(dev_t dev)
Line 710  dcmtty(dev_t dev)
         board = DCMBOARD(unit);          board = DCMBOARD(unit);
         port = DCMPORT(unit);          port = DCMPORT(unit);
   
         sc = dcm_cd.cd_devs[board];          sc = device_private(dcm_cd.cd_devs[board]);
   
         return sc->sc_tty[port];          return sc->sc_tty[port];
 }  }
Line 719  dcmintr(void *arg)
Line 721  dcmintr(void *arg)
         struct dcm_softc *sc = arg;          struct dcm_softc *sc = arg;
         struct dcmdevice *dcm = sc->sc_dcm;          struct dcmdevice *dcm = sc->sc_dcm;
         struct dcmischeme *dis = &sc->sc_scheme;          struct dcmischeme *dis = &sc->sc_scheme;
         int brd = device_unit(&sc->sc_dev);          int brd = device_unit(sc->sc_dev);
         int code, i;          int code, i;
         int pcnd[4], mcode, mcnd[4];          int pcnd[4], mcode, mcnd[4];
   
Line 749  dcmintr(void *arg)
Line 751  dcmintr(void *arg)
 #ifdef DEBUG  #ifdef DEBUG
         if (dcmdebug & DDB_INTR) {          if (dcmdebug & DDB_INTR) {
                 printf("%s: dcmintr: iir %x pc %x/%x/%x/%x ",                  printf("%s: dcmintr: iir %x pc %x/%x/%x/%x ",
                        sc->sc_dev.dv_xname, code, pcnd[0], pcnd[1],                      device_xname(sc->sc_dev), code, pcnd[0], pcnd[1],
                        pcnd[2], pcnd[3]);                      pcnd[2], pcnd[3]);
                 printf("miir %x mc %x/%x/%x/%x\n",                  printf("miir %x mc %x/%x/%x/%x\n",
                        mcode, mcnd[0], mcnd[1], mcnd[2], mcnd[3]);                      mcode, mcnd[0], mcnd[1], mcnd[2], mcnd[3]);
         }          }
 #endif  #endif
         if (code & IIR_TIMEO)          if (code & IIR_TIMEO)
Line 896  dcmreadbuf(struct dcm_softc *sc, int por
Line 898  dcmreadbuf(struct dcm_softc *sc, int por
   
 #ifdef DEBUG  #ifdef DEBUG
                 if (dcmdebug & DDB_INPUT)                  if (dcmdebug & DDB_INPUT)
                         printf("%s port %d: dcmreadbuf: c%x('%c') s%x f%x h%x t%x\n",                          printf("%s port %d: "
                                sc->sc_dev.dv_xname, port,                              "dcmreadbuf: c%x('%c') s%x f%x h%x t%x\n",
                                c&0xFF, c, stat&0xFF,                              device_xname(sc->sc_dev), port,
                                tp->t_flags, head, pp->r_tail);                              c&0xFF, c, stat&0xFF,
                               tp->t_flags, head, pp->r_tail);
 #endif  #endif
                 /*                  /*
                  * Check for and handle errors                   * Check for and handle errors
Line 907  dcmreadbuf(struct dcm_softc *sc, int por
Line 910  dcmreadbuf(struct dcm_softc *sc, int por
                 if (stat & RD_MASK) {                  if (stat & RD_MASK) {
 #ifdef DEBUG  #ifdef DEBUG
                         if (dcmdebug & (DDB_INPUT|DDB_SIOERR))                          if (dcmdebug & (DDB_INPUT|DDB_SIOERR))
                                 printf("%s port %d: dcmreadbuf: err: c%x('%c') s%x\n",                                  printf("%s port %d: "
                                        sc->sc_dev.dv_xname, port,                                      "dcmreadbuf: err: c%x('%c') s%x\n",
                                        stat, c&0xFF, c);                                      device_xname(sc->sc_dev), port,
                                       stat, c&0xFF, c);
 #endif  #endif
                         if (stat & (RD_BD | RD_FE))                          if (stat & (RD_BD | RD_FE))
                                 c |= TTY_FE;                                  c |= TTY_FE;
Line 918  dcmreadbuf(struct dcm_softc *sc, int por
Line 922  dcmreadbuf(struct dcm_softc *sc, int por
                         else if (stat & RD_OVF)                          else if (stat & RD_OVF)
                                 log(LOG_WARNING,                                  log(LOG_WARNING,
                                     "%s port %d: silo overflow\n",                                      "%s port %d: silo overflow\n",
                                     sc->sc_dev.dv_xname, port);                                      device_xname(sc->sc_dev), port);
                         else if (stat & RD_OE)                          else if (stat & RD_OE)
                                 log(LOG_WARNING,                                  log(LOG_WARNING,
                                     "%s port %d: uart overflow\n",                                      "%s port %d: uart overflow\n",
                                     sc->sc_dev.dv_xname, port);                                      device_xname(sc->sc_dev), port);
                 }                  }
                 (*tp->t_linesw->l_rint)(c, tp);                  (*tp->t_linesw->l_rint)(c, tp);
         }          }
Line 962  dcmmint(struct dcm_softc *sc, int port, 
Line 966  dcmmint(struct dcm_softc *sc, int port, 
 #ifdef DEBUG  #ifdef DEBUG
         if (dcmdebug & DDB_MODEM)          if (dcmdebug & DDB_MODEM)
                 printf("%s port %d: dcmmint: mcnd %x mcndlast %x\n",                  printf("%s port %d: dcmmint: mcnd %x mcndlast %x\n",
                        sc->sc_dev.dv_xname, port, mcnd, sc->sc_mcndlast[port]);                      device_xname(sc->sc_dev), port, mcnd,
                       sc->sc_mcndlast[port]);
 #endif  #endif
         delta = mcnd ^ sc->sc_mcndlast[port];          delta = mcnd ^ sc->sc_mcndlast[port];
         sc->sc_mcndlast[port] = mcnd;          sc->sc_mcndlast[port] = mcnd;
Line 1005  dcmioctl(dev_t dev, u_long cmd, void *da
Line 1010  dcmioctl(dev_t dev, u_long cmd, void *da
         port = DCMPORT(unit);          port = DCMPORT(unit);
         board = DCMBOARD(unit);          board = DCMBOARD(unit);
   
         sc = dcm_cd.cd_devs[board];          sc = device_private(dcm_cd.cd_devs[board]);
         dcm = sc->sc_dcm;          dcm = sc->sc_dcm;
         tp = sc->sc_tty[port];          tp = sc->sc_tty[port];
   
 #ifdef DEBUG  #ifdef DEBUG
         if (dcmdebug & DDB_IOCTL)          if (dcmdebug & DDB_IOCTL)
                 printf("%s port %d: dcmioctl: cmd %lx data %x flag %x\n",                  printf("%s port %d: dcmioctl: cmd %lx data %x flag %x\n",
                        sc->sc_dev.dv_xname, port, cmd, *data, flag);                      device_xname(sc->sc_dev), port, cmd, *(int *)data, flag);
 #endif  #endif
   
         error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, l);          error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, l);
Line 1120  dcmparam(struct tty *tp, struct termios 
Line 1125  dcmparam(struct tty *tp, struct termios 
         board = DCMBOARD(unit);          board = DCMBOARD(unit);
         port = DCMPORT(unit);          port = DCMPORT(unit);
   
         sc = dcm_cd.cd_devs[board];          sc = device_private(dcm_cd.cd_devs[board]);
         dcm = sc->sc_dcm;          dcm = sc->sc_dcm;
   
         /* check requested parameters */          /* check requested parameters */
Line 1158  dcmparam(struct tty *tp, struct termios 
Line 1163  dcmparam(struct tty *tp, struct termios 
                 mode |= LC_1STOP;                  mode |= LC_1STOP;
 #ifdef DEBUG  #ifdef DEBUG
         if (dcmdebug & DDB_PARAM)          if (dcmdebug & DDB_PARAM)
                 printf("%s port %d: dcmparam: cflag %x mode %x speed %d uperch %d\n",                  printf("%s port %d: "
                        sc->sc_dev.dv_xname, port, cflag, mode, tp->t_ospeed,                      "dcmparam: cflag %x mode %x speed %d uperch %d\n",
                        DCM_USPERCH(tp->t_ospeed));                      device_xname(sc->sc_dev), port, cflag, mode, tp->t_ospeed,
                       DCM_USPERCH(tp->t_ospeed));
 #endif  #endif
   
         /*          /*
Line 1206  dcmstart(struct tty *tp)
Line 1212  dcmstart(struct tty *tp)
         board = DCMBOARD(unit);          board = DCMBOARD(unit);
         port = DCMPORT(unit);          port = DCMPORT(unit);
   
         sc = dcm_cd.cd_devs[board];          sc = device_private(dcm_cd.cd_devs[board]);
         dcm = sc->sc_dcm;          dcm = sc->sc_dcm;
   
         s = spltty();          s = spltty();
Line 1216  dcmstart(struct tty *tp)
Line 1222  dcmstart(struct tty *tp)
 #ifdef DEBUG  #ifdef DEBUG
         if (dcmdebug & DDB_OUTPUT)          if (dcmdebug & DDB_OUTPUT)
                 printf("%s port %d: dcmstart: state %x flags %x outcc %d\n",                  printf("%s port %d: dcmstart: state %x flags %x outcc %d\n",
                        sc->sc_dev.dv_xname, port, tp->t_state, tp->t_flags,                      device_xname(sc->sc_dev), port, tp->t_state, tp->t_flags,
                        tp->t_outq.c_cc);                      tp->t_outq.c_cc);
 #endif  #endif
         if (tp->t_state & (TS_TIMEOUT|TS_BUSY|TS_TTSTOP))          if (tp->t_state & (TS_TIMEOUT|TS_BUSY|TS_TTSTOP))
                 goto out;                  goto out;
Line 1291  again:
Line 1297  again:
 #ifdef DEBUG  #ifdef DEBUG
         if (dcmdebug & DDB_INTR)          if (dcmdebug & DDB_INTR)
                 printf("%s port %d: dcmstart: head %x tail %x outqcc %d\n",                  printf("%s port %d: dcmstart: head %x tail %x outqcc %d\n",
                     sc->sc_dev.dv_xname, port, head, tail, tp->t_outq.c_cc);                      device_xname(sc->sc_dev), port, head, tail,
                       tp->t_outq.c_cc);
 #endif  #endif
 out:  out:
 #ifdef DCMSTATS  #ifdef DCMSTATS
Line 1335  dcmmctl(dev_t dev, int bits, int how)
Line 1342  dcmmctl(dev_t dev, int bits, int how)
         brd = DCMBOARD(unit);          brd = DCMBOARD(unit);
         port = DCMPORT(unit);          port = DCMPORT(unit);
   
         sc = dcm_cd.cd_devs[brd];          sc = device_private(dcm_cd.cd_devs[brd]);
         dcm = sc->sc_dcm;          dcm = sc->sc_dcm;
   
 #ifdef DEBUG  #ifdef DEBUG
         if (dcmdebug & DDB_MODEM)          if (dcmdebug & DDB_MODEM)
                 printf("%s port %d: dcmmctl: bits 0x%x how %x\n",                  printf("%s port %d: dcmmctl: bits 0x%x how %x\n",
                        sc->sc_dev.dv_xname, port, bits, how);                      device_xname(sc->sc_dev), port, bits, how);
 #endif  #endif
   
         s = spltty();          s = spltty();
Line 1385  dcmmctl(dev_t dev, int bits, int how)
Line 1392  dcmmctl(dev_t dev, int bits, int how)
 static void  static void
 dcmsetischeme(int brd, int flags)  dcmsetischeme(int brd, int flags)
 {  {
         struct dcm_softc *sc = dcm_cd.cd_devs[brd];          struct dcm_softc *sc = device_private(dcm_cd.cd_devs[brd]);
         struct dcmdevice *dcm = sc->sc_dcm;          struct dcmdevice *dcm = sc->sc_dcm;
         struct dcmischeme *dis = &sc->sc_scheme;          struct dcmischeme *dis = &sc->sc_scheme;
         int i;          int i;
Line 1395  dcmsetischeme(int brd, int flags)
Line 1402  dcmsetischeme(int brd, int flags)
 #ifdef DEBUG  #ifdef DEBUG
         if (dcmdebug & DDB_INTSCHM)          if (dcmdebug & DDB_INTSCHM)
                 printf("%s: dcmsetischeme(%d): cur %d, ints %d, chars %d\n",                  printf("%s: dcmsetischeme(%d): cur %d, ints %d, chars %d\n",
                        sc->sc_dev.dv_xname, perchar, dis->dis_perchar,                      device_xname(sc->sc_dev), perchar, dis->dis_perchar,
                        dis->dis_intr, dis->dis_char);                      dis->dis_intr, dis->dis_char);
         if ((flags & DIS_RESET) == 0 && perchar == dis->dis_perchar) {          if ((flags & DIS_RESET) == 0 && perchar == dis->dis_perchar) {
                 printf("%s: dcmsetischeme: redundent request %d\n",                  printf("%s: dcmsetischeme: redundent request %d\n",
                        sc->sc_dev.dv_xname, perchar);                      device_xname(sc->sc_dev), perchar);
                 return;                  return;
         }          }
 #endif  #endif
Line 1512  dcmselftest(struct dcm_softc *sc)
Line 1519  dcmselftest(struct dcm_softc *sc)
         if (dcm->dcm_stcon != ST_OK) {          if (dcm->dcm_stcon != ST_OK) {
 #if 0  #if 0
                 if (hd->hp_args->hw_sc != conscode)                  if (hd->hp_args->hw_sc != conscode)
                         printf("dcm%d: self test failed: %x\n",                          aprint_error_dev(sc->sc_dev, "self test failed: %x\n",
                                brd, dcm->dcm_stcon);                              dcm->dcm_stcon);
 #endif  #endif
                 goto out;                  goto out;
         }          }

Legend:
Removed from v.1.78  
changed lines
  Added in v.1.78.14.1

CVSweb <webmaster@jp.NetBSD.org>