Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1481b910 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'release-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-acpi-2.6:
  acpi: fix crash in core ACPI code, triggered by CONFIG_ACPI_PCI_SLOT=y
  ACPI: thinkpad-acpi: don't misdetect in get_thinkpad_model_data() on -ENOMEM
  ACPI: thinkpad-acpi: bump up version to 0.21
  ACPI: thinkpad-acpi: add bluetooth and WWAN rfkill support
  ACPI: thinkpad-acpi: WLSW overrides other rfkill switches
  ACPI: thinkpad-acpi: prepare for bluetooth and wwan rfkill support
  ACPI: thinkpad-acpi: consolidate wlsw notification function
  ACPI: thinkpad-acpi: minor refactor on radio switch init
  Revert "ACPI: don't walk tables if ACPI was disabled"
  Revert "dock: bay: Don't call acpi_walk_namespace() when ACPI is disabled."
  Revert "Fix FADT parsing"
  ACPI : Set FAN device to correct state in boot phase
  ACPI: Ignore _BQC object when registering backlight device
  ACPI: stop complaints about interrupt link End Tags and blank IRQ descriptors
parents 5042d997 f88133d7
Loading
Loading
Loading
Loading
+18 −8
Original line number Diff line number Diff line
		     ThinkPad ACPI Extras Driver

                            Version 0.20
                          April 09th, 2008
                            Version 0.21
                           May 29th, 2008

               Borislav Deianov <borislav@users.sf.net>
             Henrique de Moraes Holschuh <hmh@hmh.eng.br>
@@ -621,7 +621,8 @@ Bluetooth
---------

procfs: /proc/acpi/ibm/bluetooth
sysfs device attribute: bluetooth_enable
sysfs device attribute: bluetooth_enable (deprecated)
sysfs rfkill class: switch "tpacpi_bluetooth_sw"

This feature shows the presence and current state of a ThinkPad
Bluetooth device in the internal ThinkPad CDC slot.
@@ -643,8 +644,12 @@ Sysfs notes:
		0: disables Bluetooth / Bluetooth is disabled
		1: enables Bluetooth / Bluetooth is enabled.

	Note: this interface will be probably be superseded by the
	generic rfkill class, so it is NOT to be considered stable yet.
	Note: this interface has been superseded by the	generic rfkill
	class.  It has been deprecated, and it will be removed in year
	2010.

	rfkill controller switch "tpacpi_bluetooth_sw": refer to
	Documentation/rfkill.txt for details.

Video output control -- /proc/acpi/ibm/video
--------------------------------------------
@@ -1374,7 +1379,8 @@ EXPERIMENTAL: WAN
-----------------

procfs: /proc/acpi/ibm/wan
sysfs device attribute: wwan_enable
sysfs device attribute: wwan_enable (deprecated)
sysfs rfkill class: switch "tpacpi_wwan_sw"

This feature is marked EXPERIMENTAL because the implementation
directly accesses hardware registers and may not work as expected. USE
@@ -1404,8 +1410,12 @@ Sysfs notes:
		0: disables WWAN card / WWAN card is disabled
		1: enables WWAN card / WWAN card is enabled.

	Note: this interface will be probably be superseded by the
	generic rfkill class, so it is NOT to be considered stable yet.
	Note: this interface has been superseded by the	generic rfkill
	class.  It has been deprecated, and it will be removed in year
	2010.

	rfkill controller switch "tpacpi_wwan_sw": refer to
	Documentation/rfkill.txt for details.

Multiple Commands, Module Parameters
------------------------------------
+8 −0
Original line number Diff line number Diff line
@@ -137,6 +137,10 @@ char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node)
	/* Calculate required buffer size based on depth below root */

	size = acpi_ns_get_pathname_length(node);
	if (!size) {
		ACPI_ERROR((AE_INFO, "Invalid node failure"));
		return_PTR(NULL);
	}

	/* Allocate a buffer to be returned to caller */

