rd = rx_base + rx_tail;
rx_tail = (rx_tail + 1) % 8;
memset(rd, 0, 16);
- rd->buffer_addr = cpu_to_le64((unsigned long)packet);
+ rd->buffer_addr = cpu_to_le64(virt_to_phys(packet));
/*
* Make sure there are no stale data in WB over this area, which
unsigned long tipg, tarc;
uint32_t ipgr1, ipgr2;
- E1000_WRITE_REG(hw, TDBAL, lower_32_bits((unsigned long)tx_base));
- E1000_WRITE_REG(hw, TDBAH, upper_32_bits((unsigned long)tx_base));
+ E1000_WRITE_REG(hw, TDBAL, lower_32_bits(virt_to_phys(tx_base)));
+ E1000_WRITE_REG(hw, TDBAH, upper_32_bits(virt_to_phys(tx_base)));
E1000_WRITE_REG(hw, TDLEN, 128);
E1000_WRITE_FLUSH(hw);
}
/* Setup the Base and Length of the Rx Descriptor Ring */
- E1000_WRITE_REG(hw, RDBAL, lower_32_bits((unsigned long)rx_base));
- E1000_WRITE_REG(hw, RDBAH, upper_32_bits((unsigned long)rx_base));
+ E1000_WRITE_REG(hw, RDBAL, lower_32_bits(virt_to_phys(rx_base)));
+ E1000_WRITE_REG(hw, RDBAH, upper_32_bits(virt_to_phys(rx_base)));
E1000_WRITE_REG(hw, RDLEN, 128);