[glsdk/meta-ti-glsdk.git] / recipes-kernel / linux / linux-ti33x-psp-3.2 / 3.2.20 / 0017-solos-pci-Fix-DMA-support.patch
1 From 44882d3e1cf0d691b04f438f70a32e6b918961d7 Mon Sep 17 00:00:00 2001
2 From: David Woodhouse <dwmw2@infradead.org>
3 Date: Thu, 24 May 2012 04:58:27 +0000
4 Subject: [PATCH 17/86] solos-pci: Fix DMA support
6 commit b4bd8ad9bb311e8536f726f7a633620ccd358cde upstream.
8 DMA support has finally made its way to the top of the TODO list, having
9 realised that a Geode using MMIO can't keep up with two ADSL2+ lines
10 each running at 21Mb/s.
12 This patch fixes a couple of bugs in the DMA support in the driver, so
13 once the corresponding FPGA update is complete and tested everything
14 should work properly.
16 We weren't storing the currently-transmitting skb, so we were never
17 unmapping it and never freeing/popping it when the TX was done.
18 And the addition of pci_set_master() is fairly self-explanatory.
20 Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
21 Signed-off-by: David S. Miller <davem@davemloft.net>
22 Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
23 ---
24 drivers/atm/solos-pci.c | 4 +++-
25 1 file changed, 3 insertions(+), 1 deletion(-)
27 diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c
28 index 5d1d076..d452592 100644
29 --- a/drivers/atm/solos-pci.c
30 +++ b/drivers/atm/solos-pci.c
31 @@ -984,6 +984,7 @@ static uint32_t fpga_tx(struct solos_card *card)
32 } else if (skb && card->using_dma) {
33 SKB_CB(skb)->dma_addr = pci_map_single(card->dev, skb->data,
34 skb->len, PCI_DMA_TODEVICE);
35 + card->tx_skb[port] = skb;
36 iowrite32(SKB_CB(skb)->dma_addr,
37 card->config_regs + TX_DMA_ADDR(port));
38 }
39 @@ -1152,7 +1153,8 @@ static int fpga_probe(struct pci_dev *dev, const struct pci_device_id *id)
40 db_fpga_upgrade = db_firmware_upgrade = 0;
41 }
43 - if (card->fpga_version >= DMA_SUPPORTED){
44 + if (card->fpga_version >= DMA_SUPPORTED) {
45 + pci_set_master(dev);
46 card->using_dma = 1;
47 } else {
48 card->using_dma = 0;
49 --
50 1.7.9.5