Skip to contentSkip to conversation

sound/soc/sh/siu: Fixed undefined dma_length of scatter gather

PATCH In review Markus Pietrek 2 participants 3 messages Jul 13, 2010 – Sep 17, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sound/soc/sh/siu: Fixed undefined dma_length of scatter gather

Without this patch, an undefined/random sg->dma_length is used and the sound will be played/captured wrongly.

---
 sound/soc/sh/siu_pcm.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
sound/soc/sh/siu_pcm.c +2 -0
index 36170be..f6fdf9c 100644
@@ -127,6 +127,7 @@ static int siu_pcm_wr_set(struct siu_port *port_info,
        sg_init_table(&sg, 1);
        sg_set_page(&sg, pfn_to_page(PFN_DOWN(buff)),
                    size, offset_in_page(buff));
+       sg_dma_len(sg) = size;
        sg_dma_address(&sg) = buff;
 
        desc = siu_stream->chan->device->device_prep_slave_sg(siu_stream->chan,
@@ -176,6 +177,7 @@ static int siu_pcm_rd_set(struct siu_port *port_info,
        sg_init_table(&sg, 1);
        sg_set_page(&sg, pfn_to_page(PFN_DOWN(buff)),
                    size, offset_in_page(buff));
+       sg_dma_len(sg) = size;
        sg_dma_address(&sg) = buff;
 
        desc = siu_stream->chan->device->device_prep_slave_sg(siu_stream->chan,

--
1.7.0.4

_____________________________________

Amtsgericht Mannheim
HRB 110 300
Geschäftsführer: Dieter Baur, Ramona Maurer
_____________________________________

Important Note:
- This e-mail may contain trade secrets or privileged, undisclosed or otherwise confidential information.
- If you have received this e-mail in error, you are hereby notified that any review, copying or distribution of it is strictly prohibited.
- Please inform us immediately and destroy the original transmittal.

Thank you for your cooperation.

#1 lore raw

Re: [PATCH] sound/soc/sh/siu: Fixed undefined dma_length of scatter

Please use this patch. The first patch was based on a modified driver where sg is provided as a pointer and not as a local variable.

---
 sound/soc/sh/siu_pcm.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
sound/soc/sh/siu_pcm.c +2 -0
index 36170be..b0ccd0b 100644
@@ -127,6 +127,7 @@ static int siu_pcm_wr_set(struct siu_port *port_info,
        sg_init_table(&sg, 1);
        sg_set_page(&sg, pfn_to_page(PFN_DOWN(buff)),
                    size, offset_in_page(buff));
+       sg_dma_len(&sg) = size;
        sg_dma_address(&sg) = buff;
 
        desc = siu_stream->chan->device->device_prep_slave_sg(siu_stream->chan,
@@ -176,6 +177,7 @@ static int siu_pcm_rd_set(struct siu_port *port_info,
        sg_init_table(&sg, 1);
        sg_set_page(&sg, pfn_to_page(PFN_DOWN(buff)),
                    size, offset_in_page(buff));
+       sg_dma_len(&sg) = size;
        sg_dma_address(&sg) = buff;
 
        desc = siu_stream->chan->device->device_prep_slave_sg(siu_stream->chan,

_____________________________________

Amtsgericht Mannheim
HRB 110 300
Geschäftsführer: Dieter Baur, Ramona Maurer
_____________________________________

Important Note:
- This e-mail may contain trade secrets or privileged, undisclosed or otherwise confidential information.
- If you have received this e-mail in error, you are hereby notified that any review, copying or distribution of it is strictly prohibited.
- Please inform us immediately and destroy the original transmittal.

Thank you for your cooperation.

Tested-by on v1 1/1
#2 lore raw

Re: [PATCH] sound/soc/sh/siu: Fixed undefined dma_length of scatter

In reply to Markus Pietrek

Paul, this patch is also required for 2.6.36, AFAICS, you've only merged it for 2.6.37?

Thanks
Guennadi

Quoted 41 lines · Markus Pietrek

Please use this patch. The first patch was based on a modified driver where sg is provided as a pointer and not as a local variable.

---
 sound/soc/sh/siu_pcm.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
sound/soc/sh/siu_pcm.c +2 -0
index 36170be..b0ccd0b 100644
@@ -127,6 +127,7 @@ static int siu_pcm_wr_set(struct siu_port *port_info,
        sg_init_table(&sg, 1);
        sg_set_page(&sg, pfn_to_page(PFN_DOWN(buff)),
                    size, offset_in_page(buff));
+       sg_dma_len(&sg) = size;
        sg_dma_address(&sg) = buff;
 
        desc = siu_stream->chan->device->device_prep_slave_sg(siu_stream->chan,
@@ -176,6 +177,7 @@ static int siu_pcm_rd_set(struct siu_port *port_info,
        sg_init_table(&sg, 1);
        sg_set_page(&sg, pfn_to_page(PFN_DOWN(buff)),
                    size, offset_in_page(buff));
+       sg_dma_len(&sg) = size;
        sg_dma_address(&sg) = buff;
 
        desc = siu_stream->chan->device->device_prep_slave_sg(siu_stream->chan,

_____________________________________

Amtsgericht Mannheim
HRB 110 300
Geschäftsführer: Dieter Baur, Ramona Maurer
_____________________________________

Important Note:
- This e-mail may contain trade secrets or privileged, undisclosed or otherwise confidential information.
- If you have received this e-mail in error, you are hereby notified that any review, copying or distribution of it is strictly prohibited.
- Please inform us immediately and destroy the original transmittal.

Quoted 6 lines

Thank you for your cooperation.
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/