rpms/kernel/F-9 linux-2.6-e1000e-workaround-hw-errata.patch, NONE, 1.1.2.1 linux-2.6-x86-64-fix-int-0x80-enosys-return.patch, NONE, 1.1.2.1 kernel.spec, 1.891.2.26, 1.891.2.27

Chuck Ebbert cebbert at fedoraproject.org
Sat Feb 21 01:25:12 UTC 2009


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv2877

Modified Files:
      Tag: private-fedora-9-2_6_27-branch
	kernel.spec 
Added Files:
      Tag: private-fedora-9-2_6_27-branch
	linux-2.6-e1000e-workaround-hw-errata.patch 
	linux-2.6-x86-64-fix-int-0x80-enosys-return.patch 
Log Message:
Fix bug in x86-64 syscall error handling. (F10#484871)
Fix e1000e Tx unit hang.

linux-2.6-e1000e-workaround-hw-errata.patch:

--- NEW FILE linux-2.6-e1000e-workaround-hw-errata.patch ---
From: Jesse Brandeburg <jesse.brandeburg at intel.com>
Date: Mon, 26 Jan 2009 20:16:26 +0000 (-0800)
Subject: e1000e: workaround hw errata
X-Git-Tag: v2.6.29-rc3~23^2~9
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=78272bbab895cc8f63bab5181dee55b72208e3b7

e1000e: workaround hw errata

There is a hardware errata in some revisions of the 82574 that needs
to be worked around in the driver by setting a register bit at init.

If this bit is not set A0 versions of the 82574 can generate
tx hangs.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg at intel.com>
Signed-off-by: Bruce Allan <bruce.w.allan at intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
---

diff --git a/drivers/net/e1000e/82571.c b/drivers/net/e1000e/82571.c
index cf43ee7..0890162 100644
--- a/drivers/net/e1000e/82571.c
+++ b/drivers/net/e1000e/82571.c
@@ -981,11 +981,15 @@ static void e1000_initialize_hw_bits_82571(struct e1000_hw *hw)
 		ew32(PBA_ECC, reg);
 	}
 
-	/* PCI-Ex Control Register */
+	/* PCI-Ex Control Registers */
 	if (hw->mac.type == e1000_82574) {
 		reg = er32(GCR);
 		reg |= (1 << 22);
 		ew32(GCR, reg);
+
+		reg = er32(GCR2);
+		reg |= 1;
+		ew32(GCR2, reg);
 	}
 
 	return;
diff --git a/drivers/net/e1000e/hw.h b/drivers/net/e1000e/hw.h
index f25e961..2d4ce04 100644
--- a/drivers/net/e1000e/hw.h
+++ b/drivers/net/e1000e/hw.h
@@ -206,6 +206,7 @@ enum e1e_registers {
 	E1000_MANC2H    = 0x05860, /* Management Control To Host - RW */
 	E1000_SW_FW_SYNC = 0x05B5C, /* Software-Firmware Synchronization - RW */
 	E1000_GCR	= 0x05B00, /* PCI-Ex Control */
+	E1000_GCR2      = 0x05B64, /* PCI-Ex Control #2 */
 	E1000_FACTPS    = 0x05B30, /* Function Active and Power State to MNG */
 	E1000_SWSM      = 0x05B50, /* SW Semaphore */
 	E1000_FWSM      = 0x05B54, /* FW Semaphore */

linux-2.6-x86-64-fix-int-0x80-enosys-return.patch:

--- NEW FILE linux-2.6-x86-64-fix-int-0x80-enosys-return.patch ---
From: Roland McGrath <roland at redhat.com>
Date: Sat, 7 Feb 2009 02:15:18 +0000 (-0800)
Subject: x86-64: fix int $0x80 -ENOSYS return
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=c09249f8d1b84344eca882547afdbffee8c09d14

x86-64: fix int $0x80 -ENOSYS return

One of my past fixes to this code introduced a different new bug.
When using 32-bit "int $0x80" entry for a bogus syscall number,
the return value is not correctly set to -ENOSYS.  This only happens
when neither syscall-audit nor syscall tracing is enabled (i.e., never
seen if auditd ever started).  Test program:

	/* gcc -o int80-badsys -m32 -g int80-badsys.c
	   Run on x86-64 kernel.
	   Note to reproduce the bug you need auditd never to have started.  */

	#include <errno.h>
	#include <stdio.h>

	int
	main (void)
	{
	  long res;
	  asm ("int $0x80" : "=a" (res) : "0" (99999));
	  printf ("bad syscall returns %ld\n", res);
	  return res != -ENOSYS;
	}

The fix makes the int $0x80 path match the sysenter and syscall paths.

Reported-by: Dmitry V. Levin <ldv at altlinux.org>
Signed-off-by: Roland McGrath <roland at redhat.com>
---

diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S
index 256b00b..5a0d76d 100644
--- a/arch/x86/ia32/ia32entry.S
+++ b/arch/x86/ia32/ia32entry.S
@@ -418,9 +418,9 @@ ENTRY(ia32_syscall)
 	orl   $TS_COMPAT,TI_status(%r10)
 	testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%r10)
 	jnz ia32_tracesys