@@ -229,6 +233,10 @@ acpi_ns_handle_to_pathname(acpi_handle target_handle,
	/* Determine size required for the caller buffer */

	required_size = acpi_ns_get_pathname_length(node);
	if (!required_size) {
		ACPI_ERROR((AE_INFO, "Invalid node failure"));
		return_ACPI_STATUS(AE_ERROR);
	}

	/* Validate/Allocate/Clear caller buffer */

+20 −11
Original line number Diff line number Diff line
@@ -113,19 +113,22 @@ acpi_pci_link_check_possible(struct acpi_resource *resource, void *context)

	switch (resource->type) {
	case ACPI_RESOURCE_TYPE_START_DEPENDENT:
	case ACPI_RESOURCE_TYPE_END_TAG:
		return AE_OK;
	case ACPI_RESOURCE_TYPE_IRQ:
		{
			struct acpi_resource_irq *p = &resource->data.irq;
			if (!p || !p->interrupt_count) {
				printk(KERN_WARNING PREFIX "Blank IRQ resource\n");
				ACPI_DEBUG_PRINT((ACPI_DB_INFO,
						  "Blank _PRS IRQ resource\n"));
				return AE_OK;
			}
			for (i = 0;
			     (i < p->interrupt_count
			      && i < ACPI_PCI_LINK_MAX_POSSIBLE); i++) {
				if (!p->interrupts[i]) {
					printk(KERN_WARNING PREFIX "Invalid IRQ %d\n",
					printk(KERN_WARNING PREFIX
					       "Invalid _PRS IRQ %d\n",
					       p->interrupts[i]);
					continue;
				}
@@ -143,14 +146,15 @@ acpi_pci_link_check_possible(struct acpi_resource *resource, void *context)
			    &resource->data.extended_irq;
			if (!p || !p->interrupt_count) {
				printk(KERN_WARNING PREFIX
					      "Blank EXT IRQ resource\n");
					      "Blank _PRS EXT IRQ resource\n");
				return AE_OK;
			}
			for (i = 0;
			     (i < p->interrupt_count
			      && i < ACPI_PCI_LINK_MAX_POSSIBLE); i++) {
				if (!p->interrupts[i]) {
					printk(KERN_WARNING PREFIX "Invalid IRQ %d\n",
					printk(KERN_WARNING PREFIX
					       "Invalid _PRS IRQ %d\n",
					       p->interrupts[i]);
					continue;
				}
@@ -163,7 +167,8 @@ acpi_pci_link_check_possible(struct acpi_resource *resource, void *context)
			break;
		}
	default:
		printk(KERN_ERR PREFIX "Resource is not an IRQ entry\n");
		printk(KERN_ERR PREFIX "_PRS resource type 0x%x isn't an IRQ\n",
		       resource->type);
		return AE_OK;
	}

@@ -199,6 +204,9 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context)


	switch (resource->type) {
	case ACPI_RESOURCE_TYPE_START_DEPENDENT:
	case ACPI_RESOURCE_TYPE_END_TAG:
		return AE_OK;
	case ACPI_RESOURCE_TYPE_IRQ:
		{
			struct acpi_resource_irq *p = &resource->data.irq;
@@ -208,7 +216,7 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context)
				 * particularly those those w/ _STA disabled
				 */
				ACPI_DEBUG_PRINT((ACPI_DB_INFO,
						  "Blank IRQ resource\n"));
						  "Blank _CRS IRQ resource\n"));
				return AE_OK;
			}
			*irq = p->interrupts[0];
@@ -224,7 +232,7 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context)
				 * return at least 1 IRQ
				 */
				printk(KERN_WARNING PREFIX
					      "Blank EXT IRQ resource\n");
					      "Blank _CRS EXT IRQ resource\n");
				return AE_OK;
			}
			*irq = p->interrupts[0];
@@ -232,10 +240,11 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context)
		}
		break;
	default:
		printk(KERN_ERR PREFIX "Resource %d isn't an IRQ\n", resource->type);
	case ACPI_RESOURCE_TYPE_END_TAG:
		printk(KERN_ERR PREFIX "_CRS resource type 0x%x isn't an IRQ\n",
		       resource->type);
		return AE_OK;
	}

	return AE_CTRL_TERMINATE;
}

