diff options
Diffstat (limited to 'drivers/net/e1000/main.c')
-rw-r--r-- | drivers/net/e1000/main.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/e1000/main.c b/drivers/net/e1000/main.c index 363730de0a..76acea563e 100644 --- a/drivers/net/e1000/main.c +++ b/drivers/net/e1000/main.c @@ -3226,7 +3226,7 @@ static int e1000_sw_init(struct eth_device *edev) /* identify the MAC */ result = e1000_set_mac_type(hw); if (result) { - dev_err(&hw->edev.dev, "Unknown MAC Type\n"); + dev_err(hw->dev, "Unknown MAC Type\n"); return result; } @@ -3267,7 +3267,7 @@ static void e1000_configure_tx(struct e1000_hw *hw) unsigned long tctl; unsigned long tipg, tarc; uint32_t ipgr1, ipgr2; - const unsigned long tx_base = (unsigned long)hw->tx_base; + const unsigned long tx_base = (unsigned long)hw->tx_base_phys; e1000_write_reg(hw, E1000_TDBAL, lower_32_bits(tx_base)); e1000_write_reg(hw, E1000_TDBAH, upper_32_bits(tx_base)); @@ -3386,7 +3386,7 @@ static void e1000_setup_rctl(struct e1000_hw *hw) static void e1000_configure_rx(struct e1000_hw *hw) { unsigned long rctl, ctrl_ext; - const unsigned long rx_base = (unsigned long)hw->rx_base; + const unsigned long rx_base = (unsigned long)hw->rx_base_phys; hw->rx_tail = 0; /* make sure receives are disabled while setting up the descriptors */ @@ -3438,12 +3438,12 @@ static int e1000_poll(struct eth_device *edev) if (readb(&rd->status) & E1000_RXD_STAT_DD) { const uint16_t len = readw(&rd->length); - dma_sync_single_for_cpu(hw->packet_dma, len, + dma_sync_single_for_cpu(hw->dev, hw->packet_dma, len, DMA_FROM_DEVICE); net_receive(edev, hw->packet, len); - dma_sync_single_for_device(hw->packet_dma, len, + dma_sync_single_for_device(hw->dev, hw->packet_dma, len, DMA_FROM_DEVICE); e1000_fill_rx(hw); return 1; @@ -3476,7 +3476,7 @@ static int e1000_transmit(struct eth_device *edev, void *txpacket, int length) ret = readl_poll_timeout(&txp->upper.data, stat, stat & E1000_TXD_STAT_DD, - MSECOND / USECOND); + USEC_PER_MSEC); if (ret) dev_dbg(hw->dev, "e1000: tx timeout\n"); @@ -3595,8 +3595,8 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *id) hw = xzalloc(sizeof(*hw)); - hw->tx_base = dma_alloc_coherent(16 * sizeof(*hw->tx_base), DMA_ADDRESS_BROKEN); - hw->rx_base = dma_alloc_coherent(16 * sizeof(*hw->rx_base), DMA_ADDRESS_BROKEN); + hw->tx_base = dma_alloc_coherent(16 * sizeof(*hw->tx_base), &hw->tx_base_phys); + hw->rx_base = dma_alloc_coherent(16 * sizeof(*hw->rx_base), &hw->rx_base_phys); edev = &hw->edev; |