--- 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 #include #include