linux-mips
[Top] [All Lists]

Re: [PATCH] [RFC] r4k_dma_cache_wback_inv function fails when size=0...

To: sjhill@realitydiluted.com
Subject: Re: [PATCH] [RFC] r4k_dma_cache_wback_inv function fails when size=0...
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Tue, 16 Mar 2004 23:09:28 +0900 (JST)
Cc: linux-mips@linux-mips.org
In-reply-to: <4055E320.8080808@realitydiluted.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <4055E320.8080808@realitydiluted.com>
Sender: linux-mips-bounce@linux-mips.org
>>>>> On Mon, 15 Mar 2004 12:08:48 -0500, "Steven J. Hill" 
>>>>> <sjhill@realitydiluted.com> said:

sjhill> The 'r4k_dma_cache_wback_inv' function will fail when the
sjhill> requested size equals 0 AND when the address is a multiple of
sjhill> the line size. I discovered this bug while using the National
sjhill> Semiconductor DP8381x series PCI ethernet driver. I have
sjhill> attached a test program showing the bug as well as a patch for
sjhill> comment. Okay to apply?

I think your patch is overkill.  It flushes many one line then needed.

How about just inserting

        if (unlikely(size == 0))
                return;

in beginning of each function?

---
Atsushi Nemoto

<Prev in Thread] Current Thread [Next in Thread>