All of lore.kernel.org
 help / color / mirror / Atom feed
From: matthieu castet <castet.matthieu-GANU6spQydw@public.gmane.org>
To: matthieu castet <castet.matthieu-GANU6spQydw@public.gmane.org>
Cc: Linux Kernel list
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Len Brown <len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH] PNPACPI parser fix
Date: Sat, 05 Feb 2005 10:07:08 +0100	[thread overview]
Message-ID: <42048CBC.8070700@free.fr> (raw)
In-Reply-To: <4203AFC5.8070308-GANU6spQydw@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 477 bytes --]

Hi,

matthieu castet wrote:
> Hi,
> 
> This patch is very old (11/2004), but never get merged even if acked by 
> Shaohua Li.
> As you can see in the bugzilla report 
> (http://bugzilla.kernel.org/show_bug.cgi?id=3912), it solve parsing 
> issue in the pnpacpi core : the pnpacpi parser supposed that are no
> resource after EndDependentFn.
> 
> Please apply this patch.
> Thanks.
> 
> Matthieu CASTET

oops, the attachement was wrong.

Here is the patch.


Regards,

Matthieu

[-- Attachment #2: pnpacpi_parser.patch --]
[-- Type: text/x-patch, Size: 1127 bytes --]

--- linux-2.6.9/drivers/pnp/pnpacpi/rsparser.c.old	2004-11-12 22:55:10.000000000 +0100
+++ linux-2.6.9/drivers/pnp/pnpacpi/rsparser.c	2004-11-20 10:44:36.000000000 +0100
@@ -443,6 +443,7 @@
 
 struct acpipnp_parse_option_s {
 	struct pnp_option *option;
+	struct pnp_option *option_independent;
 	struct pnp_dev *dev;
 };
 
@@ -506,7 +507,15 @@
 			parse_data->option = option;	
 			break;
 		case ACPI_RSTYPE_END_DPF:
-			return AE_CTRL_TERMINATE;
+			/*only one EndDependentFn is allowed*/
+			if (!parse_data->option_independent) {
+				pnp_warn("PnPACPI: more than one EndDependentFn");
+				return AE_ERROR;
+			}
+			parse_data->option = parse_data->option_independent;
+			parse_data->option_independent = NULL;
+			break;
 		default:
 			pnp_warn("PnPACPI:Option type: %d not handle", res->id);
 			return AE_ERROR;
@@ -524,6 +533,7 @@
 	parse_data.option = pnp_register_option_independent(dev);
 	if (!parse_data.option)
 		return AE_ERROR;
+	parse_data.option_independent = parse_data.option;
 	parse_data.dev = dev;
 	status = acpi_walk_resources(handle, METHOD_NAME__PRS, 
 		pnpacpi_option_resource, &parse_data);

WARNING: multiple messages have this Message-ID (diff)
From: matthieu castet <castet.matthieu@free.fr>
To: matthieu castet <castet.matthieu@free.fr>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>,
	Len Brown <len.brown@intel.com>,
	acpi-devel@lists.sourceforge.net
Subject: Re: [PATCH] PNPACPI parser fix
Date: Sat, 05 Feb 2005 10:07:08 +0100	[thread overview]
Message-ID: <42048CBC.8070700@free.fr> (raw)
In-Reply-To: <4203AFC5.8070308@free.fr>

[-- Attachment #1: Type: text/plain, Size: 477 bytes --]

Hi,

matthieu castet wrote:
> Hi,
> 
> This patch is very old (11/2004), but never get merged even if acked by 
> Shaohua Li.
> As you can see in the bugzilla report 
> (http://bugzilla.kernel.org/show_bug.cgi?id=3912), it solve parsing 
> issue in the pnpacpi core : the pnpacpi parser supposed that are no
> resource after EndDependentFn.
> 
> Please apply this patch.
> Thanks.
> 
> Matthieu CASTET

oops, the attachement was wrong.

Here is the patch.


Regards,

Matthieu

[-- Attachment #2: pnpacpi_parser.patch --]
[-- Type: text/x-patch, Size: 1127 bytes --]

--- linux-2.6.9/drivers/pnp/pnpacpi/rsparser.c.old	2004-11-12 22:55:10.000000000 +0100
+++ linux-2.6.9/drivers/pnp/pnpacpi/rsparser.c	2004-11-20 10:44:36.000000000 +0100
@@ -443,6 +443,7 @@
 
 struct acpipnp_parse_option_s {
 	struct pnp_option *option;
+	struct pnp_option *option_independent;
 	struct pnp_dev *dev;
 };
 
@@ -506,7 +507,15 @@
 			parse_data->option = option;	
 			break;
 		case ACPI_RSTYPE_END_DPF:
-			return AE_CTRL_TERMINATE;
+			/*only one EndDependentFn is allowed*/
+			if (!parse_data->option_independent) {
+				pnp_warn("PnPACPI: more than one EndDependentFn");
+				return AE_ERROR;
+			}
+			parse_data->option = parse_data->option_independent;
+			parse_data->option_independent = NULL;
+			break;
 		default:
 			pnp_warn("PnPACPI:Option type: %d not handle", res->id);
 			return AE_ERROR;
@@ -524,6 +533,7 @@
 	parse_data.option = pnp_register_option_independent(dev);
 	if (!parse_data.option)
 		return AE_ERROR;
+	parse_data.option_independent = parse_data.option;
 	parse_data.dev = dev;
 	status = acpi_walk_resources(handle, METHOD_NAME__PRS, 
 		pnpacpi_option_resource, &parse_data);

  parent reply	other threads:[~2005-02-05  9:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-04 17:24 [PATCH] PNPACPI parser fix matthieu castet
     [not found] ` <4203AFC5.8070308-GANU6spQydw@public.gmane.org>
2005-02-05  9:07   ` matthieu castet [this message]
2005-02-05  9:07     ` matthieu castet
  -- strict thread matches above, loose matches on Subject: below --
2004-11-21 19:27 [Patch] PnPacpi " matthieu castet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42048CBC.8070700@free.fr \
    --to=castet.matthieu-ganu6spqydw@public.gmane.org \
    --cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.