linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Enable A20 using KBC for some MSI laptops to fix S3 resume
@ 2012-10-24  6:47 Ondrej Zary
  2012-10-24 19:01 ` Rafael J. Wysocki
  0 siblings, 1 reply; 9+ messages in thread
From: Ondrej Zary @ 2012-10-24  6:47 UTC (permalink / raw)
  To: hpa; +Cc: linux-acpi, linux-kernel

Some MSI laptop BIOSes are broken - INT 15h code uses port 92h to enable A20
line but resume code assumes that KBC was used.
The laptop will not resume from S3 otherwise but powers off after a while
and then powers on again stuck with a blank screen.

Fix it by enabling A20 using KBC. Affected laptop list and DMI data are from
bug reports at Ubuntu Launchpad.

Tested with EX600 and PR200.

Fixes https://bugzilla.kernel.org/show_bug.cgi?id=12878

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>

--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -1349,6 +1349,20 @@ static int __init dmi_ignore_irq0_timer_override(const struct dmi_system_id *d)
 }
 
 /*
+ * Enable A20 line using KBC even if it's already enabled using other method.
+ * This is needed for some MSI laptops to resume from S3.
+ */
+static int __init a20_enable_kbc(const struct dmi_system_id *d)
+{
+	printk(KERN_NOTICE "%s detected: enabling A20 using KBC\n", d->ident);
+	outb(0xd1, 0x64);	/* Command write */
+	outb(0xdf, 0x60);	/* A20 on */
+	outb(0xff, 0x64);	/* Null command, but UHCI wants it */
+
+	return 0;
+}
+
+/*
  * If your system is blacklisted here, but you find that acpi=force
  * works for you, please contact linux-acpi@vger.kernel.org
  */
@@ -1423,6 +1437,60 @@ static struct dmi_system_id __initdata acpi_dmi_table[] = {
 		     DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
 		     },
 	 },
+	/*
+	 * Some MSI laptop BIOSes are broken - INT 15h code uses port 92h to
+	 * enable A20 line but resume code assumes that KBC was used.
+	 * The laptop will not resume from S3 otherwise but powers off
+	 * after a while and then powers on again stuck with a blank screen.
+	 */
+	{
+	 .callback = a20_enable_kbc,
+	 .ident = "MSI EX600 Laptop",
+	 .matches = {
+		     DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
+		     DMI_MATCH(DMI_PRODUCT_NAME, "MSI Notebook EX600"),
+		     },
+	 },
+	{
+	 .callback = a20_enable_kbc,
+	 .ident = "MSI EX700 Laptop",
+	 .matches = {
+		     DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
+		     DMI_MATCH(DMI_PRODUCT_NAME, "EX700"),
+		     },
+	 },
+	{
+	 .callback = a20_enable_kbc,
+	 .ident = "MSI GX700 Laptop",
+	 .matches = {
+		     DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
+		     DMI_MATCH(DMI_PRODUCT_NAME, "GX700"),
+		     },
+	 },
+	{
+	 .callback = a20_enable_kbc,
+	 .ident = "MSI VR201 Laptop",
+	 .matches = {
+		     DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
+		     DMI_MATCH(DMI_PRODUCT_NAME, "MSI Notebook VR201"),
+		     },
+	 },
+	{
+	 .callback = a20_enable_kbc,
+	 .ident = "MSI VR601 Laptop",
+	 .matches = {
+		     DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
+		     DMI_MATCH(DMI_PRODUCT_NAME, "MSI Notebook VR601"),
+		     },
+	 },
+	{
+	 .callback = a20_enable_kbc,
+	 .ident = "MSI PR200 Laptop",
+	 .matches = {
+		     DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
+		     DMI_MATCH(DMI_PRODUCT_NAME, "MSI Notebook PR200"),
+		     },
+	 },
 	{}
 };
 


-- 
Ondrej Zary

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Enable A20 using KBC for some MSI laptops to fix S3 resume
  2012-10-24  6:47 [PATCH] Enable A20 using KBC for some MSI laptops to fix S3 resume Ondrej Zary
@ 2012-10-24 19:01 ` Rafael J. Wysocki
  2012-10-24 19:36   ` H. Peter Anvin
  0 siblings, 1 reply; 9+ messages in thread
From: Rafael J. Wysocki @ 2012-10-24 19:01 UTC (permalink / raw)
  To: Ondrej Zary, hpa; +Cc: linux-acpi, linux-kernel

On Wednesday 24 of October 2012 08:47:52 Ondrej Zary wrote:
> Some MSI laptop BIOSes are broken - INT 15h code uses port 92h to enable A20
> line but resume code assumes that KBC was used.
> The laptop will not resume from S3 otherwise but powers off after a while
> and then powers on again stuck with a blank screen.
> 
> Fix it by enabling A20 using KBC. Affected laptop list and DMI data are from
> bug reports at Ubuntu Launchpad.
> 
> Tested with EX600 and PR200.
> 
> Fixes https://bugzilla.kernel.org/show_bug.cgi?id=12878
> 
> Signed-off-by: Ondrej Zary <linux@rainbow-software.org>

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


> --- a/arch/x86/kernel/acpi/boot.c
> +++ b/arch/x86/kernel/acpi/boot.c
> @@ -1349,6 +1349,20 @@ static int __init dmi_ignore_irq0_timer_override(const struct dmi_system_id *d)
>  }
>  
>  /*
> + * Enable A20 line using KBC even if it's already enabled using other method.
> + * This is needed for some MSI laptops to resume from S3.
> + */
> +static int __init a20_enable_kbc(const struct dmi_system_id *d)
> +{
> +	printk(KERN_NOTICE "%s detected: enabling A20 using KBC\n", d->ident);
> +	outb(0xd1, 0x64);	/* Command write */
> +	outb(0xdf, 0x60);	/* A20 on */
> +	outb(0xff, 0x64);	/* Null command, but UHCI wants it */
> +
> +	return 0;
> +}
> +
> +/*
>   * If your system is blacklisted here, but you find that acpi=force
>   * works for you, please contact linux-acpi@vger.kernel.org
>   */
> @@ -1423,6 +1437,60 @@ static struct dmi_system_id __initdata acpi_dmi_table[] = {
>  		     DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
>  		     },
>  	 },
> +	/*
> +	 * Some MSI laptop BIOSes are broken - INT 15h code uses port 92h to
> +	 * enable A20 line but resume code assumes that KBC was used.
> +	 * The laptop will not resume from S3 otherwise but powers off
> +	 * after a while and then powers on again stuck with a blank screen.
> +	 */
> +	{
> +	 .callback = a20_enable_kbc,
> +	 .ident = "MSI EX600 Laptop",
> +	 .matches = {
> +		     DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
> +		     DMI_MATCH(DMI_PRODUCT_NAME, "MSI Notebook EX600"),
> +		     },
> +	 },
> +	{
> +	 .callback = a20_enable_kbc,
> +	 .ident = "MSI EX700 Laptop",
> +	 .matches = {
> +		     DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
> +		     DMI_MATCH(DMI_PRODUCT_NAME, "EX700"),
> +		     },
> +	 },
> +	{
> +	 .callback = a20_enable_kbc,
> +	 .ident = "MSI GX700 Laptop",
> +	 .matches = {
> +		     DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
> +		     DMI_MATCH(DMI_PRODUCT_NAME, "GX700"),
> +		     },
> +	 },
> +	{
> +	 .callback = a20_enable_kbc,
> +	 .ident = "MSI VR201 Laptop",
> +	 .matches = {
> +		     DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
> +		     DMI_MATCH(DMI_PRODUCT_NAME, "MSI Notebook VR201"),
> +		     },
> +	 },
> +	{
> +	 .callback = a20_enable_kbc,
> +	 .ident = "MSI VR601 Laptop",
> +	 .matches = {
> +		     DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
> +		     DMI_MATCH(DMI_PRODUCT_NAME, "MSI Notebook VR601"),
> +		     },
> +	 },
> +	{
> +	 .callback = a20_enable_kbc,
> +	 .ident = "MSI PR200 Laptop",
> +	 .matches = {
> +		     DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
> +		     DMI_MATCH(DMI_PRODUCT_NAME, "MSI Notebook PR200"),
> +		     },
> +	 },
>  	{}
>  };
>  
> 
> 
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Enable A20 using KBC for some MSI laptops to fix S3 resume
  2012-10-24 19:01 ` Rafael J. Wysocki
