* [PATCH 0/2] MCB patches for v4.9
@ 2016-09-14 10:05 Johannes Thumshirn
2016-09-14 10:05 ` [PATCH 1/2] Enable PCI bus mastering by default Johannes Thumshirn
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Johannes Thumshirn @ 2016-09-14 10:05 UTC (permalink / raw)
To: Greg KH; +Cc: Linux Kernel Mailinglist, Michael Moese, Johannes Thumshirn
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
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH 1/2] Enable PCI bus mastering by default 2016-09-14 10:05 [PATCH 0/2] MCB patches for v4.9 Johannes Thumshirn @ 2016-09-14 10:05 ` Johannes Thumshirn 2016-09-27 10:33 ` Greg KH 2016-09-14 10:05 ` [PATCH 2/2] Add a dma_device to mcb_device Johannes Thumshirn 2016-09-27 8:30 ` [PATCH 0/2] MCB patches for v4.9 Johannes Thumshirn 2 siblings, 1 reply; 7+ messages in thread From: Johannes Thumshirn @ 2016-09-14 10:05 UTC (permalink / raw) To: Greg KH; +Cc: Linux Kernel Mailinglist, Michael Moese, Johannes Thumshirn 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 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] Enable PCI bus mastering by default 2016-09-14 10:05 ` [PATCH 1/2] Enable PCI bus mastering by default Johannes Thumshirn @ 2016-09-27 10:33 ` Greg KH 0 siblings, 0 replies; 7+ messages in thread From: Greg KH @ 2016-09-27 10:33 UTC (permalink / raw) To: Johannes Thumshirn; +Cc: Linux Kernel Mailinglist, Michael Moese On Wed, Sep 14, 2016 at 12:05:23PM +0200, Johannes Thumshirn wrote: > 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(+) Please put a prefix on your subject lines to show what driver you are talking about, otherwise a generic subject like this doesn't make sense in the whole kernel tree. I'll go fix it up... greg k-h ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] Add a dma_device to mcb_device 2016-09-14 10:05 [PATCH 0/2] MCB patches for v4.9 Johannes Thumshirn 2016-09-14 10:05 ` [PATCH 1/2] Enable PCI bus mastering by default Johannes Thumshirn @ 2016-09-14 10:05 ` Johannes Thumshirn 2016-09-27 8:30 ` [PATCH 0/2] MCB patches for v4.9 Johannes Thumshirn 2 siblings, 0 replies; 7+ messages in thread From: Johannes Thumshirn @ 2016-09-14 10:05 UTC (permalink / raw) To: Greg KH; +Cc: Linux Kernel Mailinglist, Michael Moese, Johannes Thumshirn 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 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] MCB patches for v4.9 2016-09-14 10:05 [PATCH 0/2] MCB patches for v4.9 Johannes Thumshirn 2016-09-14 10:05 ` [PATCH 1/2] Enable PCI bus mastering by default Johannes Thumshirn 2016-09-14 10:05 ` [PATCH 2/2] Add a dma_device to mcb_device Johannes Thumshirn @ 2016-09-27 8:30 ` Johannes Thumshirn 2016-09-27 10:32 ` Greg KH 2 siblings, 1 reply; 7+ messages in thread From: Johannes Thumshirn @ 2016-09-27 8:30 UTC (permalink / raw) To: Greg KH; +Cc: Linux Kernel Mailinglist, Michael Moese On Wed, Sep 14, 2016 at 12:05:22PM +0200, Johannes Thumshirn wrote: > 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 > Gentle ping on this... -- Johannes Thumshirn Storage jthumshirn@suse.de +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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] MCB patches for v4.9 2016-09-27 8:30 ` [PATCH 0/2] MCB patches for v4.9 Johannes Thumshirn @ 2016-09-27 10:32 ` Greg KH 2016-09-27 11:02 ` Johannes Thumshirn 0 siblings, 1 reply; 7+ messages in thread From: Greg KH @ 2016-09-27 10:32 UTC (permalink / raw) To: Johannes Thumshirn; +Cc: Linux Kernel Mailinglist, Michael Moese On Tue, Sep 27, 2016 at 10:30:45AM +0200, Johannes Thumshirn wrote: > On Wed, Sep 14, 2016 at 12:05:22PM +0200, Johannes Thumshirn wrote: > > 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 > > > > Gentle ping on this... Sorry about that, will get to it today... ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] MCB patches for v4.9 2016-09-27 10:32 ` Greg KH @ 2016-09-27 11:02 ` Johannes Thumshirn 0 siblings, 0 replies; 7+ messages in thread From: Johannes Thumshirn @ 2016-09-27 11:02 UTC (permalink / raw) To: Greg KH; +Cc: Linux Kernel Mailinglist, Michael Moese On Tue, Sep 27, 2016 at 12:32:34PM +0200, Greg KH wrote: > On Tue, Sep 27, 2016 at 10:30:45AM +0200, Johannes Thumshirn wrote: > > On Wed, Sep 14, 2016 at 12:05:22PM +0200, Johannes Thumshirn wrote: > > > 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 > > > > > > > Gentle ping on this... > > Sorry about that, will get to it today... Thanks :-) -- Johannes Thumshirn Storage jthumshirn@suse.de +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 ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-09-27 11:02 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-09-14 10:05 [PATCH 0/2] MCB patches for v4.9 Johannes Thumshirn 2016-09-14 10:05 ` [PATCH 1/2] Enable PCI bus mastering by default Johannes Thumshirn 2016-09-27 10:33 ` Greg KH 2016-09-14 10:05 ` [PATCH 2/2] Add a dma_device to mcb_device Johannes Thumshirn 2016-09-27 8:30 ` [PATCH 0/2] MCB patches for v4.9 Johannes Thumshirn 2016-09-27 10:32 ` Greg KH 2016-09-27 11:02 ` Johannes Thumshirn
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox