For the 2100- the flags weren't quite right- but things worked anyway. Wierd.

This commit is contained in:
mjacob 1997-09-10 02:16:13 +00:00
parent f88e00fba3
commit 18430b4e5e

View File

@ -1,4 +1,4 @@
/* $NetBSD: isp_pci.c,v 1.16 1997/08/27 11:25:23 bouyer Exp $ */
/* $NetBSD: isp_pci.c,v 1.17 1997/09/10 02:16:13 mjacob Exp $ */
/*
* PCI specific probe and attach routines for Qlogic ISP SCSI adapters.
@ -458,31 +458,32 @@ isp_pci_dmasetup(isp, xs, rq, iptrp, optr)
struct isp_pcisoftc *pci = (struct isp_pcisoftc *)isp;
bus_dmamap_t dmap = pci->pci_xfer_dmap[rq->req_handle - 1];
ispcontreq_t *crq;
int segcnt, seg, error, ovseg, seglim;
int segcnt, seg, error, ovseg, seglim, drq;
if (xs->datalen == 0) {
rq->req_seg_count = 1;
return (0);
}
if (rq->req_handle > RQUEST_QUEUE_LEN(isp) ||
rq->req_handle < 1) {
if (rq->req_handle > RQUEST_QUEUE_LEN(isp) || rq->req_handle < 1) {
panic("%s: bad handle (%d) in isp_pci_dmasetup\n",
isp->isp_name, rq->req_handle);
/* NOTREACHED */
}
if (xs->flags & SCSI_DATA_IN) {
rq->req_flags |= REQFLAG_DATA_IN;
drq = REQFLAG_DATA_IN;
} else {
rq->req_flags |= REQFLAG_DATA_OUT;
drq = REQFLAG_DATA_OUT;
}
if (isp->isp_type & ISP_HA_FC) {
seglim = ISP_RQDSEG_T2;
((ispreqt2_t *)rq)->req_totalcnt = xs->datalen;
((ispreqt2_t *)rq)->req_flags |= drq;
} else {
seglim = ISP_RQDSEG;
rq->req_flags |= drq;
}
error = bus_dmamap_load(pci->pci_dmat, dmap, xs->data, xs->datalen,
NULL, xs->flags & SCSI_NOSLEEP ? BUS_DMA_NOWAIT : BUS_DMA_WAITOK);