Re: 2.6.26-rc1 regression: ISA DMA broken (bisected)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Rene Herman
Date: Wednesday, May 14, 2008 - 11:41 am

On 14-05-08 17:40, Rene Herman wrote:

CC list trimmed as now PNP and ALSA specific.


You're in a maze of struct device *s, all alike... I was passing the 
pnp_card->dev instead of the initialized pnp_dev->dev.

And, not doing so brings out a difference between ISAPnP and legacy ISA 
again insofar that legacy ISA does not consist of cards with multiple 
devices. We just have the single struct device * for the ISA device.

This therefore would be the easiest solution (and works fine) but seems 
a bit of a hack. Bjorn, do you have an opinion? If I abstract things out 
a bit more I might be able to do this nicer. One might on the other hand 
argue that the dma_mask is going to be constant for all card devices so 
might as well just use the card dev.

sound/{isa,oss} together with drivers/isdn/hisax/ are the only pnp_card 
users.

diff --git a/drivers/pnp/card.c b/drivers/pnp/card.c
index a762a41..a2842a7 100644
--- a/drivers/pnp/card.c
+++ b/drivers/pnp/card.c
@@ -7,6 +7,7 @@
 #include <linux/module.h>
 #include <linux/ctype.h>
 #include <linux/slab.h>
+#include <linux/dma-mapping.h>
 #include <linux/pnp.h>
 #include "base.h"

@@ -167,6 +168,9 @@ struct pnp_card *pnp_alloc_card(struct pnp_protocol *protocol, int id, char *pnp
 	sprintf(card->dev.bus_id, "%02x:%02x", card->protocol->number,
 		card->number);

+	card->dev.coherent_dma_mask = DMA_24BIT_MASK;
+	card->dev.dma_mask = &card->dev.coherent_dma_mask;
+
 	dev_id = pnp_add_card_id(card, pnpid);
 	if (!dev_id) {
 		kfree(card);

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
2.6.26-rc1 regression: ISA DMA broken (bisected), Rene Herman, (Thu May 8, 6:37 pm)
Re: 2.6.26-rc1 regression: ISA DMA broken (bisected), Takashi Iwai, (Thu May 8, 11:06 pm)
Re: 2.6.26-rc1 regression: ISA DMA broken (bisected), Ingo Molnar, (Fri May 9, 1:55 am)
Re: 2.6.26-rc1 regression: ISA DMA broken (bisected), Ingo Molnar, (Fri May 9, 1:58 am)
Re: 2.6.26-rc1 regression: ISA DMA broken (bisected), Rene Herman, (Fri May 9, 5:03 am)
Re: 2.6.26-rc1 regression: ISA DMA broken (bisected), Ingo Molnar, (Fri May 9, 5:28 am)
Re: 2.6.26-rc1 regression: ISA DMA broken (bisected), Pete Clements, (Fri May 9, 5:29 am)
Re: 2.6.26-rc1 regression: ISA DMA broken (bisected), Glauber Costa, (Fri May 9, 5:48 am)
Re: 2.6.26-rc1 regression: ISA DMA broken (bisected), Jesse Barnes, (Fri May 9, 10:20 am)
Re: 2.6.26-rc1 regression: ISA DMA broken (bisected), Rene Herman, (Fri May 9, 4:00 pm)
Re: 2.6.26-rc1 regression: ISA DMA broken (bisected), Ingo Molnar, (Tue May 13, 7:36 am)
Re: 2.6.26-rc1 regression: ISA DMA broken (bisected), Rene Herman, (Tue May 13, 8:26 am)
Re: 2.6.26-rc1 regression: ISA DMA broken (bisected), Bjorn Helgaas, (Tue May 13, 9:59 am)
Re: 2.6.26-rc1 regression: ISA DMA broken (bisected), Rene Herman, (Tue May 13, 10:33 am)
Re: 2.6.26-rc1 regression: ISA DMA broken (bisected), Bjorn Helgaas, (Tue May 13, 4:18 pm)
Re: 2.6.26-rc1 regression: ISA DMA broken (bisected), Takashi Iwai, (Wed May 14, 2:25 am)
Re: 2.6.26-rc1 regression: ISA DMA broken (bisected), Rene Herman, (Wed May 14, 5:46 am)
Re: 2.6.26-rc1 regression: ISA DMA broken (bisected), Takashi Iwai, (Wed May 14, 6:01 am)
Re: 2.6.26-rc1 regression: ISA DMA broken (bisected), Bjorn Helgaas, (Wed May 14, 8:26 am)
Re: 2.6.26-rc1 regression: ISA DMA broken (bisected), Rene Herman, (Wed May 14, 8:40 am)
Re: 2.6.26-rc1 regression: ISA DMA broken (bisected), Takashi Iwai, (Wed May 14, 8:53 am)
Re: 2.6.26-rc1 regression: ISA DMA broken (bisected), Rene Herman, (Wed May 14, 11:41 am)
Re: 2.6.26-rc1 regression: ISA DMA broken (bisected), Bjorn Helgaas, (Wed May 14, 11:50 am)
Re: 2.6.26-rc1 regression: ISA DMA broken (bisected), Rene Herman, (Wed May 14, 12:09 pm)
[DEVICE MODEL] dev-&gt;dma_mask, Rene Herman, (Fri May 30, 2:28 pm)
[PATCH] ISA: set 24-bit dma_mask for ISA devices., Rene Herman, (Fri May 30, 3:37 pm)
Re: [PATCH] ISA: set 24-bit dma_mask for ISA devices., Andrew Morton, (Fri May 30, 3:55 pm)
Re: [PATCH] ISA: set 24-bit dma_mask for ISA devices., Rene Herman, (Fri May 30, 4:50 pm)
[PATCH] ISA: set 24-bit dma_mask for ISA devices., Rene Herman, (Fri May 30, 4:55 pm)<