Writing Device Drivers

VMEbus--Example Two

A DMA engine on a VMEbus in a SPARC machine has the following attributes:

The resulting attribute structure is:

	static ddi_dma_attr_t attributes = {
 		DMA_ATTR_V0,		/* Version number */
 		0x00000000,			/* low address */
 		0xFFFFFFFF,			/* high address */
 		0xFFFFFFFF,			/* counter register max */
 		1,						/* byte alignment */
 		0x1FE,				/* burst sizes */
 		0x2,					/* minimum transfer size */
 		0xFFFFFFFF,			/* max xfer size */
 		0xFFFFFF,			/* address register max */
 		17,					/* no scatter-gather */
 		512,					/* device operates on sectors */
 		0,						/* attr flag: set to 0 */
 	};