From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from spam.carreker.com (unknown [65.221.249.208]) by dsl2.external.hp.com (Postfix) with ESMTP id 015B6484B for ; Mon, 26 Jan 2004 18:32:20 -0700 (MST) Received: from localhost (dalvir04.carreker.com [127.0.0.1]) by spam.carreker.com (Postfix) with ESMTP id 5D4512E81AF for ; Mon, 26 Jan 2004 19:30:24 -0600 (CST) Received: from spam.carreker.com ([127.0.0.1]) by localhost (dalvir04.carreker.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 06978-05 for ; Mon, 26 Jan 2004 19:30:23 -0600 (CST) Received: from pickup.carreker.com (unknown [172.21.1.23]) by spam.carreker.com (Postfix) with ESMTP id 8E34C2E8424 for ; Mon, 26 Jan 2004 18:54:47 -0600 (CST) Message-ID: <20040126190003.98EBB48E6@dsl2.external.hp.com> From: parisc-linux-request@lists.parisc-linux.org To: parisc-linux@lists.parisc-linux.org Date: Mon, 26 Jan 2004 13:00:03 -0600 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_003_01C3E43E.A9554970" Subject: [parisc-linux] parisc-linux Digest, Vol 2, Issue 33 Reply-To: parisc-linux@lists.parisc-linux.org List-Id: parisc-linux developers list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , ------_=_NextPart_003_01C3E43E.A9554970 Content-Type: text/plain; charset="iso-8859-1" Send parisc-linux mailing list submissions to parisc-linux@lists.parisc-linux.org To subscribe or unsubscribe via the World Wide Web, visit http://lists.parisc-linux.org/mailman/listinfo/parisc-linux or, via email, send a message with subject or body 'help' to parisc-linux-request@lists.parisc-linux.org You can reach the person managing the list at parisc-linux-owner@lists.parisc-linux.org When replying, please edit your Subject line so it is more specific than "Re: Contents of parisc-linux digest..." Today's Topics: 1. Re: A fix for B2k and CONFIG_PDC_CONSOLE pb (Matthew Wilcox) 2. Re: A fix for B2k and CONFIG_PDC_CONSOLE pb (Joel Soete) 3. Re: A fix for B2k and CONFIG_PDC_CONSOLE pb (Joel Soete) ---------------------------------------------------------------------- Message: 1 Date: Mon, 26 Jan 2004 17:25:05 +0000 From: Matthew Wilcox Subject: Re: [parisc-linux] A fix for B2k and CONFIG_PDC_CONSOLE pb To: Joel Soete Cc: Christoph Plattner , Grant Grundler , parisc-linux@lists.parisc-linux.org Message-ID: <20040126172505.GQ11844@parcelfarce.linux.theplanet.co.uk> Content-Type: text/plain; charset=us-ascii On Mon, Jan 26, 2004 at 06:00:53PM +0100, Joel Soete wrote: > > /* Bail if no console input device. */ > - if (!PAGE0->mem_kbd.iodc_io) > + if ((PAGE0->mem_cons.cl_class != CL_DUPLEX) && !PAGE0->mem_kbd.iodc_io) > return 0; > > /* wait for a keyboard (rs232)-input */ > spin_lock_irqsave(&pdc_lock, flags); > - real32_call(PAGE0->mem_kbd.iodc_io, > - (unsigned long)PAGE0->mem_kbd.hpa, ENTRY_IO_CIN, > - PAGE0->mem_kbd.spa, __pa(PAGE0->mem_kbd.dp.layers), > - __pa(iodc_retbuf), 0, __pa(iodc_dbuf), 1, 0); > + if (PAGE0->mem_cons.cl_class == CL_DUPLEX) This doesn't make sense. PAGE0->mem_cons.cl_class has to be CL_DUPLEX otherwise the test above would have failed. Do you perhaps mean that && above to be an || ? If so, this would all read better as ... /* wait for a keyboard (rs232)-input */ spin_lock_irqsave(&pdc_lock, flags); if (PAGE0->mem_cons.cl_class == CL_DUPLEX) { real32_call(PAGE0->mem_cons.iodc_io, (unsigned long)PAGE0->mem_cons.hpa, ENTRY_IO_CIN, PAGE0->mem_cons.spa, __pa(PAGE0->mem_cons.dp.layers), __pa(iodc_retbuf), 0, __pa(iodc_dbuf), 1, 0); } else if (PAGE0->mem_kbd.iodc_io) { real32_call(PAGE0->mem_kbd.iodc_io, (unsigned long)PAGE0->mem_kbd.hpa, ENTRY_IO_CIN, PAGE0->mem_kbd.spa, __pa(PAGE0->mem_kbd.dp.layers), __pa(iodc_retbuf), 0, __pa(iodc_dbuf), 1, 0); } else { spin_unlock_irqrestore(&pdc_lock, flags); return 0; } Slightly ugly to have two unlocks for the same lock, but that's better than duplicating the test. I haven't looked at the code, maybe we could use a goto instead. -- "Next the statesmen will invent cheap lies, putting the blame upon the nation that is attacked, and every man will be glad of those conscience-soothing falsities, and will diligently study them, and refuse to examine any refutations of them; and thus he will by and by convince himself that the war is just, and will thank God for the better sleep he enjoys after this process of grotesque self-deception." -- Mark Twain ------------------------------ Message: 2 Date: Mon, 26 Jan 2004 19:20:26 +0100 From: "Joel Soete" Subject: Re: [parisc-linux] A fix for B2k and CONFIG_PDC_CONSOLE pb To: "Matthew Wilcox" Cc: Christoph Plattner , Grant Grundler , parisc-linux@lists.parisc-linux.org Message-ID: <40153110000001C0@ocpmta2.freegates.net> Content-Type: text/plain; charset="ISO-8859-1" > + if ((PAGE0->mem_cons.cl_class != CL_DUPLEX) && !PAGE0->mem_kbd.iodc_io) > return 0; Right Matthew this case is nearly impossible (may be excepted if disconected the usb kbd during the boot), it would means that my pdc_console is not a serial one (ie graphic([01])) but no usb kdb found, so in that case pdc would switch console automaticaly to serial. I would just still check the case when I have an usb kbd (I would have to recover one) but the pdc console is setup to serial port (eg no graphic screen available) just for an output screen without input kbd? Thanks for your attention and remarks, Joel ------------------------------------------------------------------------ - Tiscali ADSL: 12 mois à 29,50 EUR/mois! L'Internet rapide, c'est pour tout le monde. http://reg.tiscali.be/default.asp?lg=fr ------------------------------ Message: 3 Date: Mon, 26 Jan 2004 19:38:50 +0100 From: "Joel Soete" Subject: Re: [parisc-linux] A fix for B2k and CONFIG_PDC_CONSOLE pb To: "Matthew Wilcox" Cc: Christoph Plattner , Grant Grundler , parisc-linux@lists.parisc-linux.org Message-ID: <4015311000000204@ocpmta2.freegates.net> Content-Type: text/plain; charset="ISO-8859-1" Sorry for auto reply, but I just find back the right kdb and: >I would just still check the case when I have an usb kbd (I would have to >recover one) but the pdc console is setup to serial port (e >no graphic screen available) just for an output screen without input kbd? That case is also impossible, the console setup as serial_1 (eg) is always CL_DUPLEX :( I will so review my patch. Thanks for all, Joel ------------------------------------------------------------------------ - Tiscali ADSL: 12 mois à 29,50 EUR/mois! L'Internet rapide, c'est pour tout le monde. http://reg.tiscali.be/default.asp?lg=fr ------------------------------ _______________________________________________ parisc-linux mailing list parisc-linux@lists.parisc-linux.org http://lists.parisc-linux.org/mailman/listinfo/parisc-linux End of parisc-linux Digest, Vol 2, Issue 33 ******************************************* ------_=_NextPart_003_01C3E43E.A9554970 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable parisc-linux Digest, Vol 2, Issue 33

Send parisc-linux mailing list submissions to
        parisc-linux@lists.parisc-linux.org

To subscribe or unsubscribe via the World Wide Web, = visit
        http://lists.parisc-linux.org/mailman/listinfo/parisc-= linux
or, via email, send a message with subject or body = 'help' to
        parisc-linux-request@lists.parisc-linux.org

You can reach the person managing the list at
        parisc-linux-owner@lists.parisc-linux.org

When replying, please edit your Subject line so it is = more specific
than "Re: Contents of parisc-linux = digest..."


Today's Topics:

   1. Re: A fix for B2k and = CONFIG_PDC_CONSOLE pb (Matthew Wilcox)
   2. Re: A fix for B2k and = CONFIG_PDC_CONSOLE pb (Joel Soete)
   3. Re: A fix for B2k and = CONFIG_PDC_CONSOLE pb (Joel Soete)


---------------------------------------------------------------= -------

Message: 1
Date: Mon, 26 Jan 2004 17:25:05 +0000
From: Matthew Wilcox <willy@debian.org>
Subject: Re: [parisc-linux] A fix for B2k and = CONFIG_PDC_CONSOLE pb
To: Joel Soete <soete.joel@tiscali.be>
Cc: Christoph Plattner = <christoph.plattner@gmx.at>,     Grant = Grundler
        <grundler@parisc-linux.org>,    = parisc-linux@lists.parisc-linux.org
Message-ID: = <20040126172505.GQ11844@parcelfarce.linux.theplanet.co.uk>
Content-Type: text/plain; charset=3Dus-ascii

On Mon, Jan 26, 2004 at 06:00:53PM +0100, Joel Soete = wrote:

>       /* Bail if no = console input device. */
> -     if = (!PAGE0->mem_kbd.iodc_io)
> +     if = ((PAGE0->mem_cons.cl_class !=3D CL_DUPLEX) && = !PAGE0->mem_kbd.iodc_io)
>       =         return 0;
>      
>       /* wait for a = keyboard (rs232)-input */
>       = spin_lock_irqsave(&pdc_lock, flags);
> -     = real32_call(PAGE0->mem_kbd.iodc_io,
> -     =             (unsigned = long)PAGE0->mem_kbd.hpa, ENTRY_IO_CIN,
> -     =             = PAGE0->mem_kbd.spa, __pa(PAGE0->mem_kbd.dp.layers),
> -     =             = __pa(iodc_retbuf), 0, __pa(iodc_dbuf), 1, 0);
> +     if = (PAGE0->mem_cons.cl_class =3D=3D CL_DUPLEX)

This doesn't make sense.  = PAGE0->mem_cons.cl_class has to be CL_DUPLEX
otherwise the test above would have failed.  Do = you perhaps mean that &&
above to be an || ?  If so, this would all read = better as ...

        /* wait = for a keyboard (rs232)-input */
        spin_lock_irqsave(&pdc_lock, flags);
        if = (PAGE0->mem_cons.cl_class =3D=3D CL_DUPLEX) {

        =         real32_call(PAGE0->mem_cons.iodc_io,
        =         =             (unsigned long)PAGE0->mem_cons.hpa, = ENTRY_IO_CIN,
        =         =             PAGE0->mem_cons.spa, = __pa(PAGE0->mem_cons.dp.layers),
        =         =             __pa(iodc_retbuf), 0, __pa(iodc_dbuf), 1, = 0);
        } else if = (PAGE0->mem_kbd.iodc_io) {
        =         real32_call(PAGE0->mem_kbd.iodc_io,
        =         =             (unsigned long)PAGE0->mem_kbd.hpa, = ENTRY_IO_CIN,
        =         =             PAGE0->mem_kbd.spa, = __pa(PAGE0->mem_kbd.dp.layers),
        =         =             __pa(iodc_retbuf), 0, __pa(iodc_dbuf), 1, = 0);
        } else = {
        =         spin_unlock_irqrestore(&pdc_lock, flags);
        =         return = 0;
        }

Slightly ugly to have two unlocks for the same lock, = but that's better
than duplicating the test.  I haven't looked at = the code, maybe we could
use a goto instead.

--
"Next the statesmen will invent cheap lies, = putting the blame upon
the nation that is attacked, and every man will be = glad of those
conscience-soothing falsities, and will diligently = study them, and refuse
to examine any refutations of them; and thus he will = by and by convince
himself that the war is just, and will thank God for = the better sleep
he enjoys after this process of grotesque = self-deception." -- Mark Twain


------------------------------

Message: 2
Date: Mon, 26 Jan 2004 19:20:26 +0100
From: "Joel Soete" = <soete.joel@tiscali.be>
Subject: Re: [parisc-linux] A fix for B2k and = CONFIG_PDC_CONSOLE pb
To: "Matthew Wilcox" = <willy@debian.org>
Cc: Christoph Plattner = <christoph.plattner@gmx.at>,     Grant = Grundler
        <grundler@parisc-linux.org>,    = parisc-linux@lists.parisc-linux.org
Message-ID: = <40153110000001C0@ocpmta2.freegates.net>
Content-Type: text/plain; = charset=3D"ISO-8859-1"



> +     if = ((PAGE0->mem_cons.cl_class !=3D CL_DUPLEX) && = !PAGE0->mem_kbd.iodc_io)
>       =         return 0;
Right Matthew this case is nearly impossible (may be = excepted if disconected
the usb kbd during the boot), it would means that my = pdc_console is not a
serial one (ie graphic([01])) but no usb kdb found, = so in that case pdc would
switch console automaticaly to serial.

I would just still check the case when I have an usb = kbd (I would have to
recover one) but the pdc console is setup to serial = port (eg no graphic screen
available) just for an output screen without input = kbd?

Thanks for your attention and remarks,
    Joel


---------------------------------------------------------------= ----------
Tiscali ADSL: 12 mois =E0 29,50 €/mois! = L'Internet rapide, c'est pour tout
le monde.
http://reg.tiscali.be/default.asp?lg=3Dfr




------------------------------

Message: 3
Date: Mon, 26 Jan 2004 19:38:50 +0100
From: "Joel Soete" = <soete.joel@tiscali.be>
Subject: Re: [parisc-linux] A fix for B2k and = CONFIG_PDC_CONSOLE pb
To: "Matthew Wilcox" = <willy@debian.org>
Cc: Christoph Plattner = <christoph.plattner@gmx.at>,     Grant = Grundler
        <grundler@parisc-linux.org>,    = parisc-linux@lists.parisc-linux.org
Message-ID: = <4015311000000204@ocpmta2.freegates.net>
Content-Type: text/plain; = charset=3D"ISO-8859-1"

Sorry for auto reply, but I just find back the right = kdb and:

>I would just still check the case when I have an = usb kbd (I would have to
>recover one) but the pdc console is setup to = serial port (e
>no graphic screen available) just for an output = screen without input kbd?


That case is also impossible, the console setup as = serial_1 (eg) is always
CL_DUPLEX :(

I will so review my patch.

Thanks for all,
    Joel


---------------------------------------------------------------= ----------
Tiscali ADSL: 12 mois =E0 29,50 €/mois! = L'Internet rapide, c'est pour tout
le monde.
http://reg.tiscali.be/default.asp?lg=3Dfr




------------------------------

_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-= linux


End of parisc-linux Digest, Vol 2, Issue 33
*******************************************

------_=_NextPart_003_01C3E43E.A9554970--