SCCS-vsn: sys/hp300/dev/scsi.c 7.2
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)scsi.c 7.1 (Berkeley) %G%
+ * @(#)scsi.c 7.2 (Berkeley) %G%
#if NSCSI > 0
#ifndef lint
#if NSCSI > 0
#ifndef lint
-static char rcsid[] = "$Header: scsi.c,v 1.3 90/01/06 04:56:50 van Exp $";
+static char rcsid[] = "$Header: scsi.c,v 1.3 90/10/10 14:55:08 mike Exp $";
#endif
#include "param.h"
#endif
#include "param.h"
int scsi_cmd_wait = 512; /* microsec wait per step of 'immediate' cmds */
int scsi_data_wait = 512; /* wait per data in/out step */
int scsi_nosync = 1; /* inhibit sync xfers if 1 */
int scsi_cmd_wait = 512; /* microsec wait per step of 'immediate' cmds */
int scsi_data_wait = 512; /* wait per data in/out step */
int scsi_nosync = 1; /* inhibit sync xfers if 1 */
+int scsi_pridma = 0; /* use "priority" dma */
#ifdef DEBUG
int scsi_debug = 0;
#ifdef DEBUG
int scsi_debug = 0;
u_int ixstart_wait[MAXWAIT+2];
u_int ixin_wait[MAXWAIT+2];
u_int ixout_wait[MAXWAIT+2];
u_int ixstart_wait[MAXWAIT+2];
u_int ixin_wait[MAXWAIT+2];
u_int ixout_wait[MAXWAIT+2];
int
scsireq(dq)
register struct devqueue *dq;
int
scsireq(dq)
register struct devqueue *dq;
* get the dio part of the card set for a dma xfer.
*/
hd->scsi_hconf = 0;
* get the dio part of the card set for a dma xfer.
*/
hd->scsi_hconf = 0;
- cmd = CSR_IE | (CSR_DE0 << hs->sc_dq.dq_ctlr);
+ if (scsi_pridma)
+ dmaflags |= DMAGO_PRI;
if (bp->b_flags & B_READ)
dmaflags |= DMAGO_READ;
if ((hs->sc_flags & SCSI_DMA32) &&
if (bp->b_flags & B_READ)
dmaflags |= DMAGO_READ;
if ((hs->sc_flags & SCSI_DMA32) &&
phase = DATA_IN_PHASE;
} else
phase = DATA_OUT_PHASE;
phase = DATA_IN_PHASE;
} else
phase = DATA_OUT_PHASE;
+ /*
+ * DMA enable bits must be set after size and direction bits.
+ */
+ hd->scsi_csr |= (CSR_DE0 << hs->sc_dq.dq_ctlr);
/*
* Setup the SPC for the transfer. We don't want to take
* first a command complete then a service required interrupt
/*
* Setup the SPC for the transfer. We don't want to take
* first a command complete then a service required interrupt
volatile register struct scsidevice *hd =
(struct scsidevice *)scsi_softc[unit].sc_hc->hp_addr;
volatile register struct scsidevice *hd =
(struct scsidevice *)scsi_softc[unit].sc_hc->hp_addr;
+#ifdef DEBUG
+ if (scsi_debug)
+ printf("scsi%d: done called!\n");
+#endif
/* dma operation is done -- turn off card dma */
hd->scsi_csr &=~ (CSR_DE1|CSR_DE0);
}
/* dma operation is done -- turn off card dma */
hd->scsi_csr &=~ (CSR_DE1|CSR_DE0);
}
hd->scsi_tcl;
if (!(hs->sc_flags & SCSI_PAD))
len -= 4;
hd->scsi_tcl;
if (!(hs->sc_flags & SCSI_PAD))
len -= 4;
- if (len)
- printf("scsi%d: transfer length error %d\n", unit, len);
hs->sc_flags &=~ SCSI_PAD;
#endif
dq = hs->sc_sq.dq_forw;
hs->sc_flags &=~ SCSI_PAD;
#endif
dq = hs->sc_sq.dq_forw;