[openib-general][PATCH][SRP] bug fixes & fmr supported,

Christoph Hellwig hch at lst.de
Wed Sep 21 01:43:00 PDT 2005


> +		if ((dma_addr & (PAGE_SIZE - 1)) ||
> +		    ((dma_addr + dma_len) & (PAGE_SIZE - 1)) ||
> +		    ((i == (sg_cnt - 1)) && !unaligned)) {
> +			srp_fmr->io_addr = dma_addr & PAGE_MASK;
> +			++unaligned;
> +		}
> +
> +		if (unaligned <= 1) {
> +			cur_len += dma_len;
> +			for (base_addr = dma_addr;
> +			     (dma_addr & PAGE_MASK) <=
> +			     ((base_addr + dma_len - 1) & PAGE_MASK);
> +			     dma_addr += PAGE_SIZE)
> +				dma_pages[page_cnt++] = dma_addr & PAGE_MASK;
> +		}
> +
> +		if ((unaligned > 1) || (i == (sg_cnt - 1))) {

this is definitly completely broken.  dma_addr_ts are opaqueue handles,
some platforms use high bits in them for iommu flags.




More information about the general mailing list