/* Allocate a shared buffer in host memory that can be used by both the kernel and also the hardware interface via DMA.  */
static int sep_map_and_alloc_shared_area(struct sep_device *sep, unsigned long size)
/* Allocate a shared buffer in host memory that can be used by both the kernel and also the hardware interface via DMA.  */
static int sep_map_and_alloc_shared_area(struct sep_device *sep, unsigned long size)
{
	sep->shared_addr = dma_alloc_coherent(&sep->pdev->dev, size,
					&sep->shared_bus, GFP_KERNEL);
	if (!sep->shared_addr) {
		edbg("sep_driver :shared memory dma_alloc_coherent failed\n");
		return -ENOMEM;
	}
	edbg("sep: shared_addr %ld bytes @%p (bus %08llx)\n",
		size, sep->shared_addr, (unsigned long long)sep->shared_bus);
	return 0;
}