@ 2012-10-24 19:36   ` H. Peter Anvin
  2012-10-24 19:56     ` Ondrej Zary
  2012-10-24 20:09     ` Alan Cox
  0 siblings, 2 replies; 9+ messages in thread
From: H. Peter Anvin @ 2012-10-24 19:36 UTC (permalink / raw)
  To: Rafael J. Wysocki, Ondrej Zary; +Cc: linux-acpi, linux-kernel

Minor concern: it should do the wait for ready before sending each command.

"Rafael J. Wysocki" <rjw@sisk.pl> wrote:

>On Wednesday 24 of October 2012 08:47:52 Ondrej Zary wrote:
>> Some MSI laptop BIOSes are broken - INT 15h code uses port 92h to
>enable A20
>> line but resume code assumes that KBC was used.
>> The laptop will not resume from S3 otherwise but powers off after a
>while
>> and then powers on again stuck with a blank screen.
>> 
>> Fix it by enabling A20 using KBC. Affected laptop list and DMI data
>are from
>> bug reports at Ubuntu Launchpad.
>> 
>> Tested with EX600 and PR200.
>> 
>> Fixes https://bugzilla.kernel.org/show_bug.cgi?id=12878
>> 
>> Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
>
>Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
>
>> --- a/arch/x86/kernel/acpi/boot.c
>> +++ b/arch/x86/kernel/acpi/boot.c
>> @@ -1349,6 +1349,20 @@ static int __init
>dmi_ignore_irq0_timer_override(const struct dmi_system_id *d)
>>  }
>>  
>>  /*
>> + * Enable A20 line using KBC even if it's already enabled using
>other method.
>> + * This is needed for some MSI laptops to resume from S3.
>> + */
>> +static int __init a20_enable_kbc(const struct dmi_system_id *d)
>> +{
>> +	printk(KERN_NOTICE "%s detected: enabling A20 using KBC\n",
>d->ident);
>> +	outb(0xd1, 0x64);	/* Command write */
>> +	outb(0xdf, 0x60);	/* A20 on */
>> +	outb(0xff, 0x64);	/* Null command, but UHCI wants it */
>> +
>> +	return 0;
>> +}
>> +
>> +/*
>>   * If your system is blacklisted here, but you find that acpi=force
>>   * works for you, please contact linux-acpi@vger.kernel.org
>>   */
>> @@ -1423,6 +1437,60 @@ static struct dmi_system_id __initdata
>acpi_dmi_table[] = {
>>  		     DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
>>  		     },
>>  	 },
>> +	/*
>> +	 * Some MSI laptop BIOSes are broken - INT 15h code uses port 92h
>to
>> +	 * enable A20 line but resume code assumes that KBC was used.
>> +	 * The laptop will not resume from S3 otherwise but powers off
>> +	 * after a while and then powers on again stuck with a blank
>screen.
>> +	 */
>> +	{
>> +	 .callback = a20_enable_kbc,
>> +	 .ident = "MSI EX600 Laptop",
>> +	 .matches = {
>> +		     DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
>> +		     DMI_MATCH(DMI_PRODUCT_NAME, "MSI Notebook EX600"),
>> +		     },
>> +	 },
>> +	{
>> +	 .callback = a20_enable_kbc,
>> +	 .ident = "MSI EX700 Laptop",
>> +	 .matches = {
>> +		     DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
>> +		     DMI_MATCH(DMI_PRODUCT_NAME, "EX700"),
>> +		     },
>> +	 },
>> +	{
>> +	 .callback = a20_enable_kbc,
>> +	 .ident = "MSI GX700 Laptop",
>> +	 .matches = {
>> +		     DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
>> +		     DMI_MATCH(DMI_PRODUCT_NAME, "GX700"),
>> +		     },
>> +	 },
>> +	{
>> +	 .callback = a20_enable_kbc,
>> +	 .ident = "MSI VR201 Laptop",
>> +	 .matches = {
>> +		     DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
>> +		     DMI_MATCH(DMI_PRODUCT_NAME, "MSI Notebook VR201"),
>> +		     },
>> +	 },
>> +	{
>> +	 .callback = a20_enable_kbc,
>> +	 .ident = "MSI VR601 Laptop",
>> +	 .matches = {
>> +		     DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
>> +		     DMI_MATCH(DMI_PRODUCT_NAME, "MSI Notebook VR601"),
>> +		     },
>> +	 },
>> +	{
>> +	 .callback = a20_enable_kbc,
>> +	 .ident = "MSI PR200 Laptop",
>> +	 .matches = {
>> +		     DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
>> +		     DMI_MATCH(DMI_PRODUCT_NAME, "MSI Notebook PR200"),
>> +		     },
>> +	 },
>>  	{}
>>  };
>>  
>> 
>> 
>> 

-- 
Sent from my mobile phone. Please excuse brevity and lack of formatting.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Enable A20 using KBC for some MSI laptops to fix S3 resume
  2012-10-24 19:36   ` H. Peter Anvin
