diff for duplicates of <48409408.8090901@keyaccess.nl> diff --git a/a/1.txt b/N1/1.txt index 1cb7bbc..8b13789 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,52 +1 @@ ->From 56e4b14aa58612aeb41b51d73a75f85dd72127a1 Mon Sep 17 00:00:00 2001 -From: Rene Herman <rene.herman@gmail.com> -Date: Sat, 31 May 2008 00:31:40 +0200 -Subject: [PATCH] ISA: set 24-bit dma_mask for ISA devices. -dma_alloc_coherent() on x86 currently takes a passed in NULL device -pointer to mean that it should allocate an ISA compatible (24-bit) -buffer which is a bit of a hack. - -The ALSA ISA drivers are the main consumers of this but have a struct -device in fact readily available. - -For the legacy drivers, this sets the device dma_mask in preparation -for using the actual device with the DMA API so as to eventually not -need the NULL hack in dma_alloc_coherent(). - -This does not fix a current bug -- 2.6.26-rc1 stumbled over the NULL -hack in dma_alloc_coherent() but this has already been fixed in commit -4a367f3a9dbf2e7ffcee4702203479809236ee6e by Takashi Iwai. - -Signed-off-by: Rene Herman <rene.herman@gmail.com> -Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> -Cc: Takashi Iwai <tiwai@suse.de> -Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> ---- - drivers/base/isa.c | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) - -diff --git a/drivers/base/isa.c b/drivers/base/isa.c -index d222239..efd5775 100644 ---- a/drivers/base/isa.c -+++ b/drivers/base/isa.c -@@ -7,6 +7,7 @@ - #include <linux/slab.h> - #include <linux/module.h> - #include <linux/init.h> -+#include <linux/dma-mapping.h> - #include <linux/isa.h> - - static struct device isa_bus = { -@@ -141,6 +142,9 @@ int isa_register_driver(struct isa_driver *isa_driver, unsigned int ndev) - isa_dev->dev.release = isa_dev_release; - isa_dev->id = id; - -+ isa_dev->dev.coherent_dma_mask = DMA_24BIT_MASK; -+ isa_dev->dev.dma_mask = &isa_dev->dev.coherent_dma_mask; -+ - error = device_register(&isa_dev->dev); - if (error) { - put_device(&isa_dev->dev); --- -1.5.2.2 diff --git a/N1/2.hdr b/N1/2.hdr new file mode 100644 index 0000000..920035c --- /dev/null +++ b/N1/2.hdr @@ -0,0 +1,5 @@ +Content-Type: text/plain; + name="0002-ISA-set-24-bit-dma_mask-for-ISA-devices.patch" +Content-Transfer-Encoding: 7bit +Content-Disposition: inline; + filename="0002-ISA-set-24-bit-dma_mask-for-ISA-devices.patch" diff --git a/N1/2.txt b/N1/2.txt new file mode 100644 index 0000000..1cb7bbc --- /dev/null +++ b/N1/2.txt @@ -0,0 +1,52 @@ +>From 56e4b14aa58612aeb41b51d73a75f85dd72127a1 Mon Sep 17 00:00:00 2001 +From: Rene Herman <rene.herman@gmail.com> +Date: Sat, 31 May 2008 00:31:40 +0200 +Subject: [PATCH] ISA: set 24-bit dma_mask for ISA devices. + +dma_alloc_coherent() on x86 currently takes a passed in NULL device +pointer to mean that it should allocate an ISA compatible (24-bit) +buffer which is a bit of a hack. + +The ALSA ISA drivers are the main consumers of this but have a struct +device in fact readily available. + +For the legacy drivers, this sets the device dma_mask in preparation +for using the actual device with the DMA API so as to eventually not +need the NULL hack in dma_alloc_coherent(). + +This does not fix a current bug -- 2.6.26-rc1 stumbled over the NULL +hack in dma_alloc_coherent() but this has already been fixed in commit +4a367f3a9dbf2e7ffcee4702203479809236ee6e by Takashi Iwai. + +Signed-off-by: Rene Herman <rene.herman@gmail.com> +Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> +Cc: Takashi Iwai <tiwai@suse.de> +Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> +--- + drivers/base/isa.c | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/drivers/base/isa.c b/drivers/base/isa.c +index d222239..efd5775 100644 +--- a/drivers/base/isa.c ++++ b/drivers/base/isa.c +@@ -7,6 +7,7 @@ + #include <linux/slab.h> + #include <linux/module.h> + #include <linux/init.h> ++#include <linux/dma-mapping.h> + #include <linux/isa.h> + + static struct device isa_bus = { +@@ -141,6 +142,9 @@ int isa_register_driver(struct isa_driver *isa_driver, unsigned int ndev) + isa_dev->dev.release = isa_dev_release; + isa_dev->id = id; + ++ isa_dev->dev.coherent_dma_mask = DMA_24BIT_MASK; ++ isa_dev->dev.dma_mask = &isa_dev->dev.coherent_dma_mask; ++ + error = device_register(&isa_dev->dev); + if (error) { + put_device(&isa_dev->dev); +-- +1.5.2.2 diff --git a/a/content_digest b/N1/content_digest index 0ced57e..4bf02c3 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -7,12 +7,14 @@ "Subject\0[PATCH] ISA: set 24-bit dma_mask for ISA devices.\0" "Date\0Sat, 31 May 2008 01:55:52 +0200\0" "To\0Andrew Morton <akpm@osdl.org>\0" - "Cc\0Takashi Iwai <tiwai@suse.de>" - ALSA devel <alsa-devel@alsa-project.org> - Linux Kernel <linux-kernel@vger.kernel.org> + "Cc\0Bjorn Helgaas <bjorn.helgaas@hp.com>" + Takashi Iwai <tiwai@suse.de> Alan Cox <alan@lxorguk.ukuu.org.uk> - " Bjorn Helgaas <bjorn.helgaas@hp.com>\0" - "\00:1\0" + Linux Kernel <linux-kernel@vger.kernel.org> + " ALSA devel <alsa-devel@alsa-project.org>\0" + "\01:1\0" + "b\0" + "\01:2\0" "fn\00002-ISA-set-24-bit-dma_mask-for-ISA-devices.patch\0" "b\0" ">From 56e4b14aa58612aeb41b51d73a75f85dd72127a1 Mon Sep 17 00:00:00 2001\n" @@ -68,4 +70,4 @@ "-- \n" 1.5.2.2 -fb5352575db1a7825b345e77ffa004950c953b0eea53d132be22cfaca3eece86 +f04bc1c37d62b66834eeb759b9ff5ffcd7afaea1c37b6e88f3b867adf679a7f5
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.