+6 −11
Original line number Diff line number Diff line
@@ -124,7 +124,7 @@ static struct acpi_fadt_info fadt_info_table[] = {

static void inline
acpi_tb_init_generic_address(struct acpi_generic_address *generic_address,
			     u8 byte_width, u64 address)
			     u8 bit_width, u64 address)
{

	/*
@@ -136,7 +136,7 @@ acpi_tb_init_generic_address(struct acpi_generic_address *generic_address,
	/* All other fields are byte-wide */

	generic_address->space_id = ACPI_ADR_SPACE_SYSTEM_IO;
	generic_address->bit_width = byte_width << 3;
	generic_address->bit_width = bit_width;
	generic_address->bit_offset = 0;
	generic_address->access_width = 0;
}
@@ -343,11 +343,9 @@ static void acpi_tb_convert_fadt(void)
	 *
	 * The PM event blocks are split into two register blocks, first is the
	 * PM Status Register block, followed immediately by the PM Enable Register
	 * block. Each is of length (xpm1x_event_block.bit_width/2)
	 * block. Each is of length (pm1_event_length/2)
	 */
	WARN_ON(ACPI_MOD_16(acpi_gbl_FADT.xpm1a_event_block.bit_width));
	pm1_register_length = (u8) ACPI_DIV_16(acpi_gbl_FADT
					       .xpm1a_event_block.bit_width);
	pm1_register_length = (u8) ACPI_DIV_2(acpi_gbl_FADT.pm1_event_length);

	/* The PM1A register block is required */

@@ -362,17 +360,14 @@ static void acpi_tb_convert_fadt(void)
	/* The PM1B register block is optional, ignore if not present */

	if (acpi_gbl_FADT.xpm1b_event_block.address) {
		WARN_ON(ACPI_MOD_16(acpi_gbl_FADT.xpm1b_event_block.bit_width));
		pm1_register_length = (u8) ACPI_DIV_16(acpi_gbl_FADT
						       .xpm1b_event_block
						       .bit_width);
		acpi_tb_init_generic_address(&acpi_gbl_xpm1b_enable,
					     pm1_register_length,
					     (acpi_gbl_FADT.xpm1b_event_block.
					      address + pm1_register_length));
		/* Don't forget to copy space_id of the GAS */
		acpi_gbl_xpm1b_enable.space_id =
		    acpi_gbl_FADT.xpm1b_event_block.space_id;
		    acpi_gbl_FADT.xpm1a_event_block.space_id;

	}
}

+43 −0
Original line number Diff line number Diff line
@@ -769,6 +769,47 @@ static void acpi_thermal_run(unsigned long data)
		acpi_os_execute(OSL_GPE_HANDLER, acpi_thermal_check, (void *)data);
}

static void acpi_thermal_active_off(void *data)
{
	int result = 0;
	struct acpi_thermal *tz = data;
	int i = 0;
	int j = 0;
	struct acpi_thermal_active *active = NULL;

	if (!tz) {
		printk(KERN_ERR PREFIX "Invalid (NULL) context\n");
		return;
	}

	result = acpi_thermal_get_temperature(tz);
	if (result)
		return;

	for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE; i++) {
		active = &(tz->trips.active[i]);
		if (!active || !active->flags.valid)
			break;
		if (tz->temperature >= active->temperature) {
			/*
			 * If the thermal temperature is greater than the
			 * active threshod, unnecessary to turn off the
			 * the active cooling device.
			 */
			continue;
		}
		/*
		 * Below Threshold?
		 * ----------------
		 * Turn OFF all cooling devices associated with this
		 * threshold.
		 */
		for (j = 0; j < active->devices.count; j++)
			result = acpi_bus_set_power(active->devices.handles[j],
						    ACPI_STATE_D3);
	}
}

static void acpi_thermal_check(void *data)
{
	int result = 0;
@@ -1624,6 +1665,8 @@ static int acpi_thermal_add(struct acpi_device *device)

	init_timer(&tz->timer);

	acpi_thermal_active_off(tz);

	acpi_thermal_check(tz);

	status = acpi_install_notify_handler(device->handle,
Loading