Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1483143 > unrolled thread
| Started by | Johannes Thumshirn <jthumshirn@suse.de> |
|---|---|
| First post | 2016-09-14 12:10 +0200 |
| Last post | 2016-09-14 12:10 +0200 |
| Articles | 3 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH 0/2] MCB patches for v4.9 Johannes Thumshirn <jthumshirn@suse.de> - 2016-09-14 12:10 +0200
[PATCH 1/2] Enable PCI bus mastering by default Johannes Thumshirn <jthumshirn@suse.de> - 2016-09-14 12:10 +0200
[PATCH 2/2] Add a dma_device to mcb_device Johannes Thumshirn <jthumshirn@suse.de> - 2016-09-14 12:10 +0200
| From | Johannes Thumshirn <jthumshirn@suse.de> |
|---|---|
| Date | 2016-09-14 12:10 +0200 |
| Subject | [PATCH 0/2] MCB patches for v4.9 |
| Message-ID | <shfiF-7ZI-5@gated-at.bofh.it> |
Hi Greg, Here are the additional MCB patches for v4.9. They're around enabling of DMA for devices on an MCBus, are tested and apply cleanly against your char-misc-next tree. Thanks, Johannes 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(+) -- 1.8.5.6
[toc] | [next] | [standalone]
| From | Johannes Thumshirn <jthumshirn@suse.de> |
|---|---|
| Date | 2016-09-14 12:10 +0200 |
| Subject | [PATCH 1/2] Enable PCI bus mastering by default |
| Message-ID | <shfiF-7ZI-17@gated-at.bofh.it> |
| In reply to | #1483143 |
From: Michael Moese <michael.moese@men.de>
In order to successfully perform DMA operations on PCI devices,
it is necessary to enble PCI bus mastering, so enable it by default.
Signed-off-by: Michael Moese <michael.moese@men.de>
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.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) {
--
1.8.5.6
[toc] | [prev] | [next] | [standalone]
| From | Johannes Thumshirn <jthumshirn@suse.de> |
|---|---|
| Date | 2016-09-14 12:10 +0200 |
| Subject | [PATCH 2/2] Add a dma_device to mcb_device |
| Message-ID | <shfiF-7ZI-25@gated-at.bofh.it> |
| In reply to | #1483143 |
From: Michael Moese <michael.moese@men.de>
When performing DMA operations on a MCB device, the device needed
for using the DMA API is "mcb_device->bus_carrier".
This is rather lengthy, so a shortcut is introduced to struct mcb_device
in order to ensure the MCB device driver uses the correct device for DMA
operations.
Signed-off-by: Michael Moese <michael.moese@men.de>
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.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..921a5d2 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_dev = 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)
--
1.8.5.6
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web