@ 2012-10-24 19:56     ` Ondrej Zary
  2012-10-24 20:03       ` H. Peter Anvin
  2012-10-24 20:09     ` Alan Cox
  1 sibling, 1 reply; 9+ messages in thread
From: Ondrej Zary @ 2012-10-24 19:56 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: Rafael J. Wysocki, linux-acpi, linux-kernel

On Wednesday 24 October 2012 21:36:04 H. Peter Anvin wrote:
> Minor concern: it should do the wait for ready before sending each command.

It was a hack and then I forgot to add the waits... Should I redo the patch? 
I'll not be able to test it as I have to return the machine.

> "Rafael J. Wysocki" <rjw@sisk.pl> wrote:
> >On Wednesday 24 of October 2012 08:47:52 Ondrej Zary wrote:
> >> Some MSI laptop BIOSes are broken - INT 15h code uses port 92h to
> >
> >enable A20
> >
> >> line but resume code assumes that KBC was used.
> >> The laptop will not resume from S3 otherwise but powers off after a
> >
> >while
> >
> >> and then powers on again stuck with a blank screen.
> >>
> >> Fix it by enabling A20 using KBC. Affected laptop list and DMI data
> >
> >are from
> >
> >> bug reports at Ubuntu Launchpad.
> >>
> >> Tested with EX600 and PR200.
> >>
> >> Fixes https://bugzilla.kernel.org/show_bug.cgi?id=12878
> >>
> >> Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
> >
> >Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> >
> >> --- a/arch/x86/kernel/acpi/boot.c
> >> +++ b/arch/x86/kernel/acpi/boot.c
> >> @@ -1349,6 +1349,20 @@ static int __init
> >
> >dmi_ignore_irq0_timer_override(const struct dmi_system_id *d)
> >
> >>  }
> >>
> >>  /*
> >> + * Enable A20 line using KBC even if it's already enabled using
> >
> >other method.
> >
> >> + * This is needed for some MSI laptops to resume from S3.
> >> + */
> >> +static int __init a20_enable_kbc(const struct dmi_system_id *d)
> >> +{
> >> +	printk(KERN_NOTICE "%s detected: enabling A20 using KBC\n",
> >
> >d->ident);
> >
> >> +	outb(0xd1, 0x64);	/* Command write */
> >> +	outb(0xdf, 0x60);	/* A20 on */
> >> +	outb(0xff, 0x64);	/* Null command, but UHCI wants it */
> >> +
> >> +	return 0;
> >> +}
> >> +
> >> +/*
> >>   * If your system is blacklisted here, but you find that acpi=force
> >>   * works for you, please contact linux-acpi@vger.kernel.org
> >>   */
> >> @@ -1423,6 +1437,60 @@ static struct dmi_system_id __initdata
> >
> >acpi_dmi_table[] = {
> >
> >>  		     DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
> >>  		     },
> >>  	 },
> >> +	/*
> >> +	 * Some MSI laptop BIOSes are broken - INT 15h code uses port 92h
> >
> >to
> >
> >> +	 * enable A20 line but resume code assumes that KBC was used.
> >> +	 * The laptop will not resume from S3 otherwise but powers off
> >> +	 * after a while and then powers on again stuck with a blank
> >
> >screen.
> >
> >> +	 */
> >> +	{
> >> +	 .callback = a20_enable_kbc,
> >> +	 .ident = "MSI EX600 Laptop",
> >> +	 .matches = {
> >> +		     DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
> >> +		     DMI_MATCH(DMI_PRODUCT_NAME, "MSI Notebook EX600"),
> >> +		     },
> >> +	 },
> >> +	{
> >> +	 .callback = a20_enable_kbc,
> >> +	 .ident = "MSI EX700 Laptop",
> >> +	 .matches = {
> >> +		     DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
> >> +		     DMI_MATCH(DMI_PRODUCT_NAME, "EX700"),
> >> +		     },
> >> +	 },
> >> +	{
> >> +	 .callback = a20_enable_kbc,
> >> +	 .ident = "MSI GX700 Laptop",
> >> +	 .matches = {
> >> +		     DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
> >> +		     DMI_MATCH(DMI_PRODUCT_NAME, "GX700"),
> >> +		     },
> >> +	 },
> >> +	{
> >> +	 .callback = a20_enable_kbc,
> >> +	 .ident = "MSI VR201 Laptop",
> >> +	 .matches = {
> >> +		     DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
> >> +		     DMI_MATCH(DMI_PRODUCT_NAME, "MSI Notebook VR201"),
> >> +		     },
> >> +	 },
> >> +	{
> >> +	 .callback = a20_enable_kbc,
> >> +	 .ident = "MSI VR601 Laptop",
> >> +	 .matches = {
> >> +		     DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
> >> +		     DMI_MATCH(DMI_PRODUCT_NAME, "MSI Notebook VR601"),
> >> +		     },
> >> +	 },
> >> +	{
> >> +	 .callback = a20_enable_kbc,
> >> +	 .ident = "MSI PR200 Laptop",
> >> +	 .matches = {
> >> +		     DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
> >> +		     DMI_MATCH(DMI_PRODUCT_NAME, "MSI Notebook PR200"),
> >> +		     },
> >> +	 },
> >>  	{}
> >>  };


-- 
Ondrej Zary

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Enable A20 using KBC for some MSI laptops to fix S3 resume
  2012-10-24 19:56     ` Ondrej Zary
