Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Nov 2012 14:34:46 +0000 (UTC)
From:      Matt Jacob <mjacob@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r242920 - stable/9/sys/dev/isp
Message-ID:  <201211121434.qACEYkAb034730@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mjacob
Date: Mon Nov 12 14:34:46 2012
New Revision: 242920
URL: http://svnweb.freebsd.org/changeset/base/242920

Log:
  MFC 242479,242480: Force segments to 1 for mapping
  control spaces.

Modified:
  stable/9/sys/dev/isp/isp_pci.c
  stable/9/sys/dev/isp/isp_sbus.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)
  stable/9/sys/dev/isp/   (props changed)

Modified: stable/9/sys/dev/isp/isp_pci.c
==============================================================================
--- stable/9/sys/dev/isp/isp_pci.c	Mon Nov 12 14:19:05 2012	(r242919)
+++ stable/9/sys/dev/isp/isp_pci.c	Mon Nov 12 14:34:46 2012	(r242920)
@@ -1524,7 +1524,7 @@ isp_pci_mbxdma(ispsoftc_t *isp)
 {
 	caddr_t base;
 	uint32_t len, nsegs;
-	int i, error, ns, cmap = 0;
+	int i, error, cmap = 0;
 	bus_size_t slim;	/* segment size */
 	bus_addr_t llim;	/* low limit of unavailable dma */
 	bus_addr_t hlim;	/* high limit of unavailable dma */
@@ -1633,13 +1633,12 @@ isp_pci_mbxdma(ispsoftc_t *isp)
 	if (isp->isp_type >= ISP_HA_FC_2300) {
 		len += (N_XCMDS * XCMD_SIZE);
 	}
-	ns = (len / PAGE_SIZE) + 1;
 
 	/*
 	 * Create a tag for the control spaces. We don't always need this
 	 * to be 32 bits, but we do this for simplicity and speed's sake.
 	 */
-	if (isp_dma_tag_create(isp->isp_osinfo.dmat, QENTRY_LEN, slim, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, len, ns, slim, 0, &isp->isp_osinfo.cdmat)) {
+	if (isp_dma_tag_create(isp->isp_osinfo.dmat, QENTRY_LEN, slim, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, len, 1, slim, 0, &isp->isp_osinfo.cdmat)) {
 		isp_prt(isp, ISP_LOGERR, "cannot create a dma tag for control spaces");
 		free(isp->isp_osinfo.pcmd_pool, M_DEVBUF);
 		free(isp->isp_xflist, M_DEVBUF);

Modified: stable/9/sys/dev/isp/isp_sbus.c
==============================================================================
--- stable/9/sys/dev/isp/isp_sbus.c	Mon Nov 12 14:19:05 2012	(r242919)
+++ stable/9/sys/dev/isp/isp_sbus.c	Mon Nov 12 14:34:46 2012	(r242920)
@@ -460,7 +460,7 @@ isp_sbus_mbxdma(ispsoftc_t *isp)
 {
 	caddr_t base;
 	uint32_t len;
-	int i, error, ns;
+	int i, error;
 	struct imush im;
 
 	/*
@@ -511,10 +511,9 @@ isp_sbus_mbxdma(ispsoftc_t *isp)
 	len = ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(isp));
 	len += ISP_QUEUE_SIZE(RESULT_QUEUE_LEN(isp));
 
-	ns = (len / PAGE_SIZE) + 1;
 	if (isp_dma_tag_create(isp->isp_osinfo.dmat, QENTRY_LEN,
 	    BUS_SPACE_MAXADDR_24BIT+1, BUS_SPACE_MAXADDR_32BIT,
-	    BUS_SPACE_MAXADDR_32BIT, NULL, NULL, len, ns,
+	    BUS_SPACE_MAXADDR_32BIT, NULL, NULL, len, 1,
 	    BUS_SPACE_MAXADDR_24BIT, 0, &isp->isp_osinfo.cdmat)) {
 		isp_prt(isp, ISP_LOGERR,
 		    "cannot create a dma tag for control spaces");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211121434.qACEYkAb034730>