bus_dmamap_t map;  map = malloc(sizeof(*map), M_DEVBUF, M_NOWAIT); if (map == NULL) return (ENOMEM); /* * Although we can dma data above 4GB, our * "consistent" memory is below 4GB for * space efficiency reasons (only need a 4byte * address).  For this reason, we have to reset * our dma mask when doing allocations. */ if (ahd->dev_softc != NULL) if (pci_set_dma_mask(ahd->dev_softc, 0xFFFFFFFF)) { printk(KERN_WARNING "aic79xx: No suitable DMA available.\n"); kfree(map); return (ENODEV); } 
ahd_dmamem_alloc(struct ahd_softc *ahd, bus_dma_tag_t dmat, void** vaddr,		 int flags, bus_dmamap_t *mapp){	bus_dmamap_t map;	map = malloc(sizeof(*map), M_DEVBUF, M_NOWAIT);	if (map == NULL)		return (ENOMEM);	/*	 * Although we can dma data above 4GB, our	 * "consistent" memory is below 4GB for	 * space efficiency reasons (only need a 4byte	 * address).  For this reason, we have to reset	 * our dma mask when doing allocations.	 */	if (ahd->dev_softc != NULL)		if (pci_set_dma_mask(ahd->dev_softc, 0xFFFFFFFF)) {			printk(KERN_WARNING "aic79xx: No suitable DMA available.\n");			kfree(map);			return (ENODEV);		}	*vaddr = pci_alloc_consistent(ahd->dev_softc,				      dmat->maxsize, &map->bus_addr);	if (ahd->dev_softc != NULL)		if (pci_set_dma_mask(ahd->dev_softc,				     ahd->platform_data->hw_dma_mask)) {			printk(KERN_WARNING "aic79xx: No suitable DMA available.\n");			kfree(map);			return (ENODEV);		}	if (*vaddr == NULL)		return (ENOMEM);	*mapp = map;	return(0);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/73a25462100772b72a5d62fd66dff01b53018618/aic79xx_osm.c/buggy/drivers/scsi/aic7xxx/aic79xx_osm.c