Add a dma_device to mcb_device
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v2 1/2 Enable PCI bus mastering by default
In order to successfully perform DMA operations on PCI devices, it is necessary to enble PCI bus mastering, so enable it 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
Re: [PATCH v2 1/2] Enable PCI bus mastering by default
Quoted 5 lines · Michael Moese
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 <[email protected]>---
Applied thanks.
I'm not pushing the commit's out, as I'll wait if Greg to applies the mcb-for-4.8 patches before or not. This would remove the burden of a rebase and force-push.
Signature · 6 lines
Johannes Thumshirn Storage [email protected] +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
PATCH v2 2/2 Add a dma_device to mcb_device
In reply to a message not in the archiveWhen 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.
--- 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_dev = 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
Johannes Thumshirn
AppliedQuoted 8 lines · Michael Moese
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 structmcb_devicein order to ensure the MCB device driver uses the correct device for DMA operations.Signed-off-by Michael Moese <[email protected]>---
Applied, thanks.
Signature · 6 lines
Johannes Thumshirn Storage [email protected] +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850