diff options
author | Alan Cox <alan@linux.intel.com> | 2009-10-06 15:48:49 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-11 12:23:06 -0800 |
commit | 9c60684b723906691e814e1bcfadb9f32bf2cc4d (patch) | |
tree | d0dcb81e84088210676d645ba9b3d744c7ee1291 /drivers/staging/et131x/et1310_tx.c | |
parent | Staging: et131x: the stuck descriptor copy is never used (diff) | |
download | linux-dev-9c60684b723906691e814e1bcfadb9f32bf2cc4d.tar.xz linux-dev-9c60684b723906691e814e1bcfadb9f32bf2cc4d.zip |
Staging: et131x: pci_alloc_consistent DMA alignment is guaranteed
So we can remove this alignment work.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/et131x/et1310_tx.c')
-rw-r--r-- | drivers/staging/et131x/et1310_tx.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/staging/et131x/et1310_tx.c b/drivers/staging/et131x/et1310_tx.c index 8beb029fab1c..b2e4950b002a 100644 --- a/drivers/staging/et131x/et1310_tx.c +++ b/drivers/staging/et131x/et1310_tx.c @@ -146,15 +146,6 @@ int et131x_tx_dma_memory_alloc(struct et131x_adapter *adapter) * are ever returned, make sure the high part is retrieved here before * storing the adjusted address. */ - tx_ring->pTxDescRingAdjustedPa = tx_ring->tx_desc_ring_pa; - - /* Align Tx Descriptor Ring on a 4k (0x1000) byte boundary */ - et131x_align_allocated_memory(adapter, - &tx_ring->pTxDescRingAdjustedPa, - &tx_ring->TxDescOffset, 0x0FFF); - - tx_ring->tx_desc_ring += tx_ring->TxDescOffset; - /* Allocate memory for the Tx status block */ tx_ring->pTxStatusVa = pci_alloc_consistent(adapter->pdev, sizeof(TX_STATUS_BLOCK_t), @@ -190,16 +181,12 @@ void et131x_tx_dma_memory_free(struct et131x_adapter *adapter) if (adapter->tx_ring.tx_desc_ring) { /* Free memory relating to Tx rings here */ - adapter->tx_ring.tx_desc_ring -= adapter->tx_ring.TxDescOffset; - desc_size = (sizeof(struct tx_desc) * NUM_DESC_PER_RING_TX) + 4096 - 1; - pci_free_consistent(adapter->pdev, desc_size, adapter->tx_ring.tx_desc_ring, adapter->tx_ring.tx_desc_ring_pa); - adapter->tx_ring.tx_desc_ring = NULL; } @@ -236,9 +223,9 @@ void ConfigTxDmaRegs(struct et131x_adapter *etdev) struct _TXDMA_t __iomem *txdma = &etdev->regs->txdma; /* Load the hardware with the start of the transmit descriptor ring. */ - writel((u32) (etdev->tx_ring.pTxDescRingAdjustedPa >> 32), + writel((u32) ((u64)etdev->tx_ring.tx_desc_ring_pa >> 32), &txdma->pr_base_hi); - writel((u32) etdev->tx_ring.pTxDescRingAdjustedPa, + writel((u32) etdev->tx_ring.tx_desc_ring_pa, &txdma->pr_base_lo); /* Initialise the transmit DMA engine */ |