@ 2012-10-24 20:03       ` H. Peter Anvin
  0 siblings, 0 replies; 9+ messages in thread
From: H. Peter Anvin @ 2012-10-24 20:03 UTC (permalink / raw)
  To: Ondrej Zary; +Cc: Rafael J. Wysocki, linux-acpi, linux-kernel

Probably should.

Ondrej Zary <linux@rainbow-software.org> wrote:

>On Wednesday 24 October 2012 21:36:04 H. Peter Anvin wrote:
>> Minor concern: it should do the wait for ready before sending each
>command.
>
>It was a hack and then I forgot to add the waits... Should I redo the
>patch? 
>I'll not be able to test it as I have to return the machine.
>
>> "Rafael J. Wysocki" <rjw@sisk.pl> wrote:
>> >On Wednesday 24 of October 2012 08:47:52 Ondrej Zary wrote:
>> >> Some MSI laptop BIOSes are broken - INT 15h code uses port 92h to
>> >
>> >enable A20
>> >
>> >> line but resume code assumes that KBC was used.
>> >> The laptop will not resume from S3 otherwise but powers off after
>a
>> >
>> >while
>> >
>> >> and then powers on again stuck with a blank screen.
>> >>
>> >> Fix it by enabling A20 using KBC. Affected laptop list and DMI
>data
>> >
>> >are from
>> >
>> >> bug reports at Ubuntu Launchpad.
>> >>
>> >> Tested with EX600 and PR200.
>> >>
>> >> Fixes https://bugzilla.kernel.org/show_bug.cgi?id=12878
>> >>
>> >> Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
>> >
>> >Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>> >
>> >> --- a/arch/x86/kernel/acpi/boot.c
>> >> +++ b/arch/x86/kernel/acpi/boot.c
>> >> @@ -1349,6 +1349,20 @@ static int __init
>> >
>> >dmi_ignore_irq0_timer_override(const struct dmi_system_id *d)
>> >
>> >>  }
>> >>
>> >>  /*
>> >> + * Enable A20 line using KBC even if it's already enabled using
>> >
>> >other method.
>> >
>> >> + * This is needed for some MSI laptops to resume from S3.
>> >> + */
>> >> +static int __init a20_enable_kbc(const struct dmi_system_id *d)
>> >> +{
>> >> +	printk(KERN_NOTICE "%s detected: enabling A20 using KBC\n",
>> >
>> >d->ident);
>> >
>> >> +	outb(0xd1, 0x64);	/* Command write */
>> >> +	outb(0xdf, 0x60);	/* A20 on */
>> >> +	outb(0xff, 0x64);	/* Null command, but UHCI wants it */
>> >> +
>> >> +	return 0;
>> >> +}
>> >> +
>> >> +/*
>> >>   * If your system is blacklisted here, but you find that
>acpi=force
>> >>   * works for you, please contact linux-acpi@vger.kernel.org
>> >>   */
>> >> @@ -1423,6 +1437,60 @@ static struct dmi_system_id __initdata
>> >
>> >acpi_dmi_table[] = {
>> >
>> >>  		     DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
>> >>  		     },
>> >>  	 },
>> >> +	/*
>> >> +	 * Some MSI laptop BIOSes are broken - INT 15h code uses port
>92h
>> >
>> >to
>> >
>> >> +	 * enable A20 line but resume code assumes that KBC was used.
>> >> +	 * The laptop will not resume from S3 otherwise but powers off
>> >> +	 * after a while and then powers on again stuck with a blank
>> >
>> >screen.
>> >
>> >> +	 */
>> >> +	{
>> >> +	 .callback = a20_enable_kbc,
>> >> +	 .ident = "MSI EX600 Laptop",
>> >> +	 .matches = {
>> >> +		     DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
>> >> +		     DMI_MATCH(DMI_PRODUCT_NAME, "MSI Notebook EX600"),
>> >> +		     },
>> >> +	 },
>> >> +	{
>> >> +	 .callback = a20_enable_kbc,
>> >> +	 .ident = "MSI EX700 Laptop",
>> >> +	 .matches = {
>> >> +		     DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
>> >> +		     DMI_MATCH(DMI_PRODUCT_NAME, "EX700"),
>> >> +		     },
>> >> +	 },
>> >> +	{
>> >> +	 .callback = a20_enable_kbc,
>> >> +	 .ident = "MSI GX700 Laptop",
>> >> +	 .matches = {
>> >> +		     DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
>> >> +		     DMI_MATCH(DMI_PRODUCT_NAME, "GX700"),
>> >> +		     },
>> >> +	 },
>> >> +	{
>> >> +	 .callback = a20_enable_kbc,
>> >> +	 .ident = "MSI VR201 Laptop",
>> >> +	 .matches = {
>> >> +		     DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
>> >> +		     DMI_MATCH(DMI_PRODUCT_NAME, "MSI Notebook VR201"),
>> >> +		     },
>> >> +	 },
>> >> +	{
>> >> +	 .callback = a20_enable_kbc,
>> >> +	 .ident = "MSI VR601 Laptop",
>> >> +	 .matches = {
>> >> +		     DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
>> >> +		     DMI_MATCH(DMI_PRODUCT_NAME, "MSI Notebook VR601"),
>> >> +		     },
>> >> +	 },
>> >> +	{
>> >> +	 .callback = a20_enable_kbc,
>> >> +	 .ident = "MSI PR200 Laptop",
>> >> +	 .matches = {
>> >> +		     DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
>> >> +		     DMI_MATCH(DMI_PRODUCT_NAME, "MSI Notebook PR200"),
>> >> +		     },
>> >> +	 },
>> >>  	{}
>> >>  };

-- 
Sent from my mobile phone. Please excuse brevity and lack of formatting.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Enable A20 using KBC for some MSI laptops to fix S3 resume
  2012-10-24 19:36   ` H. Peter Anvin
  2012-10-24 19:56     ` Ondrej Zary
@ 2012-10-24 20:09     ` Alan Cox
  2012-10-26  4:31       ` Robert Hancock
  1 sibling, 1 reply; 9+ messages in thread
From: Alan Cox @ 2012-10-24 20:09 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: Rafael J. Wysocki, Ondrej Zary, linux-acpi, linux-kernel

On Wed, 24 Oct 2012 12:36:04 -0700
"H. Peter Anvin" <hpa@zytor.com> wrote:

> Minor concern: it should do the wait for ready before sending each command.

Can we get a command line to do this quirk too - it strikes me that if
the MSIs rely upon it then it may be something Windows always does so
will be useful to try on other problem machines as an experiment.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Enable A20 using KBC for some MSI laptops to fix S3 resume
  2012-10-24 20:09     ` Alan Cox
