mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-17 12:41:32 +00:00
net: e1000: Use virt_to_phys() instead of pci_virt_to_mem()
Using (dm_)pci_virt_to_mem() is incorrect to translate the virtual address in local DRAM to a physical address. The correct macro here is virt_to_phys() so switch to using this macro. As virt_to_bus() is now not used any more, this patch also removes both definitions (DM and non-DM). This issue was detected while testing the e1000 driver on the MIPS Octeon III platform, which needs address translation. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Aaron Williams <awilliams@marvell.com> Cc: Chandrakala Chavva <cchavva@marvell.com>
This commit is contained in:
parent
55f0103567
commit
919c8ede86
1 changed files with 1 additions and 7 deletions
|
@ -45,12 +45,6 @@ tested on both gig copper and gig fiber boards
|
|||
|
||||
#define TOUT_LOOP 100000
|
||||
|
||||
#ifdef CONFIG_DM_ETH
|
||||
#define virt_to_bus(devno, v) dm_pci_virt_to_mem(devno, (void *) (v))
|
||||
#else
|
||||
#define virt_to_bus(devno, v) pci_virt_to_mem(devno, (void *) (v))
|
||||
#endif
|
||||
|
||||
#define E1000_DEFAULT_PCI_PBA 0x00000030
|
||||
#define E1000_DEFAULT_PCIE_PBA 0x000a0026
|
||||
|
||||
|
@ -5385,7 +5379,7 @@ static int _e1000_transmit(struct e1000_hw *hw, void *txpacket, int length)
|
|||
txp = tx_base + tx_tail;
|
||||
tx_tail = (tx_tail + 1) % 8;
|
||||
|
||||
txp->buffer_addr = cpu_to_le64(virt_to_bus(hw->pdev, nv_packet));
|
||||
txp->buffer_addr = cpu_to_le64(virt_to_phys(nv_packet));
|
||||
txp->lower.data = cpu_to_le32(hw->txd_cmd | length);
|
||||
txp->upper.data = 0;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue