Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1471761 > unrolled thread

[Add PCI DMA support to MCB 0/2]

Started byMichael Moese <michael.moese@men.de>
First post2016-08-29 14:20 +0200
Last post2016-08-29 14:30 +0200
Articles 4 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [Add PCI DMA support to MCB 0/2]  Michael Moese <michael.moese@men.de> - 2016-08-29 14:20 +0200
    [Add PCI DMA support to MCB 2/2] Add a dma_device to mcb_device Michael Moese <michael.moese@men.de> - 2016-08-29 14:20 +0200
    [Add PCI DMA support to MCB 1/2] Enable PCI bus mastering by default Michael Moese <michael.moese@men.de> - 2016-08-29 14:20 +0200
    Re: [Add PCI DMA support to MCB 0/2] <michael.moese@men.de> - 2016-08-29 14:30 +0200

#1471761 — [Add PCI DMA support to MCB 0/2]

FromMichael Moese <michael.moese@men.de>
Date2016-08-29 14:20 +0200
Subject[Add PCI DMA support to MCB 0/2]
Message-ID<sbtHI-7bR-13@gated-at.bofh.it>
This small series of two patches enable (PCI) DMA support in MCB.

The first patch enables PCI bus mastering by default for all
PCI-based MCB devices.

The second patch adds a dma_device to the mcb_device for all devices
as a shortcut to mcb_device->bus->carrier.

Michael Moese (2):
  Enable PCI bus mastering by default
  Add a dma_device to mcb_device

 drivers/mcb/mcb-core.c | 1 +
 drivers/mcb/mcb-pci.c  | 1 +
 include/linux/mcb.h    | 1 +
 3 files changed, 3 insertions(+)

--
2.6.6

[toc] | [next] | [standalone]


#1471764 — [Add PCI DMA support to MCB 2/2] Add a dma_device to mcb_device

FromMichael Moese <michael.moese@men.de>
Date2016-08-29 14:20 +0200
Subject[Add PCI DMA support to MCB 2/2] Add a dma_device to mcb_device
Message-ID<sbtHI-7bR-21@gated-at.bofh.it>
In reply to#1471761
Signed-off-by: Michael Moese <michael.moese@men.de>
---
 drivers/mcb/mcb-core.c | 1 +
 include/linux/mcb.h    | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/mcb/mcb-core.c b/drivers/mcb/mcb-core.c
index 5306966..e74bfea 100644
--- a/drivers/mcb/mcb-core.c
+++ b/drivers/mcb/mcb-core.c
@@ -233,6 +233,7 @@ int mcb_device_register(struct mcb_bus *bus, struct mcb_device *dev)
 	dev->dev.bus = &mcb_bus_type;
 	dev->dev.parent = bus->dev.parent;
 	dev->dev.release = mcb_release_dev;
+	dev->dma_device = bus->carrier;
 
 	device_id = dev->id;
 	dev_set_name(&dev->dev, "mcb%d-16z%03d-%d:%d:%d",
diff --git a/include/linux/mcb.h b/include/linux/mcb.h
index ee5200d..4097ac9 100644
--- a/include/linux/mcb.h
+++ b/include/linux/mcb.h
@@ -76,6 +76,7 @@ struct mcb_device {
 	int rev;
 	struct resource irq;
 	struct resource mem;
+	struct device *dma_dev;
 };
 
 static inline struct mcb_device *to_mcb_device(struct device *dev)
-- 
2.6.6

[toc] | [prev] | [next] | [standalone]


#1471767 — [Add PCI DMA support to MCB 1/2] Enable PCI bus mastering by default

FromMichael Moese <michael.moese@men.de>
Date2016-08-29 14:20 +0200
Subject[Add PCI DMA support to MCB 1/2] Enable PCI bus mastering by default
Message-ID<sbtHI-7bR-17@gated-at.bofh.it>
In reply to#1471761
Signed-off-by: Michael Moese <michael.moese@men.de>
---
 drivers/mcb/mcb-pci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mcb/mcb-pci.c b/drivers/mcb/mcb-pci.c
index b15a034..af4d2f2 100644
--- a/drivers/mcb/mcb-pci.c
+++ b/drivers/mcb/mcb-pci.c
@@ -46,6 +46,7 @@ static int mcb_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 		dev_err(&pdev->dev, "Failed to enable PCI device\n");
 		return -ENODEV;
 	}
+	pci_set_master(pdev);
 
 	priv->mapbase = pci_resource_start(pdev, 0);
 	if (!priv->mapbase) {
-- 
2.6.6

[toc] | [prev] | [next] | [standalone]


#1471780

From<michael.moese@men.de>
Date2016-08-29 14:30 +0200
Message-ID<sbtRo-7g9-37@gated-at.bofh.it>
In reply to#1471761
I'm sorry for the errors in the patches.
I'll correct them and resend everything.

On Mon, Aug 29, 2016 at 02:08:21PM +0200, Michael Moese wrote:
> This small series of two patches enable (PCI) DMA support in MCB.
> 
> The first patch enables PCI bus mastering by default for all
> PCI-based MCB devices.
> 
> The second patch adds a dma_device to the mcb_device for all devices
> as a shortcut to mcb_device->bus->carrier.
> 
> Michael Moese (2):
>   Enable PCI bus mastering by default
>   Add a dma_device to mcb_device
> 
>  drivers/mcb/mcb-core.c | 1 +
>  drivers/mcb/mcb-pci.c  | 1 +
>  include/linux/mcb.h    | 1 +
>  3 files changed, 3 insertions(+)
> 
> --
> 2.6.6

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web