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/
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
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.
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
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.
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.
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