linux-mips
[Top] [All Lists]

[PATCH] Fix potential bug in au1xxx_ddma_add_device()

To: linux-mips@linux-mips.org
Subject: [PATCH] Fix potential bug in au1xxx_ddma_add_device()
From: Freddy Spierenburg <freddy@dusktilldawn.nl>
Date: Fri, 31 Mar 2006 17:06:57 +0200
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.11+cvs20060126
Hi,

Can anybody with a AMD DBAu1200 or DBAu1550 board test this patch
out? Unfortunately I don't have one so I was not able to try it
out to see if I do not brake something else.

While trying to understand the MMC driver I found a potential
glitch in the design of au1xxx_ddma_add_device(). It uses
find_dbdev_id(0) to find an available empty device slot in
the array dbdev_tab. But id 0 is already taken by
DSCR_CMD0_UART0_TX, so this entry will always be overwritten the
first time au1xxx_ddma_add_device() is called. This can lead to
some surprising effects when one expects the data for
DSCR_CMD0_UART0_TX to be in that slot.

Signed-off-by: Freddy Spierenburg <freddy@dusktilldawn.nl>

-- 
$ cat ~/.signature
Freddy Spierenburg <freddy@dusktilldawn.nl>  http://freddy.snarl.nl/
GnuPG: 0x7941D1E1=C948 5851 26D2 FA5C 39F1  E588 6F17 FD5D 7941 D1E1
$ # Please read http://www.ietf.org/rfc/rfc2015.txt before complain!

Attachment: dbdma.patch
Description: Text document

Attachment: signature.asc
Description: Digital signature

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] Fix potential bug in au1xxx_ddma_add_device(), Freddy Spierenburg <=