@ 2012-10-26  4:31       ` Robert Hancock
  2012-10-26  4:44         ` H. Peter Anvin
  0 siblings, 1 reply; 9+ messages in thread
From: Robert Hancock @ 2012-10-26  4:31 UTC (permalink / raw)
  To: Alan Cox
  Cc: H. Peter Anvin, Rafael J. Wysocki, Ondrej Zary, linux-acpi, linux-kernel

On 10/24/2012 02:09 PM, Alan Cox wrote:
> On Wed, 24 Oct 2012 12:36:04 -0700
> "H. Peter Anvin" <hpa@zytor.com> wrote:
>
>> Minor concern: it should do the wait for ready before sending each command.
>
> Can we get a command line to do this quirk too - it strikes me that if
> the MSIs rely upon it then it may be something Windows always does so
> will be useful to try on other problem machines as an experiment.

I agree, one has to keep in mind the age-old question "how does Windows 
work?" since it surely has no such quirk. I'd say we're sometimes too 
quick to add these DMI quirks when a more general solution would be 
somehow figure out how the Linux behavior differs from what Windows is 
doing.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Enable A20 using KBC for some MSI laptops to fix S3 resume
  2012-10-26  4:31       ` Robert Hancock
@ 2012-10-26  4:44         ` H. Peter Anvin
  2012-10-26  6:20           ` Ondrej Zary
  0 siblings, 1 reply; 9+ messages in thread
From: H. Peter Anvin @ 2012-10-26  4:44 UTC (permalink / raw)
  To: Robert Hancock, Alan Cox
  Cc: Rafael J. Wysocki, Ondrej Zary, linux-acpi, linux-kernel

My guess is that Windows explicitly enables A20 on resume.  We should do that too, really... with the current heavily unified realmode code it should be easy - let me hack up a patch in the morning.

Robert Hancock <hancockrwd@gmail.com> wrote:

>On 10/24/2012 02:09 PM, Alan Cox wrote:
>> On Wed, 24 Oct 2012 12:36:04 -0700
>> "H. Peter Anvin" <hpa@zytor.com> wrote:
>>
>>> Minor concern: it should do the wait for ready before sending each
>command.
>>
>> Can we get a command line to do this quirk too - it strikes me that
>if
>> the MSIs rely upon it then it may be something Windows always does so
>> will be useful to try on other problem machines as an experiment.
>
>I agree, one has to keep in mind the age-old question "how does Windows
>
>work?" since it surely has no such quirk. I'd say we're sometimes too 
>quick to add these DMI quirks when a more general solution would be 
>somehow figure out how the Linux behavior differs from what Windows is 
>doing.

-- 
Sent from my mobile phone. Please excuse brevity and lack of formatting.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Enable A20 using KBC for some MSI laptops to fix S3 resume
  2012-10-26  4:44         ` H. Peter Anvin
