Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190712
b: refs/heads/master
c: 1468cf0
h: refs/heads/master
v: v3
  • Loading branch information
Len Brown committed May 7, 2010
1 parent 301dd41 commit 029ff6e
Show file tree
Hide file tree
Showing 5 changed files with 154 additions and 24 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4bdae98f1a456ea1fea5ea02f9249d23bceab75b
refs/heads/master: 1468cf0542663f873410b83d8bb61ae779e3a845
2 changes: 1 addition & 1 deletion trunk/drivers/acpi/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
144 changes: 144 additions & 0 deletions trunk/drivers/acpi/sleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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 */
Expand Down
26 changes: 4 additions & 22 deletions trunk/drivers/pnp/pnpacpi/rsparser.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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)
Expand All @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/pnp/resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 029ff6e

Please sign in to comment.