-ia32_do_syscall:	
 	cmpl $(IA32_NR_syscalls-1),%eax
-	ja  int_ret_from_sys_call	/* ia32_tracesys has set RAX(%rsp) */
+	ja ia32_badsys
+ia32_do_call:
 	IA32_ARG_FIXUP
 	call *ia32_sys_call_table(,%rax,8) # xxx: rip relative
 ia32_sysret:
@@ -435,7 +435,9 @@ ia32_tracesys:
 	call syscall_trace_enter
 	LOAD_ARGS32 ARGOFFSET  /* reload args from stack in case ptrace changed it */
 	RESTORE_REST
-	jmp ia32_do_syscall
+	cmpl $(IA32_NR_syscalls-1),%eax
+	ja  int_ret_from_sys_call	/* ia32_tracesys has set RAX(%rsp) */
+	jmp ia32_do_call
 END(ia32_syscall)
 
 ia32_badsys:


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-9/kernel.spec,v
retrieving revision 1.891.2.26
retrieving revision 1.891.2.27
diff -u -r1.891.2.26 -r1.891.2.27
--- kernel.spec	21 Feb 2009 01:13:47 -0000	1.891.2.26
+++ kernel.spec	21 Feb 2009 01:24:41 -0000	1.891.2.27
@@ -601,6 +601,7 @@
 Patch21: linux-2.6-utrace.patch
 Patch22: linux-2.6-x86-tracehook.patch
 Patch23: linux-2.6.27-x86-tracehook-syscall-arg-order.patch
+Patch24: linux-2.6-x86-64-fix-int-0x80-enosys-return.patch
 
 Patch41: linux-2.6-sysrq-c.patch
 
@@ -706,6 +707,7 @@
 Patch2001: linux-2.6-e1000e-add-support-for-the-82567LM-4-device.patch
 Patch2002: linux-2.6-e1000e-add-support-for-82567LM-3-and-82567LF-3-ICH10D-parts.patch
 Patch2003: linux-2.6-e1000e-add-support-for-new-82574L-part.patch
+Patch2005: linux-2.6-e1000e-workaround-hw-errata.patch
 
 # r8169 fixes
 Patch2007: linux-2.6-netdev-r8169-2.6.28.patch
@@ -1095,6 +1097,7 @@
 ApplyPatch linux-2.6-utrace.patch
 ApplyPatch linux-2.6-x86-tracehook.patch
 ApplyPatch linux-2.6.27-x86-tracehook-syscall-arg-order.patch
+ApplyPatch linux-2.6-x86-64-fix-int-0x80-enosys-return.patch
 
 # enable sysrq-c on all kernels, not only kexec
 ApplyPatch linux-2.6-sysrq-c.patch
@@ -1286,6 +1289,7 @@
 ApplyPatch linux-2.6-e1000e-add-support-for-the-82567LM-4-device.patch
 ApplyPatch linux-2.6-e1000e-add-support-for-82567LM-3-and-82567LF-3-ICH10D-parts.patch
 ApplyPatch linux-2.6-e1000e-add-support-for-new-82574L-part.patch
+ApplyPatch linux-2.6-e1000e-workaround-hw-errata.patch
 
 ApplyPatch linux-2.6-netdev-r8169-2.6.28.patch
 ApplyPatch linux-2.6-netdev-atl2.patch
@@ -1917,6 +1921,10 @@
 %kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL}.xen -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf %{with_xen} xen
 
 %changelog
+* Sat Feb 21 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.27.19-78.2.27
+- Fix bug in x86-64 syscall error handling. (F10#484871)
+- Fix e1000e Tx unit hang.
+
 * Sat Feb 21 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.27.19-78.2.26
 - 2.6.27.19
   Dropped patches (merged upstream):




More information about the fedora-extras-commits mailing list