]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
Merge branches 'bugzilla-14337', 'bugzilla-14998', 'bugzilla-15407', 'bugzilla-15903...
authorLen Brown <len.brown@intel.com>
Fri, 7 May 2010 02:04:31 +0000 (22:04 -0400)
committerLen Brown <len.brown@intel.com>
Fri, 7 May 2010 02:04:31 +0000 (22:04 -0400)
drivers/acpi/bus.c
drivers/acpi/sleep.c
drivers/pnp/pnpacpi/rsparser.c
drivers/pnp/resource.c

index 37132dc2da03df35ec25b1e8e203715ceb172aac..743576bf1bd79e5e7b8c6fc10bafb674d88c8803 100644 (file)
@@ -527,7 +527,7 @@ int acpi_bus_generate_proc_event4(const char *device_class, const char *bus_id,
        if (!event_is_open)
                return 0;
 
-       event = kmalloc(sizeof(struct acpi_bus_event), GFP_ATOMIC);
+       event = kzalloc(sizeof(struct acpi_bus_event), GFP_ATOMIC);
        if (!event)
                return -ENOMEM;
 
index f74834a544fd6b85eae3941ea9c5401f08a91450..e2e992599e68b45bba9da87872c543eba17979cb 100644 (file)
@@ -450,6 +450,126 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = {
                },
        },
        {
+       .callback = init_set_sci_en_on_resume,
+       .ident = "Lenovo ThinkPad T410",
+       .matches = {
+               DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+               DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T410"),
+               },
+       },
+       {
+       .callback = init_set_sci_en_on_resume,
+       .ident = "Lenovo ThinkPad T510",
+       .matches = {
+               DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+               DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T510"),
+               },
+       },
+       {
+       .callback = init_set_sci_en_on_resume,
+       .ident = "Lenovo ThinkPad W510",
+       .matches = {
+               DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+               DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad W510"),
+               },
+       },
+       {
+       .callback = init_set_sci_en_on_resume,
+       .ident = "Lenovo ThinkPad X201",
+       .matches = {
+               DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+               DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X201"),
+               },
+       },
+       {
+       .callback = init_set_sci_en_on_resume,
+       .ident = "Lenovo ThinkPad X201",
+       .matches = {
+               DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+               DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X201s"),
+               },
+       },
+       {
+       .callback = init_set_sci_en_on_resume,
+       .ident = "Lenovo ThinkPad T410",
+       .matches = {
+               DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+               DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T410"),
+               },
+       },
+       {
+       .callback = init_set_sci_en_on_resume,
+       .ident = "Lenovo ThinkPad T510",
+       .matches = {
+               DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+               DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T510"),
+               },
+       },
+       {
+       .callback = init_set_sci_en_on_resume,
+       .ident = "Lenovo ThinkPad W510",
+       .matches = {
+               DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+               DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad W510"),
+               },
+       },
+       {
+       .callback = init_set_sci_en_on_resume,
+       .ident = "Lenovo ThinkPad X201",
+       .matches = {
+               DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+               DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X201"),
+               },
+       },
+       {
+       .callback = init_set_sci_en_on_resume,
+       .ident = "Lenovo ThinkPad X201",
+       .matches = {
+               DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+               DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X201s"),
+               },
+       },
+       {
+       .callback = init_set_sci_en_on_resume,
+       .ident = "Lenovo ThinkPad T410",
+       .matches = {
+               DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+               DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T410"),
+               },
+       },
+       {
+       .callback = init_set_sci_en_on_resume,
+       .ident = "Lenovo ThinkPad T510",
+       .matches = {
+               DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+               DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T510"),
+               },
+       },
+       {
+       .callback = init_set_sci_en_on_resume,
+       .ident = "Lenovo ThinkPad W510",
+       .matches = {
+               DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+               DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad W510"),
+               },
+       },
+       {
+       .callback = init_set_sci_en_on_resume,
+       .ident = "Lenovo ThinkPad X201",
+       .matches = {
+               DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+               DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X201"),
+               },
+       },
+       {
+       .callback = init_set_sci_en_on_resume,
+       .ident = "Lenovo ThinkPad X201",
+       .matches = {
+               DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+               DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X201s"),
+               },
+       },
+       {
        .callback = init_old_suspend_ordering,
        .ident = "Panasonic CF51-2L",
        .matches = {
@@ -458,6 +578,30 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = {
                DMI_MATCH(DMI_BOARD_NAME, "CF51-2L"),
                },
        },
+       {
+       .callback = init_set_sci_en_on_resume,
+       .ident = "Dell Studio 1558",
+       .matches = {
+               DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+               DMI_MATCH(DMI_PRODUCT_NAME, "Studio 1558"),
+               },
+       },
+       {
+       .callback = init_set_sci_en_on_resume,
+       .ident = "Dell Studio 1557",
+       .matches = {
+               DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+               DMI_MATCH(DMI_PRODUCT_NAME, "Studio 1557"),
+               },
+       },
+       {
+       .callback = init_set_sci_en_on_resume,
+       .ident = "Dell Studio 1555",
+       .matches = {
+               DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+               DMI_MATCH(DMI_PRODUCT_NAME, "Studio 1555"),
+               },
+       },
        {},
 };
 #endif /* CONFIG_SUSPEND */
