2008-06-30 18:36:42

by Randy Dunlap

[permalink] [raw]
Subject: [PATCH] PCI: add stub for pci_set_consistent_dma_mask()

From: Randy Dunlap <[email protected]>

When CONFIG_PCI=n, there is no stub for pci_set_consistent_dma_mask(),
so add one like other similar stubs. Otherwise there can be build errors,
as here:

linux-next-20080630/drivers/ssb/main.c:1175: error: implicit declaration of function 'pci_set_consistent_dma_mask'

Signed-off-by: Randy Dunlap <[email protected]>
---
include/linux/pci.h | 5 +++++
1 file changed, 5 insertions(+)

--- linux-next-20080630.orig/include/linux/pci.h
+++ linux-next-20080630/include/linux/pci.h
@@ -854,6 +854,11 @@ static inline int pci_set_dma_mask(struc
return -EIO;
}

+static inline int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
+{
+ return -EIO;
+}
+
static inline int pci_set_dma_max_seg_size(struct pci_dev *dev,
unsigned int size)
{


---
~Randy
Linux Plumbers Conference, 17-19 September 2008, Portland, Oregon USA
http://linuxplumbersconf.org/


2008-06-30 18:42:55

by Jesse Barnes

[permalink] [raw]
Subject: Re: [PATCH] PCI: add stub for pci_set_consistent_dma_mask()

On Monday, June 30, 2008 11:35 am Randy Dunlap wrote:
> From: Randy Dunlap <[email protected]>
>
> When CONFIG_PCI=n, there is no stub for pci_set_consistent_dma_mask(),
> so add one like other similar stubs. Otherwise there can be build errors,
> as here:
>
> linux-next-20080630/drivers/ssb/main.c:1175: error: implicit declaration of
> function 'pci_set_consistent_dma_mask'
>
> Signed-off-by: Randy Dunlap <[email protected]>

Applied to linux-next, thanks Randy.

Jesse

2008-06-30 20:41:29

by Michael Büsch

[permalink] [raw]
Subject: Re: [PATCH] PCI: add stub for pci_set_consistent_dma_mask()

On Monday 30 June 2008 20:42:30 Jesse Barnes wrote:
> On Monday, June 30, 2008 11:35 am Randy Dunlap wrote:
> > From: Randy Dunlap <[email protected]>
> >
> > When CONFIG_PCI=n, there is no stub for pci_set_consistent_dma_mask(),
> > so add one like other similar stubs. Otherwise there can be build errors,
> > as here:
> >
> > linux-next-20080630/drivers/ssb/main.c:1175: error: implicit declaration of
> > function 'pci_set_consistent_dma_mask'
> >
> > Signed-off-by: Randy Dunlap <[email protected]>
>
> Applied to linux-next, thanks Randy.

I guess this is probably also needed for 2.6.26.

--
Greetings Michael.

2008-06-30 21:00:30

by Jesse Barnes

[permalink] [raw]
Subject: Re: [PATCH] PCI: add stub for pci_set_consistent_dma_mask()

On Monday, June 30, 2008 1:40 pm Michael Buesch wrote:
> On Monday 30 June 2008 20:42:30 Jesse Barnes wrote:
> > On Monday, June 30, 2008 11:35 am Randy Dunlap wrote:
> > > From: Randy Dunlap <[email protected]>
> > >
> > > When CONFIG_PCI=n, there is no stub for pci_set_consistent_dma_mask(),
> > > so add one like other similar stubs. Otherwise there can be build
> > > errors, as here:
> > >
> > > linux-next-20080630/drivers/ssb/main.c:1175: error: implicit
> > > declaration of function 'pci_set_consistent_dma_mask'
> > >
> > > Signed-off-by: Randy Dunlap <[email protected]>
> >
> > Applied to linux-next, thanks Randy.
>
> I guess this is probably also needed for 2.6.26.

Hm, current upstream seems to have pci_set_consistent_dma_mask under
CONFIG_SSB_PCIHOST, which in turn depends on PCI = y (or PCI = SSB, what does
that mean?).

But yeah, it wouldn't hurt to push this for 2.6.26 too.

Jesse

2008-06-30 21:10:47

by Michael Büsch

[permalink] [raw]
Subject: Re: [PATCH] PCI: add stub for pci_set_consistent_dma_mask()

On Monday 30 June 2008 23:00:02 Jesse Barnes wrote:
> On Monday, June 30, 2008 1:40 pm Michael Buesch wrote:
> > On Monday 30 June 2008 20:42:30 Jesse Barnes wrote:
> > > On Monday, June 30, 2008 11:35 am Randy Dunlap wrote:
> > > > From: Randy Dunlap <[email protected]>
> > > >
> > > > When CONFIG_PCI=n, there is no stub for pci_set_consistent_dma_mask(),
> > > > so add one like other similar stubs. Otherwise there can be build
> > > > errors, as here:
> > > >
> > > > linux-next-20080630/drivers/ssb/main.c:1175: error: implicit
> > > > declaration of function 'pci_set_consistent_dma_mask'
> > > >
> > > > Signed-off-by: Randy Dunlap <[email protected]>
> > >
> > > Applied to linux-next, thanks Randy.
> >
> > I guess this is probably also needed for 2.6.26.
>
> Hm, current upstream seems to have pci_set_consistent_dma_mask under
> CONFIG_SSB_PCIHOST, which in turn depends on PCI = y (or PCI = SSB, what does
> that mean?).
>
> But yeah, it wouldn't hurt to push this for 2.6.26 too.

Yeah, I wasn't talking about ssb, but rather other drivers.
Maybe there's no such user of that function, however.

--
Greetings Michael.

2008-06-30 21:13:17

by Michael Büsch

[permalink] [raw]
Subject: Re: [PATCH] PCI: add stub for pci_set_consistent_dma_mask()

On Monday 30 June 2008 23:00:02 Jesse Barnes wrote:
> On Monday, June 30, 2008 1:40 pm Michael Buesch wrote:
> > On Monday 30 June 2008 20:42:30 Jesse Barnes wrote:
> > > On Monday, June 30, 2008 11:35 am Randy Dunlap wrote:
> > > > From: Randy Dunlap <[email protected]>
> > > >
> > > > When CONFIG_PCI=n, there is no stub for pci_set_consistent_dma_mask(),
> > > > so add one like other similar stubs. Otherwise there can be build
> > > > errors, as here:
> > > >
> > > > linux-next-20080630/drivers/ssb/main.c:1175: error: implicit
> > > > declaration of function 'pci_set_consistent_dma_mask'
> > > >
> > > > Signed-off-by: Randy Dunlap <[email protected]>
> > >
> > > Applied to linux-next, thanks Randy.
> >
> > I guess this is probably also needed for 2.6.26.
>
> Hm, current upstream seems to have pci_set_consistent_dma_mask under
> CONFIG_SSB_PCIHOST,

Yeah, I wasn't talking about ssb, but rather other drivers.
Maybe there's no such user of that function, however.

--
Greetings Michael.

2008-07-02 04:32:19

by Grant Grundler

[permalink] [raw]
Subject: Re: [PATCH] PCI: add stub for pci_set_consistent_dma_mask()

On Mon, Jun 30, 2008 at 02:00:02PM -0700, Jesse Barnes wrote:
> > > Applied to linux-next, thanks Randy.
> >
> > I guess this is probably also needed for 2.6.26.
>
> Hm, current upstream seems to have pci_set_consistent_dma_mask under
> CONFIG_SSB_PCIHOST, which in turn depends on PCI = y (or PCI = SSB, what does
> that mean?).
>
> But yeah, it wouldn't hurt to push this for 2.6.26 too.

While I don't expect problems, it's not a critical fix. And there
are very few drivers that support both PCI and !PCI bus flavors.
I personally would not apply this patch to any "stable" kernel.

grant