linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Add PCI DMA support to MCB 0/2]
@ 2016-08-29 12:08 Michael Moese
  2016-08-29 12:08 ` [Add PCI DMA support to MCB 1/2] Enable PCI bus mastering by default Michael Moese
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Michael Moese @ 2016-08-29 12:08 UTC (permalink / raw)
  To: jthumshirn; +Cc: linux-kernel, Michael Moese

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Add PCI DMA support to MCB 1/2] Enable PCI bus mastering by default
  2016-08-29 12:08 [Add PCI DMA support to MCB 0/2] Michael Moese
@ 2016-08-29 12:08 ` Michael Moese
  2016-08-29 12:08 ` [Add PCI DMA support to MCB 2/2] Add a dma_device to mcb_device Michael Moese
  2016-08-29 12:25 ` [Add PCI DMA support to MCB 0/2] michael.moese
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Moese @ 2016-08-29 12:08 UTC (permalink / raw)
  To: jthumshirn; +Cc: linux-kernel, Michael Moese

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Add PCI DMA support to MCB 2/2] Add a dma_device to mcb_device
  2016-08-29 12:08 [Add PCI DMA support to MCB 0/2] Michael Moese
  2016-08-29 12:08 ` [Add PCI DMA support to MCB 1/2] Enable PCI bus mastering by default Michael Moese
@ 2016-08-29 12:08 ` Michael Moese
  2016-08-29 12:25 ` [Add PCI DMA support to MCB 0/2] michael.moese
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Moese @ 2016-08-29 12:08 UTC (permalink / raw)
  To: jthumshirn; +Cc: linux-kernel, Michael Moese

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Add PCI DMA support to MCB 0/2]
  2016-08-29 12:08 [Add PCI DMA support to MCB 0/2] Michael Moese
  2016-08-29 12:08 ` [Add PCI DMA support to MCB 1/2] Enable PCI bus mastering by default Michael Moese
  2016-08-29 12:08 ` [Add PCI DMA support to MCB 2/2] Add a dma_device to mcb_device Michael Moese
@ 2016-08-29 12:25 ` michael.moese
  2 siblings, 0 replies; 4+ messages in thread
From: michael.moese @ 2016-08-29 12:25 UTC (permalink / raw)
  To: jthumshirn; +Cc: linux-kernel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-08-29 12:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-29 12:08 [Add PCI DMA support to MCB 0/2] Michael Moese
2016-08-29 12:08 ` [Add PCI DMA support to MCB 1/2] Enable PCI bus mastering by default Michael Moese
2016-08-29 12:08 ` [Add PCI DMA support to MCB 2/2] Add a dma_device to mcb_device Michael Moese
2016-08-29 12:25 ` [Add PCI DMA support to MCB 0/2] michael.moese

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).