Date: Sun, 6 May 2012 19:34:55 +0000 (UTC) From: Marcel Moolenaar <marcel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r235102 - in projects/altix2/sys: conf dev/mpt Message-ID: <201205061934.q46JYtSo028193@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <sys/busdma.h> + +#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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205061934.q46JYtSo028193>