index 35bb44af49b37b44d0f3594173e453c76c49281d..100e4d9372f1fa24c30d280efa4c105bc96da6f8 100644 (file)
@@ -274,26 +274,6 @@ static void pnpacpi_parse_allocated_busresource(struct pnp_dev *dev,
        pnp_add_bus_resource(dev, start, end);
 }
 
-static u64 addr_space_length(struct pnp_dev *dev, u64 min, u64 max, u64 len)
-{
-       u64 max_len;
-
-       max_len = max - min + 1;
-       if (len <= max_len)
-               return len;
-
-       /*
-        * Per 6.4.3.5, _LEN cannot exceed _MAX - _MIN + 1, but some BIOSes
-        * don't do this correctly, e.g.,
-        * https://bugzilla.kernel.org/show_bug.cgi?id=15480
-        */
-       dev_info(&dev->dev,
-                "resource length %#llx doesn't fit in %#llx-%#llx, trimming\n",
-                (unsigned long long) len, (unsigned long long) min,
-                (unsigned long long) max);
-       return max_len;
-}
-
 static void pnpacpi_parse_allocated_address_space(struct pnp_dev *dev,
                                                  struct acpi_resource *res)
 {
@@ -309,7 +289,8 @@ static void pnpacpi_parse_allocated_address_space(struct pnp_dev *dev,
                return;
        }
 
-       len = addr_space_length(dev, p->minimum, p->maximum, p->address_length);
+       /* Windows apparently computes length rather than using _LEN */
+       len = p->maximum - p->minimum + 1;
        window = (p->producer_consumer == ACPI_PRODUCER) ? 1 : 0;
 
        if (p->resource_type == ACPI_MEMORY_RANGE)
@@ -330,7 +311,8 @@ static void pnpacpi_parse_allocated_ext_address_space(struct pnp_dev *dev,
        int window;
        u64 len;
 
-       len = addr_space_length(dev, p->minimum, p->maximum, p->address_length);
+       /* Windows apparently computes length rather than using _LEN */
+       len = p->maximum - p->minimum + 1;
        window = (p->producer_consumer == ACPI_PRODUCER) ? 1 : 0;
 
        if (p->resource_type == ACPI_MEMORY_RANGE)
index 2e54e6a23c72c8ff44b610412e3c1c92baac81b8..e3446ab8b563743d462756fb7237225a8a492f79 100644 (file)
@@ -211,6 +211,8 @@ int pnp_check_port(struct pnp_dev *dev, struct resource *res)
                        if (tres->flags & IORESOURCE_IO) {
                                if (cannot_compare(tres->flags))
                                        continue;
+                               if (tres->flags & IORESOURCE_WINDOW)
+                                       continue;
                                tport = &tres->start;
                                tend = &tres->end;
                                if (ranged_conflict(port, end, tport, tend))
@@ -271,6 +273,8 @@ int pnp_check_mem(struct pnp_dev *dev, struct resource *res)
                        if (tres->flags & IORESOURCE_MEM) {
                                if (cannot_compare(tres->flags))
                                        continue;
+                               if (tres->flags & IORESOURCE_WINDOW)
+                                       continue;
                                taddr = &tres->start;
                                tend = &tres->end;
                                if (ranged_conflict(addr, end, taddr, tend))