Using DMA_NO_ZERO_ADDR
DMA_NO_ZERO_ADDR is supplied on the d_map_init service or the d_map_init_ext service to prevent d_map_page and d_map_list from giving out bus address zero to this d_handle.
Because many off-the-shelf PCI devices are not tested for bus address of zero, such devices might not work. Striking out bus address 0 causes a driver's mappable memory to shrink by one I/O page (4 KB). On some systems, using the flag would cause the d_map_init service or the d_map_init_ext service to fail even if there is not an error condition. In such a case, the driver should call the d_map_init service or the d_map_init_ext service without the flag and then check the bus address to see whether zero falls in its range of addresses. The driver can do this by mapping all of its range and checking for address 0. Such a check should be done at the driver initialization time. If bus address 0 is assigned to the driver, it can leave it mapped for the life of the driver and unmap all other addresses. This guarantees that address 0 is not assigned to it again.