[Add PCI DMA support to MCB 0/2]
cover [Add PCI DMA support to MCB 0/2]
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
PATCH 1/2 Enable PCI bus mastering by default
--- drivers/mcb/mcb-pci.c | 1 + 1 file changed, 1 insertion(+)
drivers/mcb/mcb-pci.c +1 -0
@@ -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) {
Signature · 1 line
2.6.6
PATCH 2/2 Add a dma_device to mcb_device
In reply to Michael Moese--- drivers/mcb/mcb-core.c | 1 + include/linux/mcb.h | 1 + 2 files changed, 2 insertions(+)
drivers/mcb/mcb-core.c +1 -0
@@ -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",
include/linux/mcb.h +1 -0
@@ -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)
Signature · 1 line
2.6.6
I'm sorry for the errors in the patches.
I'll correct them and resend everything.
Quoted 19 lines · 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_deviceto themcb_devicefor all devices as a shortcut tomcb_device->bus->carrier.Michael Moese (2):
Enable PCI bus mastering by default
Add adma_devicetomcb_devicedrivers/mcb/mcb-core.c | 1 + drivers/mcb/mcb-pci.c | 1 + include/linux/mcb.h | 1 + 3 files changed, 3 insertions(+)--
2.6.6