From: matthieu castet <castet.matthieu@free.fr>
To: Meelis Roos <mroos@linux.ee>
Cc: "Li Shaohua" <shaohua.li@intel.com>,
"Linux Kernel list" <linux-kernel@vger.kernel.org>,
"Jean Tourrilhes" <jt@bougret.hpl.hp.com>,
"Adam Belay" <ambx1@neo.rr.com>, "Ville Syrjälä" <syrjala@sci.fi>
Subject: Re: [PATCH] smsc-ircc2: Add PnP support.
Date: Sat, 27 Nov 2004 15:02:44 +0100 [thread overview]
Message-ID: <41A88904.3070305@free.fr> (raw)
In-Reply-To: <Pine.SOC.4.61.0411271411190.1904@math.ut.ee>
[-- Attachment #1: Type: text/plain, Size: 1284 bytes --]
Hi,
Meelis Roos wrote:
>> That's because resource point at the end of the resources list, so
>> there is nothing to read. With this patch, you should see something.
>
>
> On bootup there are loads on lines 167 and 472.
>
> On auto there are none.
>
> On activate there are
> ******846*******
> pnp: Device 00:0a activated.
>
> On modprobe smsc-ircc2 there are no more debug lines, just
> found SMC SuperIO Chip (devid=0x5a rev=00 base=0x002e): LPC47N227
> smsc_superio_flat(): IrDA not enabled
> smsc_superio_flat(): fir: 0x00, sir: 0x00, dma: 15, irq: 0, mode: 0x02
>
> And I checked that I am using the new patch.
>
thanks.
it seems there is no resource in your __CRS. Like Shaohua said the acpi
spec say that it must return valid template even if the device is
disable [1].
Just for confirmation, could you try this patch. It should enable
pnp_dbg message and print your _CRS when you activate the device.
If there is nothing between ******574******* and ******857*******, you
bios is likely broken.
thanks
Matthieu CASTET
[1]
If a device is disabled, then _CRS returns a valid resource template for
the device, but the actual
resource assignments in the return byte stream are ignored. If the
device is disabled when _CRS is called, it
must remain disabled.
[-- Attachment #2: rs2.patch --]
[-- Type: text/x-patch, Size: 2693 bytes --]
--- linux-2.6.9/drivers/pnp/pnpacpi/rsparser.c.int 2004-11-27 01:46:10.000000000 +0100
+++ linux-2.6.9/drivers/pnp/pnpacpi/rsparser.c 2004-11-27 14:11:32.000000000 +0100
@@ -29,6 +29,22 @@
#define valid_IRQ(i) (((i) != 0) && ((i) != 2))
#endif
+static int first = 1;
+static void debug_pnp(struct acpi_resource *res, int line) {
+ int tmp = acpi_dbg_level;
+ int tmp1 = acpi_dbg_layer;
+ if (!first)
+ return;
+ first = 0;
+
+ acpi_dbg_level = 0x00010000;
+ acpi_dbg_layer = 0x00000100;
+ printk("******%d*******\n",line);
+ ACPI_DUMP_RESOURCE_LIST(res);
+ acpi_dbg_level = tmp;
+ acpi_dbg_layer = tmp1;
+}
+
/*
* Allocated Resources
*/
@@ -152,6 +168,8 @@
{
struct pnp_resource_table * res_table = (struct pnp_resource_table *)data;
+ debug_pnp(res,__LINE__);
+
switch (res->id) {
case ACPI_RSTYPE_IRQ:
if ((res->data.irq.number_of_interrupts > 0) &&
@@ -233,6 +251,7 @@
/* Blank the resource table values */
pnp_init_resource_table(res);
+ first = 1;
return acpi_walk_resources(handle, METHOD_NAME__CRS, pnpacpi_allocated_resource, res);
}
@@ -455,6 +474,8 @@
struct pnp_dev *dev = parse_data->dev;
struct pnp_option *option = parse_data->option;
+ //debug_pnp(res,__LINE__);
+
switch (res->id) {
case ACPI_RSTYPE_IRQ:
pnpacpi_parse_irq_option(option, &res->data.irq);
@@ -535,6 +556,7 @@
return AE_ERROR;
parse_data.independent_option = parse_data.option;
parse_data.dev = dev;
+ first=1;
status = acpi_walk_resources(handle, METHOD_NAME__PRS,
pnpacpi_option_resource, &parse_data);
@@ -548,6 +570,9 @@
void *data)
{
int *res_cnt = (int *)data;
+
+ debug_pnp(res,__LINE__);
+
switch (res->id) {
case ACPI_RSTYPE_IRQ:
case ACPI_RSTYPE_EXT_IRQ:
@@ -603,6 +628,7 @@
int res_cnt = 0;
acpi_status status;
+ first = 1;
status = acpi_walk_resources(handle, METHOD_NAME__CRS,
pnpacpi_count_resources, &res_cnt);
if (ACPI_FAILURE(status)) {
@@ -765,6 +791,7 @@
/* pnpacpi_build_resource_template allocates extra mem */
int res_cnt = (buffer->length - 1)/sizeof(struct acpi_resource) - 1;
struct acpi_resource *resource = (struct acpi_resource*)buffer->pointer;
+ struct acpi_resource *res = resource;
int port = 0, irq = 0, dma = 0, mem = 0;
pnp_dbg("res cnt %d", res_cnt);
@@ -826,5 +853,8 @@
resource ++;
i ++;
}
+ first=1;
+ debug_pnp(res,__LINE__);
+
return 0;
}
--- linux-2.6.9/drivers/pnp/pnpacpi/pnpacpi.h.old 2004-11-27 14:54:22.000000000 +0100
+++ linux-2.6.9/drivers/pnp/pnpacpi/pnpacpi.h 2004-11-27 14:14:00.000000000 +0100
@@ -1,6 +1,8 @@
#ifndef ACPI_PNP_H
#define ACPI_PNP_H
+#define DEBUG
+
#include <acpi/acpi_bus.h>
#include <linux/acpi.h>
#include <linux/pnp.h>
next prev parent reply other threads:[~2004-11-27 14:02 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-18 18:42 matthieu castet
2004-11-18 18:55 ` Jean Tourrilhes
2004-11-18 19:49 ` matthieu castet
2004-11-18 20:41 ` Ville Syrjälä
2004-11-18 23:02 ` Adam Belay
2004-11-19 15:27 ` Meelis Roos
2004-11-19 15:53 ` matthieu castet
2004-11-19 15:57 ` matthieu castet
2004-11-19 16:15 ` Meelis Roos
2004-11-19 16:22 ` Meelis Roos
2004-11-19 17:28 ` matthieu castet
2004-11-19 17:34 ` Meelis Roos
2004-11-19 18:29 ` matthieu castet
2004-11-19 23:09 ` Meelis Roos
2004-11-20 9:50 ` matthieu castet
2004-11-21 17:50 ` Meelis Roos
2004-11-21 18:16 ` matthieu castet
2004-11-21 18:51 ` Meelis Roos
2004-11-21 19:21 ` matthieu castet
2004-11-21 20:20 ` matthieu castet
2004-11-22 1:29 ` Li Shaohua
2004-11-22 8:37 ` Meelis Roos
2004-11-26 16:02 ` matthieu castet
2004-11-26 18:19 ` Meelis Roos
2004-11-27 0:50 ` matthieu castet
2004-11-27 12:15 ` Meelis Roos
2004-11-27 14:02 ` matthieu castet [this message]
2004-11-27 18:24 ` Meelis Roos
2004-11-27 18:58 ` matthieu castet
2004-11-27 19:25 ` matthieu castet
2004-11-27 19:39 ` Meelis Roos
2004-11-22 8:39 ` Meelis Roos
2004-11-22 8:42 ` Meelis Roos
2004-11-22 8:38 ` Meelis Roos
2004-11-20 11:43 ` [ACPI] " Ville Syrjälä
2004-11-20 11:57 ` matthieu castet
[not found] <20041117232047.GA28061@bougret.hpl.hp.com>
2004-11-18 3:52 ` Ville Syrjälä
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=41A88904.3070305@free.fr \
--to=castet.matthieu@free.fr \
--cc=ambx1@neo.rr.com \
--cc=jt@bougret.hpl.hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mroos@linux.ee \
--cc=shaohua.li@intel.com \
--cc=syrjala@sci.fi \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome