diff options
author | David Woodhouse <dwmw2@infradead.org> | 2012-05-24 04:58:27 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-06-10 00:36:08 +0900 |
commit | c6fb8b4e362693c4d4864de46607c558852a570a (patch) | |
tree | 2a6be55e39db0a1162f00d3e6134e5c5a0c2a6f3 | |
parent | dab0a045b4ff1689617a0fdbd4e8060770effa58 (diff) | |
download | linux-3.10-c6fb8b4e362693c4d4864de46607c558852a570a.tar.gz linux-3.10-c6fb8b4e362693c4d4864de46607c558852a570a.tar.bz2 linux-3.10-c6fb8b4e362693c4d4864de46607c558852a570a.zip |
solos-pci: Fix DMA support
commit b4bd8ad9bb311e8536f726f7a633620ccd358cde upstream.
DMA support has finally made its way to the top of the TODO list, having
realised that a Geode using MMIO can't keep up with two ADSL2+ lines
each running at 21Mb/s.
This patch fixes a couple of bugs in the DMA support in the driver, so
once the corresponding FPGA update is complete and tested everything
should work properly.
We weren't storing the currently-transmitting skb, so we were never
unmapping it and never freeing/popping it when the TX was done.
And the addition of pci_set_master() is fairly self-explanatory.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/atm/solos-pci.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c index e8cd652d201..98510931c81 100644 --- a/drivers/atm/solos-pci.c +++ b/drivers/atm/solos-pci.c @@ -984,6 +984,7 @@ static uint32_t fpga_tx(struct solos_card *card) } else if (skb && card->using_dma) { SKB_CB(skb)->dma_addr = pci_map_single(card->dev, skb->data, skb->len, PCI_DMA_TODEVICE); + card->tx_skb[port] = skb; iowrite32(SKB_CB(skb)->dma_addr, card->config_regs + TX_DMA_ADDR(port)); } @@ -1152,7 +1153,8 @@ static int fpga_probe(struct pci_dev *dev, const struct pci_device_id *id) db_fpga_upgrade = db_firmware_upgrade = 0; } - if (card->fpga_version >= DMA_SUPPORTED){ + if (card->fpga_version >= DMA_SUPPORTED) { + pci_set_master(dev); card->using_dma = 1; } else { card->using_dma = 0; |