From owner-svn-src-projects@FreeBSD.ORG Sun May 6 19:34:55 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DCF0F106566B; Sun, 6 May 2012 19:34:55 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD9458FC0A; Sun, 6 May 2012 19:34:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q46JYtmH028196; Sun, 6 May 2012 19:34:55 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q46JYtSo028193; Sun, 6 May 2012 19:34:55 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201205061934.q46JYtSo028193@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 6 May 2012 19:34:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235102 - in projects/altix2/sys: conf dev/mpt X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 May 2012 19:34:56 -0000 Author: marcel Date: Sun May 6 19:34:55 2012 New Revision: 235102 URL: http://svn.freebsd.org/changeset/base/235102 Log: Add global option "MPT_USE_BUSDMA" to have mpt(4) use busdma/mi instead of bus_dma. mpt(4) is the SCSI controller driver under VMWare Fusion, which makes for a convenient prototyping environment. Hook up to busdma_tag_create(). Everything else fails. Modified: projects/altix2/sys/conf/options projects/altix2/sys/dev/mpt/mpt.h Modified: projects/altix2/sys/conf/options ============================================================================== --- projects/altix2/sys/conf/options Sun May 6 19:03:36 2012 (r235101) +++ projects/altix2/sys/conf/options Sun May 6 19:34:55 2012 (r235102) @@ -911,3 +911,6 @@ AR71XX_REALMEM opt_ar71xx.h AR71XX_ENV_UBOOT opt_ar71xx.h AR71XX_ENV_REDBOOT opt_ar71xx.h AR71XX_ATH_EEPROM opt_ar71xx.h + +# busdma/mi +MPT_USE_BUSDMA opt_global.h Modified: projects/altix2/sys/dev/mpt/mpt.h ============================================================================== --- projects/altix2/sys/dev/mpt/mpt.h Sun May 6 19:03:36 2012 (r235101) +++ projects/altix2/sys/dev/mpt/mpt.h Sun May 6 19:34:55 2012 (r235102) @@ -238,6 +238,23 @@ int mpt_modevent(module_t, int, void *); #define bus_dmamap_sync_range(dma_tag, dmamap, offset, len, op) \ bus_dmamap_sync(dma_tag, dmamap, op) +#ifdef MPT_USE_BUSDMA +#include + +#define mpt_dma_tag_create(mpt, parent_tag, alignment, boundary, \ + lowaddr, highaddr, filter, filterarg, \ + maxsize, nsegments, maxsegsz, flags, \ + dma_tagp) \ + busdma_tag_create((mpt)->dev, lowaddr, alignment, boundary, \ + maxsize, nsegments, maxsegsz, flags, (busdma_tag_t *)dma_tagp) + +#define mpt_dma_tag_derive(mpt, parent_tag, alignment, boundary, \ + lowaddr, highaddr, filter, filterarg, \ + maxsize, nsegments, maxsegsz, flags, \ + dma_tagp) \ + busdma_tag_derive(parent_tag, lowaddr, alignment, boundary, \ + maxsize, nsegments, maxsegsz, flags, (busdma_tag_t *)dma_tagp) +#else #if __FreeBSD_version < 600000 #define bus_get_dma_tag(x) NULL #endif @@ -261,6 +278,7 @@ int mpt_modevent(module_t, int, void *); maxsize, nsegments, maxsegsz, flags, \ dma_tagp) #endif +#endif /* MPT_USE_BUSDMA */ struct mpt_map_info { struct mpt_softc *mpt;