[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201301140954.43795.linux@rainbow-software.org>
Date: Mon, 14 Jan 2013 09:54:43 +0100
From: Ondrej Zary <linux@...nbow-software.org>
To: "Jan Beulich" <JBeulich@...e.com>
Cc: dmitry.torokhov@...il.com, hpa@...ux.intel.com,
"Alan Cox" <alan@...rguk.ukuu.org.uk>,
"Rafael J. Wysocki" <rjw@...k.pl>, linux-kernel@...r.kernel.org
Subject: Re: your patch "x86, 8042: Enable A20 using KBC to fix S3 resume on some MSI laptops"
On Monday 14 January 2013, Jan Beulich wrote:
> >>> On 14.01.13 at 09:29, Ondrej Zary <linux@...nbow-software.org> wrote:
> >
> > On Monday 14 January 2013, Jan Beulich wrote:
> >> Ondrej,
> >>
> >> I see two problems with this patch: For one, on a system without
> >> i8042 the code at the place it got inserted ought to incur a stall of
> >> 1s (50us * I8042_CTL_TIMEOUT [10000] * 2). I believe that this
> >> code should not be run before i8042_controller_check() completed
> >> successfully, but at the very least the second call to
> >> i8042_command() should be conditional upon the first being
> >> successful (effectively halving the stall).
> >
> > I believe that all PnP-capable systems without 8042 will exit with
> > -ENODEV after x86_platform.i8042_detect().
>
> How that, with default_i8042_detect() being just "return 1;"?
Oops, I meant i8042_pnp_init(). But looking at the code again, it always
returns 0, even when the controller is not found.
So probably the right place is after i8042_controller_check().
> > Old non-PnP systems usually have 8042.
>
> Sure.
>
> >> Second, considering that enabling A20 (even if just in a fake way),
> >> is a core system operation, I don't think it belongs into a driver
> >> that is only optionally present in the kernel.
> >
> > The first version of this patch added A20 enabling to early init code.
> > But that could be dangerous as it was run before any 8042 detection,
> > possibly breaking systems without 8042. I haven't found a better place
> > for this.
>
> I realize that the change would be more intrusive, but imo that's
> not an excuse for not doing it properly.
What's "properly"? Doing extra 8042 detection somewhere else does not look
right.
--
Ondrej Zary
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists