public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rene Herman <rene.herman@keyaccess.nl>
To: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Takashi Iwai <tiwai@suse.de>, Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	ALSA devel <alsa-devel@alsa-project.org>
Subject: Re: 2.6.26-rc1 regression: ISA DMA broken (bisected)
Date: Wed, 14 May 2008 20:41:56 +0200	[thread overview]
Message-ID: <482B3274.2060006@keyaccess.nl> (raw)
In-Reply-To: <482B0807.9050404@keyaccess.nl>

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

CC list trimmed as now PNP and ALSA specific.

> Like this? With this (on top of the previous patch setting the
> dma_mask ofcourse) legacy ISA actually appears to be fine but it's
> then ISAPnP which goes bonkers again. Sigh. Getting an allocation
> failure. Don't understand why yet since pnp_alloc_dev() definitely
> sets the mask already. Will stare...

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);


  parent reply	other threads:[~2008-05-14 18:40 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-09  1:37 2.6.26-rc1 regression: ISA DMA broken (bisected) Rene Herman
2008-05-09  6:06 ` Takashi Iwai
2008-05-09  8:55   ` Ingo Molnar
2008-05-09  8:58     ` Ingo Molnar
2008-05-09 17:20       ` Jesse Barnes
2008-05-09 12:03   ` Rene Herman
2008-05-09 12:28     ` Ingo Molnar
2008-05-09 23:00       ` Rene Herman
2008-05-13 14:36         ` Ingo Molnar
2008-05-13 15:26           ` Rene Herman
2008-05-09 12:29     ` Pete Clements
2008-05-09 12:48   ` Glauber Costa
2008-05-13 16:59   ` Bjorn Helgaas
2008-05-13 17:01     ` Alan Cox
2008-05-13 17:33       ` Rene Herman
2008-05-13 23:18         ` Bjorn Helgaas
2008-05-14  9:25           ` Takashi Iwai
2008-05-14 12:46           ` Rene Herman
2008-05-14 13:01             ` Takashi Iwai
2008-05-14 15:40               ` Rene Herman
2008-05-14 15:53                 ` Takashi Iwai
2008-05-14 18:41                 ` Rene Herman [this message]
2008-05-14 18:50                   ` Bjorn Helgaas
2008-05-14 19:09                     ` Rene Herman
2008-05-30 21:15                       ` [PATCH] " Rene Herman
2008-05-30 21:28                         ` [DEVICE MODEL] dev->dma_mask Rene Herman
2008-05-30 21:43                         ` [PATCH] Re: 2.6.26-rc1 regression: ISA DMA broken (bisected) Bjorn Helgaas
2008-05-30 22:11                           ` Rene Herman
2008-05-30 22:37                             ` [PATCH] ISA: set 24-bit dma_mask for ISA devices Rene Herman
2008-05-30 22:55                               ` Andrew Morton
2008-05-30 23:50                                 ` Rene Herman
2008-05-30 23:54                             ` [PATCH] PNP: set the pnp_card dma_mask for use by ISAPnP cards Rene Herman
2008-05-31  8:55                               ` Takashi Iwai
2008-05-30 23:55                             ` [PATCH] ISA: set 24-bit dma_mask for ISA devices Rene Herman
2008-05-31  8:56                               ` Takashi Iwai
2008-05-14 15:26             ` 2.6.26-rc1 regression: ISA DMA broken (bisected) Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=482B3274.2060006@keyaccess.nl \
    --to=rene.herman@keyaccess.nl \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=alsa-devel@alsa-project.org \
    --cc=bjorn.helgaas@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox