* [PATCH] ssb: Fix coherent DMA mask for PCI devices
@ 2008-06-12 13:33 Michael Buesch
[not found] ` <200806121533.14435.mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Michael Buesch @ 2008-06-12 13:33 UTC (permalink / raw)
To: John Linville
Cc: linux-wireless, netdev, linux-kernel, Kirill A. Shutemov,
Glauber Costa
This fixes setting the coherent DMA mask for PCI devices.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
---
John, please queue this bugfix for 2.6.26
The whole SSB DMA API should be rewritten, as it makes too many bad
assumptions about the other subsytems. I will do that soon.
But let's apply this patch for now, as it fixes this particular bug.
Index: wireless-testing/drivers/ssb/main.c
===================================================================
--- wireless-testing.orig/drivers/ssb/main.c 2008-05-17 18:44:32.000000000 +0200
+++ wireless-testing/drivers/ssb/main.c 2008-06-12 15:24:04.000000000 +0200
@@ -1165,21 +1165,27 @@ u32 ssb_dma_translation(struct ssb_devic
}
EXPORT_SYMBOL(ssb_dma_translation);
int ssb_dma_set_mask(struct ssb_device *ssb_dev, u64 mask)
{
struct device *dma_dev = ssb_dev->dma_dev;
+ int err = 0;
#ifdef CONFIG_SSB_PCIHOST
- if (ssb_dev->bus->bustype == SSB_BUSTYPE_PCI)
- return dma_set_mask(dma_dev, mask);
+ if (ssb_dev->bus->bustype == SSB_BUSTYPE_PCI) {
+ err = pci_set_dma_mask(ssb_dev->bus->host_pci, mask);
+ if (err)
+ return err;
+ err = pci_set_consistent_dma_mask(ssb_dev->bus->host_pci, mask);
+ return err;
+ }
#endif
dma_dev->coherent_dma_mask = mask;
dma_dev->dma_mask = &dma_dev->coherent_dma_mask;
- return 0;
+ return err;
}
EXPORT_SYMBOL(ssb_dma_set_mask);
int ssb_bus_may_powerdown(struct ssb_bus *bus)
{
struct ssb_chipcommon *cc;
^ permalink raw reply [flat|nested] 3+ messages in thread[parent not found: <200806121533.14435.mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>]
* Re: [PATCH] ssb: Fix coherent DMA mask for PCI devices [not found] ` <200806121533.14435.mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org> @ 2008-06-12 21:44 ` Pekka Enberg [not found] ` <84144f020806121444i43d381ehdee1774c135d8841-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Pekka Enberg @ 2008-06-12 21:44 UTC (permalink / raw) To: Michael Buesch Cc: John Linville, linux-wireless-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA, linux-kernel, Kirill A. Shutemov, Glauber Costa On Thu, Jun 12, 2008 at 4:33 PM, Michael Buesch <mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org> wrote: > This fixes setting the coherent DMA mask for PCI devices. > > Signed-off-by: Michael Buesch <mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org> > > --- > > John, please queue this bugfix for 2.6.26 > > The whole SSB DMA API should be rewritten, as it makes too many bad > assumptions about the other subsytems. I will do that soon. > But let's apply this patch for now, as it fixes this particular bug. Hmm. Does the patch have anything to do with this bug report? http://bugzilla.kernel.org/show_bug.cgi?id=10819 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <84144f020806121444i43d381ehdee1774c135d8841-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] ssb: Fix coherent DMA mask for PCI devices [not found] ` <84144f020806121444i43d381ehdee1774c135d8841-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2008-06-12 23:21 ` Michael Buesch 0 siblings, 0 replies; 3+ messages in thread From: Michael Buesch @ 2008-06-12 23:21 UTC (permalink / raw) To: Pekka Enberg Cc: John Linville, linux-wireless-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA, linux-kernel, Kirill A. Shutemov, Glauber Costa On Thursday 12 June 2008 23:44:13 Pekka Enberg wrote: > On Thu, Jun 12, 2008 at 4:33 PM, Michael Buesch <mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org> wrote: > > This fixes setting the coherent DMA mask for PCI devices. > > > > Signed-off-by: Michael Buesch <mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org> > > > > --- > > > > John, please queue this bugfix for 2.6.26 > > > > The whole SSB DMA API should be rewritten, as it makes too many bad > > assumptions about the other subsytems. I will do that soon. > > But let's apply this patch for now, as it fixes this particular bug. > > Hmm. Does the patch have anything to do with this bug report? > > http://bugzilla.kernel.org/show_bug.cgi?id=10819 > > Sorry. Magic crystal ball is broken. :) Can you please try? -- Greetings Michael. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-06-12 23:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-12 13:33 [PATCH] ssb: Fix coherent DMA mask for PCI devices Michael Buesch
[not found] ` <200806121533.14435.mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>
2008-06-12 21:44 ` Pekka Enberg
[not found] ` <84144f020806121444i43d381ehdee1774c135d8841-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-06-12 23:21 ` Michael Buesch
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).