[BACK]Return to ncr53c9x.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / dev / ic

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

Diff for /src/sys/dev/ic/ncr53c9x.c between version 1.106.2.4 and 1.106.2.5

version 1.106.2.4, 2005/03/04 16:41:31 version 1.106.2.5, 2005/11/10 14:04:15
Line 694  ncr53c9x_select(sc, ecb)
Line 694  ncr53c9x_select(sc, ecb)
                         sc->sc_cmdlen = clen;                          sc->sc_cmdlen = clen;
                         sc->sc_cmdp = (caddr_t)&ecb->cmd.cmd;                          sc->sc_cmdp = (caddr_t)&ecb->cmd.cmd;
   
                           NCRDMA_SETUP(sc, &sc->sc_cmdp, &sc->sc_cmdlen, 0,
                               &dmasize);
                         /* Program the SCSI counter */                          /* Program the SCSI counter */
                         NCR_SET_COUNT(sc, dmasize);                          NCR_SET_COUNT(sc, dmasize);
   
Line 702  ncr53c9x_select(sc, ecb)
Line 704  ncr53c9x_select(sc, ecb)
   
                         /* And get the targets attention */                          /* And get the targets attention */
                         NCRCMD(sc, NCRCMD_SELNATN | NCRCMD_DMA);                          NCRCMD(sc, NCRCMD_SELNATN | NCRCMD_DMA);
                         NCRDMA_SETUP(sc, &sc->sc_cmdp, &sc->sc_cmdlen, 0,  
                             &dmasize);  
                         NCRDMA_GO(sc);                          NCRDMA_GO(sc);
                 } else {                  } else {
                         ncr53c9x_wrfifo(sc, (u_char *)&ecb->cmd.cmd, ecb->clen);                          ncr53c9x_wrfifo(sc, (u_char *)&ecb->cmd.cmd, ecb->clen);
Line 751  ncr53c9x_select(sc, ecb)
Line 751  ncr53c9x_select(sc, ecb)
                 sc->sc_cmdlen = clen;                  sc->sc_cmdlen = clen;
                 sc->sc_cmdp = cmd;                  sc->sc_cmdp = cmd;
   
                   NCRDMA_SETUP(sc, &sc->sc_cmdp, &sc->sc_cmdlen, 0, &dmasize);
                 /* Program the SCSI counter */                  /* Program the SCSI counter */
                 NCR_SET_COUNT(sc, dmasize);                  NCR_SET_COUNT(sc, dmasize);
   
Line 765  ncr53c9x_select(sc, ecb)
Line 766  ncr53c9x_select(sc, ecb)
                         NCRCMD(sc, NCRCMD_SELATN3 | NCRCMD_DMA);                          NCRCMD(sc, NCRCMD_SELATN3 | NCRCMD_DMA);
                 } else                  } else
                         NCRCMD(sc, NCRCMD_SELATN | NCRCMD_DMA);                          NCRCMD(sc, NCRCMD_SELATN | NCRCMD_DMA);
                 NCRDMA_SETUP(sc, &sc->sc_cmdp, &sc->sc_cmdlen, 0, &dmasize);  
                 NCRDMA_GO(sc);                  NCRDMA_GO(sc);
                 return;                  return;
         }          }
Line 1351  static int
Line 1351  static int
 ncr53c9x_rdfifo(struct ncr53c9x_softc *sc, int how)  ncr53c9x_rdfifo(struct ncr53c9x_softc *sc, int how)
 {  {
         int i, n;          int i, n;
         u_char *buf;          u_char *ibuf;
   
         switch(how) {          switch(how) {
         case NCR_RDFIFO_START:          case NCR_RDFIFO_START:
                 buf = sc->sc_imess;                  ibuf = sc->sc_imess;
                 sc->sc_imlen = 0;                  sc->sc_imlen = 0;
                 break;                  break;
         case NCR_RDFIFO_CONTINUE:          case NCR_RDFIFO_CONTINUE:
                 buf = sc->sc_imess + sc->sc_imlen;                  ibuf = sc->sc_imess + sc->sc_imlen;
                 break;                  break;
         default:          default:
                 panic("ncr53c9x_rdfifo: bad flag");                  panic("ncr53c9x_rdfifo: bad flag");
Line 1376  ncr53c9x_rdfifo(struct ncr53c9x_softc *s
Line 1376  ncr53c9x_rdfifo(struct ncr53c9x_softc *s
                 n *= 2;                  n *= 2;
   
                 for (i = 0; i < n; i++)                  for (i = 0; i < n; i++)
                         buf[i] = NCR_READ_REG(sc, NCR_FIFO);                          ibuf[i] = NCR_READ_REG(sc, NCR_FIFO);
   
                 if (sc->sc_espstat2 & NCRFAS_STAT2_ISHUTTLE) {                  if (sc->sc_espstat2 & NCRFAS_STAT2_ISHUTTLE) {
   
                         NCR_WRITE_REG(sc, NCR_FIFO, 0);                          NCR_WRITE_REG(sc, NCR_FIFO, 0);
                         buf[i++] = NCR_READ_REG(sc, NCR_FIFO);                          ibuf[i++] = NCR_READ_REG(sc, NCR_FIFO);
   
                         NCR_READ_REG(sc, NCR_FIFO);                          NCR_READ_REG(sc, NCR_FIFO);
   
Line 1389  ncr53c9x_rdfifo(struct ncr53c9x_softc *s
Line 1389  ncr53c9x_rdfifo(struct ncr53c9x_softc *s
                 }                  }
         } else {          } else {
                 for (i = 0; i < n; i++)                  for (i = 0; i < n; i++)
                         buf[i] = NCR_READ_REG(sc, NCR_FIFO);                          ibuf[i] = NCR_READ_REG(sc, NCR_FIFO);
         }          }
   
         sc->sc_imlen += i;          sc->sc_imlen += i;

Legend:
Removed from v.1.106.2.4  
changed lines
  Added in v.1.106.2.5

CVSweb <webmaster@jp.NetBSD.org>