[PATCH] PCI: add stub for pci_set_consistent_dma_mask() - Kernel

This is a discussion on [PATCH] PCI: add stub for pci_set_consistent_dma_mask() - Kernel ; From: Randy Dunlap 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 --- include/linux/pci.h | 5 ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: [PATCH] PCI: add stub for pci_set_consistent_dma_mask()

  1. [PATCH] PCI: add stub for pci_set_consistent_dma_mask()

    From: Randy Dunlap

    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
    ---
    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/
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

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


    Applied to linux-next, thanks Randy.

    Jesse
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

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

    >
    > Applied to linux-next, thanks Randy.


    I guess this is probably also needed for 2.6.26.

    --
    Greetings Michael.
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

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

    > >
    > > 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
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  5. 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
    > > > >
    > > > > 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
    > > >
    > > > 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.
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  6. 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
    > > > >
    > > > > 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
    > > >
    > > > 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.
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  7. 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
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

+ Reply to Thread