lkml.org 
[lkml]   [2017]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.10 193/250] ALSA: ctxfi: Fix the incorrect check of dma_set_mask() call
    Date
    From: Takashi Iwai <tiwai@suse.de>

    commit f363a06642f28caaa78cb6446bbad90c73fe183c upstream.

    In the commit [15c75b09f8d1: ALSA: ctxfi: Fallback DMA mask to 32bit],
    I forgot to put "!" at dam_set_mask() call check in cthw20k1.c (while
    cthw20k2.c is OK). This patch fixes that obvious bug.

    (As a side note: although the original commit was completely wrong,
    it's still working for most of machines, as it sets to 32bit DMA mask
    in the end. So the bug severity is low.)

    Fixes: 15c75b09f8d1 ("ALSA: ctxfi: Fallback DMA mask to 32bit")
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Willy Tarreau <w@1wt.eu>
    ---
    sound/pci/ctxfi/cthw20k1.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/sound/pci/ctxfi/cthw20k1.c b/sound/pci/ctxfi/cthw20k1.c
    index abd0a2d..7f414b0 100644
    --- a/sound/pci/ctxfi/cthw20k1.c
    +++ b/sound/pci/ctxfi/cthw20k1.c
    @@ -1904,7 +1904,7 @@ static int hw_card_start(struct hw *hw)
    return err;

    /* Set DMA transfer mask */
    - if (dma_set_mask(&pci->dev, DMA_BIT_MASK(dma_bits))) {
    + if (!dma_set_mask(&pci->dev, DMA_BIT_MASK(dma_bits))) {
    dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(dma_bits));
    } else {
    dma_set_mask(&pci->dev, DMA_BIT_MASK(32));
    --
    2.8.0.rc2.1.gbe9624a
    \
     
     \ /
      Last update: 2017-06-12 01:16    [W:2.709 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site