WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] xen: more robust serial port driver

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] [PATCH] xen: more robust serial port driver
From: Christoph Egger <Christoph.Egger@xxxxxxx>
Date: Tue, 28 Jul 2009 16:47:36 +0200
Cc: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Tue, 28 Jul 2009 07:48:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C694C69E.10CA2%keir.fraser@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <C694C69E.10CA2%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.7
On Tuesday 28 July 2009 16:15:42 Keir Fraser wrote:
> On 28/07/2009 15:07, "Christoph Egger" <Christoph.Egger@xxxxxxx> wrote:
> > Attached patch adds a check if the fifo is usable before we
> > actually use it.
>
> I count that at least the first two chunks and the initialisation of
> tx_fifo_size are unnecessary.

First hunk:

    It looks suspicious returning a value of type void.

Second hunk and initialization of tx_fifo_size:

    If you are sure these initializations are duplicates, then they are
    unnecessary.

> Might this be the case for the udelay(100) as 
> well?

No. This ensures, that the write takes effect before the read happens.

> And what kinds of systems have these broken UARTs that half-advertise 
> a broken/non-existent FIFO?

The original ns16550 has a broken FIFO. The ns16450 has no FIFO.
There are simulators which simulate those old things instead of a ns16550a.

Christoph

-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel