From c1664fa91ae2fda93ee5cb64ad1c4d77afb6e717 Mon Sep 17 00:00:00 2001 From: gibbs Date: Mon, 16 Aug 1999 01:52:21 +0000 Subject: Properly set the alignment argument to bus_dma_tag_create(). If we don't care about the alignment, set it to 1, meaning single byte alignment. --- sys/pci/adv_pci.c | 4 ++-- sys/pci/adw_pci.c | 4 ++-- sys/pci/amd.c | 4 +++- sys/pci/bt_pci.c | 4 ++-- sys/pci/dpt_pci.c | 4 ++-- sys/pci/ida_pci.c | 4 ++-- sys/pci/isp_pci.c | 4 ++-- 7 files changed, 15 insertions(+), 13 deletions(-) (limited to 'sys/pci') diff --git a/sys/pci/adv_pci.c b/sys/pci/adv_pci.c index 4a669d0..1ca2cee 100644 --- a/sys/pci/adv_pci.c +++ b/sys/pci/adv_pci.c @@ -47,7 +47,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: adv_pci.c,v 1.6 1999/05/09 17:06:35 peter Exp $ + * $Id: adv_pci.c,v 1.7 1999/07/03 20:16:58 peter Exp $ */ #include @@ -163,7 +163,7 @@ advpciattach(pcici_t config_id, int unit) /* Allocate a dmatag for our transfer DMA maps */ /* XXX Should be a child of the PCI bus dma tag */ - error = bus_dma_tag_create(/*parent*/NULL, /*alignment*/0, + error = bus_dma_tag_create(/*parent*/NULL, /*alignment*/1, /*boundary*/0, /*lowaddr*/ADV_PCI_MAX_DMA_ADDR, /*highaddr*/BUS_SPACE_MAXADDR, diff --git a/sys/pci/adw_pci.c b/sys/pci/adw_pci.c index 8b0b86a..6509786 100644 --- a/sys/pci/adw_pci.c +++ b/sys/pci/adw_pci.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: adw_pci.c,v 1.5 1999/05/09 17:06:36 peter Exp $ + * $Id: adw_pci.c,v 1.6 1999/07/03 20:16:58 peter Exp $ */ #include @@ -136,7 +136,7 @@ adwpciattach(pcici_t config_id, int unit) /* Allocate a dmatag for our transfer DMA maps */ /* XXX Should be a child of the PCI bus dma tag */ - error = bus_dma_tag_create(/*parent*/NULL, /*alignment*/0, + error = bus_dma_tag_create(/*parent*/NULL, /*alignment*/1, /*boundary*/0, /*lowaddr*/ADW_PCI_MAX_DMA_ADDR, /*highaddr*/BUS_SPACE_MAXADDR, diff --git a/sys/pci/amd.c b/sys/pci/amd.c index c8a5d3b..d1861df 100644 --- a/sys/pci/amd.c +++ b/sys/pci/amd.c @@ -1884,6 +1884,7 @@ SRBdone(struct amd_softc *amd, struct amd_srb *pSRB) status = pSRB->TargetStatus; pccb->ccb_h.status = CAM_REQ_CMP; + pccb->ccb_h.status = CAM_REQ_CMP; if (pSRB->SRBFlag & AUTO_REQSENSE) { pSRB->SRBFlag &= ~AUTO_REQSENSE; pSRB->AdaptStatus = 0; @@ -1991,6 +1992,7 @@ SRBdone(struct amd_softc *amd, struct amd_srb *pSRB) } else { /* No error */ pSRB->AdaptStatus = 0; pSRB->TargetStatus = 0; + pcsio->resid = 0; /* there is no error, (sense is invalid) */ } } @@ -2279,7 +2281,7 @@ amd_init(int unit, pcici_t config_id) amd->tag = I386_BUS_SPACE_IO; amd->bsh = pci_conf_read(config_id, PCI_MAP_REG_START) & 0xFFFE; /* DMA tag for mapping buffers into device visible space. */ - if (bus_dma_tag_create(/*parent_dmat*/NULL, /*alignment*/0, + if (bus_dma_tag_create(/*parent_dmat*/NULL, /*alignment*/1, /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, /*highaddr*/BUS_SPACE_MAXADDR, diff --git a/sys/pci/bt_pci.c b/sys/pci/bt_pci.c index e4f8669..5aa8844 100644 --- a/sys/pci/bt_pci.c +++ b/sys/pci/bt_pci.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bt_pci.c,v 1.7 1999/05/08 21:59:38 dfr Exp $ + * $Id: bt_pci.c,v 1.8 1999/07/03 20:17:01 peter Exp $ */ #include @@ -172,7 +172,7 @@ bt_pci_attach(device_t dev) /* Allocate a dmatag for our CCB DMA maps */ /* XXX Should be a child of the PCI bus dma tag */ - if (bus_dma_tag_create(/*parent*/NULL, /*alignemnt*/0, /*boundary*/0, + if (bus_dma_tag_create(/*parent*/NULL, /*alignemnt*/1, /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, diff --git a/sys/pci/dpt_pci.c b/sys/pci/dpt_pci.c index 3caaf45..4e03f78 100644 --- a/sys/pci/dpt_pci.c +++ b/sys/pci/dpt_pci.c @@ -32,7 +32,7 @@ * dptpci.c: PCI Bus Attachment for DPT SCSI HBAs */ -#ident "$Id: dpt_pci.c,v 1.12 1999/04/24 20:13:58 peter Exp $" +#ident "$Id: dpt_pci.c,v 1.13 1999/05/09 17:06:44 peter Exp $" #include "opt_devfs.h" #include "opt_dpt.h" @@ -158,7 +158,7 @@ dpt_pci_attach(pcici_t config_id, int unit) /* Allocate a dmatag representing the capabilities of this attachment */ /* XXX Should be a child of the PCI bus dma tag */ - if (bus_dma_tag_create(/*parent*/NULL, /*alignemnt*/0, /*boundary*/0, + if (bus_dma_tag_create(/*parent*/NULL, /*alignemnt*/1, /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, diff --git a/sys/pci/ida_pci.c b/sys/pci/ida_pci.c index 6f5e260..330ce7c 100644 --- a/sys/pci/ida_pci.c +++ b/sys/pci/ida_pci.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ida_pci.c,v 1.2 1999/07/03 20:17:02 peter Exp $ + * $Id: ida_pci.c,v 1.3 1999/07/29 01:03:02 mdodd Exp $ */ #include @@ -145,7 +145,7 @@ ida_pci_attach(device_t dev) return (ENOMEM); } - error = bus_dma_tag_create(/*parent*/NULL, /*alignment*/0, + error = bus_dma_tag_create(/*parent*/NULL, /*alignment*/1, /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, /*maxsize*/MAXBSIZE, /*nsegments*/IDA_NSEG, diff --git a/sys/pci/isp_pci.c b/sys/pci/isp_pci.c index 69dbd83..34473da 100644 --- a/sys/pci/isp_pci.c +++ b/sys/pci/isp_pci.c @@ -1,4 +1,4 @@ -/* $Id: isp_pci.c,v 1.27 1999/07/05 22:04:08 mjacob Exp $ */ +/* $Id: isp_pci.c,v 1.28 1999/07/06 01:24:20 mjacob Exp $ */ /* release_6_5_99 */ /* * PCI specific probe and attach routines for Qlogic ISP SCSI adapters. @@ -516,7 +516,7 @@ isp_pci_attach(pcici_t cfid, int unit) pci_cfgwrite(cfid, PCIR_ROMADDR, data, 4); ISP_UNLOCK(isp); - if (bus_dma_tag_create(NULL, 0, 0, BUS_SPACE_MAXADDR_32BIT, + if (bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, lim + 1, 255, lim, 0, &pcs->parent_dmat) != 0) { printf("%s: could not create master dma tag\n", isp->isp_name); -- cgit v1.1