@ 2012-10-26  6:20           ` Ondrej Zary
  0 siblings, 0 replies; 9+ messages in thread
From: Ondrej Zary @ 2012-10-26  6:20 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Robert Hancock, Alan Cox, Rafael J. Wysocki, linux-acpi, linux-kernel

On Friday 26 October 2012, H. Peter Anvin wrote:
> My guess is that Windows explicitly enables A20 on resume.  We should do
> that too, really... with the current heavily unified realmode code it
> should be easy - let me hack up a patch in the morning.

Neither s3_beep nor s3_leds (this patch: 
https://lists.ubuntu.com/archives/kernel-team/2011-May/015621.html ) worked 
for me so I thing that BIOS breaks on resume before we can do anything.

> Robert Hancock <hancockrwd@gmail.com> wrote:
> >On 10/24/2012 02:09 PM, Alan Cox wrote:
> >> On Wed, 24 Oct 2012 12:36:04 -0700
> >>
> >> "H. Peter Anvin" <hpa@zytor.com> wrote:
> >>> Minor concern: it should do the wait for ready before sending each
> >
> >command.
> >
> >> Can we get a command line to do this quirk too - it strikes me that
> >
> >if
> >
> >> the MSIs rely upon it then it may be something Windows always does so
> >> will be useful to try on other problem machines as an experiment.
> >
> >I agree, one has to keep in mind the age-old question "how does Windows
> >
> >work?" since it surely has no such quirk. I'd say we're sometimes too
> >quick to add these DMI quirks when a more general solution would be
> >somehow figure out how the Linux behavior differs from what Windows is
> >doing.



-- 
Ondrej Zary

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-10-26  6:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-24  6:47 [PATCH] Enable A20 using KBC for some MSI laptops to fix S3 resume Ondrej Zary
2012-10-24 19:01 ` Rafael J. Wysocki
2012-10-24 19:36   ` H. Peter Anvin
2012-10-24 19:56     ` Ondrej Zary
2012-10-24 20:03       ` H. Peter Anvin
2012-10-24 20:09     ` Alan Cox
2012-10-26  4:31       ` Robert Hancock
2012-10-26  4:44         ` H. Peter Anvin
2012-10-26  6:20           ` Ondrej Zary

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).