/* invaild or writeback cache and convert virtual address to physical address  */
dma_addr_t linux_pci_map_single(void *handle, void *ptr, size_t size, int sd_idx, int direction)
/* invaild or writeback cache and convert virtual address to physical address  */
dma_addr_t linux_pci_map_single(void *handle, void *ptr, size_t size, int sd_idx, int direction)
{
	struct rt_rtmp_adapter *pAd;
	struct os_cookie *pObj;
	pAd = (struct rt_rtmp_adapter *)handle;
	pObj = (struct os_cookie *)pAd->OS_Cookie;
	if (sd_idx == 1) {
		struct rt_tx_blk *pTxBlk;
		pTxBlk = (struct rt_tx_blk *)ptr;
		return pci_map_single(pObj->pci_dev, pTxBlk->pSrcBufData,
				      pTxBlk->SrcBufLen, direction);
	} else {
		return pci_map_single(pObj->pci_dev, ptr, size, direction);
	}
}