Skip to contentSkip to conversation

PCI: add stub for pci_set_consistent_dma_mask()

PATCH Applied Randy Dunlap 4 participants 7 messages Jun 30, 2008 – Jul 2, 2008 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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'

---
 include/linux/pci.h |    5 +++++
 1 file changed, 5 insertions(+)
include/linux/pci.h +5 -0
@@ -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/

Applied
#1 lore raw
Quoted 10 lines · Randy Dunlap

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'

Applied to linux-next, thanks Randy.

Jesse

#2 lore raw
Quoted 7 lines · On Monday 30 June 2008 20:42:30 Jesse Barnes wrote:
Quoted 6 lines · Randy Dunlap

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:

Quoted 6 lines
Quoted 4 lines

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

Applied to linux-next, thanks Randy.

I guess this is probably also needed for 2.6.26.

Signature · 1 line
Greetings Michael.
#3 lore raw
Quoted 8 lines · Michael Buesch
Quoted 7 lines · On Monday 30 June 2008 20:42:30 Jesse Barnes wrote:
Quoted 6 lines · Randy Dunlap

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:

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

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

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

#4 lore raw
Quoted 16 lines · On Monday 30 June 2008 23:00:02 Jesse Barnes wrote:
Quoted 15 lines · Michael Buesch
Quoted 13 lines · On Monday 30 June 2008 20:42:30 Jesse Barnes wrote:
Quoted 10 lines · Randy Dunlap

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'

Applied to linux-next, thanks Randy.

Quoted 7 lines
Quoted 1 line

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.

Signature · 1 line
Greetings Michael.
#5 lore raw
In reply to Jesse Barnes
Quoted 12 lines · On Monday 30 June 2008 23:00:02 Jesse Barnes wrote:
Quoted 11 lines · Michael Buesch
Quoted 10 lines · On Monday 30 June 2008 20:42:30 Jesse Barnes wrote:
Quoted 9 lines · Randy Dunlap

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'

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

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.

Signature · 1 line
Greetings Michael.
#6 lore raw
In reply to Jesse Barnes
Quoted 9 lines · Jesse Barnes
Quoted 3 lines
Quoted 1 line

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