All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 00/41] 2.6.27-stable review
@ 2009-02-04 18:45 ` Greg KH
  2009-02-04 18:45   ` [patch 01/41] cifs: make sure we allocate enough storage for socket address Greg KH
                     ` (40 more replies)
  0 siblings, 41 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:45 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan

This is the start of the stable review cycle for the 2.6.27.15 release.
There are 41 patches in this series, all will be posted as a response to
this one.  If anyone has any issues with these being applied, please let
us know.  If anyone is a maintainer of the proper subsystem, and wants
to add a Signed-off-by: line to the patch, please respond with it.

These patches are sent out with a number of different people on the Cc:
line.  If you wish to be a reviewer, please email stable@kernel.org to
add your name to the list.  If you want to be off the reviewer list,
also email us.

Responses should be made by Friday, February 6, 19:00:00 UTC.  Anything
received after that time might be too late.

The whole patch series can be found in one patch at:
	kernel.org/pub/linux/kernel/v2.6/stable-review/patch-2.6.27.15-rc1.gz
and the diffstat can be found below.


thanks,

greg k-h

 Makefile                            |    2 +-
 arch/ia64/sn/kernel/io_acpi_init.c  |    8 ++--
 arch/m68knommu/Kconfig              |    4 ++
 arch/x86/Kconfig                    |    3 +
 arch/x86/kernel/acpi/cstate.c       |    4 +-
 arch/x86/lib/usercopy_32.c          |    4 +-
 arch/x86/lib/usercopy_64.c          |    4 +-
 arch/x86/mm/pageattr.c              |   49 ++++++++++++------
 arch/x86/pci/irq.c                  |    1 +
 drivers/acpi/ac.c                   |    2 +-
 drivers/acpi/acpi_memhotplug.c      |    5 +-
 drivers/acpi/asus_acpi.c            |    4 +-
 drivers/acpi/battery.c              |    5 +-
 drivers/acpi/bay.c                  |    2 +-
 drivers/acpi/bus.c                  |    4 +-
 drivers/acpi/button.c               |    4 +-
 drivers/acpi/container.c            |    2 +-
 drivers/acpi/dispatcher/dsmethod.c  |    3 +
 drivers/acpi/dock.c                 |    6 +-
 drivers/acpi/ec.c                   |    8 ++-
 drivers/acpi/namespace/nsutils.c    |    8 +++-
 drivers/acpi/namespace/nsxfname.c   |    1 +
 drivers/acpi/numa.c                 |    2 +-
 drivers/acpi/osl.c                  |    5 +-
 drivers/acpi/parser/psparse.c       |    4 +-
 drivers/acpi/pci_link.c             |    4 --
 drivers/acpi/pci_root.c             |    2 +-
 drivers/acpi/pci_slot.c             |   10 ++--
 drivers/acpi/power.c                |    2 +-
 drivers/acpi/processor_core.c       |    4 +-
 drivers/acpi/processor_idle.c       |    1 +
 drivers/acpi/processor_perflib.c    |    2 +-
 drivers/acpi/processor_throttling.c |    2 +-
 drivers/acpi/sbshc.c                |    2 +-
 drivers/acpi/scan.c                 |   12 ++++-
 drivers/acpi/sleep/main.c           |   10 +++-
 drivers/acpi/thermal.c              |   43 ++++++++++------
 drivers/acpi/utils.c                |    4 +-
 drivers/acpi/video.c                |   47 +++++++++--------
 drivers/ata/libata-acpi.c           |    2 +-
 drivers/ata/sata_mv.c               |    6 +-
 drivers/ata/sata_nv.c               |   77 ++++++++++++++++++----------
 drivers/char/selection.c            |    2 +-
 drivers/cpuidle/cpuidle.c           |    9 +++-
 drivers/cpuidle/governors/menu.c    |   10 +++-
 drivers/input/keyboard/atkbd.c      |   34 ++++++++++++
 drivers/misc/asus-laptop.c          |   15 +++---
 drivers/misc/eeepc-laptop.c         |    2 +-
 drivers/misc/fujitsu-laptop.c       |    8 ++--
 drivers/misc/intel_menlow.c         |   29 ++++++-----
 drivers/net/ixgb/ixgb_main.c        |    8 ++-
 drivers/pci/hotplug/acpiphp_glue.c  |   14 +++---
 drivers/pci/hotplug/acpiphp_ibm.c   |    4 +-
 drivers/pci/hotplug/sgi_hotplug.c   |    4 +-
 drivers/serial/jsm/jsm_tty.c        |    6 ++
 drivers/usb/host/isp1760-if.c       |   96 ++++++++++++++++++++---------------
 drivers/video/aty/mach64_ct.c       |   11 ++++
 fs/cifs/connect.c                   |   18 +++---
 fs/dlm/plock.c                      |    2 +
 fs/nfsd/nfs4state.c                 |   31 +++++++----
 include/acpi/acpi_bus.h             |    2 +-
 include/acpi/actypes.h              |    2 +-
 include/linux/if_vlan.h             |    7 +++
 include/linux/pci_ids.h             |    1 +
 net/8021q/vlan_core.c               |   46 ++++++++++++-----
 net/core/dev.c                      |    3 +
 66 files changed, 480 insertions(+), 258 deletions(-)

^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 01/41] cifs: make sure we allocate enough storage for socket address
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
@ 2009-02-04 18:45   ` Greg KH
  2009-02-04 18:45   ` [patch 02/41] ixgb: fix bug when freeing resources Greg KH
                     ` (39 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:45 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Jeff Layton, Steve French

[-- Attachment #1: cifs-make-sure-we-allocate-enough-storage-for-socket-address.patch --]
[-- Type: text/plain, Size: 3397 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Jeff Layton <jlayton@redhat.com>

commit a9ac49d303f967be0dabd97cb722c4a13109c6c2 upstream.

cifs_mount declares a struct sockaddr on the stack and then casts it
to the proper address type. The storage allocated is fine for ipv4,
but is too small for ipv6 addresses. Declare it as
"struct sockaddr_storage" instead of struct sockaddr".

This bug was manifesting itself as oopses and address corruption when
mounting IPv6 addresses.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Tested-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 fs/cifs/connect.c |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -1349,7 +1349,7 @@ cifs_parse_mount_options(char *options, 
 }
 
 static struct TCP_Server_Info *
-cifs_find_tcp_session(struct sockaddr *addr)
+cifs_find_tcp_session(struct sockaddr_storage *addr)
 {
 	struct list_head *tmp;
 	struct TCP_Server_Info *server;
@@ -1369,11 +1369,11 @@ cifs_find_tcp_session(struct sockaddr *a
 		if (server->tcpStatus == CifsNew)
 			continue;
 
-		if (addr->sa_family == AF_INET &&
+		if (addr->ss_family == AF_INET &&
 		    (addr4->sin_addr.s_addr !=
 		     server->addr.sockAddr.sin_addr.s_addr))
 			continue;
-		else if (addr->sa_family == AF_INET6 &&
+		else if (addr->ss_family == AF_INET6 &&
 			 memcmp(&server->addr.sockAddr6.sin6_addr,
 				&addr6->sin6_addr, sizeof(addr6->sin6_addr)))
 			continue;
@@ -2027,7 +2027,7 @@ cifs_mount(struct super_block *sb, struc
 	int rc = 0;
 	int xid;
 	struct socket *csocket = NULL;
-	struct sockaddr addr;
+	struct sockaddr_storage addr;
 	struct sockaddr_in *sin_server = (struct sockaddr_in *) &addr;
 	struct sockaddr_in6 *sin_server6 = (struct sockaddr_in6 *) &addr;
 	struct smb_vol volume_info;
@@ -2039,7 +2039,7 @@ cifs_mount(struct super_block *sb, struc
 
 /* cFYI(1, ("Entering cifs_mount. Xid: %d with: %s", xid, mount_data)); */
 
-	memset(&addr, 0, sizeof(struct sockaddr));
+	memset(&addr, 0, sizeof(struct sockaddr_storage));
 	memset(&volume_info, 0, sizeof(struct smb_vol));
 	if (cifs_parse_mount_options(mount_data, devname, &volume_info)) {
 		rc = -EINVAL;
@@ -2069,9 +2069,9 @@ cifs_mount(struct super_block *sb, struc
 			rc = cifs_inet_pton(AF_INET6, volume_info.UNCip,
 					    &sin_server6->sin6_addr.in6_u);
 			if (rc > 0)
-				addr.sa_family = AF_INET6;
+				addr.ss_family = AF_INET6;
 		} else {
-			addr.sa_family = AF_INET;
+			addr.ss_family = AF_INET;
 		}
 
 		if (rc <= 0) {
@@ -2113,7 +2113,7 @@ cifs_mount(struct super_block *sb, struc
 
 	srvTcp = cifs_find_tcp_session(&addr);
 	if (!srvTcp) { /* create socket */
-		if (addr.sa_family == AF_INET6) {
+		if (addr.ss_family == AF_INET6) {
 			cFYI(1, ("attempting ipv6 connect"));
 			/* BB should we allow ipv6 on port 139? */
 			/* other OS never observed in Wild doing 139 with v6 */
@@ -2144,7 +2144,7 @@ cifs_mount(struct super_block *sb, struc
 		} else {
 			srvTcp->noblocksnd = volume_info.noblocksnd;
 			srvTcp->noautotune = volume_info.noautotune;
-			if (addr.sa_family == AF_INET6)
+			if (addr.ss_family == AF_INET6)
 				memcpy(&srvTcp->addr.sockAddr6, sin_server6,
 					sizeof(struct sockaddr_in6));
 			else


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 02/41] ixgb: fix bug when freeing resources
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
  2009-02-04 18:45   ` [patch 01/41] cifs: make sure we allocate enough storage for socket address Greg KH
@ 2009-02-04 18:45   ` Greg KH
  2009-02-04 18:45   ` [patch 03/41] m68knommu: set NO_DMA Greg KH
                     ` (38 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:45 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Breno Leitao, Jesse Brandeburg, David S. Miller

[-- Attachment #1: ixgb-fix-bug-when-freeing-resources.patch --]
[-- Type: text/plain, Size: 1406 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Brandeburg, Jesse <jesse.brandeburg@intel.com>

commit 23e55a32ca1ffdbe7a492ef99f0e0ac48e504a13 upstream.

It was pointed out by Breno Leitao <leitao@linux.vnet.ibm.com> that
ixgb would crash on PPC when an IOMMU was in use, if change_mtu was
called.

It appears to be a pretty simple issue in the driver that wasn't discovered
because most systems don't run with an IOMMU.  The driver needs to only unmap
buffers that are mapped (duh).

CC: Breno Leitao <leitao@linux.vnet.ibm.com>

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/ixgb/ixgb_main.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -977,15 +977,17 @@ ixgb_clean_rx_ring(struct ixgb_adapter *
 
 	for (i = 0; i < rx_ring->count; i++) {
 		buffer_info = &rx_ring->buffer_info[i];
-		if (buffer_info->skb) {
-
+		if (buffer_info->dma) {
 			pci_unmap_single(pdev,
 					 buffer_info->dma,
 					 buffer_info->length,
 					 PCI_DMA_FROMDEVICE);
+			buffer_info->dma = 0;
+			buffer_info->length = 0;
+		}
 
+		if (buffer_info->skb) {
 			dev_kfree_skb(buffer_info->skb);
-
 			buffer_info->skb = NULL;
 		}
 	}


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 03/41] m68knommu: set NO_DMA
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
  2009-02-04 18:45   ` [patch 01/41] cifs: make sure we allocate enough storage for socket address Greg KH
  2009-02-04 18:45   ` [patch 02/41] ixgb: fix bug when freeing resources Greg KH
@ 2009-02-04 18:45   ` Greg KH
  2009-02-04 18:45   ` [patch 04/41] sata_mv: fix 8-port timeouts on 508x/6081 chips Greg KH
                     ` (37 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:45 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Adrian Bunk, Greg Ungerer

[-- Attachment #1: m68knommu-set-no_dma.patch --]
[-- Type: text/plain, Size: 1627 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Adrian Bunk <bunk@kernel.org>

commit e0212e72186e855027dd35b37e9d7a99a078448c upstream.

m68knommu does not set the Kconfig NO_DMA variable, but also does
not provide the required functions, resulting in the following
build error triggered by commit a40c24a13366e324bc0ff8c3bb107db89312c984
(net: Add SKB DMA mapping helper functions.):

<--  snip  -->

..
  LD      vmlinux
net/built-in.o: In function `skb_dma_unmap':
(.text+0xac5e): undefined reference to `dma_unmap_single'
net/built-in.o: In function `skb_dma_unmap':
(.text+0xac7a): undefined reference to `dma_unmap_page'
net/built-in.o: In function `skb_dma_map':
(.text+0xacdc): undefined reference to `dma_map_single'
net/built-in.o: In function `skb_dma_map':
(.text+0xace8): undefined reference to `dma_mapping_error'
net/built-in.o: In function `skb_dma_map':
(.text+0xad10): undefined reference to `dma_map_page'
net/built-in.o: In function `skb_dma_map':
(.text+0xad82): undefined reference to `dma_unmap_page'
net/built-in.o: In function `skb_dma_map':
(.text+0xadc6): undefined reference to `dma_unmap_single'
make[1]: *** [vmlinux] Error 1

<--  snip  -->

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/m68knommu/Kconfig |    4 ++++
 1 file changed, 4 insertions(+)

--- a/arch/m68knommu/Kconfig
+++ b/arch/m68knommu/Kconfig
@@ -14,6 +14,10 @@ config MMU
 	bool
 	default n
 
+config NO_DMA
+	bool
+	default y
+
 config FPU
 	bool
 	default n


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 04/41] sata_mv: fix 8-port timeouts on 508x/6081 chips
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (2 preceding siblings ...)
  2009-02-04 18:45   ` [patch 03/41] m68knommu: set NO_DMA Greg KH
@ 2009-02-04 18:45   ` Greg KH
  2009-02-04 18:45   ` [patch 05/41] x86: use early clobbers in usercopy*.c Greg KH
                     ` (36 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:45 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Mark Lord, Jeff Garzik

[-- Attachment #1: sata_mv-fix-8-port-timeouts-on-508x-6081-chips.patch --]
[-- Type: text/plain, Size: 1132 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Mark Lord <liml@rtr.ca>

commit b0bccb18bc523d1d5060d25958f12438062829a9 upstream.

Fix a longstanding bug for the 8-port Marvell Sata controllers (508x/6081),
where accesses to the upper 4 ports would cause lost-interrupts / timeouts
for the lower 4-ports.  With this patch, the 6081 boards should finally be
reliable enough for mainstream use with Linux.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/ata/sata_mv.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -883,7 +883,7 @@ static void mv_start_dma(struct ata_port
 		struct mv_host_priv *hpriv = ap->host->private_data;
 		int hardport = mv_hardport_from_port(ap->port_no);
 		void __iomem *hc_mmio = mv_hc_base_from_port(
-					mv_host_base(ap->host), hardport);
+					mv_host_base(ap->host), ap->port_no);
 		u32 hc_irq_cause, ipending;
 
 		/* clear EDMA event indicators, if any */


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 05/41] x86: use early clobbers in usercopy*.c
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (3 preceding siblings ...)
  2009-02-04 18:45   ` [patch 04/41] sata_mv: fix 8-port timeouts on 508x/6081 chips Greg KH
@ 2009-02-04 18:45   ` Greg KH
  2009-02-04 18:46   ` [patch 06/41] Add enable_ms to jsm driver Greg KH
                     ` (35 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:45 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Andi Kleen, H. Peter Anvin, Ingo Molnar

[-- Attachment #1: x86-use-early-clobbers-in-usercopy-.c.patch --]
[-- Type: text/plain, Size: 3990 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Andi Kleen <andi@firstfloor.org>

commit e0a96129db574d6365e3439d16d88517c437ab33 upstream.

Impact: fix rare (but currently harmless) miscompile with certain configs and gcc versions

Hugh Dickins noticed that strncpy_from_user() was miscompiled
in some circumstances with gcc 4.3.

Thanks to Hugh's excellent analysis it was easy to track down.

Hugh writes:

> Try building an x86_64 defconfig 2.6.29-rc1 kernel tree,
> except not quite defconfig, switch CONFIG_PREEMPT_NONE=y
> and CONFIG_PREEMPT_VOLUNTARY off (because it expands a
> might_fault() there, which hides the issue): using a
> gcc 4.3.2 (I've checked both openSUSE 11.1 and Fedora 10).
>
> It generates the following:
>
> 0000000000000000 <__strncpy_from_user>:
>    0:   48 89 d1                mov    %rdx,%rcx
>    3:   48 85 c9                test   %rcx,%rcx
>    6:   74 0e                   je     16 <__strncpy_from_user+0x16>
>    8:   ac                      lods   %ds:(%rsi),%al
>    9:   aa                      stos   %al,%es:(%rdi)
>    a:   84 c0                   test   %al,%al
>    c:   74 05                   je     13 <__strncpy_from_user+0x13>
>    e:   48 ff c9                dec    %rcx
>   11:   75 f5                   jne    8 <__strncpy_from_user+0x8>
>   13:   48 29 c9                sub    %rcx,%rcx
>   16:   48 89 c8                mov    %rcx,%rax
>   19:   c3                      retq
>
> Observe that "sub %rcx,%rcx; mov %rcx,%rax", whereas gcc 4.2.1
> (and many other configs) say "sub %rcx,%rdx; mov %rdx,%rax".
> Isn't it returning 0 when it ought to be returning strlen?

The asm constraints for the strncpy_from_user() result were missing an
early clobber, which tells gcc that the last output arguments
are written before all input arguments are read.

Also add more early clobbers in the rest of the file and fix 32-bit
usercopy.c in the same way.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
[ since this API is rarely used and no in-kernel user relies on a 'len'
  return value (they only rely on negative return values) this miscompile
  was never noticed in the field. But it's worth fixing it nevertheless. ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/lib/usercopy_32.c |    4 ++--
 arch/x86/lib/usercopy_64.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

--- a/arch/x86/lib/usercopy_32.c
+++ b/arch/x86/lib/usercopy_32.c
@@ -49,7 +49,7 @@ do {									   \
 		"	jmp 2b\n"					   \
 		".previous\n"						   \
 		_ASM_EXTABLE(0b,3b)					   \
-		: "=d"(res), "=c"(count), "=&a" (__d0), "=&S" (__d1),	   \
+		: "=&d"(res), "=&c"(count), "=&a" (__d0), "=&S" (__d1),	   \
 		  "=&D" (__d2)						   \
 		: "i"(-EFAULT), "0"(count), "1"(count), "3"(src), "4"(dst) \
 		: "memory");						   \
@@ -211,7 +211,7 @@ long strnlen_user(const char __user *s, 
 		"	.align 4\n"
 		"	.long 0b,2b\n"
 		".previous"
-		:"=r" (n), "=D" (s), "=a" (res), "=c" (tmp)
+		:"=&r" (n), "=&D" (s), "=&a" (res), "=&c" (tmp)
 		:"0" (n), "1" (s), "2" (0), "3" (mask)
 		:"cc");
 	return res & mask;
--- a/arch/x86/lib/usercopy_64.c
+++ b/arch/x86/lib/usercopy_64.c
@@ -32,7 +32,7 @@ do {									   \
 		"	jmp 2b\n"					   \
 		".previous\n"						   \
 		_ASM_EXTABLE(0b,3b)					   \
-		: "=r"(res), "=c"(count), "=&a" (__d0), "=&S" (__d1),	   \
+		: "=&r"(res), "=&c"(count), "=&a" (__d0), "=&S" (__d1),	   \
 		  "=&D" (__d2)						   \
 		: "i"(-EFAULT), "0"(count), "1"(count), "3"(src), "4"(dst) \
 		: "memory");						   \
@@ -86,7 +86,7 @@ unsigned long __clear_user(void __user *
 		".previous\n"
 		_ASM_EXTABLE(0b,3b)
 		_ASM_EXTABLE(1b,2b)
-		: [size8] "=c"(size), [dst] "=&D" (__d0)
+		: [size8] "=&c"(size), [dst] "=&D" (__d0)
 		: [size1] "r"(size & 7), "[size8]" (size / 8), "[dst]"(addr),
 		  [zero] "r" (0UL), [eight] "r" (8UL));
 	return size;


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 06/41] Add enable_ms to jsm driver
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (4 preceding siblings ...)
  2009-02-04 18:45   ` [patch 05/41] x86: use early clobbers in usercopy*.c Greg KH
@ 2009-02-04 18:46   ` Greg KH
  2009-02-04 18:46   ` [patch 07/41] fbdev/atyfb: Fix DSP config on some PowerMacs & PowerBooks Greg KH
                     ` (34 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:46 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Scott Kilau, Paul Larson

[-- Attachment #1: add-enable_ms-to-jsm-driver.patch --]
[-- Type: text/plain, Size: 1240 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Paul Larson <pl@linux.vnet.ibm.com>

commit 0461ec5bc7745b89a8ab67ba0ea497abd58a6301 upstream.

This fixes a crash observed when non-existant enable_ms function is
called for jsm driver.

Signed-off-by: Scott Kilau <Scott.Kilau@digi.com>
Signed-off-by: Paul Larson <pl@linux.vnet.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/serial/jsm/jsm_tty.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/drivers/serial/jsm/jsm_tty.c
+++ b/drivers/serial/jsm/jsm_tty.c
@@ -161,6 +161,11 @@ static void jsm_tty_stop_rx(struct uart_
 	channel->ch_bd->bd_ops->disable_receiver(channel);
 }
 
+static void jsm_tty_enable_ms(struct uart_port *port)
+{
+	/* Nothing needed */
+}
+
 static void jsm_tty_break(struct uart_port *port, int break_state)
 {
 	unsigned long lock_flags;
@@ -345,6 +350,7 @@ static struct uart_ops jsm_ops = {
 	.start_tx	= jsm_tty_start_tx,
 	.send_xchar	= jsm_tty_send_xchar,
 	.stop_rx	= jsm_tty_stop_rx,
+	.enable_ms	= jsm_tty_enable_ms,
 	.break_ctl	= jsm_tty_break,
 	.startup	= jsm_tty_open,
 	.shutdown	= jsm_tty_close,


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 07/41] fbdev/atyfb: Fix DSP config on some PowerMacs & PowerBooks
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (5 preceding siblings ...)
  2009-02-04 18:46   ` [patch 06/41] Add enable_ms to jsm driver Greg KH
@ 2009-02-04 18:46   ` Greg KH
  2009-02-04 23:51     ` Benjamin Herrenschmidt
  2009-02-04 18:46   ` [patch 08/41] Fix memory corruption in console selection Greg KH
                     ` (33 subsequent siblings)
  40 siblings, 1 reply; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:46 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Risto Suominen, Benjamin Herrenschmidt

[-- Attachment #1: fbdev-atyfb-fix-dsp-config-on-some-powermacs-powerbooks.patch --]
[-- Type: text/plain, Size: 1871 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Risto Suominen <Risto.Suominen@gmail.com>

commit 7fbb7cadd062baf299fd8b26a80ea99da0c3fe01 upstream.

Since the complete re-write in 2.6.10, some PowerMacs (At least PowerMac 5500
and PowerMac G3 Beige rev A) with ATI Mach64 chip have suffered from unstable
columns in their framebuffer image. This seems to depend on a value (4) read
from PLL_EXT_CNTL register, which leads to incorrect DSP config parameters to
be written to the chip. This patch uses a value calculated by aty_init_pll_ct
instead, as a starting point.

There are questions as to whether this should be extended to other platforms
or maybe made dependent on specific chip types, but in the meantime, this has
been tested on various powermacs and works for them so let's commit it.

Signed-off-by: Risto Suominen <Risto.Suominen@gmail.com>
Tested-by: Michael Pettersson <mike@it.uu.se>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/video/aty/mach64_ct.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

--- a/drivers/video/aty/mach64_ct.c
+++ b/drivers/video/aty/mach64_ct.c
@@ -8,6 +8,9 @@
 #include <asm/io.h>
 #include <video/mach64.h>
 #include "atyfb.h"
+#ifdef CONFIG_PPC
+#include <asm/machdep.h>
+#endif
 
 #undef DEBUG
 
@@ -536,6 +539,14 @@ static int __devinit aty_init_pll_ct(con
 	pll->ct.xclk_post_div_real = postdividers[xpost_div];
 	pll->ct.mclk_fb_div = q * pll->ct.xclk_post_div_real / 8;
 
+#ifdef CONFIG_PPC
+	if (machine_is(powermac)) {
+		/* Override PLL_EXT_CNTL & 0x07. */
+		pll->ct.xclk_post_div = xpost_div;
+		pll->ct.xclk_ref_div = 1;
+	}
+#endif
+
 #ifdef DEBUG
 	pllmclk = (1000000 * pll->ct.mclk_fb_mult * pll->ct.mclk_fb_div) /
 			(par->ref_clk_per * pll->ct.pll_ref_div);


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 08/41] Fix memory corruption in console selection
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (6 preceding siblings ...)
  2009-02-04 18:46   ` [patch 07/41] fbdev/atyfb: Fix DSP config on some PowerMacs & PowerBooks Greg KH
@ 2009-02-04 18:46   ` Greg KH
  2009-02-04 18:46   ` [patch 09/41] Input: atkbd - broaden the Dell DMI signatures Greg KH
                     ` (32 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:46 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Mikulas Patocka

[-- Attachment #1: fix-memory-corruption-in-console-selection.patch --]
[-- Type: text/plain, Size: 1490 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Mikulas Patocka <mpatocka@redhat.com>

commit 878b8619f711280fd05845e21956434b5e588cc4 upstream.

Fix an off-by-two memory error in console selection.

The loop below goes from sel_start to sel_end (inclusive), so it writes
one more character.  This one more character was added to the allocated
size (+1), but it was not multiplied by an UTF-8 multiplier.

This patch fixes a memory corruption when UTF-8 console is used and the
user selects a few characters, all of them 3-byte in UTF-8 (for example
a frame line).

When memory redzones are enabled, a redzone corruption is reported.
When they are not enabled, trashing of random memory occurs.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/char/selection.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/char/selection.c
+++ b/drivers/char/selection.c
@@ -268,7 +268,7 @@ int set_selection(const struct tiocl_sel
 
 	/* Allocate a new buffer before freeing the old one ... */
 	multiplier = use_unicode ? 3 : 1;  /* chars can take up to 3 bytes */
-	bp = kmalloc((sel_end-sel_start)/2*multiplier+1, GFP_KERNEL);
+	bp = kmalloc(((sel_end-sel_start)/2+1)*multiplier, GFP_KERNEL);
 	if (!bp) {
 		printk(KERN_WARNING "selection: kmalloc() failed\n");
 		clear_selection();


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 09/41] Input: atkbd - broaden the Dell DMI signatures
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (7 preceding siblings ...)
  2009-02-04 18:46   ` [patch 08/41] Fix memory corruption in console selection Greg KH
@ 2009-02-04 18:46   ` Greg KH
  2009-02-04 18:46   ` [patch 10/41] Input: atkbd - Samsung NC10 key repeat fix Greg KH
                     ` (31 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:46 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Matthew Garrett, Dmitry Torokhov

[-- Attachment #1: input-atkbd-broaden-the-dell-dmi-signatures.patch --]
[-- Type: text/plain, Size: 1171 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Matthew Garrett <mjg59@srcf.ucam.org>

commit 2a3ec3265741c3b2a7ebbd1b33f538e5a5583c48 upstream.

Some Dells need the dell input quirk applied but have a different vendor
string in their DMI tables. Add an extra entry to cover these machines as
well.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Cc: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/input/keyboard/atkbd.c |    9 +++++++++
 1 file changed, 9 insertions(+)

--- a/drivers/input/keyboard/atkbd.c
+++ b/drivers/input/keyboard/atkbd.c
@@ -1486,6 +1486,15 @@ static struct dmi_system_id atkbd_dmi_qu
 		.driver_data = atkbd_dell_laptop_keymap_fixup,
 	},
 	{
+		.ident = "Dell Laptop",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+			DMI_MATCH(DMI_CHASSIS_TYPE, "8"), /* Portable */
+		},
+		.callback = atkbd_setup_fixup,
+		.driver_data = atkbd_dell_laptop_keymap_fixup,
+	},
+	{
 		.ident = "HP 2133",
 		.matches = {
 			DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 10/41] Input: atkbd - Samsung NC10 key repeat fix
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (8 preceding siblings ...)
  2009-02-04 18:46   ` [patch 09/41] Input: atkbd - broaden the Dell DMI signatures Greg KH
@ 2009-02-04 18:46   ` Greg KH
  2009-02-04 18:46   ` [patch 11/41] net: fix packet socket delivery in rx irq handler Greg KH
                     ` (30 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:46 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Stuart Hopkins, Dmitry Torokhov

[-- Attachment #1: input-atkbd-samsung-nc10-key-repeat-fix.patch --]
[-- Type: text/plain, Size: 1838 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Stuart Hopkins <stuart@dodgy-geeza.com>

commit 4200844bd9dc511088258437d564a187f0ffc94e upstream.

This patch fixes the key repeat issue with the Fn+F? keys on the new
Samsung NC10 Netbook, so that the keys can be defined and used within
ACPID correctly, otherwise the keys repeat indefinately.

This solves part of http://bugzilla.kernel.org/show_bug.cgi?id=12021

Signed-off-by: Stuart Hopkins <stuart@dodgy-geeza.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Cc: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/input/keyboard/atkbd.c |   25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

--- a/drivers/input/keyboard/atkbd.c
+++ b/drivers/input/keyboard/atkbd.c
@@ -884,6 +884,22 @@ static void atkbd_inventec_keymap_fixup(
 }
 
 /*
+ * Samsung NC10 with Fn+F? key release not working
+ */
+static void atkbd_samsung_keymap_fixup(struct atkbd *atkbd)
+{
+	const unsigned int forced_release_keys[] = {
+		0x82, 0x83, 0x84, 0x86, 0x88, 0x89, 0xb3, 0xf7, 0xf9,
+	};
+	int i;
+
+	if (atkbd->set == 2)
+		for (i = 0; i < ARRAY_SIZE(forced_release_keys); i++)
+			__set_bit(forced_release_keys[i],
+				  atkbd->force_release_mask);
+}
+
+/*
  * atkbd_set_keycode_table() initializes keyboard's keycode table
  * according to the selected scancode set
  */
@@ -1512,6 +1528,15 @@ static struct dmi_system_id atkbd_dmi_qu
 		.callback = atkbd_setup_fixup,
 		.driver_data = atkbd_inventec_keymap_fixup,
 	},
+	{
+		.ident = "Samsung NC10",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "NC10"),
+		},
+		.callback = atkbd_setup_fixup,
+		.driver_data = atkbd_samsung_keymap_fixup,
+	},
 	{ }
 };
 


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 11/41] net: fix packet socket delivery in rx irq handler
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (9 preceding siblings ...)
  2009-02-04 18:46   ` [patch 10/41] Input: atkbd - Samsung NC10 key repeat fix Greg KH
@ 2009-02-04 18:46   ` Greg KH
  2009-02-04 18:46   ` [patch 12/41] nfsd: Ensure nfsv4 calls the underlying filesystem on LOCKT Greg KH
                     ` (29 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:46 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Patrick McHardy, David S. Miller, Jesse Brandeburg

[-- Attachment #1: net-fix-packet-socket-delivery-in-rx-irq-handler.patch --]
[-- Type: text/plain, Size: 5006 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Patrick McHardy <kaber@trash.net>

commit 9b22ea560957de1484e6b3e8538f7eef202e3596 upstream.

The changes to deliver hardware accelerated VLAN packets to packet
sockets (commit bc1d0411) caused a warning for non-NAPI drivers.
The __vlan_hwaccel_rx() function is called directly from the drivers
RX function, for non-NAPI drivers that means its still in RX IRQ
context:

[   27.779463] ------------[ cut here ]------------
[   27.779509] WARNING: at kernel/softirq.c:136 local_bh_enable+0x37/0x81()
...
[   27.782520]  [<c0264755>] netif_nit_deliver+0x5b/0x75
[   27.782590]  [<c02bba83>] __vlan_hwaccel_rx+0x79/0x162
[   27.782664]  [<f8851c1d>] atl1_intr+0x9a9/0xa7c [atl1]
[   27.782738]  [<c0155b17>] handle_IRQ_event+0x23/0x51
[   27.782808]  [<c015692e>] handle_edge_irq+0xc2/0x102
[   27.782878]  [<c0105fd5>] do_IRQ+0x4d/0x64

Split hardware accelerated VLAN reception into two parts to fix this:

- __vlan_hwaccel_rx just stores the VLAN TCI and performs the VLAN
  device lookup, then calls netif_receive_skb()/netif_rx()

- vlan_hwaccel_do_receive(), which is invoked by netif_receive_skb()
  in softirq context, performs the real reception and delivery to
  packet sockets.

Reported-and-tested-by: Ramon Casellas <ramon.casellas@cttc.es>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 include/linux/if_vlan.h |    7 +++++++
 net/8021q/vlan_core.c   |   46 +++++++++++++++++++++++++++++++++-------------
 net/core/dev.c          |    3 +++
 3 files changed, 43 insertions(+), 13 deletions(-)

--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -114,6 +114,8 @@ extern u16 vlan_dev_vlan_id(const struct
 
 extern int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp,
 			     u16 vlan_tci, int polling);
+extern int vlan_hwaccel_do_receive(struct sk_buff *skb);
+
 #else
 static inline struct net_device *vlan_dev_real_dev(const struct net_device *dev)
 {
@@ -133,6 +135,11 @@ static inline int __vlan_hwaccel_rx(stru
 	BUG();
 	return NET_XMIT_SUCCESS;
 }
+
+static inline int vlan_hwaccel_do_receive(struct sk_buff *skb)
+{
+	return 0;
+}
 #endif
 
 /**
--- a/net/8021q/vlan_core.c
+++ b/net/8021q/vlan_core.c
@@ -3,11 +3,20 @@
 #include <linux/if_vlan.h>
 #include "vlan.h"
 
+struct vlan_hwaccel_cb {
+	struct net_device	*dev;
+};
+
+static inline struct vlan_hwaccel_cb *vlan_hwaccel_cb(struct sk_buff *skb)
+{
+	return (struct vlan_hwaccel_cb *)skb->cb;
+}
+
 /* VLAN rx hw acceleration helper.  This acts like netif_{rx,receive_skb}(). */
 int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp,
 		      u16 vlan_tci, int polling)
 {
-	struct net_device_stats *stats;
+	struct vlan_hwaccel_cb *cb = vlan_hwaccel_cb(skb);
 
 	if (skb_bond_should_drop(skb)) {
 		dev_kfree_skb_any(skb);
@@ -15,23 +24,35 @@ int __vlan_hwaccel_rx(struct sk_buff *sk
 	}
 
 	skb->vlan_tci = vlan_tci;
+	cb->dev = vlan_group_get_device(grp, vlan_tci & VLAN_VID_MASK);
+
+	return (polling ? netif_receive_skb(skb) : netif_rx(skb));
+}
+EXPORT_SYMBOL(__vlan_hwaccel_rx);
+
+int vlan_hwaccel_do_receive(struct sk_buff *skb)
+{
+	struct vlan_hwaccel_cb *cb = vlan_hwaccel_cb(skb);
+	struct net_device *dev = cb->dev;
+	struct net_device_stats *stats;
+
 	netif_nit_deliver(skb);
 
-	skb->dev = vlan_group_get_device(grp, vlan_tci & VLAN_VID_MASK);
-	if (skb->dev == NULL) {
-		dev_kfree_skb_any(skb);
-		/* Not NET_RX_DROP, this is not being dropped
-		 * due to congestion. */
-		return NET_RX_SUCCESS;
+	if (dev == NULL) {
+		kfree_skb(skb);
+		return -1;
 	}
-	skb->dev->last_rx = jiffies;
+
+	skb->dev = dev;
+	skb->priority = vlan_get_ingress_priority(dev, skb->vlan_tci);
 	skb->vlan_tci = 0;
 
-	stats = &skb->dev->stats;
+	dev->last_rx = jiffies;
+
+	stats = &dev->stats;
 	stats->rx_packets++;
 	stats->rx_bytes += skb->len;
 
-	skb->priority = vlan_get_ingress_priority(skb->dev, vlan_tci);
 	switch (skb->pkt_type) {
 	case PACKET_BROADCAST:
 		break;
@@ -43,13 +64,12 @@ int __vlan_hwaccel_rx(struct sk_buff *sk
 		 * This allows the VLAN to have a different MAC than the
 		 * underlying device, and still route correctly. */
 		if (!compare_ether_addr(eth_hdr(skb)->h_dest,
-					skb->dev->dev_addr))
+					dev->dev_addr))
 			skb->pkt_type = PACKET_HOST;
 		break;
 	};
-	return (polling ? netif_receive_skb(skb) : netif_rx(skb));
+	return 0;
 }
-EXPORT_SYMBOL(__vlan_hwaccel_rx);
 
 struct net_device *vlan_dev_real_dev(const struct net_device *dev)
 {
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2187,6 +2187,9 @@ int netif_receive_skb(struct sk_buff *sk
 	int ret = NET_RX_DROP;
 	__be16 type;
 
+	if (skb->vlan_tci && vlan_hwaccel_do_receive(skb))
+		return NET_RX_SUCCESS;
+
 	/* if we've gotten here through NAPI, check netpoll */
 	if (netpoll_receive_skb(skb))
 		return NET_RX_DROP;


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 12/41] nfsd: Ensure nfsv4 calls the underlying filesystem on LOCKT
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (10 preceding siblings ...)
  2009-02-04 18:46   ` [patch 11/41] net: fix packet socket delivery in rx irq handler Greg KH
@ 2009-02-04 18:46   ` Greg KH
  2009-02-04 18:46   ` [patch 13/41] nfsd: only set file_lock.fl_lmops in nfsd4_lockt if a stateowner is found Greg KH
                     ` (28 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:46 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, J. Bruce Fields

[-- Attachment #1: nfsd-ensure-nfsv4-calls-the-underlying-filesystem-on-lockt.patch --]
[-- Type: text/plain, Size: 2673 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: J. Bruce Fields <bfields@citi.umich.edu>

commit 55ef1274dddd4de387c54d110e354ffbb6cdc706 upstream.

Since nfsv4 allows LOCKT without an open, but the ->lock() method is a
file method, we fake up a struct file in the nfsv4 code with just the
fields we need initialized.  But we forgot to initialize the file
operations, with the result that LOCKT never results in a call to the
filesystem's ->lock() method (if it exists).

We could just add that one more initialization.  But this hack of faking
up a struct file with only some fields initialized seems the kind of
thing that might cause more problems in the future.  We should either do
an open and get a real struct file, or make lock-testing an inode (not a
file) method.

This patch does the former.

Reported-by: Marc Eshel <eshel@almaden.ibm.com>
Tested-by: Marc Eshel <eshel@almaden.ibm.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 fs/nfsd/nfs4state.c |   30 ++++++++++++++++++++----------
 1 file changed, 20 insertions(+), 10 deletions(-)

--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2767,6 +2767,25 @@ out:
 }
 
 /*
+ * The NFSv4 spec allows a client to do a LOCKT without holding an OPEN,
+ * so we do a temporary open here just to get an open file to pass to
+ * vfs_test_lock.  (Arguably perhaps test_lock should be done with an
+ * inode operation.)
+ */
+static int nfsd_test_lock(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file_lock *lock)
+{
+	struct file *file;
+	int err;
+
+	err = nfsd_open(rqstp, fhp, S_IFREG, NFSD_MAY_READ, &file);
+	if (err)
+		return err;
+	err = vfs_test_lock(file, lock);
+	nfsd_close(file);
+	return err;
+}
+
+/*
  * LOCKT operation
  */
 __be32
@@ -2774,7 +2793,6 @@ nfsd4_lockt(struct svc_rqst *rqstp, stru
 	    struct nfsd4_lockt *lockt)
 {
 	struct inode *inode;
-	struct file file;
 	struct file_lock file_lock;
 	int error;
 	__be32 status;
@@ -2832,16 +2850,8 @@ nfsd4_lockt(struct svc_rqst *rqstp, stru
 
 	nfs4_transform_lock_offset(&file_lock);
 
-	/* vfs_test_lock uses the struct file _only_ to resolve the inode.
-	 * since LOCKT doesn't require an OPEN, and therefore a struct
-	 * file may not exist, pass vfs_test_lock a struct file with
-	 * only the dentry:inode set.
-	 */
-	memset(&file, 0, sizeof (struct file));
-	file.f_path.dentry = cstate->current_fh.fh_dentry;
-
 	status = nfs_ok;
-	error = vfs_test_lock(&file, &file_lock);
+	error = nfsd_test_lock(rqstp, &cstate->current_fh, &file_lock);
 	if (error) {
 		status = nfserrno(error);
 		goto out;


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 13/41] nfsd: only set file_lock.fl_lmops in nfsd4_lockt if a stateowner is found
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (11 preceding siblings ...)
  2009-02-04 18:46   ` [patch 12/41] nfsd: Ensure nfsv4 calls the underlying filesystem on LOCKT Greg KH
@ 2009-02-04 18:46   ` Greg KH
  2009-02-04 18:46   ` [patch 14/41] PCI: irq and pci_ids patch for Intel Tigerpoint DeviceIDs Greg KH
                     ` (27 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:46 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Jeff Layton, J. Bruce Fields

[-- Attachment #1: nfsd-only-set-file_lock.fl_lmops-in-nfsd4_lockt-if-a-stateowner-is-found.patch --]
[-- Type: text/plain, Size: 1487 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Jeff Layton <jlayton@redhat.com>

commit fa82a491275a613b15489aab4b99acecb00958d3 upstream.

nfsd4_lockt does a search for a lockstateowner when building the lock
struct to test. If one is found, it'll set fl_owner to it. Regardless of
whether that happens, it'll also set fl_lmops. Given that this lock is
basically a "lightweight" lock that's just used for checking conflicts,
setting fl_lmops is probably not appropriate for it.

This behavior exposed a bug in DLM's GETLK implementation where it
wasn't clearing out the fields in the file_lock before filling in
conflicting lock info. While we were able to fix this in DLM, it
still seems pointless and dangerous to set the fl_lmops this way
when we may have a NULL lockstateowner.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@pig.fieldses.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 fs/nfsd/nfs4state.c |    1 -
 1 file changed, 1 deletion(-)

--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2840,7 +2840,6 @@ nfsd4_lockt(struct svc_rqst *rqstp, stru
 		file_lock.fl_owner = (fl_owner_t)lockt->lt_stateowner;
 	file_lock.fl_pid = current->tgid;
 	file_lock.fl_flags = FL_POSIX;
-	file_lock.fl_lmops = &nfsd_posix_mng_ops;
 
 	file_lock.fl_start = lockt->lt_offset;
 	if ((lockt->lt_length == ~(u64)0) || LOFF_OVERFLOW(lockt->lt_offset, lockt->lt_length))


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 14/41] PCI: irq and pci_ids patch for Intel Tigerpoint DeviceIDs
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (12 preceding siblings ...)
  2009-02-04 18:46   ` [patch 13/41] nfsd: only set file_lock.fl_lmops in nfsd4_lockt if a stateowner is found Greg KH
@ 2009-02-04 18:46   ` Greg KH
  2009-02-04 18:46   ` [patch 15/41] sata_nv: rename nv_nf2_hardreset() Greg KH
                     ` (26 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:46 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Seth Heasley, Jesse Barnes

[-- Attachment #1: pci-irq-and-pci_ids-patch-for-intel-tigerpoint-deviceids.patch --]
[-- Type: text/plain, Size: 1283 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Seth Heasley <seth.heasley@intel.com>

commit 57064d213d2e44654d4f13c66df135b5e7389a26 upstream.

This patch adds the Intel Tigerpoint LPC Controller DeviceIDs.

Signed-off-by: Seth Heasley <seth.heasley@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/pci/irq.c      |    1 +
 include/linux/pci_ids.h |    1 +
 2 files changed, 2 insertions(+)

--- a/arch/x86/pci/irq.c
+++ b/arch/x86/pci/irq.c
@@ -573,6 +573,7 @@ static __init int intel_router_probe(str
 	case PCI_DEVICE_ID_INTEL_ICH7_1:
 	case PCI_DEVICE_ID_INTEL_ICH7_30:
 	case PCI_DEVICE_ID_INTEL_ICH7_31:
+	case PCI_DEVICE_ID_INTEL_TGP_LPC:
 	case PCI_DEVICE_ID_INTEL_ESB2_0:
 	case PCI_DEVICE_ID_INTEL_ICH8_0:
 	case PCI_DEVICE_ID_INTEL_ICH8_1:
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2384,6 +2384,7 @@
 #define PCI_DEVICE_ID_INTEL_ICH7_0	0x27b8
 #define PCI_DEVICE_ID_INTEL_ICH7_1	0x27b9
 #define PCI_DEVICE_ID_INTEL_ICH7_30	0x27b0
+#define PCI_DEVICE_ID_INTEL_TGP_LPC	0x27bc
 #define PCI_DEVICE_ID_INTEL_ICH7_31	0x27bd
 #define PCI_DEVICE_ID_INTEL_ICH7_17	0x27da
 #define PCI_DEVICE_ID_INTEL_ICH7_19	0x27dd


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 15/41] sata_nv: rename nv_nf2_hardreset()
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (13 preceding siblings ...)
  2009-02-04 18:46   ` [patch 14/41] PCI: irq and pci_ids patch for Intel Tigerpoint DeviceIDs Greg KH
@ 2009-02-04 18:46   ` Greg KH
  2009-02-04 18:46   ` [patch 16/41] sata_nv: fix MCP5x reset Greg KH
                     ` (25 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:46 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Tejun Heo, Jeff Garzik

[-- Attachment #1: sata_nv-rename-nv_nf2_hardreset.patch --]
[-- Type: text/plain, Size: 2515 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Tejun Heo <tj@kernel.org>

commit e8caa3c70e94d867ca2efe9e53fd388b52d6d0c8 upstream.

nv_nf2_hardreset() will be used by other flavors too.  Rename it to
nv_noclassify_hardreset().

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/ata/sata_nv.c |   28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -305,10 +305,10 @@ static irqreturn_t nv_ck804_interrupt(in
 static int nv_scr_read(struct ata_port *ap, unsigned int sc_reg, u32 *val);
 static int nv_scr_write(struct ata_port *ap, unsigned int sc_reg, u32 val);
 
+static int nv_noclassify_hardreset(struct ata_link *link, unsigned int *class,
+				   unsigned long deadline);
 static void nv_nf2_freeze(struct ata_port *ap);
 static void nv_nf2_thaw(struct ata_port *ap);
-static int nv_nf2_hardreset(struct ata_link *link, unsigned int *class,
-			    unsigned long deadline);
 static void nv_ck804_freeze(struct ata_port *ap);
 static void nv_ck804_thaw(struct ata_port *ap);
 static int nv_adma_slave_config(struct scsi_device *sdev);
@@ -432,7 +432,7 @@ static struct ata_port_operations nv_nf2
 	.inherits		= &nv_common_ops,
 	.freeze			= nv_nf2_freeze,
 	.thaw			= nv_nf2_thaw,
-	.hardreset		= nv_nf2_hardreset,
+	.hardreset		= nv_noclassify_hardreset,
 };
 
 /* CK804 finally gets hardreset right */
@@ -1530,6 +1530,17 @@ static int nv_scr_write(struct ata_port 
 	return 0;
 }
 
+static int nv_noclassify_hardreset(struct ata_link *link, unsigned int *class,
+				   unsigned long deadline)
+{
+	bool online;
+	int rc;
+
+	rc = sata_link_hardreset(link, sata_deb_timing_hotplug, deadline,
+				 &online, NULL);
+	return online ? -EAGAIN : rc;
+}
+
 static void nv_nf2_freeze(struct ata_port *ap)
 {
 	void __iomem *scr_addr = ap->host->ports[0]->ioaddr.scr_addr;
@@ -1554,17 +1565,6 @@ static void nv_nf2_thaw(struct ata_port 
 	iowrite8(mask, scr_addr + NV_INT_ENABLE);
 }
 
-static int nv_nf2_hardreset(struct ata_link *link, unsigned int *class,
-			    unsigned long deadline)
-{
-	bool online;
-	int rc;
-
-	rc = sata_link_hardreset(link, sata_deb_timing_hotplug, deadline,
-				 &online, NULL);
-	return online ? -EAGAIN : rc;
-}
-
 static void nv_ck804_freeze(struct ata_port *ap)
 {
 	void __iomem *mmio_base = ap->host->iomap[NV_MMIO_BAR];


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 16/41] sata_nv: fix MCP5x reset
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (14 preceding siblings ...)
  2009-02-04 18:46   ` [patch 15/41] sata_nv: rename nv_nf2_hardreset() Greg KH
@ 2009-02-04 18:46   ` Greg KH
  2009-02-04 18:46   ` [patch 17/41] sata_nv: ck804 has borked hardreset too Greg KH
                     ` (24 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:46 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Tejun Heo, Jeff Garzik

[-- Attachment #1: sata_nv-fix-mcp5x-reset.patch --]
[-- Type: text/plain, Size: 3872 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Tejun Heo <tj@kernel.org>

commit 2d775708bc6613f1be47f1e720781343341ecc94 upstream.

MCP5x family of controllers seem to share much more with nf2's as far
as reset protocol is concerned.  It requires heardreset to get the PHY
going and classfication code report after hardreset is unreliable.
Create a new board type MCP5x and use noclassify hardreset.  SWNCQ is
modified to inherit from this new type.

This fixes hotplug regression reported in kernel bz#12351.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/ata/sata_nv.c |   42 +++++++++++++++++++++++++++++-------------
 1 file changed, 29 insertions(+), 13 deletions(-)

--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -352,6 +352,7 @@ enum nv_host_type
 	NFORCE3 = NFORCE2,	/* NF2 == NF3 as far as sata_nv is concerned */
 	CK804,
 	ADMA,
+	MCP5x,
 	SWNCQ,
 };
 
@@ -363,10 +364,10 @@ static const struct pci_device_id nv_pci
 	{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA2), CK804 },
 	{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA), CK804 },
 	{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2), CK804 },
-	{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA), SWNCQ },
-	{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2), SWNCQ },
-	{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA), SWNCQ },
-	{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2), SWNCQ },
+	{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA), MCP5x },
+	{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2), MCP5x },
+	{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA), MCP5x },
+	{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2), MCP5x },
 	{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA), GENERIC },
 	{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA2), GENERIC },
 	{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA3), GENERIC },
@@ -467,8 +468,19 @@ static struct ata_port_operations nv_adm
 	.host_stop		= nv_adma_host_stop,
 };
 
+/* Kernel bz#12351 reports that when SWNCQ is enabled, for hotplug to
+ * work, hardreset should be used and hardreset can't report proper
+ * signature, which suggests that mcp5x is closer to nf2 as long as
+ * reset quirkiness is concerned.  Define separate ops for mcp5x with
+ * nv_noclassify_hardreset().
+ */
+static struct ata_port_operations nv_mcp5x_ops = {
+	.inherits		= &nv_common_ops,
+	.hardreset		= nv_noclassify_hardreset,
+};
+
 static struct ata_port_operations nv_swncq_ops = {
-	.inherits		= &nv_generic_ops,
+	.inherits		= &nv_mcp5x_ops,
 
 	.qc_defer		= ata_std_qc_defer,
 	.qc_prep		= nv_swncq_qc_prep,
@@ -531,6 +543,15 @@ static const struct ata_port_info nv_por
 		.port_ops	= &nv_adma_ops,
 		.private_data	= NV_PI_PRIV(nv_adma_interrupt, &nv_adma_sht),
 	},
+	/* MCP5x */
+	{
+		.flags		= ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY,
+		.pio_mask	= NV_PIO_MASK,
+		.mwdma_mask	= NV_MWDMA_MASK,
+		.udma_mask	= NV_UDMA_MASK,
+		.port_ops	= &nv_mcp5x_ops,
+		.private_data	= NV_PI_PRIV(nv_generic_interrupt, &nv_sht),
+	},
 	/* SWNCQ */
 	{
 		.flags	        = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
@@ -2355,14 +2376,9 @@ static int nv_init_one(struct pci_dev *p
 	if (type == CK804 && adma_enabled) {
 		dev_printk(KERN_NOTICE, &pdev->dev, "Using ADMA mode\n");
 		type = ADMA;
-	}
-
-	if (type == SWNCQ) {
-		if (swncq_enabled)
-			dev_printk(KERN_NOTICE, &pdev->dev,
-				   "Using SWNCQ mode\n");
-		else
-			type = GENERIC;
+	} else if (type == MCP5x && swncq_enabled) {
+		dev_printk(KERN_NOTICE, &pdev->dev, "Using SWNCQ mode\n");
+		type = SWNCQ;
 	}
 
 	ppi[0] = &nv_port_info[type];


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 17/41] sata_nv: ck804 has borked hardreset too
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (15 preceding siblings ...)
  2009-02-04 18:46   ` [patch 16/41] sata_nv: fix MCP5x reset Greg KH
@ 2009-02-04 18:46   ` Greg KH
  2009-02-04 18:46   ` [patch 18/41] USB: isp1760: Fix probe in PCI glue code Greg KH
                     ` (23 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:46 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Tejun Heo, Jeff Garzik

[-- Attachment #1: sata_nv-ck804-has-borked-hardreset-too.patch --]
[-- Type: text/plain, Size: 1403 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Tejun Heo <tj@kernel.org>

commit 8d993eaa9c3c61b8a5929a7f695078a1fcfb4869 upstream.

While playing with nvraid, I found out that rmmoding and insmoding
often trigger hardreset failure on the first port (the second one was
always okay).  Seriously, how diverse can you get with hardreset
behaviors?  Anyways, make ck804 use noclassify variant too.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/ata/sata_nv.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -436,11 +436,16 @@ static struct ata_port_operations nv_nf2
 	.hardreset		= nv_noclassify_hardreset,
 };
 
-/* CK804 finally gets hardreset right */
+/* For initial probing after boot and hot plugging, hardreset mostly
+ * works fine on CK804 but curiously, reprobing on the initial port by
+ * rescanning or rmmod/insmod fails to acquire the initial D2H Reg FIS
+ * in somewhat undeterministic way.  Use noclassify hardreset.
+ */
 static struct ata_port_operations nv_ck804_ops = {
 	.inherits		= &nv_common_ops,
 	.freeze			= nv_ck804_freeze,
 	.thaw			= nv_ck804_thaw,
+	.hardreset		= nv_noclassify_hardreset,
 	.host_stop		= nv_ck804_host_stop,
 };
 


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 18/41] USB: isp1760: Fix probe in PCI glue code
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (16 preceding siblings ...)
  2009-02-04 18:46   ` [patch 17/41] sata_nv: ck804 has borked hardreset too Greg KH
@ 2009-02-04 18:46   ` Greg KH
  2009-02-04 18:46   ` [patch 19/41] x86: fix page attribute corruption with cpa() Greg KH
                     ` (22 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:46 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Karl Bongers, Sebastian Andrzej Siewior, Stefan Bader

[-- Attachment #1: usb-isp1760-fix-probe-in-pci-glue-code.patch --]
[-- Type: text/plain, Size: 5216 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Karl Bongers <kbongers@jged.com>

This is the backported version of the upstream commit
Stefan Bader <stefan.bader@canonical.com> did the backport

Contains fixes so probe on x86 PCI runs, apparently I'm first to try
this. Several fixes to memory access to probe host scratch register.
Previously would bug check on chip_addr var used uninitialized.
Scratch reg write failed in one instance due to 16-bit initial access
mode, so added "& 0x0000ffff" to the readl as fix.
Includes some general cleanup - remove global vars, organize memory map
resource use.

Signed-off-by: Karl Bongers <kbongers@jged.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/host/isp1760-if.c |   96 ++++++++++++++++++++++++------------------
 1 file changed, 55 insertions(+), 41 deletions(-)

--- a/drivers/usb/host/isp1760-if.c
+++ b/drivers/usb/host/isp1760-if.c
@@ -129,23 +129,23 @@ static struct of_platform_driver isp1760
 #endif
 
 #ifdef CONFIG_PCI
-static u32 nxp_pci_io_base;
-static u32 iolength;
-static u32 pci_mem_phy0;
-static u32 length;
-static u8 __iomem *chip_addr;
-static u8 __iomem *iobase;
-
 static int __devinit isp1761_pci_probe(struct pci_dev *dev,
 		const struct pci_device_id *id)
 {
 	u8 latency, limit;
 	__u32 reg_data;
 	int retry_count;
-	int length;
-	int status = 1;
 	struct usb_hcd *hcd;
 	unsigned int devflags = 0;
+	int ret_status = 0;
+
+	resource_size_t pci_mem_phy0;
+	resource_size_t memlength;
+
+	u8 __iomem *chip_addr;
+	u8 __iomem *iobase;
+	resource_size_t nxp_pci_io_base;
+	resource_size_t iolength;
 
 	if (usb_disabled())
 		return -ENODEV;
@@ -168,26 +168,30 @@ static int __devinit isp1761_pci_probe(s
 	iobase = ioremap_nocache(nxp_pci_io_base, iolength);
 	if (!iobase) {
 		printk(KERN_ERR "ioremap #1\n");
-		release_mem_region(nxp_pci_io_base, iolength);
-		return -ENOMEM;
+		ret_status = -ENOMEM;
+		goto cleanup1;
 	}
 	/* Grab the PLX PCI shared memory of the ISP 1761 we need  */
 	pci_mem_phy0 = pci_resource_start(dev, 3);
-	length = pci_resource_len(dev, 3);
-
-	if (length < 0xffff) {
-		printk(KERN_ERR "memory length for this resource is less than "
-				"required\n");
-		release_mem_region(nxp_pci_io_base, iolength);
-		iounmap(iobase);
-		return  -ENOMEM;
+	memlength = pci_resource_len(dev, 3);
+	if (memlength < 0xffff) {
+		printk(KERN_ERR "memory length for this resource is wrong\n");
+		ret_status = -ENOMEM;
+		goto cleanup2;
 	}
 
-	if (!request_mem_region(pci_mem_phy0, length, "ISP-PCI")) {
+	if (!request_mem_region(pci_mem_phy0, memlength, "ISP-PCI")) {
 		printk(KERN_ERR "host controller already in use\n");
-		release_mem_region(nxp_pci_io_base, iolength);
-		iounmap(iobase);
-		return -EBUSY;
+		ret_status = -EBUSY;
+		goto cleanup2;
+	}
+
+	/* map available memory */
+	chip_addr = ioremap_nocache(pci_mem_phy0,memlength);
+	if (!chip_addr) {
+		printk(KERN_ERR "Error ioremap failed\n");
+		ret_status = -ENOMEM;
+		goto cleanup3;
 	}
 
 	/* bad pci latencies can contribute to overruns */
@@ -210,38 +214,54 @@ static int __devinit isp1761_pci_probe(s
 		 * */
 		writel(0xface, chip_addr + HC_SCRATCH_REG);
 		udelay(100);
-		reg_data = readl(chip_addr + HC_SCRATCH_REG);
+		reg_data = readl(chip_addr + HC_SCRATCH_REG) & 0x0000ffff;
 		retry_count--;
 	}
 
+	iounmap(chip_addr);
+
 	/* Host Controller presence is detected by writing to scratch register
 	 * and reading back and checking the contents are same or not
 	 */
 	if (reg_data != 0xFACE) {
 		err("scratch register mismatch %x", reg_data);
-		goto clean;
+		ret_status = -ENOMEM;
+		goto cleanup3;
 	}
 
 	pci_set_master(dev);
 
-	status = readl(iobase + 0x68);
-	status |= 0x900;
-	writel(status, iobase + 0x68);
+	/* configure PLX PCI chip to pass interrupts */
+#define PLX_INT_CSR_REG 0x68
+	reg_data = readl(iobase + PLX_INT_CSR_REG);
+	reg_data |= 0x900;
+	writel(reg_data, iobase + PLX_INT_CSR_REG);
 
 	dev->dev.dma_mask = NULL;
-	hcd = isp1760_register(pci_mem_phy0, length, dev->irq,
+	hcd = isp1760_register(pci_mem_phy0, memlength, dev->irq,
 		IRQF_SHARED | IRQF_DISABLED, &dev->dev, dev_name(&dev->dev),
 		devflags);
+	if (IS_ERR(hcd)) {
+		ret_status = -ENODEV;
+		goto cleanup3;
+	}
+
+	/* done with PLX IO access */
+	iounmap(iobase);
+	release_mem_region(nxp_pci_io_base, iolength);
+
 	pci_set_drvdata(dev, hcd);
-	if (!hcd)
-		return 0;
-clean:
-	status = -ENODEV;
+	return 0;
+
+cleanup3:
+	release_mem_region(pci_mem_phy0, memlength);
+cleanup2:
 	iounmap(iobase);
-	release_mem_region(pci_mem_phy0, length);
+cleanup1:
 	release_mem_region(nxp_pci_io_base, iolength);
-	return status;
+	return ret_status;
 }
+
 static void isp1761_pci_remove(struct pci_dev *dev)
 {
 	struct usb_hcd *hcd;
@@ -254,12 +274,6 @@ static void isp1761_pci_remove(struct pc
 	usb_put_hcd(hcd);
 
 	pci_disable_device(dev);
-
-	iounmap(iobase);
-	iounmap(chip_addr);
-
-	release_mem_region(nxp_pci_io_base, iolength);
-	release_mem_region(pci_mem_phy0, length);
 }
 
 static void isp1761_pci_shutdown(struct pci_dev *dev)


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 19/41] x86: fix page attribute corruption with cpa()
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (17 preceding siblings ...)
  2009-02-04 18:46   ` [patch 18/41] USB: isp1760: Fix probe in PCI glue code Greg KH
@ 2009-02-04 18:46   ` Greg KH
  2009-02-04 18:46   ` [patch 20/41] cpuidle: update the last_state acpi cpuidle reflecting actual state entered Greg KH
                     ` (21 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:46 UTC (permalink / raw)
  To: linux-kernel, stable, Greg KH
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Ingo Molnar, venkatesh.pallipadi, Suresh Siddha

[-- Attachment #1: x86-fix-page-attribute-corruption-with-cpa.patch --]
[-- Type: text/plain, Size: 4280 bytes --]


2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Suresh Siddha <suresh.b.siddha@intel.com>

commit a1e46212a410793d575718818e81ddc442a65283 upstream.

Impact: fix sporadic slowdowns and warning messages

This patch fixes a performance issue reported by Linus on his
Nehalem system. While Linus reverted the PAT patch (commit
58dab916dfb57328d50deb0aa9b3fc92efa248ff) which exposed the issue,
existing cpa() code can potentially still cause wrong(page attribute
corruption) behavior.

This patch also fixes the "WARNING: at arch/x86/mm/pageattr.c:560" that
various people reported.

In 64bit kernel, kernel identity mapping might have holes depending
on the available memory and how e820 reports the address range
covering the RAM, ACPI, PCI reserved regions. If there is a 2MB/1GB hole
in the address range that is not listed by e820 entries, kernel identity
mapping will have a corresponding hole in its 1-1 identity mapping.

If cpa() happens on the kernel identity mapping which falls into these
holes,
existing code fails like this:

__change_page_attr_set_clr()
	__change_page_attr()
		returns 0 because of if (!kpte). But doesn't
		set cpa->numpages and cpa->pfn.
	cpa_process_alias()
		uses uninitialized cpa->pfn (random value)
		which can potentially lead to changing the page
		attribute of kernel text/data, kernel identity
		mapping of RAM pages etc. oops!

This bug was easily exposed by another PAT patch which was doing
cpa() more often on kernel identity mapping holes (physical range
between
max_low_pfn_mapped and 4GB), where in here it was setting the
cache disable attribute(PCD) for kernel identity mappings aswell.

Fix cpa() to handle the kernel identity mapping holes. Retain
the WARN() for cpa() calls to other not present address ranges
(kernel-text/data, ioremap() addresses)

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


---
 arch/x86/mm/pageattr.c |   49 ++++++++++++++++++++++++++++++++++---------------
 1 file changed, 34 insertions(+), 15 deletions(-)

--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -582,6 +582,36 @@ out_unlock:
 	return 0;
 }
 
+static int __cpa_process_fault(struct cpa_data *cpa, unsigned long vaddr,
+			       int primary)
+{
+	/*
+	 * Ignore all non primary paths.
+	 */
+	if (!primary)
+		return 0;
+
+	/*
+	 * Ignore the NULL PTE for kernel identity mapping, as it is expected
+	 * to have holes.
+	 * Also set numpages to '1' indicating that we processed cpa req for
+	 * one virtual address page and its pfn. TBD: numpages can be set based
+	 * on the initial value and the level returned by lookup_address().
+	 */
+	if (within(vaddr, PAGE_OFFSET,
+		   PAGE_OFFSET + (max_pfn_mapped << PAGE_SHIFT))) {
+		cpa->numpages = 1;
+		cpa->pfn = __pa(vaddr) >> PAGE_SHIFT;
+		return 0;
+	} else {
+		WARN(1, KERN_WARNING "CPA: called for zero pte. "
+			"vaddr = %lx cpa->vaddr = %lx\n", vaddr,
+			cpa->vaddr);
+
+		return -EINVAL;
+	}
+}
+
 static int __change_page_attr(struct cpa_data *cpa, int primary)
 {
 	unsigned long address = cpa->vaddr;
@@ -592,17 +622,11 @@ static int __change_page_attr(struct cpa
 repeat:
 	kpte = lookup_address(address, &level);
 	if (!kpte)
-		return 0;
+		return __cpa_process_fault(cpa, address, primary);
 
 	old_pte = *kpte;
-	if (!pte_val(old_pte)) {
-		if (!primary)
-			return 0;
-		WARN(1, KERN_WARNING "CPA: called for zero pte. "
-		       "vaddr = %lx cpa->vaddr = %lx\n", address,
-		       cpa->vaddr);
-		return -EINVAL;
-	}
+	if (!pte_val(old_pte))
+		return __cpa_process_fault(cpa, address, primary);
 
 	if (level == PG_LEVEL_4K) {
 		pte_t new_pte;
@@ -676,12 +700,7 @@ static int cpa_process_alias(struct cpa_
 	 * mapping already:
 	 */
 	if (!(within(cpa->vaddr, PAGE_OFFSET,
-		    PAGE_OFFSET + (max_low_pfn_mapped << PAGE_SHIFT))
-#ifdef CONFIG_X86_64
-		|| within(cpa->vaddr, PAGE_OFFSET + (1UL<<32),
-		    PAGE_OFFSET + (max_pfn_mapped << PAGE_SHIFT))
-#endif
-	)) {
+		    PAGE_OFFSET + (max_pfn_mapped << PAGE_SHIFT)))) {
 
 		alias_cpa = *cpa;
 		alias_cpa.vaddr = (unsigned long) __va(cpa->pfn << PAGE_SHIFT);


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 20/41] cpuidle: update the last_state acpi cpuidle reflecting actual state entered
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (18 preceding siblings ...)
  2009-02-04 18:46   ` [patch 19/41] x86: fix page attribute corruption with cpa() Greg KH
@ 2009-02-04 18:46   ` Greg KH
  2009-02-04 18:46   ` [patch 21/41] cpuidle: upon BIOS bug, default to default_idle rather than polling Greg KH
                     ` (20 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:46 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Len Brown, Venkatesh Pallipadi, Thomas Renninger

[-- Attachment #1: cpuidle-update-the-last_state-acpi-cpuidle-reflecting-actual-state-entered.patch --]
[-- Type: text/plain, Size: 927 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>

commit addbad46ed0906cd584784423b9d0babc7476446

reflect the actual state entered in dev->last_state, when actaul state entered
is different from intended one.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/acpi/processor_idle.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -1587,6 +1587,7 @@ static int acpi_idle_enter_bm(struct cpu
 
 	if (acpi_idle_bm_check()) {
 		if (dev->safe_state) {
+			dev->last_state = dev->safe_state;
 			return dev->safe_state->enter(dev, dev->safe_state);
 		} else {
 			local_irq_disable();


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 21/41] cpuidle: upon BIOS bug, default to default_idle rather than polling
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (19 preceding siblings ...)
  2009-02-04 18:46   ` [patch 20/41] cpuidle: update the last_state acpi cpuidle reflecting actual state entered Greg KH
@ 2009-02-04 18:46   ` Greg KH
  2009-02-04 18:46   ` [patch 22/41] cpuidle: use last_state which can reflect the actual state entered Greg KH
                     ` (19 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:46 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Len Brown, Venkatesh Pallipadi, Thomas Renninger

[-- Attachment #1: cpuidle-upon-bios-bug-default-to-default_idle-rather-than-polling.patch --]
[-- Type: text/plain, Size: 1102 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>

commit 89cedfefca1d446ee2598fd3bcbb23ee3802e26a upstream

http://bugzilla.kernel.org/show_bug.cgi?id=11345

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/Kconfig          |    3 +++
 drivers/cpuidle/cpuidle.c |    4 ++++
 2 files changed, 7 insertions(+)

--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -123,6 +123,9 @@ config GENERIC_TIME_VSYSCALL
 config ARCH_HAS_CPU_RELAX
 	def_bool y
 
+config ARCH_HAS_DEFAULT_IDLE
+	def_bool y
+
 config ARCH_HAS_CACHE_LINE_SIZE
 	def_bool y
 
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -56,7 +56,11 @@ static void cpuidle_idle_call(void)
 		if (pm_idle_old)
 			pm_idle_old();
 		else
+#if defined(CONFIG_ARCH_HAS_DEFAULT_IDLE)
+			default_idle();
+#else
 			local_irq_enable();
+#endif
 		return;
 	}
 


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 22/41] cpuidle: use last_state which can reflect the actual state entered
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (20 preceding siblings ...)
  2009-02-04 18:46   ` [patch 21/41] cpuidle: upon BIOS bug, default to default_idle rather than polling Greg KH
@ 2009-02-04 18:46   ` Greg KH
  2009-02-04 18:46   ` [patch 23/41] cpuidle: Add decaying history logic to menu idle predictor Greg KH
                     ` (18 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:46 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Len Brown, Venkatesh Pallipadi, Thomas Renninger

[-- Attachment #1: cpuidle-use-last_state-which-can-reflect-the-actual-state-entered.patch --]
[-- Type: text/plain, Size: 1555 bytes --]


2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>

commit 887e301aa1105326f1412a98749024263b1031c7 upstream

cpuidle accounts the idle time for the C-state it was trying to enter and
not to the actual state that the driver eventually entered. The driver may
select a different state than the one chosen by cpuidle due to
constraints like bus-mastering, etc.

Change the time acounting code to look at the dev->last_state after
returning from target_state->enter(). Driver can modify dev->last_state
internally, inside the enter routine to reflect the actual C-state
entered.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Tested-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/cpuidle/cpuidle.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -71,8 +71,11 @@ static void cpuidle_idle_call(void)
 	target_state = &dev->states[next_state];
 
 	/* enter the state and update stats */
-	dev->last_residency = target_state->enter(dev, target_state);
 	dev->last_state = target_state;
+	dev->last_residency = target_state->enter(dev, target_state);
+	if (dev->last_state)
+		target_state = dev->last_state;
+
 	target_state->time += (unsigned long long)dev->last_residency;
 	target_state->usage++;
 


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 23/41] cpuidle: Add decaying history logic to menu idle predictor
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (21 preceding siblings ...)
  2009-02-04 18:46   ` [patch 22/41] cpuidle: use last_state which can reflect the actual state entered Greg KH
@ 2009-02-04 18:46   ` Greg KH
  2009-02-04 18:46   ` [patch 24/41] ACPI: Avoid array address overflow when _CST MWAIT hint bits are set Greg KH
                     ` (17 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:46 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Len Brown, venkatesh.pallipadi, Thomas Renninger

[-- Attachment #1: cpuidle-add-decaying-history-logic-to-menu-idle-predictor.patch --]
[-- Type: text/plain, Size: 2200 bytes --]


2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>

commit 816bb611e41be29b476dc16f6297eb551bf4d747 upstream

Add decaying history of predicted idle time, instead of using the last early
wakeup. This logic helps menu governor do better job of predicting idle time.

With this change, we also measured noticable (~8%) power savings on
a DP server system with CPUs supporting deep C states, when system
was lightly loaded. There was no change to power or perf on other load
conditions.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/cpuidle/governors/menu.c |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

--- a/drivers/cpuidle/governors/menu.c
+++ b/drivers/cpuidle/governors/menu.c
@@ -15,12 +15,14 @@
 #include <linux/tick.h>
 
 #define BREAK_FUZZ	4	/* 4 us */
+#define PRED_HISTORY_PCT	50
 
 struct menu_device {
 	int		last_state_idx;
 
 	unsigned int	expected_us;
 	unsigned int	predicted_us;
+	unsigned int    current_predicted_us;
 	unsigned int	last_measured_us;
 	unsigned int	elapsed_us;
 };
@@ -47,6 +49,12 @@ static int menu_select(struct cpuidle_de
 	data->expected_us =
 		(u32) ktime_to_ns(tick_nohz_get_sleep_length()) / 1000;
 
+	/* Recalculate predicted_us based on prediction_history_pct */
+	data->predicted_us *= PRED_HISTORY_PCT;
+	data->predicted_us += (100 - PRED_HISTORY_PCT) *
+				data->current_predicted_us;
+	data->predicted_us /= 100;
+
 	/* find the deepest idle state that satisfies our constraints */
 	for (i = CPUIDLE_DRIVER_STATE_START + 1; i < dev->state_count; i++) {
 		struct cpuidle_state *s = &dev->states[i];
@@ -97,7 +105,7 @@ static void menu_reflect(struct cpuidle_
 		measured_us = -1;
 
 	/* Predict time until next break event */
-	data->predicted_us = max(measured_us, data->last_measured_us);
+	data->current_predicted_us = max(measured_us, data->last_measured_us);
 
 	if (last_idle_us + BREAK_FUZZ <
 	    data->expected_us - target->exit_latency) {


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 24/41] ACPI: Avoid array address overflow when _CST MWAIT hint bits are set
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (22 preceding siblings ...)
  2009-02-04 18:46   ` [patch 23/41] cpuidle: Add decaying history logic to menu idle predictor Greg KH
@ 2009-02-04 18:46   ` Greg KH
  2009-02-04 18:46   ` [patch 25/41] ACPI: Attach the ACPI device to the ACPI handle as early as possible Greg KH
                     ` (16 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:46 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Zhao Yakui, Venki Pallipadi, Len Brown, Thomas Renninger

[-- Attachment #1: acpi-avoid-array-address-overflow-when-_cst-mwait-hint-bits-are-set.patch --]
[-- Type: text/plain, Size: 2117 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Zhao Yakui <yakui.zhao@intel.com>

commit 13b40a1a065824d2d4e55c8b48ea9f3f9d162929 upstream.

The Cx Register address obtained from the _CST object is used as the MWAIT
hints if the register type is FFixedHW. And it is used to check whether
the Cx type is supported or not.

On some boxes the following Cx state package is obtained from _CST object:
    >{
                ResourceTemplate ()
                {
                    Register (FFixedHW,
                        0x01,               // Bit Width
                        0x02,               // Bit Offset
                        0x0000000000889759, // Address
                        0x03,               // Access Size
                        )
                },

                0x03,
                0xF5,
                0x015E }

   In such case we should use the bit[7:4] of Cx address to check whether
the Cx type is supported or not.

mask the MWAIT hint to avoid array address overflow

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Acked-by:Venki Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Cc: Thomas Renninger <trenn@suse.de>

---
 arch/x86/kernel/acpi/cstate.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/arch/x86/kernel/acpi/cstate.c
+++ b/arch/x86/kernel/acpi/cstate.c
@@ -56,6 +56,7 @@ static struct cstate_entry *cpu_cstate_e
 static short mwait_supported[ACPI_PROCESSOR_MAX_POWER];
 
 #define MWAIT_SUBSTATE_MASK	(0xf)
+#define MWAIT_CSTATE_MASK	(0xf)
 #define MWAIT_SUBSTATE_SIZE	(4)
 
 #define CPUID_MWAIT_LEAF (5)
@@ -98,7 +99,8 @@ int acpi_processor_ffh_cstate_probe(unsi
 	cpuid(CPUID_MWAIT_LEAF, &eax, &ebx, &ecx, &edx);
 
 	/* Check whether this particular cx_type (in CST) is supported or not */
-	cstate_type = (cx->address >> MWAIT_SUBSTATE_SIZE) + 1;
+	cstate_type = ((cx->address >> MWAIT_SUBSTATE_SIZE) &
+			MWAIT_CSTATE_MASK) + 1;
 	edx_part = edx >> (cstate_type * MWAIT_SUBSTATE_SIZE);
 	num_cstate_subtype = edx_part & MWAIT_SUBSTATE_MASK;
 


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 25/41] ACPI: Attach the ACPI device to the ACPI handle as early as possible
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (23 preceding siblings ...)
  2009-02-04 18:46   ` [patch 24/41] ACPI: Avoid array address overflow when _CST MWAIT hint bits are set Greg KH
@ 2009-02-04 18:46   ` Greg KH
  2009-02-04 18:46   ` [patch 26/41] ACPICA: Fixed a couple memory leaks associated with "implicit return" Greg KH
                     ` (15 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:46 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Zhao Yakui, Zhang Rui, Andi Kleen, Len Brown,
	Thomas Renninger

[-- Attachment #1: acpi-attach-the-acpi-device-to-the-acpi-handle-as-early-as-possible.patch --]
[-- Type: text/plain, Size: 1633 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Zhao Yakui <yakui.zhao@intel.com>

commit eab4b645769fa2f8703f5a3cb0cc4ac090d347af upstream.

Attach the ACPI device to the ACPI handle as early as possible so that OS
can get the corresponding ACPI device by the acpi handle in the course
of getting the power/wakeup/performance flags.

http://bugzilla.kernel.org/show_bug.cgi?id=8049
http://bugzilla.kernel.org/show_bug.cgi?id=11000

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/acpi/scan.c |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -1262,6 +1262,16 @@ acpi_add_single_object(struct acpi_devic
 	acpi_device_set_id(device, parent, handle, type);
 
 	/*
+	 * The ACPI device is attached to acpi handle before getting
+	 * the power/wakeup/peformance flags. Otherwise OS can't get
+	 * the corresponding ACPI device by the acpi handle in the course
+	 * of getting the power/wakeup/performance flags.
+	 */
+	result = acpi_device_set_context(device, type);
+	if (result)
+		goto end;
+
+	/*
 	 * Power Management
 	 * ----------------
 	 */
@@ -1291,8 +1301,6 @@ acpi_add_single_object(struct acpi_devic
 			goto end;
 	}
 
-	if ((result = acpi_device_set_context(device, type)))
-		goto end;
 
 	result = acpi_device_register(device, parent);
 


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 26/41] ACPICA: Fixed a couple memory leaks associated with "implicit return"
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (24 preceding siblings ...)
  2009-02-04 18:46   ` [patch 25/41] ACPI: Attach the ACPI device to the ACPI handle as early as possible Greg KH
@ 2009-02-04 18:46   ` Greg KH
  2009-02-04 18:46   ` [patch 27/41] ACPICA: Add check for invalid handle in acpi_get_object_info Greg KH
                     ` (14 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:46 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Len Brown, Bob Moore, Lin Ming, Thomas Renninger

[-- Attachment #1: acpica-fixed-a-couple-memory-leaks-associated-with-implicit-return.patch --]
[-- Type: text/plain, Size: 1515 bytes --]


2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Lin Ming <ming.m.lin@intel.com>

commit d8a0ec914afa1a994d2f6184ac4c6668b5f8068f upstream

Fixed a couple memory leaks associated with "implicit return" objects
when the AML Interpreter slack mode is enabled.

http://www.acpica.org/bugzilla/show_bug.cgi?id=349

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/acpi/dispatcher/dsmethod.c |    3 +++
 drivers/acpi/parser/psparse.c      |    4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)

--- a/drivers/acpi/dispatcher/dsmethod.c
+++ b/drivers/acpi/dispatcher/dsmethod.c
@@ -103,6 +103,9 @@ acpi_ds_method_error(acpi_status status,
 						    NULL);
 		acpi_ex_enter_interpreter();
 	}
+
+	acpi_ds_clear_implicit_return(walk_state);
+
 #ifdef ACPI_DISASSEMBLER
 	if (ACPI_FAILURE(status)) {
 
--- a/drivers/acpi/parser/psparse.c
+++ b/drivers/acpi/parser/psparse.c
@@ -641,10 +641,12 @@ acpi_status acpi_ps_parse_aml(struct acp
 					    ACPI_WALK_METHOD_RESTART;
 				}
 			} else {
-				/* On error, delete any return object */
+				/* On error, delete any return object or implicit return */
 
 				acpi_ut_remove_reference(previous_walk_state->
 							 return_desc);
+				acpi_ds_clear_implicit_return
+				    (previous_walk_state);
 			}
 		}
 


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 27/41] ACPICA: Add check for invalid handle in acpi_get_object_info
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (25 preceding siblings ...)
  2009-02-04 18:46   ` [patch 26/41] ACPICA: Fixed a couple memory leaks associated with "implicit return" Greg KH
@ 2009-02-04 18:46   ` Greg KH
  2009-02-04 18:46   ` [patch 28/41] ACPI: Change acpi_evaluate_integer to support 64-bit on 32-bit kernels Greg KH
                     ` (13 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:46 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Len Brown, Andi Kleen, Lin Ming, Bob Moore, Fiodor Suietov,
	Thomas Renninger

[-- Attachment #1: acpica-add-check-for-invalid-handle-in-acpi_get_object_info.patch --]
[-- Type: text/plain, Size: 1041 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Fiodor Suietov <fiodor.f.suietov@intel.com>

commit 237a927682a63f02adb542dbdaafe8a81566451d upstream

Return AE_BAD_PARAMETER if input handle is invalid.

http://www.acpica.org/bugzilla/show_bug.cgi?id=474

Signed-off-by: Fiodor Suietov <fiodor.f.suietov@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/acpi/namespace/nsxfname.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/acpi/namespace/nsxfname.c
+++ b/drivers/acpi/namespace/nsxfname.c
@@ -253,6 +253,7 @@ acpi_get_object_info(acpi_handle handle,
 	node = acpi_ns_map_handle_to_node(handle);
 	if (!node) {
 		(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
+		status = AE_BAD_PARAMETER;
 		goto cleanup;
 	}
 


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 28/41] ACPI: Change acpi_evaluate_integer to support 64-bit on 32-bit kernels
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (26 preceding siblings ...)
  2009-02-04 18:46   ` [patch 27/41] ACPICA: Add check for invalid handle in acpi_get_object_info Greg KH
@ 2009-02-04 18:46   ` Greg KH
  2009-02-04 18:46   ` [patch 29/41] ACPI: Fix compiler warnings introduced by 32 to 64 bit acpi conversions Greg KH
                     ` (12 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:46 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Matthew Wilcox, Len Brown, Thomas Renninger

[-- Attachment #1: acpi-change-acpi_evaluate_integer-to-support-64-bit-on-32-bit-kernels.patch --]
[-- Type: text/plain, Size: 34069 bytes --]


2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Matthew Wilcox <willy@linux.intel.com>

commit 27663c5855b10af9ec67bc7dfba001426ba21222 upstream

As of version 2.0, ACPI can return 64-bit integers.  The current
acpi_evaluate_integer only supports 64-bit integers on 64-bit platforms.
Change the argument to take a pointer to an acpi_integer so we support
64-bit integers on all platforms.

lenb: replaced use of "acpi_integer" with "unsigned long long"
lenb: fixed bug in acpi_thermal_trips_update()

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/ia64/sn/kernel/io_acpi_init.c  |    8 +++---
 drivers/acpi/ac.c                   |    2 -
 drivers/acpi/acpi_memhotplug.c      |    5 +---
 drivers/acpi/asus_acpi.c            |    2 -
 drivers/acpi/bay.c                  |    2 -
 drivers/acpi/bus.c                  |    4 +--
 drivers/acpi/button.c               |    4 +--
 drivers/acpi/container.c            |    2 -
 drivers/acpi/dock.c                 |    6 ++---
 drivers/acpi/ec.c                   |    7 ++++-
 drivers/acpi/numa.c                 |    2 -
 drivers/acpi/osl.c                  |    5 +---
 drivers/acpi/pci_root.c             |    2 -
 drivers/acpi/pci_slot.c             |   10 ++++----
 drivers/acpi/power.c                |    2 -
 drivers/acpi/processor_core.c       |    4 +--
 drivers/acpi/processor_perflib.c    |    2 -
 drivers/acpi/processor_throttling.c |    2 -
 drivers/acpi/sbshc.c                |    2 -
 drivers/acpi/sleep/main.c           |    2 -
 drivers/acpi/thermal.c              |   43 ++++++++++++++++++++++--------------
 drivers/acpi/utils.c                |    4 +--
 drivers/acpi/video.c                |   42 +++++++++++++++++------------------
 drivers/ata/libata-acpi.c           |    2 -
 drivers/misc/asus-laptop.c          |   12 +++++-----
 drivers/misc/eeepc-laptop.c         |    2 -
 drivers/misc/fujitsu-laptop.c       |    8 +++---
 drivers/misc/intel_menlow.c         |   27 +++++++++++-----------
 drivers/pci/hotplug/acpiphp_glue.c  |   14 +++++------
 drivers/pci/hotplug/acpiphp_ibm.c   |    2 -
 drivers/pci/hotplug/sgi_hotplug.c   |    4 +--
 include/acpi/acpi_bus.h             |    2 -
 32 files changed, 125 insertions(+), 112 deletions(-)

--- a/arch/ia64/sn/kernel/io_acpi_init.c
+++ b/arch/ia64/sn/kernel/io_acpi_init.c
@@ -232,7 +232,7 @@ exit:
 static unsigned int
 get_host_devfn(acpi_handle device_handle, acpi_handle rootbus_handle)
 {
-	unsigned long adr;
+	unsigned long long adr;
 	acpi_handle child;
 	unsigned int devfn;
 	int function;
@@ -292,8 +292,8 @@ get_host_devfn(acpi_handle device_handle
 static acpi_status
 find_matching_device(acpi_handle handle, u32 lvl, void *context, void **rv)
 {
-	unsigned long bbn = -1;
-	unsigned long adr;
+	unsigned long long bbn = -1;
+	unsigned long long adr;
 	acpi_handle parent = NULL;
 	acpi_status status;
 	unsigned int devfn;
@@ -348,7 +348,7 @@ sn_acpi_get_pcidev_info(struct pci_dev *
 	unsigned int host_devfn;
 	struct sn_pcidev_match pcidev_match;
 	acpi_handle rootbus_handle;
-	unsigned long segment;
+	unsigned long long segment;
 	acpi_status status;
 
 	rootbus_handle = PCI_CONTROLLER(dev)->acpi_handle;
--- a/drivers/acpi/ac.c
+++ b/drivers/acpi/ac.c
@@ -85,7 +85,7 @@ struct acpi_ac {
 	struct power_supply charger;
 #endif
 	struct acpi_device * device;
-	unsigned long state;
+	unsigned long long state;
 };
 
 #define to_acpi_ac(x) container_of(x, struct acpi_ac, charger);
--- a/drivers/acpi/acpi_memhotplug.c
+++ b/drivers/acpi/acpi_memhotplug.c
@@ -194,8 +194,7 @@ acpi_memory_get_device(acpi_handle handl
 
 static int acpi_memory_check_device(struct acpi_memory_device *mem_device)
 {
-	unsigned long current_status;
-
+	unsigned long long current_status;
 
 	/* Get device present/absent information from the _STA */
 	if (ACPI_FAILURE(acpi_evaluate_integer(mem_device->device->handle, "_STA",
@@ -264,7 +263,7 @@ static int acpi_memory_powerdown_device(
 	acpi_status status;
 	struct acpi_object_list arg_list;
 	union acpi_object arg;
-	unsigned long current_status;
+	unsigned long long current_status;
 
 
 	/* Issue the _EJ0 command */
--- a/drivers/acpi/asus_acpi.c
+++ b/drivers/acpi/asus_acpi.c
@@ -753,7 +753,7 @@ static int get_lcd_state(void)
 			/* That's what the AML code does */
 			lcd = out_obj.integer.value >> 8;
 	} else if (hotk->model == F3Sa) {
-		unsigned long tmp;
+		unsigned long long tmp;
 		union acpi_object param;
 		struct acpi_object_list input;
 		acpi_status status;
--- a/drivers/acpi/bay.c
+++ b/drivers/acpi/bay.c
@@ -90,7 +90,7 @@ static int is_ejectable(acpi_handle hand
  */
 static int bay_present(struct bay *bay)
 {
-	unsigned long sta;
+	unsigned long long sta;
 	acpi_status status;
 
 	if (bay) {
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -77,7 +77,7 @@ EXPORT_SYMBOL(acpi_bus_get_device);
 int acpi_bus_get_status(struct acpi_device *device)
 {
 	acpi_status status = AE_OK;
-	unsigned long sta = 0;
+	unsigned long long sta = 0;
 
 
 	if (!device)
@@ -155,7 +155,7 @@ int acpi_bus_get_power(acpi_handle handl
 	int result = 0;
 	acpi_status status = 0;
 	struct acpi_device *device = NULL;
-	unsigned long psc = 0;
+	unsigned long long psc = 0;
 
 
 	result = acpi_bus_get_device(handle, &device);
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -145,7 +145,7 @@ static int acpi_button_state_seq_show(st
 {
 	struct acpi_button *button = seq->private;
 	acpi_status status;
-	unsigned long state;
+	unsigned long long state;
 
 	if (!button || !button->device)
 		return 0;
@@ -253,7 +253,7 @@ static int acpi_button_remove_fs(struct 
    -------------------------------------------------------------------------- */
 static int acpi_lid_send_state(struct acpi_button *button)
 {
-	unsigned long state;
+	unsigned long long state;
 	acpi_status status;
 
 	status = acpi_evaluate_integer(button->device->handle, "_LID", NULL,
--- a/drivers/acpi/container.c
+++ b/drivers/acpi/container.c
@@ -76,7 +76,7 @@ static int is_device_present(acpi_handle
 {
 	acpi_handle temp;
 	acpi_status status;
-	unsigned long sta;
+	unsigned long long sta;
 
 
 	status = acpi_get_handle(handle, "_STA", &temp);
--- a/drivers/acpi/dock.c
+++ b/drivers/acpi/dock.c
@@ -229,7 +229,7 @@ EXPORT_SYMBOL_GPL(is_dock_device);
  */
 static int dock_present(struct dock_station *ds)
 {
-	unsigned long sta;
+	unsigned long long sta;
 	acpi_status status;
 
 	if (ds) {
@@ -730,13 +730,13 @@ static DEVICE_ATTR(undock, S_IWUSR, NULL
 static ssize_t show_dock_uid(struct device *dev,
 			     struct device_attribute *attr, char *buf)
 {
-	unsigned long lbuf;
+	unsigned long long lbuf;
 	acpi_status status = acpi_evaluate_integer(dock_station->handle,
 					"_UID", NULL, &lbuf);
 	if (ACPI_FAILURE(status))
 	    return 0;
 
-	return snprintf(buf, PAGE_SIZE, "%lx\n", lbuf);
+	return snprintf(buf, PAGE_SIZE, "%llx\n", lbuf);
 }
 static DEVICE_ATTR(uid, S_IRUGO, show_dock_uid, NULL);
 
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -769,6 +769,7 @@ static acpi_status
 ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
 {
 	acpi_status status;
+	unsigned long long tmp;
 
 	struct acpi_ec *ec = context;
 	status = acpi_walk_resources(handle, METHOD_NAME__CRS,
@@ -778,11 +779,13 @@ ec_parse_device(acpi_handle handle, u32 
 
 	/* Get GPE bit assignment (EC events). */
 	/* TODO: Add support for _GPE returning a package */
-	status = acpi_evaluate_integer(handle, "_GPE", NULL, &ec->gpe);
+	status = acpi_evaluate_integer(handle, "_GPE", NULL, &tmp);
 	if (ACPI_FAILURE(status))
 		return status;
+	ec->gpe = tmp;
 	/* Use the global lock for all EC transactions? */
-	acpi_evaluate_integer(handle, "_GLK", NULL, &ec->global_lock);
+	acpi_evaluate_integer(handle, "_GLK", NULL, &tmp);
+	ec->global_lock = tmp;
 	ec->handle = handle;
 	return AE_CTRL_TERMINATE;
 }
--- a/drivers/acpi/numa.c
+++ b/drivers/acpi/numa.c
@@ -258,7 +258,7 @@ int __init acpi_numa_init(void)
 
 int acpi_get_pxm(acpi_handle h)
 {
-	unsigned long pxm;
+	unsigned long long pxm;
 	acpi_status status;
 	acpi_handle handle;
 	acpi_handle phandle = h;
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -608,7 +608,7 @@ static void acpi_os_derive_pci_id_2(acpi
 	acpi_handle handle;
 	struct acpi_pci_id *pci_id = *id;
 	acpi_status status;
-	unsigned long temp;
+	unsigned long long temp;
 	acpi_object_type type;
 
 	acpi_get_parent(chandle, &handle);
@@ -620,8 +620,7 @@ static void acpi_os_derive_pci_id_2(acpi
 		if ((ACPI_FAILURE(status)) || (type != ACPI_TYPE_DEVICE))
 			return;
 
-		status =
-		    acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL,
+		status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL,
 					  &temp);
 		if (ACPI_SUCCESS(status)) {
 			u32 val;
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -190,7 +190,7 @@ static int __devinit acpi_pci_root_add(s
 	struct acpi_pci_root *root = NULL;
 	struct acpi_pci_root *tmp;
 	acpi_status status = AE_OK;
-	unsigned long value = 0;
+	unsigned long long value = 0;
 	acpi_handle handle = NULL;
 	struct acpi_device *child;
 
--- a/drivers/acpi/pci_slot.c
+++ b/drivers/acpi/pci_slot.c
@@ -76,10 +76,10 @@ static struct acpi_pci_driver acpi_pci_s
 };
 
 static int
-check_slot(acpi_handle handle, unsigned long *sun)
+check_slot(acpi_handle handle, unsigned long long *sun)
 {
 	int device = -1;
-	unsigned long adr, sta;
+	unsigned long long adr, sta;
 	acpi_status status;
 	struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
 
@@ -132,7 +132,7 @@ static acpi_status
 register_slot(acpi_handle handle, u32 lvl, void *context, void **rv)
 {
 	int device;
-	unsigned long sun;
+	unsigned long long sun;
 	char name[SLOT_NAME_SIZE];
 	struct acpi_pci_slot *slot;
 	struct pci_slot *pci_slot;
@@ -182,7 +182,7 @@ static acpi_status
 walk_p2p_bridge(acpi_handle handle, u32 lvl, void *context, void **rv)
 {
 	int device, function;
-	unsigned long adr;
+	unsigned long long adr;
 	acpi_status status;
 	acpi_handle dummy_handle;
 	acpi_walk_callback user_function;
@@ -239,7 +239,7 @@ static int
 walk_root_bridge(acpi_handle handle, acpi_walk_callback user_function)
 {
 	int seg, bus;
-	unsigned long tmp;
+	unsigned long long tmp;
 	acpi_status status;
 	acpi_handle dummy_handle;
 	struct pci_bus *pci_bus;
--- a/drivers/acpi/power.c
+++ b/drivers/acpi/power.c
@@ -131,7 +131,7 @@ acpi_power_get_context(acpi_handle handl
 static int acpi_power_get_state(struct acpi_power_resource *resource, int *state)
 {
 	acpi_status status = AE_OK;
-	unsigned long sta = 0;
+	unsigned long long sta = 0;
 
 
 	if (!resource || !state)
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -563,7 +563,7 @@ static int acpi_processor_get_info(struc
 
 	/* Check if it is a Device with HID and UID */
 	if (has_uid) {
-		unsigned long value;
+		unsigned long long value;
 		status = acpi_evaluate_integer(pr->handle, METHOD_NAME__UID,
 						NULL, &value);
 		if (ACPI_FAILURE(status)) {
@@ -875,7 +875,7 @@ static int acpi_processor_remove(struct 
 static int is_processor_present(acpi_handle handle)
 {
 	acpi_status status;
-	unsigned long sta = 0;
+	unsigned long long sta = 0;
 
 
 	status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
--- a/drivers/acpi/processor_perflib.c
+++ b/drivers/acpi/processor_perflib.c
@@ -126,7 +126,7 @@ static struct notifier_block acpi_ppc_no
 static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
 {
 	acpi_status status = 0;
-	unsigned long ppc = 0;
+	unsigned long long ppc = 0;
 
 
 	if (!pr)
--- a/drivers/acpi/processor_throttling.c
+++ b/drivers/acpi/processor_throttling.c
@@ -274,7 +274,7 @@ static int acpi_processor_throttling_not
 static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
 {
 	acpi_status status = 0;
-	unsigned long tpc = 0;
+	unsigned long long tpc = 0;
 
 	if (!pr)
 		return -EINVAL;
--- a/drivers/acpi/sbshc.c
+++ b/drivers/acpi/sbshc.c
@@ -258,7 +258,7 @@ extern int acpi_ec_add_query_handler(str
 static int acpi_smbus_hc_add(struct acpi_device *device)
 {
 	int status;
-	unsigned long val;
+	unsigned long long val;
 	struct acpi_smb_hc *hc;
 
 	if (!device)
--- a/drivers/acpi/sleep/main.c
+++ b/drivers/acpi/sleep/main.c
@@ -492,7 +492,7 @@ int acpi_pm_device_sleep_state(struct de
 	acpi_handle handle = DEVICE_ACPI_HANDLE(dev);
 	struct acpi_device *adev;
 	char acpi_method[] = "_SxD";
-	unsigned long d_min, d_max;
+	unsigned long long d_min, d_max;
 
 	if (!handle || ACPI_FAILURE(acpi_bus_get_device(handle, &adev))) {
 		printk(KERN_DEBUG "ACPI handle has no context!\n");
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -246,18 +246,18 @@ static const struct file_operations acpi
 static int acpi_thermal_get_temperature(struct acpi_thermal *tz)
 {
 	acpi_status status = AE_OK;
-
+	unsigned long long tmp;
 
 	if (!tz)
 		return -EINVAL;
 
 	tz->last_temperature = tz->temperature;
 
-	status =
-	    acpi_evaluate_integer(tz->device->handle, "_TMP", NULL, &tz->temperature);
+	status = acpi_evaluate_integer(tz->device->handle, "_TMP", NULL, &tmp);
 	if (ACPI_FAILURE(status))
 		return -ENODEV;
 
+	tz->temperature = tmp;
 	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Temperature is %lu dK\n",
 			  tz->temperature));
 
@@ -267,17 +267,16 @@ static int acpi_thermal_get_temperature(
 static int acpi_thermal_get_polling_frequency(struct acpi_thermal *tz)
 {
 	acpi_status status = AE_OK;
-
+	unsigned long long tmp;
 
 	if (!tz)
 		return -EINVAL;
 
-	status =
-	    acpi_evaluate_integer(tz->device->handle, "_TZP", NULL,
-				  &tz->polling_frequency);
+	status = acpi_evaluate_integer(tz->device->handle, "_TZP", NULL, &tmp);
 	if (ACPI_FAILURE(status))
 		return -ENODEV;
 
+	tz->polling_frequency = tmp;
 	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Polling frequency is %lu dS\n",
 			  tz->polling_frequency));
 
@@ -356,6 +355,7 @@ do {	\
 static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
 {
 	acpi_status status = AE_OK;
+	unsigned long long tmp;
 	struct acpi_handle_list devices;
 	int valid = 0;
 	int i;
@@ -363,7 +363,8 @@ static int acpi_thermal_trips_update(str
 	/* Critical Shutdown (required) */
 	if (flag & ACPI_TRIPS_CRITICAL) {
 		status = acpi_evaluate_integer(tz->device->handle,
-				"_CRT", NULL, &tz->trips.critical.temperature);
+				"_CRT", NULL, &tmp);
+		tz->trips.critical.temperature = tmp;
 		/*
 		 * Treat freezing temperatures as invalid as well; some
 		 * BIOSes return really low values and cause reboots at startup.
@@ -399,12 +400,13 @@ static int acpi_thermal_trips_update(str
 	/* Critical Sleep (optional) */
 	if (flag & ACPI_TRIPS_HOT) {
 		status = acpi_evaluate_integer(tz->device->handle,
-				"_HOT", NULL, &tz->trips.hot.temperature);
+				"_HOT", NULL, &tmp);
 		if (ACPI_FAILURE(status)) {
 			tz->trips.hot.flags.valid = 0;
 			ACPI_DEBUG_PRINT((ACPI_DB_INFO,
 					"No hot threshold\n"));
 		} else {
+			tz->trips.hot.temperature = tmp;
 			tz->trips.hot.flags.valid = 1;
 			ACPI_DEBUG_PRINT((ACPI_DB_INFO,
 					"Found hot threshold [%lu]\n",
@@ -418,33 +420,40 @@ static int acpi_thermal_trips_update(str
 		if (psv == -1) {
 			status = AE_SUPPORT;
 		} else if (psv > 0) {
-			tz->trips.passive.temperature = CELSIUS_TO_KELVIN(psv);
+			tmp = CELSIUS_TO_KELVIN(psv);
 			status = AE_OK;
 		} else {
 			status = acpi_evaluate_integer(tz->device->handle,
-				"_PSV", NULL, &tz->trips.passive.temperature);
+				"_PSV", NULL, &tmp);
 		}
 
 		if (ACPI_FAILURE(status))
 			tz->trips.passive.flags.valid = 0;
 		else {
+			tz->trips.passive.temperature = tmp;
 			tz->trips.passive.flags.valid = 1;
 			if (flag == ACPI_TRIPS_INIT) {
 				status = acpi_evaluate_integer(
 						tz->device->handle, "_TC1",
-						NULL, &tz->trips.passive.tc1);
+						NULL, &tmp);
 				if (ACPI_FAILURE(status))
 					tz->trips.passive.flags.valid = 0;
+				else
+					tz->trips.passive.tc1 = tmp;
 				status = acpi_evaluate_integer(
 						tz->device->handle, "_TC2",
-						NULL, &tz->trips.passive.tc2);
+						NULL, &tmp);
 				if (ACPI_FAILURE(status))
 					tz->trips.passive.flags.valid = 0;
+				else
+					tz->trips.passive.tc2 = tmp;
 				status = acpi_evaluate_integer(
 						tz->device->handle, "_TSP",
-						NULL, &tz->trips.passive.tsp);
+						NULL, &tmp);
 				if (ACPI_FAILURE(status))
 					tz->trips.passive.flags.valid = 0;
+				else
+					tz->trips.passive.tsp = tmp;
 			}
 		}
 	}
@@ -479,7 +488,7 @@ static int acpi_thermal_trips_update(str
 
 		if (flag & ACPI_TRIPS_ACTIVE) {
 			status = acpi_evaluate_integer(tz->device->handle,
-				name, NULL, &tz->trips.active[i].temperature);
+							name, NULL, &tmp);
 			if (ACPI_FAILURE(status)) {
 				tz->trips.active[i].flags.valid = 0;
 				if (i == 0)
@@ -500,8 +509,10 @@ static int acpi_thermal_trips_update(str
 						tz->trips.active[i - 2].temperature :
 						CELSIUS_TO_KELVIN(act));
 				break;
-			} else
+			} else {
+				tz->trips.active[i].temperature = tmp;
 				tz->trips.active[i].flags.valid = 1;
+			}
 		}
 
 		name[2] = 'L';
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -256,7 +256,7 @@ EXPORT_SYMBOL(acpi_extract_package);
 acpi_status
 acpi_evaluate_integer(acpi_handle handle,
 		      acpi_string pathname,
-		      struct acpi_object_list *arguments, unsigned long *data)
+		      struct acpi_object_list *arguments, unsigned long long *data)
 {
 	acpi_status status = AE_OK;
 	union acpi_object *element;
@@ -288,7 +288,7 @@ acpi_evaluate_integer(acpi_handle handle
 	*data = element->integer.value;
 	kfree(element);
 
-	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Return value [%lu]\n", *data));
+	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Return value [%llu]\n", *data));
 
 	return AE_OK;
 }
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -291,20 +291,20 @@ static int acpi_video_device_lcd_set_lev
 			int level);
 static int acpi_video_device_lcd_get_level_current(
 			struct acpi_video_device *device,
-			unsigned long *level);
+			unsigned long long *level);
 static int acpi_video_get_next_level(struct acpi_video_device *device,
 				     u32 level_current, u32 event);
 static void acpi_video_switch_brightness(struct acpi_video_device *device,
 					 int event);
 static int acpi_video_device_get_state(struct acpi_video_device *device,
-			    unsigned long *state);
+			    unsigned long long *state);
 static int acpi_video_output_get(struct output_device *od);
 static int acpi_video_device_set_state(struct acpi_video_device *device, int state);
 
 /*backlight device sysfs support*/
 static int acpi_video_get_brightness(struct backlight_device *bd)
 {
-	unsigned long cur_level;
+	unsigned long long cur_level;
 	int i;
 	struct acpi_video_device *vd =
 		(struct acpi_video_device *)bl_get_data(bd);
@@ -336,7 +336,7 @@ static struct backlight_ops acpi_backlig
 /*video output device sysfs support*/
 static int acpi_video_output_get(struct output_device *od)
 {
-	unsigned long state;
+	unsigned long long state;
 	struct acpi_video_device *vd =
 		(struct acpi_video_device *)dev_get_drvdata(&od->dev);
 	acpi_video_device_get_state(vd, &state);
@@ -370,7 +370,7 @@ static int video_get_cur_state(struct th
 {
 	struct acpi_device *device = cdev->devdata;
 	struct acpi_video_device *video = acpi_driver_data(device);
-	unsigned long level;
+	unsigned long long level;
 	int state;
 
 	acpi_video_device_lcd_get_level_current(video, &level);
@@ -410,7 +410,7 @@ static struct thermal_cooling_device_ops
 /* device */
 
 static int
-acpi_video_device_query(struct acpi_video_device *device, unsigned long *state)
+acpi_video_device_query(struct acpi_video_device *device, unsigned long long *state)
 {
 	int status;
 
@@ -421,7 +421,7 @@ acpi_video_device_query(struct acpi_vide
 
 static int
 acpi_video_device_get_state(struct acpi_video_device *device,
-			    unsigned long *state)
+			    unsigned long long *state)
 {
 	int status;
 
@@ -436,7 +436,7 @@ acpi_video_device_set_state(struct acpi_
 	int status;
 	union acpi_object arg0 = { ACPI_TYPE_INTEGER };
 	struct acpi_object_list args = { 1, &arg0 };
-	unsigned long ret;
+	unsigned long long ret;
 
 
 	arg0.integer.value = state;
@@ -495,7 +495,7 @@ acpi_video_device_lcd_set_level(struct a
 
 static int
 acpi_video_device_lcd_get_level_current(struct acpi_video_device *device,
-					unsigned long *level)
+					unsigned long long *level)
 {
 	if (device->cap._BQC)
 		return acpi_evaluate_integer(device->dev->handle, "_BQC", NULL,
@@ -549,7 +549,7 @@ static int
 acpi_video_bus_set_POST(struct acpi_video_bus *video, unsigned long option)
 {
 	int status;
-	unsigned long tmp;
+	unsigned long long tmp;
 	union acpi_object arg0 = { ACPI_TYPE_INTEGER };
 	struct acpi_object_list args = { 1, &arg0 };
 
@@ -564,7 +564,7 @@ acpi_video_bus_set_POST(struct acpi_vide
 }
 
 static int
-acpi_video_bus_get_POST(struct acpi_video_bus *video, unsigned long *id)
+acpi_video_bus_get_POST(struct acpi_video_bus *video, unsigned long long *id)
 {
 	int status;
 
@@ -575,7 +575,7 @@ acpi_video_bus_get_POST(struct acpi_vide
 
 static int
 acpi_video_bus_POST_options(struct acpi_video_bus *video,
-			    unsigned long *options)
+			    unsigned long long *options)
 {
 	int status;
 
@@ -918,7 +918,7 @@ static int acpi_video_device_state_seq_s
 {
 	int status;
 	struct acpi_video_device *dev = seq->private;
-	unsigned long state;
+	unsigned long long state;
 
 
 	if (!dev)
@@ -927,14 +927,14 @@ static int acpi_video_device_state_seq_s
 	status = acpi_video_device_get_state(dev, &state);
 	seq_printf(seq, "state:     ");
 	if (ACPI_SUCCESS(status))
-		seq_printf(seq, "0x%02lx\n", state);
+		seq_printf(seq, "0x%02llx\n", state);
 	else
 		seq_printf(seq, "<not supported>\n");
 
 	status = acpi_video_device_query(dev, &state);
 	seq_printf(seq, "query:     ");
 	if (ACPI_SUCCESS(status))
-		seq_printf(seq, "0x%02lx\n", state);
+		seq_printf(seq, "0x%02llx\n", state);
 	else
 		seq_printf(seq, "<not supported>\n");
 
@@ -1217,7 +1217,7 @@ static int acpi_video_bus_ROM_open_fs(st
 static int acpi_video_bus_POST_info_seq_show(struct seq_file *seq, void *offset)
 {
 	struct acpi_video_bus *video = seq->private;
-	unsigned long options;
+	unsigned long long options;
 	int status;
 
 
@@ -1232,7 +1232,7 @@ static int acpi_video_bus_POST_info_seq_
 			printk(KERN_WARNING PREFIX
 			       "This indicates a BIOS bug. Please contact the manufacturer.\n");
 		}
-		printk("%lx\n", options);
+		printk("%llx\n", options);
 		seq_printf(seq, "can POST: <integrated video>");
 		if (options & 2)
 			seq_printf(seq, " <PCI video>");
@@ -1256,7 +1256,7 @@ static int acpi_video_bus_POST_seq_show(
 {
 	struct acpi_video_bus *video = seq->private;
 	int status;
-	unsigned long id;
+	unsigned long long id;
 
 
 	if (!video)
@@ -1303,7 +1303,7 @@ acpi_video_bus_write_POST(struct file *f
 	struct seq_file *m = file->private_data;
 	struct acpi_video_bus *video = m->private;
 	char str[12] = { 0 };
-	unsigned long opt, options;
+	unsigned long long opt, options;
 
 
 	if (!video || count + 1 > sizeof str)
@@ -1473,7 +1473,7 @@ static int
 acpi_video_bus_get_one_device(struct acpi_device *device,
 			      struct acpi_video_bus *video)
 {
-	unsigned long device_id;
+	unsigned long long device_id;
 	int status;
 	struct acpi_video_device *data;
 	struct acpi_video_device_attrib* attribute;
@@ -1724,7 +1724,7 @@ acpi_video_get_next_level(struct acpi_vi
 static void
 acpi_video_switch_brightness(struct acpi_video_device *device, int event)
 {
-	unsigned long level_current, level_next;
+	unsigned long long level_current, level_next;
 	if (!device->brightness)
 		return;
 	acpi_video_device_lcd_get_level_current(device, &level_current);
--- a/drivers/ata/libata-acpi.c
+++ b/drivers/ata/libata-acpi.c
@@ -180,7 +180,7 @@ static void ata_acpi_handle_hotplug(stru
 	int wait = 0;
 	unsigned long flags;
 	acpi_handle handle, tmphandle;
-	unsigned long sta;
+	unsigned long long sta;
 	acpi_status status;
 
 	if (dev) {
--- a/drivers/misc/asus-laptop.c
+++ b/drivers/misc/asus-laptop.c
@@ -280,7 +280,7 @@ static int write_acpi_int(acpi_handle ha
 
 static int read_wireless_status(int mask)
 {
-	ulong status;
+	unsigned long long status;
 	acpi_status rv = AE_OK;
 
 	if (!wireless_status_handle)
@@ -297,7 +297,7 @@ static int read_wireless_status(int mask
 
 static int read_gps_status(void)
 {
-	ulong status;
+	unsigned long long status;
 	acpi_status rv = AE_OK;
 
 	rv = acpi_evaluate_integer(gps_status_handle, NULL, NULL, &status);
@@ -404,7 +404,7 @@ static void lcd_blank(int blank)
 
 static int read_brightness(struct backlight_device *bd)
 {
-	ulong value;
+	unsigned long long value;
 	acpi_status rv = AE_OK;
 
 	rv = acpi_evaluate_integer(brightness_get_handle, NULL, NULL, &value);
@@ -455,7 +455,7 @@ static ssize_t show_infos(struct device 
 			  struct device_attribute *attr, char *page)
 {
 	int len = 0;
-	ulong temp;
+	unsigned long long temp;
 	char buf[16];		//enough for all info
 	acpi_status rv = AE_OK;
 
@@ -603,7 +603,7 @@ static void set_display(int value)
 
 static int read_display(void)
 {
-	ulong value = 0;
+	unsigned long long value = 0;
 	acpi_status rv = AE_OK;
 
 	/* In most of the case, we know how to set the display, but sometime
@@ -849,7 +849,7 @@ static int asus_hotk_get_info(void)
 {
 	struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
 	union acpi_object *model = NULL;
-	ulong bsts_result, hwrs_result;
+	unsigned long long bsts_result, hwrs_result;
 	char *string = NULL;
 	acpi_status status;
 
--- a/drivers/misc/eeepc-laptop.c
+++ b/drivers/misc/eeepc-laptop.c
@@ -204,7 +204,7 @@ static int write_acpi_int(acpi_handle ha
 static int read_acpi_int(acpi_handle handle, const char *method, int *val)
 {
 	acpi_status status;
-	ulong result;
+	unsigned long long result;
 
 	status = acpi_evaluate_integer(handle, (char *)method, NULL, &result);
 	if (ACPI_FAILURE(status)) {
--- a/drivers/misc/fujitsu-laptop.c
+++ b/drivers/misc/fujitsu-laptop.c
@@ -224,7 +224,7 @@ static int set_lcd_level_alt(int level)
 
 static int get_lcd_level(void)
 {
-	unsigned long state = 0;
+	unsigned long long state = 0;
 	acpi_status status = AE_OK;
 
 	vdbg_printk(FUJLAPTOP_DBG_TRACE, "get lcd level via GBLL\n");
@@ -246,7 +246,7 @@ static int get_lcd_level(void)
 
 static int get_max_brightness(void)
 {
-	unsigned long state = 0;
+	unsigned long long state = 0;
 	acpi_status status = AE_OK;
 
 	vdbg_printk(FUJLAPTOP_DBG_TRACE, "get max lcd level via RBLL\n");
@@ -263,7 +263,7 @@ static int get_max_brightness(void)
 
 static int get_lcd_level_alt(void)
 {
-	unsigned long state = 0;
+	unsigned long long state = 0;
 	acpi_status status = AE_OK;
 
 	vdbg_printk(FUJLAPTOP_DBG_TRACE, "get lcd level via GBLS\n");
@@ -384,7 +384,7 @@ static ssize_t store_lcd_level(struct de
 
 static int get_irb(void)
 {
-	unsigned long state = 0;
+	unsigned long long state = 0;
 	acpi_status status = AE_OK;
 
 	vdbg_printk(FUJLAPTOP_DBG_TRACE, "Get irb\n");
--- a/drivers/misc/intel_menlow.c
+++ b/drivers/misc/intel_menlow.c
@@ -57,7 +57,7 @@ static int memory_get_int_max_bandwidth(
 {
 	struct acpi_device *device = cdev->devdata;
 	acpi_handle handle = device->handle;
-	unsigned long value;
+	unsigned long long value;
 	struct acpi_object_list arg_list;
 	union acpi_object arg;
 	acpi_status status = AE_OK;
@@ -90,7 +90,7 @@ static int memory_get_cur_bandwidth(stru
 {
 	struct acpi_device *device = cdev->devdata;
 	acpi_handle handle = device->handle;
-	unsigned long value;
+	unsigned long long value;
 	struct acpi_object_list arg_list;
 	union acpi_object arg;
 	acpi_status status = AE_OK;
@@ -115,7 +115,7 @@ static int memory_set_cur_bandwidth(stru
 	struct acpi_object_list arg_list;
 	union acpi_object arg;
 	acpi_status status;
-	int temp;
+	unsigned long long temp;
 	unsigned long max_state;
 
 	if (memory_get_int_max_bandwidth(cdev, &max_state))
@@ -131,7 +131,7 @@ static int memory_set_cur_bandwidth(stru
 
 	status =
 	    acpi_evaluate_integer(handle, MEMORY_SET_BANDWIDTH, &arg_list,
-				  (unsigned long *)&temp);
+				  &temp);
 
 	printk(KERN_INFO
 	       "Bandwidth value was %d: status is %d\n", state, status);
@@ -252,7 +252,8 @@ static DEFINE_MUTEX(intel_menlow_attr_lo
  * @auxtype : AUX0/AUX1
  * @buf: syfs buffer
  */
-static int sensor_get_auxtrip(acpi_handle handle, int index, int *value)
+static int sensor_get_auxtrip(acpi_handle handle, int index,
+							unsigned long long *value)
 {
 	acpi_status status;
 
@@ -260,7 +261,7 @@ static int sensor_get_auxtrip(acpi_handl
 		return -EINVAL;
 
 	status = acpi_evaluate_integer(handle, index ? GET_AUX1 : GET_AUX0,
-				       NULL, (unsigned long *)value);
+				       NULL, value);
 	if (ACPI_FAILURE(status))
 		return -EIO;
 
@@ -282,13 +283,13 @@ static int sensor_set_auxtrip(acpi_handl
 	struct acpi_object_list args = {
 		1, &arg
 	};
-	int temp;
+	unsigned long long temp;
 
 	if (index != 0 && index != 1)
 		return -EINVAL;
 
 	status = acpi_evaluate_integer(handle, index ? GET_AUX0 : GET_AUX1,
-				       NULL, (unsigned long *)&temp);
+				       NULL, &temp);
 	if (ACPI_FAILURE(status))
 		return -EIO;
 	if ((index && value < temp) || (!index && value > temp))
@@ -296,7 +297,7 @@ static int sensor_set_auxtrip(acpi_handl
 
 	arg.integer.value = value;
 	status = acpi_evaluate_integer(handle, index ? SET_AUX1 : SET_AUX0,
-				       &args, (unsigned long *)&temp);
+				       &args, &temp);
 	if (ACPI_FAILURE(status))
 		return -EIO;
 
@@ -312,7 +313,7 @@ static ssize_t aux0_show(struct device *
 			 struct device_attribute *dev_attr, char *buf)
 {
 	struct intel_menlow_attribute *attr = to_intel_menlow_attr(dev_attr);
-	int value;
+	unsigned long long value;
 	int result;
 
 	result = sensor_get_auxtrip(attr->handle, 0, &value);
@@ -324,7 +325,7 @@ static ssize_t aux1_show(struct device *
 			 struct device_attribute *dev_attr, char *buf)
 {
 	struct intel_menlow_attribute *attr = to_intel_menlow_attr(dev_attr);
-	int value;
+	unsigned long long value;
 	int result;
 
 	result = sensor_get_auxtrip(attr->handle, 1, &value);
@@ -376,7 +377,7 @@ static ssize_t bios_enabled_show(struct 
 				 struct device_attribute *attr, char *buf)
 {
 	acpi_status status;
-	unsigned long bios_enabled;
+	unsigned long long bios_enabled;
 
 	status = acpi_evaluate_integer(NULL, BIOS_ENABLED, NULL, &bios_enabled);
 	if (ACPI_FAILURE(status))
@@ -492,7 +493,7 @@ static int __init intel_menlow_module_in
 {
 	int result = -ENODEV;
 	acpi_status status;
-	unsigned long enable;
+	unsigned long long enable;
 
 	if (acpi_disabled)
 		return result;
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -180,7 +180,7 @@ register_slot(acpi_handle handle, u32 lv
 	struct acpiphp_func *newfunc;
 	acpi_handle tmp;
 	acpi_status status = AE_OK;
-	unsigned long adr, sun;
+	unsigned long long adr, sun;
 	int device, function, retval;
 
 	status = acpi_evaluate_integer(handle, "_ADR", NULL, &adr);
@@ -528,7 +528,7 @@ find_p2p_bridge(acpi_handle handle, u32 
 {
 	acpi_status status;
 	acpi_handle dummy_handle;
-	unsigned long tmp;
+	unsigned long long tmp;
 	int device, function;
 	struct pci_dev *dev;
 	struct pci_bus *pci_bus = context;
@@ -573,7 +573,7 @@ find_p2p_bridge(acpi_handle handle, u32 
 static int add_bridge(acpi_handle handle)
 {
 	acpi_status status;
-	unsigned long tmp;
+	unsigned long long tmp;
 	int seg, bus;
 	acpi_handle dummy_handle;
 	struct pci_bus *pci_bus;
@@ -767,7 +767,7 @@ static int get_gsi_base(acpi_handle hand
 {
 	acpi_status status;
 	int result = -1;
-	unsigned long gsb;
+	unsigned long long gsb;
 	struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
 	union acpi_object *obj;
 	void *table;
@@ -808,7 +808,7 @@ static acpi_status
 ioapic_add(acpi_handle handle, u32 lvl, void *context, void **rv)
 {
 	acpi_status status;
-	unsigned long sta;
+	unsigned long long sta;
 	acpi_handle tmp;
 	struct pci_dev *pdev;
 	u32 gsi_base;
@@ -872,7 +872,7 @@ static acpi_status
 ioapic_remove(acpi_handle handle, u32 lvl, void *context, void **rv)
 {
 	acpi_status status;
-	unsigned long sta;
+	unsigned long long sta;
 	acpi_handle tmp;
 	u32 gsi_base;
 	struct acpiphp_ioapic *pos, *n, *ioapic = NULL;
@@ -1264,7 +1264,7 @@ static int disable_device(struct acpiphp
 static unsigned int get_slot_status(struct acpiphp_slot *slot)
 {
 	acpi_status status;
-	unsigned long sta = 0;
+	unsigned long long sta = 0;
 	u32 dvid;
 	struct list_head *l;
 	struct acpiphp_func *func;
--- a/drivers/pci/hotplug/acpiphp_ibm.c
+++ b/drivers/pci/hotplug/acpiphp_ibm.c
@@ -183,7 +183,7 @@ static int ibm_set_attention_status(stru
 	union acpi_object args[2]; 
 	struct acpi_object_list params = { .pointer = args, .count = 2 };
 	acpi_status stat; 
-	unsigned long rc;
+	unsigned long long rc;
 	union apci_descriptor *ibm_slot;
 
 	ibm_slot = ibm_slot_from_id(hpslot_to_sun(slot));
--- a/drivers/pci/hotplug/sgi_hotplug.c
+++ b/drivers/pci/hotplug/sgi_hotplug.c
@@ -413,7 +413,7 @@ static int enable_slot(struct hotplug_sl
 	/*
 	 * Add the slot's devices to the ACPI infrastructure */
 	if (SN_ACPI_BASE_SUPPORT() && ssdt) {
-		unsigned long adr;
+		unsigned long long adr;
 		struct acpi_device *pdevice;
 		struct acpi_device *device;
 		acpi_handle phandle;
@@ -505,7 +505,7 @@ static int disable_slot(struct hotplug_s
 	/* free the ACPI resources for the slot */
 	if (SN_ACPI_BASE_SUPPORT() &&
             PCI_CONTROLLER(slot->pci_bus)->acpi_handle) {
-		unsigned long adr;
+		unsigned long long adr;
 		struct acpi_device *device;
 		acpi_handle phandle;
 		acpi_handle chandle = NULL;
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -46,7 +46,7 @@ acpi_extract_package(union acpi_object *
 acpi_status
 acpi_evaluate_integer(acpi_handle handle,
 		      acpi_string pathname,
-		      struct acpi_object_list *arguments, unsigned long *data);
+		      struct acpi_object_list *arguments, unsigned long long *data);
 acpi_status
 acpi_evaluate_reference(acpi_handle handle,
 			acpi_string pathname,


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 29/41] ACPI: Fix compiler warnings introduced by 32 to 64 bit acpi conversions
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (27 preceding siblings ...)
  2009-02-04 18:46   ` [patch 28/41] ACPI: Change acpi_evaluate_integer to support 64-bit on 32-bit kernels Greg KH
@ 2009-02-04 18:46   ` Greg KH
  2009-02-04 18:46   ` [patch 30/41] ACPI EC: Fix regression due to use of uninitialized variable Greg KH
                     ` (11 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:46 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Thomas Renninger, Matthew Wilcox, Len Brown

[-- Attachment #1: acpi-fix-compiler-warnings-introduced-by-32-to-64-bit-acpi-conversions.patch --]
[-- Type: text/plain, Size: 1250 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Thomas Renninger <trenn@suse.de>

commit: 27663c5855b10af9ec67bc7dfba001426ba21222 forgot to convert things at
two prints.

Cc: Matthew Wilcox <willy@linux.intel.com>
Cc: Len Brown <len.brown@intel.com>
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/misc/intel_menlow.c       |    2 +-
 drivers/pci/hotplug/acpiphp_ibm.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/misc/intel_menlow.c
+++ b/drivers/misc/intel_menlow.c
@@ -104,7 +104,7 @@ static int memory_get_cur_bandwidth(stru
 	if (ACPI_FAILURE(status))
 		return -EFAULT;
 
-	return sprintf(buf, "%ld\n", value);
+	return sprintf(buf, "%lld\n", value);
 }
 
 static int memory_set_cur_bandwidth(struct thermal_cooling_device *cdev,
--- a/drivers/pci/hotplug/acpiphp_ibm.c
+++ b/drivers/pci/hotplug/acpiphp_ibm.c
@@ -204,7 +204,7 @@ static int ibm_set_attention_status(stru
 		err("APLS evaluation failed:  0x%08x\n", stat);
 		return -ENODEV;
 	} else if (!rc) {
-		err("APLS method failed:  0x%08lx\n", rc);
+		err("APLS method failed:  0x%08llx\n", rc);
 		return -ERANGE;
 	}
 	return 0;


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 30/41] ACPI EC: Fix regression due to use of uninitialized variable
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (28 preceding siblings ...)
  2009-02-04 18:46   ` [patch 29/41] ACPI: Fix compiler warnings introduced by 32 to 64 bit acpi conversions Greg KH
@ 2009-02-04 18:46   ` Greg KH
  2009-02-05  8:08     ` Thomas Renninger
  2009-02-04 18:46   ` [patch 31/41] ACPICA: Fix wrong resource descriptor length for 64-bit build Greg KH
                     ` (10 subsequent siblings)
  40 siblings, 1 reply; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:46 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Alexey Starikovskiy, Len Brown, Thomas Renninger

[-- Attachment #1: acpi-ec-fix-regression-due-to-use-of-uninitialized-variable.patch --]
[-- Type: text/plain, Size: 1517 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Alexey Starikovskiy <astarikovskiy@suse.de>

commit d21cf3c16b1191f3154a51e0b20c82bf851cc553 upstream.

breakage introduced by following patch
commit 27663c5855b10af9ec67bc7dfba001426ba21222
Author: Matthew Wilcox <willy@linux.intel.com>
Date:   Fri Oct 10 02:22:59 2008 -0400

acpi_evaluate_integer() does not clear passed variable if
there is an error at evaluation.
So if we ignore error, we must supply initialized variable.

http://bugzilla.kernel.org/show_bug.cgi?id=11917

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Tested-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/acpi/ec.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -769,7 +769,7 @@ static acpi_status
 ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
 {
 	acpi_status status;
-	unsigned long long tmp;
+	unsigned long long tmp = 0;
 
 	struct acpi_ec *ec = context;
 	status = acpi_walk_resources(handle, METHOD_NAME__CRS,
@@ -784,6 +784,7 @@ ec_parse_device(acpi_handle handle, u32 
 		return status;
 	ec->gpe = tmp;
 	/* Use the global lock for all EC transactions? */
+	tmp = 0;
 	acpi_evaluate_integer(handle, "_GLK", NULL, &tmp);
 	ec->global_lock = tmp;
 	ec->handle = handle;


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 31/41] ACPICA: Fix wrong resource descriptor length for 64-bit build
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (29 preceding siblings ...)
  2009-02-04 18:46   ` [patch 30/41] ACPI EC: Fix regression due to use of uninitialized variable Greg KH
@ 2009-02-04 18:46   ` Greg KH
  2009-02-04 18:46   ` [patch 32/41] asus-laptop: Add support for P30/P35 Greg KH
                     ` (9 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:46 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Bob Moore, Lin Ming, Andi Kleen, Len Brown,
	Thomas Renninger

[-- Attachment #1: acpica-fix-wrong-resource-descriptor-length-for-64-bit-build.patch --]
[-- Type: text/plain, Size: 1312 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Bob Moore <robert.moore@intel.com>

commit 9db4fcd99f7ef886ded97cd26a8642c70fbe34df upstream.

The "minimal" descriptors such as EndTag are calculated as 12
bytes long, but the actual length in the internal descriptor is
16 because of the round-up to 8 on 64-bit build.

http://www.acpica.org/bugzilla/show_bug.cgi?id=728

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 include/acpi/actypes.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -1225,8 +1225,8 @@ struct acpi_resource {
 
 #pragma pack()
 
-#define ACPI_RS_SIZE_MIN                    12
 #define ACPI_RS_SIZE_NO_DATA                8	/* Id + Length fields */
+#define ACPI_RS_SIZE_MIN                    (u32) ACPI_ROUND_UP_TO_NATIVE_WORD (12)
 #define ACPI_RS_SIZE(type)                  (u32) (ACPI_RS_SIZE_NO_DATA + sizeof (type))
 
 #define ACPI_NEXT_RESOURCE(res)             (struct acpi_resource *)((u8 *) res + res->length)


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 32/41] asus-laptop: Add support for P30/P35
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (30 preceding siblings ...)
  2009-02-04 18:46   ` [patch 31/41] ACPICA: Fix wrong resource descriptor length for 64-bit build Greg KH
@ 2009-02-04 18:46   ` Greg KH
  2009-02-04 18:46   ` [patch 33/41] asus-laptop: Fix the led behavior with value > 1 Greg KH
                     ` (8 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:46 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Corentin Chary, Len Brown, Thomas Renninger

[-- Attachment #1: asus-laptop-add-support-for-p30-p35.patch --]
[-- Type: text/plain, Size: 949 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Torsten Krah <tkrah@fachschaft.imn.htwk-leipzig.de>

commit 4d0b856ef7eea5c03f4c1fa57793286ac068f4cd upstream.

Add support for P30/P35.

http://bugzilla.kernel.org/show_bug.cgi?id=10848

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/misc/asus-laptop.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/misc/asus-laptop.c
+++ b/drivers/misc/asus-laptop.c
@@ -139,6 +139,7 @@ ASUS_HANDLE(lcd_switch, "\\_SB.PCI0.SBRG
 	    "\\_SB.PCI0.PX40.ECD0._Q10",	/* L3C */
 	    "\\_SB.PCI0.PX40.EC0.Q10",	/* M1A */
 	    "\\_SB.PCI0.LPCB.EC0._Q10",	/* P30 */
+	    "\\_SB.PCI0.LPCB.EC0._Q0E", /* P30/P35 */
 	    "\\_SB.PCI0.PX40.Q10",	/* S1x */
 	    "\\Q10");		/* A2x, L2D, L3D, M2E */
 


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 33/41] asus-laptop: Fix the led behavior with value > 1
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (31 preceding siblings ...)
  2009-02-04 18:46   ` [patch 32/41] asus-laptop: Add support for P30/P35 Greg KH
@ 2009-02-04 18:46   ` Greg KH
  2009-02-10 20:24     ` Pavel Machek
  2009-02-04 18:46   ` [patch 34/41] video: always update the brightness when poking "brightness" Greg KH
                     ` (7 subsequent siblings)
  40 siblings, 1 reply; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:46 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Corentin Chary, Len Brown, Thomas Renninger

[-- Attachment #1: asus-laptop-fix-the-led-behavior-with-value-1.patch --]
[-- Type: text/plain, Size: 996 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Corentin Chary <corentincj@iksaif.net>

commit e3deda9c87ac5eef2b5d18cd0b5511370979ca26 upstream.

Fix http://bugzilla.kernel.org/show_bug.cgi?id=11613 .

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/misc/asus-laptop.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/misc/asus-laptop.c
+++ b/drivers/misc/asus-laptop.c
@@ -351,7 +351,7 @@ static void write_status(acpi_handle han
 	static void object##_led_set(struct led_classdev *led_cdev,	\
 				     enum led_brightness value)		\
 	{								\
-		object##_led_wk = value;				\
+		object##_led_wk = (value > 0) ? 1 : 0;			\
 		queue_work(led_workqueue, &object##_led_work);		\
 	}								\
 	static void object##_led_update(struct work_struct *ignored)	\


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 34/41] video: always update the brightness when poking "brightness"
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (32 preceding siblings ...)
  2009-02-04 18:46   ` [patch 33/41] asus-laptop: Fix the led behavior with value > 1 Greg KH
@ 2009-02-04 18:46   ` Greg KH
  2009-02-04 18:46   ` [patch 35/41] dont load asus-acpi if model is not supported Greg KH
                     ` (6 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:46 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Matthew Garrett, Len Brown, Thomas Renninger

[-- Attachment #1: video-always-update-the-brightness-when-poking-brightness.patch --]
[-- Type: text/plain, Size: 1257 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Zhang Rui <rui.zhang@intel.com>

commit 9e6dada9d255497127251c03aaa59296d186f959 upstream.

always update props.brightness no matter the backlight is changed
via procfs, hotkeys or sysfs.

Sighed-off-by: Zhang Rui <rui.zhang@intel.com>
Acked-by: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/acpi/video.c |    5 +++++
 1 file changed, 5 insertions(+)

--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -482,6 +482,7 @@ acpi_video_device_lcd_set_level(struct a
 	int status = AE_OK;
 	union acpi_object arg0 = { ACPI_TYPE_INTEGER };
 	struct acpi_object_list args = { 1, &arg0 };
+	int state;
 
 
 	arg0.integer.value = level;
@@ -490,6 +491,10 @@ acpi_video_device_lcd_set_level(struct a
 		status = acpi_evaluate_object(device->dev->handle, "_BCM",
 					      &args, NULL);
 	device->brightness->curr = level;
+	for (state = 2; state < device->brightness->count; state++)
+		if (level == device->brightness->levels[state])
+			device->backlight->props.brightness = state - 2;
+
 	return status;
 }
 


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 35/41] dont load asus-acpi if model is not supported
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (33 preceding siblings ...)
  2009-02-04 18:46   ` [patch 34/41] video: always update the brightness when poking "brightness" Greg KH
@ 2009-02-04 18:46   ` Greg KH
  2009-02-04 18:47   ` [patch 36/41] Newly inserted battery might differ from one just removed, so Greg KH
                     ` (5 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:46 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Zhang Rui, Len Brown, Thomas Renninger

[-- Attachment #1: don-t-load-asus-acpi-if-model-is-not-supported.patch --]
[-- Type: text/plain, Size: 924 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Zhang Rui <rui.zhang@intel.com>

commit 7745384080ef70f7710530afa3e45477b126e056 upstream.

asus_hotk_get_info should return -ENODEV if the model is not supported.
http://bugzilla.kernel.org/show_bug.cgi?id=10389

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/acpi/asus_acpi.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/acpi/asus_acpi.c
+++ b/drivers/acpi/asus_acpi.c
@@ -1244,6 +1244,8 @@ static int asus_hotk_get_info(void)
 			       "default values\n", string);
 			printk(KERN_NOTICE
 			       "  send /proc/acpi/dsdt to the developers\n");
+			kfree(model);
+			return -ENODEV;
 		}
 		hotk->methods = &model_conf[hotk->model];
 		return AE_OK;


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 36/41] Newly inserted battery might differ from one just removed, so
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (34 preceding siblings ...)
  2009-02-04 18:46   ` [patch 35/41] dont load asus-acpi if model is not supported Greg KH
@ 2009-02-04 18:47   ` Greg KH
  2009-02-04 18:47   ` [patch 37/41] ACPI: Do not modify SCI_EN directly Greg KH
                     ` (4 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:47 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Alexey Starikovskiy, Andy Neitzke, Len Brown,
	Thomas Renninger

[-- Attachment #1: newly-inserted-battery-might-differ-from-one-just-removed-so.patch --]
[-- Type: text/plain, Size: 1214 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Alexey Starikovskiy <astarikovskiy@suse.de>

commit 50b178512b7d6e7724f87459f6bd06504c9c2da1 upstream.

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Acked-by: Andy Neitzke <neitzke@ias.edu>

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/acpi/battery.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -472,7 +472,7 @@ static void sysfs_remove_battery(struct 
 
 static int acpi_battery_update(struct acpi_battery *battery)
 {
-	int result;
+	int result, old_present = acpi_battery_present(battery);
 	result = acpi_battery_get_status(battery);
 	if (result)
 		return result;
@@ -483,7 +483,8 @@ static int acpi_battery_update(struct ac
 		return 0;
 	}
 #endif
-	if (!battery->update_time) {
+	if (!battery->update_time ||
+	    old_present != acpi_battery_present(battery)) {
 		result = acpi_battery_get_info(battery);
 		if (result)
 			return result;


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 37/41] ACPI: Do not modify SCI_EN directly
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (35 preceding siblings ...)
  2009-02-04 18:47   ` [patch 36/41] Newly inserted battery might differ from one just removed, so Greg KH
@ 2009-02-04 18:47   ` Greg KH
  2009-02-04 18:47   ` [patch 38/41] ACPI suspend: Blacklist HP xw4600 Workstation for old code ordering Greg KH
                     ` (3 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:47 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Rafael J. Wysocki, Len Brown, Thomas Renninger

[-- Attachment #1: acpi-do-not-modify-sci_en-directly.patch --]
[-- Type: text/plain, Size: 1334 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Rafael J. Wysocki <rjw@sisk.pl>

commit 11e93130c7ce5228d484fd5e86f3984835d4256b upstream.

According to the ACPI specification the SCI_EN flag is controlled by
the hardware, which sets this flag to inform the kernel that ACPI is
enabled.  For this reason, we shouldn't try to modify SCI_EN
directly.  Also, we don't need to do it in irqrouter_resume(), since
lower-level resume code takes care of enabling ACPI in case it hasn't
been enabled by the BIOS before passing control to the kernel (which
by the way is against the ACPI specification).

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/acpi/pci_link.c |    4 ----
 1 file changed, 4 deletions(-)

--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -796,10 +796,6 @@ static int irqrouter_resume(struct sys_d
 	struct list_head *node = NULL;
 	struct acpi_pci_link *link = NULL;
 
-
-	/* Make sure SCI is enabled again (Apple firmware bug?) */
-	acpi_set_register(ACPI_BITREG_SCI_ENABLE, 1);
-
 	list_for_each(node, &acpi_link.entries) {
 		link = list_entry(node, struct acpi_pci_link, node);
 		if (!link) {


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 38/41] ACPI suspend: Blacklist HP xw4600 Workstation for old code ordering
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (36 preceding siblings ...)
  2009-02-04 18:47   ` [patch 37/41] ACPI: Do not modify SCI_EN directly Greg KH
@ 2009-02-04 18:47   ` Greg KH
  2009-02-04 18:47   ` [patch 39/41] dlm: initialize file_lock struct in GETLK before copying conflicting lock Greg KH
                     ` (2 subsequent siblings)
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:47 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Rafael J. Wysocki, Len Brown, Thomas Renninger

[-- Attachment #1: acpi-suspend-blacklist-hp-xw4600-workstation-for-old-code-ordering.patch --]
[-- Type: text/plain, Size: 1073 bytes --]


2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Rafael J. Wysocki <rjw@sisk.pl>

commit 4fb507b6b764195bb7821cf2baa988f6eb677d30

HP xw4600 Workstation is known to require the "old" (ie. compatible
with ACPI 1.0) suspend code ordering, so blacklist it for this
purpose.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Tested-by: John Brown <john.brown3@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/acpi/sleep/main.c |    8 ++++++++
 1 file changed, 8 insertions(+)

--- a/drivers/acpi/sleep/main.c
+++ b/drivers/acpi/sleep/main.c
@@ -344,6 +344,14 @@ static struct dmi_system_id __initdata a
 		DMI_MATCH(DMI_PRODUCT_NAME, "Macmini1,1"),
 		},
 	},
+	{
+	.callback = init_old_suspend_ordering,
+	.ident = "HP xw4600 Workstation",
+	.matches = {
+		DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
+		DMI_MATCH(DMI_PRODUCT_NAME, "HP xw4600 Workstation"),
+		},
+	},
 	{},
 };
 #endif /* CONFIG_SUSPEND */


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 39/41] dlm: initialize file_lock struct in GETLK before copying conflicting lock
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (37 preceding siblings ...)
  2009-02-04 18:47   ` [patch 38/41] ACPI suspend: Blacklist HP xw4600 Workstation for old code ordering Greg KH
@ 2009-02-04 18:47   ` Greg KH
  2009-02-04 18:47   ` [patch 40/41] sata_mv: Fix chip type for Hightpoint RocketRaid 1740/1742 Greg KH
  2009-02-04 18:47   ` [patch 41/41] ACPICA: Allow multiple backslash prefix in namepaths Greg KH
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:47 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Jeff Layton, David Teigland

[-- Attachment #1: dlm-initialize-file_lock-struct-in-getlk-before-copying-conflicting-lock.patch --]
[-- Type: text/plain, Size: 1309 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Jeff Layton <jlayton@redhat.com>

commit 20d5a39929232a715f29e6cb7e3f0d0c790f41eb upstream.

dlm_posix_get fills out the relevant fields in the file_lock before
returning when there is a lock conflict, but doesn't clean out any of
the other fields in the file_lock.

When nfsd does a NFSv4 lockt call, it sets the fl_lmops to
nfsd_posix_mng_ops before calling the lower fs. When the lock comes back
after testing a lock on GFS2, it still has that field set. This confuses
nfsd into thinking that the file_lock is a nfsd4 lock.

Fix this by making DLM reinitialize the file_lock before copying the
fields from the conflicting lock.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 fs/dlm/plock.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/fs/dlm/plock.c
+++ b/fs/dlm/plock.c
@@ -304,7 +304,9 @@ int dlm_posix_get(dlm_lockspace_t *locks
 	if (rv == -ENOENT)
 		rv = 0;
 	else if (rv > 0) {
+		locks_init_lock(fl);
 		fl->fl_type = (op->info.ex) ? F_WRLCK : F_RDLCK;
+		fl->fl_flags = FL_POSIX;
 		fl->fl_pid = op->info.pid;
 		fl->fl_start = op->info.start;
 		fl->fl_end = op->info.end;


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 40/41] sata_mv: Fix chip type for Hightpoint RocketRaid 1740/1742
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (38 preceding siblings ...)
  2009-02-04 18:47   ` [patch 39/41] dlm: initialize file_lock struct in GETLK before copying conflicting lock Greg KH
@ 2009-02-04 18:47   ` Greg KH
  2009-02-04 18:47   ` [patch 41/41] ACPICA: Allow multiple backslash prefix in namepaths Greg KH
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:47 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Mark Lord, Jeff Garzik

[-- Attachment #1: sata_mv-fix-chip-type-for-hightpoint-rocketraid-1740-1742.patch --]
[-- Type: text/plain, Size: 1218 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Mark Lord <liml@rtr.ca>

commit 4462254ac6be9150aae87d54d388fc348d6fcead upstream.

Fix chip type for the Highpoint RocketRAID 1740 and 1742 PCI cards.
These really do have Marvell 6042 chips on them, rather than the 5081 chip.

Confirmed by multiple (two) users (for the 1740), and by examining
the product photographs from Highpoint's web site.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/ata/sata_mv.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -669,8 +669,8 @@ static const struct pci_device_id mv_pci
 	{ PCI_VDEVICE(MARVELL, 0x5081), chip_508x },
 	/* RocketRAID 1720/174x have different identifiers */
 	{ PCI_VDEVICE(TTI, 0x1720), chip_6042 },
-	{ PCI_VDEVICE(TTI, 0x1740), chip_508x },
-	{ PCI_VDEVICE(TTI, 0x1742), chip_508x },
+	{ PCI_VDEVICE(TTI, 0x1740), chip_6042 },
+	{ PCI_VDEVICE(TTI, 0x1742), chip_6042 },
 
 	{ PCI_VDEVICE(MARVELL, 0x6040), chip_604x },
 	{ PCI_VDEVICE(MARVELL, 0x6041), chip_604x },


^ permalink raw reply	[flat|nested] 56+ messages in thread

* [patch 41/41] ACPICA: Allow multiple backslash prefix in namepaths
  2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
                     ` (39 preceding siblings ...)
  2009-02-04 18:47   ` [patch 40/41] sata_mv: Fix chip type for Hightpoint RocketRaid 1740/1742 Greg KH
@ 2009-02-04 18:47   ` Greg KH
  40 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-04 18:47 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, Lin Ming, Bob Moore, Len Brown, Thomas Renninger

[-- Attachment #1: acpica-allow-multiple-backslash-prefix-in-namepaths.patch --]
[-- Type: text/plain, Size: 1405 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Lin Ming <ming.m.lin@intel.com>

commit d037c5fd7367548191eab2b376a1d08c4ffaf7ff upstream.

In a fully qualified namepath, allow multiple backslash prefixes.
This can happen because of the use of a double-backslash in strings
(since backslash is the escape character) causing confusion.
ACPICA BZ 739 Lin Ming.

http://www.acpica.org/bugzilla/show_bug.cgi?id=739

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/acpi/namespace/nsutils.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

--- a/drivers/acpi/namespace/nsutils.c
+++ b/drivers/acpi/namespace/nsutils.c
@@ -314,9 +314,15 @@ void acpi_ns_get_internal_name_length(st
 	 *
 	 * strlen() + 1 covers the first name_seg, which has no path separator
 	 */
-	if (acpi_ns_valid_root_prefix(next_external_char[0])) {
+	if (acpi_ns_valid_root_prefix(*next_external_char)) {
 		info->fully_qualified = TRUE;
 		next_external_char++;
+
+		/* Skip redundant root_prefix, like \\_SB.PCI0.SBRG.EC0 */
+
+		while (acpi_ns_valid_root_prefix(*next_external_char)) {
+			next_external_char++;
+		}
 	} else {
 		/*
 		 * Handle Carat prefixes


^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [patch 07/41] fbdev/atyfb: Fix DSP config on some PowerMacs & PowerBooks
  2009-02-04 18:46   ` [patch 07/41] fbdev/atyfb: Fix DSP config on some PowerMacs & PowerBooks Greg KH
@ 2009-02-04 23:51     ` Benjamin Herrenschmidt
  2009-02-05  0:02       ` Greg KH
  2009-02-06 12:05       ` David Woodhouse
  0 siblings, 2 replies; 56+ messages in thread
From: Benjamin Herrenschmidt @ 2009-02-04 23:51 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-kernel, stable, Justin Forbes, Zwane Mwaikambo,
	Theodore Ts'o, Randy Dunlap, Dave Jones, Chuck Wolber,
	Chris Wedgwood, Michael Krufky, Chuck Ebbert, Domenico Andreoli,
	Willy Tarreau, Rodrigo Rubira Branco, Jake Edge, Eugene Teo,
	torvalds, akpm, alan, Risto Suominen

On Wed, 2009-02-04 at 10:46 -0800, Greg KH wrote:
> plain text document attachment
> (fbdev-atyfb-fix-dsp-config-on-some-powermacs-powerbooks.patch)
> 2.6.27-stable review patch.  If anyone has any objections, please let us know.

My only possible worry with that one is the first generation clamshell
iBook which uses a Mobility M1 chip, for which we haven't had anybody
testing whether this would break it or not ... 

So if anybody with such a machine is reading this, please holler...

Cheers,
Ben.

> ------------------
> 
> From: Risto Suominen <Risto.Suominen@gmail.com>
> 
> commit 7fbb7cadd062baf299fd8b26a80ea99da0c3fe01 upstream.
> 
> Since the complete re-write in 2.6.10, some PowerMacs (At least PowerMac 5500
> and PowerMac G3 Beige rev A) with ATI Mach64 chip have suffered from unstable
> columns in their framebuffer image. This seems to depend on a value (4) read
> from PLL_EXT_CNTL register, which leads to incorrect DSP config parameters to
> be written to the chip. This patch uses a value calculated by aty_init_pll_ct
> instead, as a starting point.
> 
> There are questions as to whether this should be extended to other platforms
> or maybe made dependent on specific chip types, but in the meantime, this has
> been tested on various powermacs and works for them so let's commit it.
> 
> Signed-off-by: Risto Suominen <Risto.Suominen@gmail.com>
> Tested-by: Michael Pettersson <mike@it.uu.se>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> 
> ---
>  drivers/video/aty/mach64_ct.c |   11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> --- a/drivers/video/aty/mach64_ct.c
> +++ b/drivers/video/aty/mach64_ct.c
> @@ -8,6 +8,9 @@
>  #include <asm/io.h>
>  #include <video/mach64.h>
>  #include "atyfb.h"
> +#ifdef CONFIG_PPC
> +#include <asm/machdep.h>
> +#endif
>  
>  #undef DEBUG
>  
> @@ -536,6 +539,14 @@ static int __devinit aty_init_pll_ct(con
>  	pll->ct.xclk_post_div_real = postdividers[xpost_div];
>  	pll->ct.mclk_fb_div = q * pll->ct.xclk_post_div_real / 8;
>  
> +#ifdef CONFIG_PPC
> +	if (machine_is(powermac)) {
> +		/* Override PLL_EXT_CNTL & 0x07. */
> +		pll->ct.xclk_post_div = xpost_div;
> +		pll->ct.xclk_ref_div = 1;
> +	}
> +#endif
> +
>  #ifdef DEBUG
>  	pllmclk = (1000000 * pll->ct.mclk_fb_mult * pll->ct.mclk_fb_div) /
>  			(par->ref_clk_per * pll->ct.pll_ref_div);
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [patch 07/41] fbdev/atyfb: Fix DSP config on some PowerMacs & PowerBooks
  2009-02-04 23:51     ` Benjamin Herrenschmidt
@ 2009-02-05  0:02       ` Greg KH
  2009-02-05  9:23         ` Benjamin Herrenschmidt
  2009-02-06 12:05       ` David Woodhouse
  1 sibling, 1 reply; 56+ messages in thread
From: Greg KH @ 2009-02-05  0:02 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: linux-kernel, stable, Justin Forbes, Zwane Mwaikambo,
	Theodore Ts'o, Randy Dunlap, Dave Jones, Chuck Wolber,
	Chris Wedgwood, Michael Krufky, Chuck Ebbert, Domenico Andreoli,
	Willy Tarreau, Rodrigo Rubira Branco, Jake Edge, Eugene Teo,
	torvalds, akpm, alan, Risto Suominen

On Thu, Feb 05, 2009 at 10:51:15AM +1100, Benjamin Herrenschmidt wrote:
> On Wed, 2009-02-04 at 10:46 -0800, Greg KH wrote:
> > plain text document attachment
> > (fbdev-atyfb-fix-dsp-config-on-some-powermacs-powerbooks.patch)
> > 2.6.27-stable review patch.  If anyone has any objections, please let us know.
> 
> My only possible worry with that one is the first generation clamshell
> iBook which uses a Mobility M1 chip, for which we haven't had anybody
> testing whether this would break it or not ... 
> 
> So if anybody with such a machine is reading this, please holler...

But this patch is already in Linus's tree, so why would you worry about
this?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [patch 30/41] ACPI EC: Fix regression due to use of uninitialized variable
  2009-02-04 18:46   ` [patch 30/41] ACPI EC: Fix regression due to use of uninitialized variable Greg KH
@ 2009-02-05  8:08     ` Thomas Renninger
  2009-02-05 15:06       ` Thomas Renninger
  2009-02-05 17:30       ` Greg KH
  0 siblings, 2 replies; 56+ messages in thread
From: Thomas Renninger @ 2009-02-05  8:08 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-kernel, stable, Justin Forbes, Zwane Mwaikambo,
	Theodore Ts'o, Randy Dunlap, Dave Jones, Chuck Wolber,
	Chris Wedgwood, Michael Krufky, Chuck Ebbert, Domenico Andreoli,
	Willy Tarreau, Rodrigo Rubira Branco, Jake Edge, Eugene Teo,
	torvalds, akpm, alan, Alexey Starikovskiy, Len Brown

Hi,

On Wednesday 04 February 2009 19:46:48 Greg KH wrote:
> 2.6.27-stable review patch.  If anyone has any objections, please let us
> know.
Does this one patch cleanly in 2.6.27-stable?
I had it on my list, but this seem to have been introduced after
2.6.27 and I thought I removed this one again?
Or this is a follow up of another fix that should go in?

   Thomas

> ------------------
>
> From: Alexey Starikovskiy <astarikovskiy@suse.de>
>
> commit d21cf3c16b1191f3154a51e0b20c82bf851cc553 upstream.
>
> breakage introduced by following patch
> commit 27663c5855b10af9ec67bc7dfba001426ba21222
> Author: Matthew Wilcox <willy@linux.intel.com>
> Date:   Fri Oct 10 02:22:59 2008 -0400
>
> acpi_evaluate_integer() does not clear passed variable if
> there is an error at evaluation.
> So if we ignore error, we must supply initialized variable.
>
> http://bugzilla.kernel.org/show_bug.cgi?id=11917
>
> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
> Tested-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
> Signed-off-by: Len Brown <len.brown@intel.com>
> Cc: Thomas Renninger <trenn@suse.de>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
>
> ---
>  drivers/acpi/ec.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> --- a/drivers/acpi/ec.c
> +++ b/drivers/acpi/ec.c
> @@ -769,7 +769,7 @@ static acpi_status
>  ec_parse_device(acpi_handle handle, u32 Level, void *context, void
> **retval) {
>  	acpi_status status;
> -	unsigned long long tmp;
> +	unsigned long long tmp = 0;
>
>  	struct acpi_ec *ec = context;
>  	status = acpi_walk_resources(handle, METHOD_NAME__CRS,
> @@ -784,6 +784,7 @@ ec_parse_device(acpi_handle handle, u32
>  		return status;
>  	ec->gpe = tmp;
>  	/* Use the global lock for all EC transactions? */
> +	tmp = 0;
>  	acpi_evaluate_integer(handle, "_GLK", NULL, &tmp);
>  	ec->global_lock = tmp;
>  	ec->handle = handle;


^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [patch 07/41] fbdev/atyfb: Fix DSP config on some PowerMacs & PowerBooks
  2009-02-05  0:02       ` Greg KH
@ 2009-02-05  9:23         ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 56+ messages in thread
From: Benjamin Herrenschmidt @ 2009-02-05  9:23 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-kernel, stable, Justin Forbes, Zwane Mwaikambo,
	Theodore Ts'o, Randy Dunlap, Dave Jones, Chuck Wolber,
	Chris Wedgwood, Michael Krufky, Chuck Ebbert, Domenico Andreoli,
	Willy Tarreau, Rodrigo Rubira Branco, Jake Edge, Eugene Teo,
	torvalds, akpm, alan, Risto Suominen

On Wed, 2009-02-04 at 16:02 -0800, Greg KH wrote:
> On Thu, Feb 05, 2009 at 10:51:15AM +1100, Benjamin Herrenschmidt wrote:
> > On Wed, 2009-02-04 at 10:46 -0800, Greg KH wrote:
> > > plain text document attachment
> > > (fbdev-atyfb-fix-dsp-config-on-some-powermacs-powerbooks.patch)
> > > 2.6.27-stable review patch.  If anyone has any objections, please let us know.
> > 
> > My only possible worry with that one is the first generation clamshell
> > iBook which uses a Mobility M1 chip, for which we haven't had anybody
> > testing whether this would break it or not ... 
> > 
> > So if anybody with such a machine is reading this, please holler...
> 
> But this patch is already in Linus's tree, so why would you worry about
> this?

Oh I always worry about things I can't test ;-) Just felt like
increasing the chances of finding the one or two users still with that
specific machine model :-)

Cheers,
Ben.



^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [patch 30/41] ACPI EC: Fix regression due to use of uninitialized variable
  2009-02-05  8:08     ` Thomas Renninger
@ 2009-02-05 15:06       ` Thomas Renninger
  2009-02-05 17:30         ` Greg KH
  2009-02-05 17:30       ` Greg KH
  1 sibling, 1 reply; 56+ messages in thread
From: Thomas Renninger @ 2009-02-05 15:06 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-kernel, stable, Justin Forbes, Zwane Mwaikambo,
	Theodore Ts'o, Randy Dunlap, Dave Jones, Chuck Wolber,
	Chris Wedgwood, Michael Krufky, Chuck Ebbert, Domenico Andreoli,
	Willy Tarreau, Rodrigo Rubira Branco, Jake Edge, Eugene Teo,
	torvalds, akpm, alan, Alexey Starikovskiy, Len Brown

On Thursday 05 February 2009 09:08:42 Thomas Renninger wrote:
> Hi,
> 
> On Wednesday 04 February 2009 19:46:48 Greg KH wrote:
> > 2.6.27-stable review patch.  If anyone has any objections, please let us
> > know.
> Does this one patch cleanly in 2.6.27-stable?
> I had it on my list, but this seem to have been introduced after
> 2.6.27 and I thought I removed this one again?
> Or this is a follow up of another fix that should go in?
Yes this got in by another patch.
The huge "make ACPI integer 64 bit aware" one. Which looked like
it could fix really nasty bugs and is safe due to only long to long long
conversions. But maybe this wasn't such a good idea, as exported
kernel functions change from long to long long...

    Thomas
> 
>    Thomas
> 
> > ------------------
> >
> > From: Alexey Starikovskiy <astarikovskiy@suse.de>
> >
> > commit d21cf3c16b1191f3154a51e0b20c82bf851cc553 upstream.
> >
> > breakage introduced by following patch
> > commit 27663c5855b10af9ec67bc7dfba001426ba21222
> > Author: Matthew Wilcox <willy@linux.intel.com>
> > Date:   Fri Oct 10 02:22:59 2008 -0400
> >
> > acpi_evaluate_integer() does not clear passed variable if
> > there is an error at evaluation.
> > So if we ignore error, we must supply initialized variable.
> >
> > http://bugzilla.kernel.org/show_bug.cgi?id=11917
> >
> > Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
> > Tested-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
> > Signed-off-by: Len Brown <len.brown@intel.com>
> > Cc: Thomas Renninger <trenn@suse.de>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> >
> > ---
> >  drivers/acpi/ec.c |    3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > --- a/drivers/acpi/ec.c
> > +++ b/drivers/acpi/ec.c
> > @@ -769,7 +769,7 @@ static acpi_status
> >  ec_parse_device(acpi_handle handle, u32 Level, void *context, void
> > **retval) {
> >  	acpi_status status;
> > -	unsigned long long tmp;
> > +	unsigned long long tmp = 0;
> >
> >  	struct acpi_ec *ec = context;
> >  	status = acpi_walk_resources(handle, METHOD_NAME__CRS,
> > @@ -784,6 +784,7 @@ ec_parse_device(acpi_handle handle, u32
> >  		return status;
> >  	ec->gpe = tmp;
> >  	/* Use the global lock for all EC transactions? */
> > +	tmp = 0;
> >  	acpi_evaluate_integer(handle, "_GLK", NULL, &tmp);
> >  	ec->global_lock = tmp;
> >  	ec->handle = handle;
> 
> 


^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [patch 30/41] ACPI EC: Fix regression due to use of uninitialized variable
  2009-02-05  8:08     ` Thomas Renninger
  2009-02-05 15:06       ` Thomas Renninger
@ 2009-02-05 17:30       ` Greg KH
  1 sibling, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-05 17:30 UTC (permalink / raw)
  To: Thomas Renninger
  Cc: linux-kernel, stable, Justin Forbes, Zwane Mwaikambo,
	Theodore Ts'o, Randy Dunlap, Dave Jones, Chuck Wolber,
	Chris Wedgwood, Michael Krufky, Chuck Ebbert, Domenico Andreoli,
	Willy Tarreau, Rodrigo Rubira Branco, Jake Edge, Eugene Teo,
	torvalds, akpm, alan, Alexey Starikovskiy, Len Brown

On Thu, Feb 05, 2009 at 09:08:42AM +0100, Thomas Renninger wrote:
> Hi,
> 
> On Wednesday 04 February 2009 19:46:48 Greg KH wrote:
> > 2.6.27-stable review patch.  If anyone has any objections, please let us
> > know.
> Does this one patch cleanly in 2.6.27-stable?

Yes it did.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [patch 30/41] ACPI EC: Fix regression due to use of uninitialized variable
  2009-02-05 15:06       ` Thomas Renninger
@ 2009-02-05 17:30         ` Greg KH
  0 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2009-02-05 17:30 UTC (permalink / raw)
  To: Thomas Renninger
  Cc: linux-kernel, stable, Justin Forbes, Zwane Mwaikambo,
	Theodore Ts'o, Randy Dunlap, Dave Jones, Chuck Wolber,
	Chris Wedgwood, Michael Krufky, Chuck Ebbert, Domenico Andreoli,
	Willy Tarreau, Rodrigo Rubira Branco, Jake Edge, Eugene Teo,
	torvalds, akpm, alan, Alexey Starikovskiy, Len Brown

On Thu, Feb 05, 2009 at 04:06:02PM +0100, Thomas Renninger wrote:
> On Thursday 05 February 2009 09:08:42 Thomas Renninger wrote:
> > Hi,
> > 
> > On Wednesday 04 February 2009 19:46:48 Greg KH wrote:
> > > 2.6.27-stable review patch.  If anyone has any objections, please let us
> > > know.
> > Does this one patch cleanly in 2.6.27-stable?
> > I had it on my list, but this seem to have been introduced after
> > 2.6.27 and I thought I removed this one again?
> > Or this is a follow up of another fix that should go in?
> Yes this got in by another patch.
> The huge "make ACPI integer 64 bit aware" one. Which looked like
> it could fix really nasty bugs and is safe due to only long to long long
> conversions. But maybe this wasn't such a good idea, as exported
> kernel functions change from long to long long...

That's ok, there is no "stable abi" requirement for the -stable
releases.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [patch 07/41] fbdev/atyfb: Fix DSP config on some PowerMacs & PowerBooks
  2009-02-04 23:51     ` Benjamin Herrenschmidt
  2009-02-05  0:02       ` Greg KH
@ 2009-02-06 12:05       ` David Woodhouse
  2009-02-06 13:48         ` Risto Suominen
  2009-02-07  2:50         ` Benjamin Herrenschmidt
  1 sibling, 2 replies; 56+ messages in thread
From: David Woodhouse @ 2009-02-06 12:05 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: Greg KH, linux-kernel, stable, Justin Forbes, Zwane Mwaikambo,
	Theodore Ts'o, Randy Dunlap, Dave Jones, Chuck Wolber,
	Chris Wedgwood, Michael Krufky, Chuck Ebbert, Domenico Andreoli,
	Willy Tarreau, Rodrigo Rubira Branco, Jake Edge, Eugene Teo,
	torvalds, akpm, alan, Risto Suominen

On Thu, 2009-02-05 at 10:51 +1100, Benjamin Herrenschmidt wrote:
> My only possible worry with that one is the first generation clamshell
> iBook which uses a Mobility M1 chip, for which we haven't had anybody
> testing whether this would break it or not ... 
> 
> So if anybody with such a machine is reading this, please holler...

I think I have one in the shed. That's a PowerBook1,1?

-- 
dwmw2


^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [patch 07/41] fbdev/atyfb: Fix DSP config on some PowerMacs &  PowerBooks
  2009-02-06 12:05       ` David Woodhouse
@ 2009-02-06 13:48         ` Risto Suominen
  2009-02-07  2:50         ` Benjamin Herrenschmidt
  1 sibling, 0 replies; 56+ messages in thread
From: Risto Suominen @ 2009-02-06 13:48 UTC (permalink / raw)
  To: David Woodhouse
  Cc: Benjamin Herrenschmidt, Greg KH, linux-kernel, stable,
	Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan

2009/2/6 David Woodhouse <dwmw2@infradead.org>:
> On Thu, 2009-02-05 at 10:51 +1100, Benjamin Herrenschmidt wrote:
>> My only possible worry with that one is the first generation clamshell
>> iBook which uses a Mobility M1 chip, for which we haven't had anybody
>> testing whether this would break it or not ...
>>
>> So if anybody with such a machine is reading this, please holler...
>
> I think I have one in the shed. That's a PowerBook1,1?
>

I think it should be either PowerBook2,1 or 2,2.

Risto

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [patch 07/41] fbdev/atyfb: Fix DSP config on some PowerMacs & PowerBooks
  2009-02-06 12:05       ` David Woodhouse
  2009-02-06 13:48         ` Risto Suominen
@ 2009-02-07  2:50         ` Benjamin Herrenschmidt
  1 sibling, 0 replies; 56+ messages in thread
From: Benjamin Herrenschmidt @ 2009-02-07  2:50 UTC (permalink / raw)
  To: David Woodhouse
  Cc: Greg KH, linux-kernel, stable, Justin Forbes, Zwane Mwaikambo,
	Theodore Ts'o, Randy Dunlap, Dave Jones, Chuck Wolber,
	Chris Wedgwood, Michael Krufky, Chuck Ebbert, Domenico Andreoli,
	Willy Tarreau, Rodrigo Rubira Branco, Jake Edge, Eugene Teo,
	torvalds, akpm, alan, Risto Suominen

On Fri, 2009-02-06 at 12:05 +0000, David Woodhouse wrote:
> On Thu, 2009-02-05 at 10:51 +1100, Benjamin Herrenschmidt wrote:
> > My only possible worry with that one is the first generation clamshell
> > iBook which uses a Mobility M1 chip, for which we haven't had anybody
> > testing whether this would break it or not ... 
> > 
> > So if anybody with such a machine is reading this, please holler...
> 
> I think I have one in the shed. That's a PowerBook1,1?

Nah, I think that's the lombard (black) ... well, iirc, I don't remember
100%, though I can try to find out.

Ben.



^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [patch 33/41] asus-laptop: Fix the led behavior with value > 1
  2009-02-04 18:46   ` [patch 33/41] asus-laptop: Fix the led behavior with value > 1 Greg KH
@ 2009-02-10 20:24     ` Pavel Machek
  2009-02-10 20:57       ` Greg KH
  0 siblings, 1 reply; 56+ messages in thread
From: Pavel Machek @ 2009-02-10 20:24 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-kernel, stable, Justin Forbes, Zwane Mwaikambo,
	Theodore Ts'o, Randy Dunlap, Dave Jones, Chuck Wolber,
	Chris Wedgwood, Michael Krufky, Chuck Ebbert, Domenico Andreoli,
	Willy Tarreau, Rodrigo Rubira Branco, Jake Edge, Eugene Teo,
	torvalds, akpm, alan, Corentin Chary, Len Brown,
	Thomas Renninger

On Wed 2009-02-04 10:46:54, Greg KH wrote:
> 2.6.27-stable review patch.  If anyone has any objections, please let us know.
> 
> ------------------
> 
> From: Corentin Chary <corentincj@iksaif.net>
> 
> commit e3deda9c87ac5eef2b5d18cd0b5511370979ca26 upstream.
> 
> Fix http://bugzilla.kernel.org/show_bug.cgi?id=11613 .
> 
> Signed-off-by: Corentin Chary <corentincj@iksaif.net>
> Signed-off-by: Len Brown <len.brown@intel.com>
> Cc: Thomas Renninger <trenn@suse.de>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> 
> ---
>  drivers/misc/asus-laptop.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/drivers/misc/asus-laptop.c
> +++ b/drivers/misc/asus-laptop.c
> @@ -351,7 +351,7 @@ static void write_status(acpi_handle han
>  	static void object##_led_set(struct led_classdev *led_cdev,	\
>  				     enum led_brightness value)		\
>  	{								\
> -		object##_led_wk = value;				\
> +		object##_led_wk = (value > 0) ? 1 : 0;			\

"= !!value" is standard  way to do that.... for unsigned value.

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [patch 33/41] asus-laptop: Fix the led behavior with value > 1
  2009-02-10 20:24     ` Pavel Machek
@ 2009-02-10 20:57       ` Greg KH
  2009-02-12  8:58         ` Pavel Machek
  0 siblings, 1 reply; 56+ messages in thread
From: Greg KH @ 2009-02-10 20:57 UTC (permalink / raw)
  To: Pavel Machek
  Cc: linux-kernel, stable, Justin Forbes, Zwane Mwaikambo,
	Theodore Ts'o, Randy Dunlap, Dave Jones, Chuck Wolber,
	Chris Wedgwood, Michael Krufky, Chuck Ebbert, Domenico Andreoli,
	Willy Tarreau, Rodrigo Rubira Branco, Jake Edge, Eugene Teo,
	torvalds, akpm, alan, Corentin Chary, Len Brown,
	Thomas Renninger

On Tue, Feb 10, 2009 at 09:24:29PM +0100, Pavel Machek wrote:
> On Wed 2009-02-04 10:46:54, Greg KH wrote:
> > 2.6.27-stable review patch.  If anyone has any objections, please let us know.
> > 
> > ------------------
> > 
> > From: Corentin Chary <corentincj@iksaif.net>
> > 
> > commit e3deda9c87ac5eef2b5d18cd0b5511370979ca26 upstream.
> > 
> > Fix http://bugzilla.kernel.org/show_bug.cgi?id=11613 .
> > 
> > Signed-off-by: Corentin Chary <corentincj@iksaif.net>
> > Signed-off-by: Len Brown <len.brown@intel.com>
> > Cc: Thomas Renninger <trenn@suse.de>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> > 
> > ---
> >  drivers/misc/asus-laptop.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > --- a/drivers/misc/asus-laptop.c
> > +++ b/drivers/misc/asus-laptop.c
> > @@ -351,7 +351,7 @@ static void write_status(acpi_handle han
> >  	static void object##_led_set(struct led_classdev *led_cdev,	\
> >  				     enum led_brightness value)		\
> >  	{								\
> > -		object##_led_wk = value;				\
> > +		object##_led_wk = (value > 0) ? 1 : 0;			\
> 
> "= !!value" is standard  way to do that.... for unsigned value.

No dispute here, but that's what is upstream :)

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [patch 33/41] asus-laptop: Fix the led behavior with value > 1
  2009-02-10 20:57       ` Greg KH
@ 2009-02-12  8:58         ` Pavel Machek
  2009-02-12  9:15           ` Corentin Chary
  0 siblings, 1 reply; 56+ messages in thread
From: Pavel Machek @ 2009-02-12  8:58 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-kernel, stable, Justin Forbes, Zwane Mwaikambo,
	Theodore Ts'o, Randy Dunlap, Dave Jones, Chuck Wolber,
	Chris Wedgwood, Michael Krufky, Chuck Ebbert, Domenico Andreoli,
	Willy Tarreau, Rodrigo Rubira Branco, Jake Edge, Eugene Teo,
	torvalds, akpm, alan, Corentin Chary, Len Brown,
	Thomas Renninger


> > > From: Corentin Chary <corentincj@iksaif.net>
> > > 
> > > commit e3deda9c87ac5eef2b5d18cd0b5511370979ca26 upstream.
> > > 
> > > Fix http://bugzilla.kernel.org/show_bug.cgi?id=11613 .
> > > 
> > > Signed-off-by: Corentin Chary <corentincj@iksaif.net>
> > > Signed-off-by: Len Brown <len.brown@intel.com>
> > > Cc: Thomas Renninger <trenn@suse.de>
> > > Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> > > 
> > > ---
> > >  drivers/misc/asus-laptop.c |    2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > --- a/drivers/misc/asus-laptop.c
> > > +++ b/drivers/misc/asus-laptop.c
> > > @@ -351,7 +351,7 @@ static void write_status(acpi_handle han
> > >  	static void object##_led_set(struct led_classdev *led_cdev,	\
> > >  				     enum led_brightness value)		\
> > >  	{								\
> > > -		object##_led_wk = value;				\
> > > +		object##_led_wk = (value > 0) ? 1 : 0;			\
> > 
> > "= !!value" is standard  way to do that.... for unsigned value.
> 
> No dispute here, but that's what is upstream :)

No dispute there, I just hope original author fixes it in the upstream
on one sunny day :).

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [patch 33/41] asus-laptop: Fix the led behavior with value > 1
  2009-02-12  8:58         ` Pavel Machek
@ 2009-02-12  9:15           ` Corentin Chary
  0 siblings, 0 replies; 56+ messages in thread
From: Corentin Chary @ 2009-02-12  9:15 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Greg KH, linux-kernel, stable, Justin Forbes, Zwane Mwaikambo,
	Theodore Ts'o, Randy Dunlap, Dave Jones, Chuck Wolber,
	Chris Wedgwood, Michael Krufky, Chuck Ebbert, Domenico Andreoli,
	Willy Tarreau, Rodrigo Rubira Branco, Jake Edge, Eugene Teo,
	torvalds, akpm, alan, Len Brown, Thomas Renninger

>> > "= !!value" is standard  way to do that.... for unsigned value.
>>
>> No dispute here, but that's what is upstream :)
>
> No dispute there, I just hope original author fixes it in the upstream
> on one sunny day :).

I'll fix that, but currently it's rainning =)


-- 
Corentin Chary
http://xf.iksaif.net

^ permalink raw reply	[flat|nested] 56+ messages in thread

end of thread, other threads:[~2009-02-12  9:16 UTC | newest]

Thread overview: 56+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20090204184029.881610776@mini.kroah.org>
2009-02-04 18:45 ` [patch 00/41] 2.6.27-stable review Greg KH
2009-02-04 18:45   ` [patch 01/41] cifs: make sure we allocate enough storage for socket address Greg KH
2009-02-04 18:45   ` [patch 02/41] ixgb: fix bug when freeing resources Greg KH
2009-02-04 18:45   ` [patch 03/41] m68knommu: set NO_DMA Greg KH
2009-02-04 18:45   ` [patch 04/41] sata_mv: fix 8-port timeouts on 508x/6081 chips Greg KH
2009-02-04 18:45   ` [patch 05/41] x86: use early clobbers in usercopy*.c Greg KH
2009-02-04 18:46   ` [patch 06/41] Add enable_ms to jsm driver Greg KH
2009-02-04 18:46   ` [patch 07/41] fbdev/atyfb: Fix DSP config on some PowerMacs & PowerBooks Greg KH
2009-02-04 23:51     ` Benjamin Herrenschmidt
2009-02-05  0:02       ` Greg KH
2009-02-05  9:23         ` Benjamin Herrenschmidt
2009-02-06 12:05       ` David Woodhouse
2009-02-06 13:48         ` Risto Suominen
2009-02-07  2:50         ` Benjamin Herrenschmidt
2009-02-04 18:46   ` [patch 08/41] Fix memory corruption in console selection Greg KH
2009-02-04 18:46   ` [patch 09/41] Input: atkbd - broaden the Dell DMI signatures Greg KH
2009-02-04 18:46   ` [patch 10/41] Input: atkbd - Samsung NC10 key repeat fix Greg KH
2009-02-04 18:46   ` [patch 11/41] net: fix packet socket delivery in rx irq handler Greg KH
2009-02-04 18:46   ` [patch 12/41] nfsd: Ensure nfsv4 calls the underlying filesystem on LOCKT Greg KH
2009-02-04 18:46   ` [patch 13/41] nfsd: only set file_lock.fl_lmops in nfsd4_lockt if a stateowner is found Greg KH
2009-02-04 18:46   ` [patch 14/41] PCI: irq and pci_ids patch for Intel Tigerpoint DeviceIDs Greg KH
2009-02-04 18:46   ` [patch 15/41] sata_nv: rename nv_nf2_hardreset() Greg KH
2009-02-04 18:46   ` [patch 16/41] sata_nv: fix MCP5x reset Greg KH
2009-02-04 18:46   ` [patch 17/41] sata_nv: ck804 has borked hardreset too Greg KH
2009-02-04 18:46   ` [patch 18/41] USB: isp1760: Fix probe in PCI glue code Greg KH
2009-02-04 18:46   ` [patch 19/41] x86: fix page attribute corruption with cpa() Greg KH
2009-02-04 18:46   ` [patch 20/41] cpuidle: update the last_state acpi cpuidle reflecting actual state entered Greg KH
2009-02-04 18:46   ` [patch 21/41] cpuidle: upon BIOS bug, default to default_idle rather than polling Greg KH
2009-02-04 18:46   ` [patch 22/41] cpuidle: use last_state which can reflect the actual state entered Greg KH
2009-02-04 18:46   ` [patch 23/41] cpuidle: Add decaying history logic to menu idle predictor Greg KH
2009-02-04 18:46   ` [patch 24/41] ACPI: Avoid array address overflow when _CST MWAIT hint bits are set Greg KH
2009-02-04 18:46   ` [patch 25/41] ACPI: Attach the ACPI device to the ACPI handle as early as possible Greg KH
2009-02-04 18:46   ` [patch 26/41] ACPICA: Fixed a couple memory leaks associated with "implicit return" Greg KH
2009-02-04 18:46   ` [patch 27/41] ACPICA: Add check for invalid handle in acpi_get_object_info Greg KH
2009-02-04 18:46   ` [patch 28/41] ACPI: Change acpi_evaluate_integer to support 64-bit on 32-bit kernels Greg KH
2009-02-04 18:46   ` [patch 29/41] ACPI: Fix compiler warnings introduced by 32 to 64 bit acpi conversions Greg KH
2009-02-04 18:46   ` [patch 30/41] ACPI EC: Fix regression due to use of uninitialized variable Greg KH
2009-02-05  8:08     ` Thomas Renninger
2009-02-05 15:06       ` Thomas Renninger
2009-02-05 17:30         ` Greg KH
2009-02-05 17:30       ` Greg KH
2009-02-04 18:46   ` [patch 31/41] ACPICA: Fix wrong resource descriptor length for 64-bit build Greg KH
2009-02-04 18:46   ` [patch 32/41] asus-laptop: Add support for P30/P35 Greg KH
2009-02-04 18:46   ` [patch 33/41] asus-laptop: Fix the led behavior with value > 1 Greg KH
2009-02-10 20:24     ` Pavel Machek
2009-02-10 20:57       ` Greg KH
2009-02-12  8:58         ` Pavel Machek
2009-02-12  9:15           ` Corentin Chary
2009-02-04 18:46   ` [patch 34/41] video: always update the brightness when poking "brightness" Greg KH
2009-02-04 18:46   ` [patch 35/41] dont load asus-acpi if model is not supported Greg KH
2009-02-04 18:47   ` [patch 36/41] Newly inserted battery might differ from one just removed, so Greg KH
2009-02-04 18:47   ` [patch 37/41] ACPI: Do not modify SCI_EN directly Greg KH
2009-02-04 18:47   ` [patch 38/41] ACPI suspend: Blacklist HP xw4600 Workstation for old code ordering Greg KH
2009-02-04 18:47   ` [patch 39/41] dlm: initialize file_lock struct in GETLK before copying conflicting lock Greg KH
2009-02-04 18:47   ` [patch 40/41] sata_mv: Fix chip type for Hightpoint RocketRaid 1740/1742 Greg KH
2009-02-04 18:47   ` [patch 41/41] ACPICA: Allow multiple backslash prefix in namepaths Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.