/* Check if the whole buffer is DMA-able. It means it is below the 16M of physical memory and doesn't span the 64k boundary. For now it seems SKB's never do this, but we'll check this anyway.  */
static int cosa_dma_able(struct channel_data *chan, char *buf, int data)
/* Check if the whole buffer is DMA-able. It means it is below the 16M of physical memory and doesn't span the 64k boundary. For now it seems SKB's never do this, but we'll check this anyway.  */
static int cosa_dma_able(struct channel_data *chan, char *buf, int data)
{
	static int count;
	unsigned long b = (unsigned long)buf;
	if (b+len >= MAX_DMA_ADDRESS)
		return 0;
	if ((b^ (b+len)) & 0x10000) {
		if (count++ < 5)
			printk(KERN_INFO "%s: packet spanning a 64k boundary\n",
				chan->name);
		return 0;
	}
	return 1;
}