Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263920
b: refs/heads/master
c: 5229d87
h: refs/heads/master
v: v3
  • Loading branch information
Toshiharu Okada authored and David S. Miller committed Sep 15, 2011
1 parent 6a70db2 commit acbd451
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 483f97f8b2b7f0ab09e14c06fe327d5e346fac28
refs/heads/master: 5229d87edcd80a3bceb0708ebd767faff2e589a9
21 changes: 14 additions & 7 deletions trunk/drivers/net/pch_gbe/pch_gbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -717,13 +717,6 @@ static void pch_gbe_configure_rx(struct pch_gbe_adapter *adapter)
iowrite32(rdba, &hw->reg->RX_DSC_BASE);
iowrite32(rdlen, &hw->reg->RX_DSC_SIZE);
iowrite32((rdba + rdlen), &hw->reg->RX_DSC_SW_P);

/* Enables Receive DMA */
rxdma = ioread32(&hw->reg->DMA_CTRL);
rxdma |= PCH_GBE_RX_DMA_EN;
iowrite32(rxdma, &hw->reg->DMA_CTRL);
/* Enables Receive */
iowrite32(PCH_GBE_MRE_MAC_RX_EN, &hw->reg->MAC_RX_EN);
}

/**
Expand Down Expand Up @@ -1097,6 +1090,19 @@ void pch_gbe_update_stats(struct pch_gbe_adapter *adapter)
spin_unlock_irqrestore(&adapter->stats_lock, flags);
}

static void pch_gbe_start_receive(struct pch_gbe_hw *hw)
{
u32 rxdma;

/* Enables Receive DMA */
rxdma = ioread32(&hw->reg->DMA_CTRL);
rxdma |= PCH_GBE_RX_DMA_EN;
iowrite32(rxdma, &hw->reg->DMA_CTRL);
/* Enables Receive */
iowrite32(PCH_GBE_MRE_MAC_RX_EN, &hw->reg->MAC_RX_EN);
return;
}

/**
* pch_gbe_intr - Interrupt Handler
* @irq: Interrupt number
Expand Down Expand Up @@ -1717,6 +1723,7 @@ int pch_gbe_up(struct pch_gbe_adapter *adapter)
pch_gbe_alloc_tx_buffers(adapter, tx_ring);
pch_gbe_alloc_rx_buffers(adapter, rx_ring, rx_ring->count);
adapter->tx_queue_len = netdev->tx_queue_len;
pch_gbe_start_receive(&adapter->hw);

mod_timer(&adapter->watchdog_timer, jiffies);

Expand Down

0 comments on commit acbd451

Please sign in to comment.