Skip to content
Browse files

Sync with Debian svn r19969

  • Loading branch information...
1 parent db8fb49 commit 52f58a70de3885b7740db87550282ea3224fd51a @mika mika committed
Showing with 15,379 additions and 1,800 deletions.
  1. +14 −10 linux-3/debian/bin/genorig.py
  2. +9 −4 linux-3/debian/bin/test-patches
  3. +57 −56 linux-3/debian/config/config
  4. +1 −1 linux-3/debian/config/defines
  5. +38 −42 linux-3/debian/config/kernelarch-x86/config
  6. +6 −1 linux-3/debian/config/kernelarch-x86/config-arch-64
  7. +42 −0 linux-3/debian/patches/bugfix/all/KVM-Fix-bounds-checking-in-ioapic-indirect-register-.patch
  8. +160 −0 linux-3/debian/patches/bugfix/all/efi_pstore-Introducing-workqueue-updating-sysfs.patch
  9. +156 −0 linux-3/debian/patches/bugfix/all/efivars-Handle-duplicate-names-from-get_next_variabl.patch
  10. +101 −0 linux-3/debian/patches/bugfix/all/efivars-explicitly-calculate-length-of-VariableName.patch
  11. +0 −133 linux-3/debian/patches/bugfix/all/exec-use-ELOOP-for-max-recursion-depth.patch
  12. +36 −0 linux-3/debian/patches/bugfix/all/kernel-signal.c-use-__ARCH_HAS_SA_RESTORER-instead-o.patch
  13. +36 −0 linux-3/debian/patches/bugfix/all/mm-Try-harder-to-allocate-vmemmap-blocks.patch
  14. +0 −48 linux-3/debian/patches/bugfix/all/pch_gbe-ptp_pch-Fix-the-dependency-direction-between.patch
  15. +0 −77 linux-3/debian/patches/bugfix/all/pps-ptp-Remove-dependencies-on-EXPERIMENTAL.patch
  16. +0 −784 linux-3/debian/patches/bugfix/all/ptp-Enable-clock-drivers-along-with-associated-net-P.patch
  17. +0 −69 linux-3/debian/patches/bugfix/all/ptp-Make-PTP_1588_CLOCK-select-rather-than-depend-on.patch
  18. +0 −29 linux-3/debian/patches/bugfix/all/sfc-Select-PTP_1588_CLOCK.patch
  19. +149 −0 linux-3/debian/patches/bugfix/all/signal-fix-use-of-missing-sa_restorer-field.patch
  20. +0 −106 linux-3/debian/patches/bugfix/arm/lis3l02dq-fix-building-without-irq-to-gpio.patch
  21. +15 −14 linux-3/debian/patches/bugfix/ia64/nouveau-ACPI-support-is-dependent-on-X86.patch
  22. +24 −0 linux-3/debian/patches/bugfix/mips/mips-add-dependencies-for-have_arch_transparent_hugepage.patch
  23. +161 −0 linux-3/debian/patches/bugfix/x86/KVM-x86-Convert-MSR_KVM_SYSTEM_TIME-to-use-gfn_to_hv.patch
  24. +39 −0 linux-3/debian/patches/bugfix/x86/KVM-x86-fix-for-buffer-overflow-in-handling-of-MSR_K.patch
  25. +0 −63 linux-3/debian/patches/bugfix/x86/asus-laptop-Do-not-call-HWRS-on-init.patch
  26. +26 −0 linux-3/debian/patches/bugfix/x86/drm-i915-add-quirk-to-invert-brightness-on-emachines-e725.patch
  27. +24 −0 linux-3/debian/patches/bugfix/x86/drm-i915-add-quirk-to-invert-brightness-on-emachines-g725.patch
  28. +25 −0 ...x-3/debian/patches/bugfix/x86/drm-i915-add-quirk-to-invert-brightness-on-packard-bell-ncl20.patch
  29. +2 −2 linux-3/debian/patches/debian/ast-disable-autoload.patch
  30. +26 −0 linux-3/debian/patches/debian/cdc_ncm-cdc_mbim-use-ncm-by-default.patch
  31. +56 −0 linux-3/debian/patches/debian/efi-autoload-efivars.patch
  32. +29 −0 linux-3/debian/patches/debian/efivars-remove-check-for-50-full-on-write.patch
  33. +95 −0 linux-3/debian/patches/debian/radeon-firmware-is-required-for-drm-and-kms-on-r600-onward.patch
  34. +0 −83 linux-3/debian/patches/debian/radeon-no-modeset-without-firmware.patch
  35. +3 −3 linux-3/debian/patches/debian/version.patch
  36. +13,499 −0 linux-3/debian/patches/features/all/alx/alx-add-new-QCA-ethernet-driver-which-supercedes-atl.patch
  37. +69 −0 linux-3/debian/patches/features/all/alx/alx-update-for-3.8.patch
  38. +36 −0 linux-3/debian/patches/features/all/alx/mark-as-staging.patch
  39. +71 −0 linux-3/debian/patches/features/all/alx/remove-atl1c-devices-from-alx.patch
  40. +272 −209 linux-3/debian/patches/features/all/aufs3/aufs3-add.patch
  41. +9 −9 linux-3/debian/patches/features/all/aufs3/aufs3-base.patch
  42. +6 −6 linux-3/debian/patches/features/all/aufs3/aufs3-kbuild.patch
  43. +42 −31 linux-3/debian/patches/features/all/aufs3/aufs3-standalone.patch
  44. +7 −7 linux-3/debian/patches/features/all/cgroups-Allow-memory-cgroup-support-to-be-included-b.patch
  45. +26 −10 linux-3/debian/patches/series
  46. +11 −2 linux-3/debian/rules.real
  47. +1 −1 linux-3/debian/templates/control.source.in
View
24 linux-3/debian/bin/genorig.py
@@ -58,23 +58,21 @@ def upstream_export(self, input_repo):
'--prefix=%s/' % self.orig, self.tag],
cwd=input_repo,
stdout=subprocess.PIPE)
- extract_proc = subprocess.Popen(['tar', '-xf', '-'], cwd=self.dir,
+ extract_proc = subprocess.Popen(['tar', '-xaf', '-'], cwd=self.dir,
stdin=archive_proc.stdout)
- if extract_proc.wait():
- raise RuntimeError("Can't extract tarball")
+ ret1 = archive_proc.wait()
+ ret2 = extract_proc.wait()
+ if ret1 or ret2:
+ raise RuntimeError("Can't create archive")
def upstream_extract(self, input_tar):
self.log("Extracting tarball %s\n" % input_tar)
- match = re.match(r'(^|.*/)(?P<dir>linux-\d+\.\d+(\.\d+)?(-\S+)?)\.tar(\.(?P<extension>(bz2|gz)))?$', input_tar)
+ match = re.match(r'(^|.*/)(?P<dir>linux-\d+\.\d+(\.\d+)?(-\S+)?)\.tar(\.(?P<extension>(bz2|gz|xz)))?$', input_tar)
if not match:
raise RuntimeError("Can't identify name of tarball")
- cmdline = ['tar', '-xf', input_tar, '-C', self.dir]
- if match.group('extension') == 'bz2':
- cmdline.append('-j')
- elif match.group('extension') == 'gz':
- cmdline.append('-z')
+ cmdline = ['tar', '-xaf', input_tar, '-C', self.dir]
if subprocess.Popen(cmdline).wait():
raise RuntimeError("Can't extract tarball")
@@ -83,7 +81,7 @@ def upstream_extract(self, input_tar):
def upstream_patch(self, input_patch):
self.log("Patching source with %s\n" % input_patch)
- match = re.match(r'(^|.*/)patch-\d+\.\d+\.\d+(-\S+?)?(\.(?P<extension>(bz2|gz)))?$', input_patch)
+ match = re.match(r'(^|.*/)patch-\d+\.\d+\.\d+(-\S+?)?(\.(?P<extension>(bz2|gz|xz)))?$', input_patch)
if not match:
raise RuntimeError("Can't identify name of patch")
cmdline = []
@@ -91,6 +89,8 @@ def upstream_patch(self, input_patch):
cmdline.append('bzcat')
elif match.group('extension') == 'gz':
cmdline.append('zcat')
+ elif match.group('extension') == 'xz':
+ cmdline.append('xzcat')
else:
cmdline.append('cat')
cmdline.append(input_patch)
@@ -128,6 +128,10 @@ def tar(self):
except OSError:
pass
raise
+ try:
+ os.symlink(os.path.join('orig', self.orig_tar), os.path.join('..', self.orig_tar))
+ except OSError:
+ pass
if __name__ == '__main__':
from optparse import OptionParser
View
13 linux-3/debian/bin/test-patches
@@ -19,12 +19,15 @@ else
featureset=none
fi
-eval "set -- $(getopt -n "$0" -- "f:j:s:" "$@")"
+fuzz=0
+
+eval "set -- $(getopt -n "$0" -o "f:j:s:" -l "fuzz:" -- "$@")"
while true; do
case "$1" in
-f) flavour="$2"; shift 2 ;;
-j) export MAKEFLAGS="$MAKEFLAGS -j$2"; shift 2 ;;
-s) featureset="$2"; shift 2 ;;
+ --fuzz) fuzz="$2"; shift 2;;
--) shift 1; break ;;
esac
done
@@ -36,6 +39,7 @@ Options:
-f <flavour> specify the 'flavour' of kernel to build, e.g. 686-pae
-j <jobs> specify number of compiler jobs to run in parallel
-s <featureset> specify an optional featureset to apply, e.g. rt
+ --fuzz <num> set the maximum patch fuzz factor (default: 0)
EOF
exit 2
fi
@@ -63,8 +67,9 @@ alias quilt='quilt --quiltrc -'
# Try to clean up any previous test patches
if [ "$featureset" = none ]; then
- while quilt top 2>/dev/null | grep -q ^test/; do
- quilt delete
+ while patch="$(quilt next 2>/dev/null || quilt top 2>/dev/null)" && \
+ [ "${patch#test/}" != "$patch" ]; do
+ quilt delete -r "$patch"
done
else
sed -i '/^test\//d' debian/patches/series-${featureset}
@@ -89,7 +94,7 @@ for patch in "$@"; do
patch_abs="$(readlink -f "$patch")"
(cd "debian/build/source_${featureset}" && \
quilt import -P "test/$(basename "$patch")" "$patch_abs" && \
- quilt push --fuzz=0)
+ quilt push --fuzz="$fuzz")
done
# Build selected binaries
View
113 linux-3/debian/config/config
@@ -418,7 +418,7 @@ CONFIG_DRM_NOUVEAU_BACKLIGHT=y
##
## file: drivers/gpu/drm/radeon/Kconfig
##
-# CONFIG_DRM_RADEON_KMS is not set
+CONFIG_DRM_RADEON_KMS=y
##
## file: drivers/gpu/drm/udl/Kconfig
@@ -627,12 +627,6 @@ CONFIG_IDE_PROC_FS=y
CONFIG_I7300_IDLE=m
##
-## file: drivers/ieee802154/Kconfig
-##
-CONFIG_IEEE802154_DRIVERS=m
-CONFIG_IEEE802154_FAKEHARD=m
-
-##
## file: drivers/iio/Kconfig
##
# CONFIG_IIO is not set
@@ -1365,22 +1359,6 @@ CONFIG_VIDEO_CX231XX_ALSA=m
CONFIG_VIDEO_CX231XX_DVB=m
##
-## file: drivers/media/usb/dvb-usb-v2/Kconfig
-##
-CONFIG_DVB_USB_V2=m
-CONFIG_DVB_USB_AF9015=m
-CONFIG_DVB_USB_AF9035=m
-CONFIG_DVB_USB_ANYSEE=m
-CONFIG_DVB_USB_AU6610=m
-CONFIG_DVB_USB_CE6230=m
-CONFIG_DVB_USB_EC168=m
-CONFIG_DVB_USB_GL861=m
-CONFIG_DVB_USB_IT913X=m
-CONFIG_DVB_USB_LME2510=m
-CONFIG_DVB_USB_MXL111SF=m
-CONFIG_DVB_USB_RTL28XXU=m
-
-##
## file: drivers/media/usb/dvb-usb/Kconfig
##
CONFIG_DVB_USB=m
@@ -1412,6 +1390,22 @@ CONFIG_DVB_USB_AZ6027=m
CONFIG_DVB_USB_TECHNISAT_USB2=m
##
+## file: drivers/media/usb/dvb-usb-v2/Kconfig
+##
+CONFIG_DVB_USB_V2=m
+CONFIG_DVB_USB_AF9015=m
+CONFIG_DVB_USB_AF9035=m
+CONFIG_DVB_USB_ANYSEE=m
+CONFIG_DVB_USB_AU6610=m
+CONFIG_DVB_USB_CE6230=m
+CONFIG_DVB_USB_EC168=m
+CONFIG_DVB_USB_GL861=m
+CONFIG_DVB_USB_IT913X=m
+CONFIG_DVB_USB_LME2510=m
+CONFIG_DVB_USB_MXL111SF=m
+CONFIG_DVB_USB_RTL28XXU=m
+
+##
## file: drivers/media/usb/em28xx/Kconfig
##
CONFIG_VIDEO_EM28XX=m
@@ -1581,6 +1575,7 @@ CONFIG_MSPRO_BLOCK=m
CONFIG_MEMSTICK_TIFM_MS=m
CONFIG_MEMSTICK_JMICRON_38X=m
CONFIG_MEMSTICK_R592=m
+CONFIG_MEMSTICK_REALTEK_PCI=m
##
## file: drivers/message/fusion/Kconfig
@@ -1607,6 +1602,7 @@ CONFIG_I2O_BUS=m
## file: drivers/mfd/Kconfig
##
CONFIG_MFD_SM501=m
+CONFIG_MFD_RTSX_PCI=m
CONFIG_HTC_PASIC3=m
# CONFIG_UCB1400_CORE is not set
# CONFIG_TPS6105X is not set
@@ -1718,6 +1714,7 @@ CONFIG_MMC_CB710=m
CONFIG_MMC_VIA_SDMMC=m
CONFIG_MMC_VUB300=m
CONFIG_MMC_USHC=m
+CONFIG_MMC_REALTEK_PCI=m
##
## file: drivers/mtd/Kconfig
@@ -1787,7 +1784,6 @@ CONFIG_MTD_ONENAND_SIM=m
##
CONFIG_MTD_UBI=m
CONFIG_MTD_UBI_WL_THRESHOLD=4096
-CONFIG_MTD_UBI_BEB_RESERVE=1
# CONFIG_MTD_UBI_GLUEBI is not set
##
@@ -1899,6 +1895,7 @@ CONFIG_ATL2=m
CONFIG_ATL1=m
CONFIG_ATL1E=m
CONFIG_ATL1C=m
+CONFIG_ALX=m
##
## file: drivers/net/ethernet/broadcom/Kconfig
@@ -2184,6 +2181,12 @@ CONFIG_BAYCOM_EPP=m
CONFIG_YAM=m
##
+## file: drivers/net/ieee802154/Kconfig
+##
+CONFIG_IEEE802154_DRIVERS=m
+CONFIG_IEEE802154_FAKEHARD=m
+
+##
## file: drivers/net/irda/Kconfig
##
CONFIG_DONGLE=y
@@ -2208,7 +2211,6 @@ CONFIG_MCS_FIR=m
CONFIG_PHYLIB=m
CONFIG_AT803X_PHY=m
CONFIG_AMD_PHY=m
-CONFIG_BCM87XX_PHY=m
CONFIG_MARVELL_PHY=m
CONFIG_DAVICOM_PHY=m
CONFIG_QSEMI_PHY=m
@@ -2218,6 +2220,7 @@ CONFIG_VITESSE_PHY=m
CONFIG_SMSC_PHY=m
CONFIG_BROADCOM_PHY=m
# CONFIG_BCM63XX_PHY is not set
+CONFIG_BCM87XX_PHY=m
CONFIG_ICPLUS_PHY=m
CONFIG_REALTEK_PHY=m
CONFIG_NATIONAL_PHY=m
@@ -2257,10 +2260,10 @@ CONFIG_SLIP_MODE_SLIP6=y
## file: drivers/net/team/Kconfig
##
CONFIG_NET_TEAM=m
+CONFIG_NET_TEAM_MODE_BROADCAST=m
CONFIG_NET_TEAM_MODE_ROUNDROBIN=m
CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=m
CONFIG_NET_TEAM_MODE_LOADBALANCE=m
-CONFIG_NET_TEAM_MODE_BROADCAST=m
##
## file: drivers/net/usb/Kconfig
@@ -2274,6 +2277,7 @@ CONFIG_USB_NET_AX8817X=m
CONFIG_USB_NET_CDCETHER=m
CONFIG_USB_NET_CDC_EEM=m
CONFIG_USB_NET_CDC_NCM=m
+CONFIG_USB_NET_CDC_MBIM=m
CONFIG_USB_NET_DM9601=m
CONFIG_USB_NET_SMSC75XX=m
CONFIG_USB_NET_SMSC95XX=m
@@ -2311,8 +2315,6 @@ CONFIG_HDLC_FR=m
CONFIG_HDLC_PPP=m
# CONFIG_HDLC_X25 is not set
# CONFIG_PC300TOO is not set
-CONFIG_WAN_ROUTER_DRIVERS=m
-# CONFIG_CYCLOMX_X25 is not set
##
## file: drivers/net/wimax/i2400m/Kconfig
@@ -2338,7 +2340,7 @@ CONFIG_MWL8K=m
##
## file: drivers/net/wireless/ath/Kconfig
##
-CONFIG_ATH_COMMON=m
+CONFIG_ATH_CARDS=y
# CONFIG_ATH_DEBUG is not set
##
@@ -2352,9 +2354,9 @@ CONFIG_ATH5K=m
## file: drivers/net/wireless/ath/ath6kl/Kconfig
##
CONFIG_ATH6KL=m
-# CONFIG_ATH6KL_DEBUG is not set
CONFIG_ATH6KL_SDIO=m
CONFIG_ATH6KL_USB=m
+# CONFIG_ATH6KL_DEBUG is not set
##
## file: drivers/net/wireless/ath/ath9k/Kconfig
@@ -2532,8 +2534,8 @@ CONFIG_WL18XX=m
##
## file: drivers/net/wireless/ti/wlcore/Kconfig
##
-CONFIG_WLCORE_SDIO=m
CONFIG_WLCORE_SPI=m
+CONFIG_WLCORE_SDIO=m
##
## file: drivers/net/wireless/zd1211rw/Kconfig
@@ -3105,7 +3107,6 @@ CONFIG_HVC_XEN_FRONTEND=y
## file: drivers/tty/serial/Kconfig
##
CONFIG_SERIAL_MAX3100=m
-# CONFIG_SERIAL_MAX3107 is not set
CONFIG_SERIAL_MFD_HSU=m
# CONFIG_SERIAL_TIMBERDALE is not set
# CONFIG_SERIAL_ALTERA_JTAGUART is not set
@@ -3117,8 +3118,8 @@ CONFIG_SERIAL_MFD_HSU=m
##
## file: drivers/tty/serial/8250/Kconfig
##
-CONFIG_SERIAL_8250_PCI=y
CONFIG_SERIAL_8250_PNP=y
+CONFIG_SERIAL_8250_PCI=y
CONFIG_SERIAL_8250_FOURPORT=m
CONFIG_SERIAL_8250_ACCENT=m
CONFIG_SERIAL_8250_BOCA=m
@@ -3240,7 +3241,6 @@ CONFIG_NOP_USB_XCEIV=m
## file: drivers/usb/serial/Kconfig
##
CONFIG_USB_SERIAL=m
-CONFIG_USB_EZUSB=y
CONFIG_USB_SERIAL_GENERIC=y
CONFIG_USB_SERIAL_AIRCABLE=m
CONFIG_USB_SERIAL_ARK3116=m
@@ -3311,7 +3311,6 @@ CONFIG_USB_STORAGE_ONETOUCH=m
CONFIG_USB_STORAGE_KARMA=m
CONFIG_USB_STORAGE_CYPRESS_ATACB=m
CONFIG_USB_STORAGE_ENE_UB6250=m
-# CONFIG_USB_LIBUSUAL is not set
##
## file: drivers/usb/wusbcore/Kconfig
@@ -3463,7 +3462,6 @@ CONFIG_XEN_PCIDEV_BACKEND=m
##
## file: fs/Kconfig
##
-CONFIG_CUSE=m
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_HUGETLBFS=y
@@ -3564,11 +3562,11 @@ CONFIG_CIFS_WEAK_PW_HASH=y
CONFIG_CIFS_UPCALL=y
CONFIG_CIFS_XATTR=y
CONFIG_CIFS_POSIX=y
+CONFIG_CIFS_ACL=y
# CONFIG_CIFS_DEBUG2 is not set
CONFIG_CIFS_DFS_UPCALL=y
-CONFIG_CIFS_FSCACHE=y
-CONFIG_CIFS_ACL=y
CONFIG_CIFS_NFSD_EXPORT=y
+CONFIG_CIFS_FSCACHE=y
##
## file: fs/coda/Kconfig
@@ -3629,7 +3627,6 @@ CONFIG_EXT3_FS_SECURITY=y
## file: fs/ext4/Kconfig
##
CONFIG_EXT4_FS=m
-CONFIG_EXT4_FS_XATTR=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y
# CONFIG_EXT4_DEBUG is not set
@@ -3660,6 +3657,7 @@ CONFIG_FSCACHE_STATS=y
## file: fs/fuse/Kconfig
##
CONFIG_FUSE_FS=m
+CONFIG_CUSE=m
##
## file: fs/gfs2/Kconfig
@@ -3961,16 +3959,16 @@ CONFIG_KERNEL_XZ=y
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
+CONFIG_FHANDLE=y
+CONFIG_AUDIT=y
+CONFIG_AUDITSYSCALL=y
+# CONFIG_AUDIT_LOGINUID_IMMUTABLE is not set
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_BSD_PROCESS_ACCT_V3=y
-CONFIG_FHANDLE=y
CONFIG_TASKSTATS=y
CONFIG_TASK_DELAY_ACCT=y
CONFIG_TASK_XACCT=y
CONFIG_TASK_IO_ACCOUNTING=y
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-# CONFIG_AUDIT_LOGINUID_IMMUTABLE is not set
## choice: RCU Implementation
CONFIG_TREE_RCU=y
# CONFIG_TREE_PREEMPT_RCU is not set
@@ -4205,6 +4203,7 @@ CONFIG_BOOT_PRINTK_DELAY=y
##
CONFIG_MEMORY_HOTPLUG=y
CONFIG_MEMORY_HOTREMOVE=y
+CONFIG_BALLOON_COMPACTION=y
CONFIG_COMPACTION=y
CONFIG_MIGRATION=y
CONFIG_KSM=y
@@ -4374,11 +4373,6 @@ CONFIG_IP_DCCP_CCID3=y
# CONFIG_DECNET is not set
##
-## file: net/dsa/Kconfig
-##
-# CONFIG_NET_DSA is not set
-
-##
## file: net/ieee802154/Kconfig
##
CONFIG_IEEE802154=m
@@ -4806,11 +4800,6 @@ CONFIG_IP_SCTP=m
CONFIG_NET_SCTPPROBE=m
# CONFIG_SCTP_DBG_MSG is not set
# CONFIG_SCTP_DBG_OBJCNT is not set
-## choice: SCTP: Cookie HMAC Algorithm
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-## end choice
##
## file: net/sunrpc/Kconfig
@@ -4821,7 +4810,6 @@ CONFIG_RPCSEC_GSS_KRB5=m
## file: net/tipc/Kconfig
##
CONFIG_TIPC=m
-CONFIG_TIPC_ADVANCED=y
CONFIG_TIPC_PORTS=8191
##
@@ -4831,6 +4819,11 @@ CONFIG_UNIX=y
CONFIG_UNIX_DIAG=m
##
+## file: net/wanrouter/Kconfig
+##
+# CONFIG_WAN_ROUTER is not set
+
+##
## file: net/wimax/Kconfig
##
CONFIG_WIMAX=m
@@ -4846,7 +4839,6 @@ CONFIG_CFG80211=m
CONFIG_CFG80211_DEFAULT_PS=y
# CONFIG_CFG80211_DEBUGFS is not set
CONFIG_CFG80211_WEXT=y
-CONFIG_LIB80211=m
# CONFIG_LIB80211_DEBUG is not set
##
@@ -5015,7 +5007,6 @@ CONFIG_SND_HDA_CODEC_CA0110=y
CONFIG_SND_HDA_CODEC_CMEDIA=y
CONFIG_SND_HDA_CODEC_SI3054=y
CONFIG_SND_HDA_GENERIC=y
-CONFIG_SND_HDA_POWER_SAVE=y
CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
##
@@ -5055,5 +5046,15 @@ CONFIG_INITRAMFS_SOURCE=""
##
## file: unknown
##
+CONFIG_EXT4_FS_XATTR=y
CONFIG_LEDS_ALIX2=m
+CONFIG_MTD_UBI_BEB_RESERVE=1
+CONFIG_SCTP_HMAC_MD5=y
+# CONFIG_SCTP_HMAC_NONE is not set
+# CONFIG_SCTP_HMAC_SHA1 is not set
+# CONFIG_SERIAL_MAX3107 is not set
+CONFIG_SND_HDA_POWER_SAVE=y
+CONFIG_TIPC_ADVANCED=y
+CONFIG_USB_EZUSB=y
+# CONFIG_USB_LIBUSUAL is not set
View
2 linux-3/debian/config/defines
@@ -28,4 +28,4 @@ gcc-4.7: gcc-4.7
# initramfs-generators
initramfs-fallback: linux-initramfs-tool
-initramfs-tools: initramfs-tools (>= 0.99~)
+initramfs-tools: initramfs-tools (>= 0.110~)
View
80 linux-3/debian/config/kernelarch-x86/config
@@ -13,7 +13,6 @@ CONFIG_X86_MPPARSE=y
CONFIG_SCHED_OMIT_FRAME_POINTER=y
CONFIG_PARAVIRT_GUEST=y
# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set
-CONFIG_KVM_CLOCK=y
CONFIG_KVM_GUEST=y
CONFIG_PARAVIRT=y
# CONFIG_PARAVIRT_SPINLOCKS is not set
@@ -22,7 +21,6 @@ CONFIG_MEMTEST=y
CONFIG_HPET_TIMER=y
CONFIG_SCHED_SMT=y
CONFIG_SCHED_MC=y
-# CONFIG_IRQ_TIME_ACCOUNTING is not set
CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
CONFIG_X86_MCE=y
CONFIG_X86_MCE_INTEL=y
@@ -52,6 +50,8 @@ CONFIG_CRASH_DUMP=y
# CONFIG_KEXEC_JUMP is not set
CONFIG_RELOCATABLE=y
CONFIG_HOTPLUG_CPU=y
+# CONFIG_BOOTPARAM_HOTPLUG_CPU0 is not set
+# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
# CONFIG_COMPAT_VDSO is not set
# CONFIG_CMDLINE_BOOL is not set
CONFIG_PCI=y
@@ -237,7 +237,6 @@ CONFIG_CISS_SCSI_TAPE=y
CONFIG_BLK_DEV_DAC960=m
CONFIG_BLK_DEV_UMEM=m
CONFIG_BLK_DEV_SX8=m
-# CONFIG_BLK_DEV_UB is not set
CONFIG_CDROM_PKTCDVD=m
CONFIG_CDROM_PKTCDVD_BUFFERS=8
# CONFIG_CDROM_PKTCDVD_WCACHE is not set
@@ -355,6 +354,7 @@ CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
##
CONFIG_X86_PCC_CPUFREQ=m
CONFIG_X86_ACPI_CPUFREQ=m
+CONFIG_X86_ACPI_CPUFREQ_CPB=y
CONFIG_X86_POWERNOW_K8=m
CONFIG_X86_SPEEDSTEP_CENTRINO=m
CONFIG_X86_P4_CLOCKMOD=m
@@ -406,6 +406,9 @@ CONFIG_EDAC_AMD8111=m
CONFIG_EDD=m
# CONFIG_EDD_OFF is not set
CONFIG_EFI_VARS=m
+CONFIG_EFI_VARS_PSTORE=y
+#. Runtime-disabled by default
+CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE=y
CONFIG_DELL_RBU=m
CONFIG_DCDBAS=m
CONFIG_DMIID=y
@@ -447,6 +450,7 @@ CONFIG_DRM_AST=m
CONFIG_DRM_GMA500=m
CONFIG_DRM_GMA600=y
CONFIG_DRM_GMA3600=y
+CONFIG_DRM_MEDFIELD=y
##
## file: drivers/gpu/drm/mgag200/Kconfig
@@ -458,16 +462,10 @@ CONFIG_DRM_MGAG200=m
##
CONFIG_DRM_NOUVEAU=m
CONFIG_DRM_NOUVEAU_BACKLIGHT=y
-# CONFIG_DRM_NOUVEAU_DEBUG is not set
CONFIG_DRM_I2C_CH7006=m
CONFIG_DRM_I2C_SIL164=m
##
-## file: drivers/gpu/drm/radeon/Kconfig
-##
-CONFIG_DRM_RADEON_KMS=y
-
-##
## file: drivers/gpu/drm/vmwgfx/Kconfig
##
CONFIG_DRM_VMWGFX=m
@@ -825,7 +823,6 @@ CONFIG_MTD_PCI=m
## file: drivers/mtd/nand/Kconfig
##
CONFIG_MTD_NAND=m
-# CONFIG_MTD_NAND_VERIFY_WRITE is not set
CONFIG_MTD_NAND_DISKONCHIP=m
# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set
CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0
@@ -1050,7 +1047,6 @@ CONFIG_DSCC4_PCISYNC=y
CONFIG_DSCC4_PCI_RST=y
CONFIG_DLCI=m
CONFIG_DLCI_MAX=8
-CONFIG_CYCLADES_SYNC=m
CONFIG_SBNI=m
# CONFIG_SBNI_MULTILINE is not set
@@ -1094,7 +1090,6 @@ CONFIG_PCI_IOAPIC=y
## file: drivers/pci/hotplug/Kconfig
##
CONFIG_HOTPLUG_PCI=y
-CONFIG_HOTPLUG_PCI_FAKE=m
CONFIG_HOTPLUG_PCI_ACPI=y
CONFIG_HOTPLUG_PCI_ACPI_IBM=m
CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m
@@ -1257,10 +1252,8 @@ CONFIG_COMEDI_ADDI_APCI_1500=m
CONFIG_COMEDI_ADDI_APCI_1516=m
CONFIG_COMEDI_ADDI_APCI_1564=m
CONFIG_COMEDI_ADDI_APCI_16XX=m
-CONFIG_COMEDI_ADDI_APCI_2016=m
CONFIG_COMEDI_ADDI_APCI_2032=m
CONFIG_COMEDI_ADDI_APCI_2200=m
-CONFIG_COMEDI_ADDI_APCI_3001=m
CONFIG_COMEDI_ADDI_APCI_3120=m
CONFIG_COMEDI_ADDI_APCI_3501=m
CONFIG_COMEDI_ADDI_APCI_3XXX=m
@@ -1328,14 +1321,16 @@ CONFIG_COMEDI_8255=m
CONFIG_ET131X=m
##
-## file: drivers/staging/media/Kconfig
+## file: drivers/staging/line6/Kconfig
##
-CONFIG_STAGING_MEDIA=y
+CONFIG_LINE6_USB=m
+# CONFIG_LINE6_USB_DUMP_PCM is not set
+# CONFIG_LINE6_USB_IMPULSE_RESPONSE is not set
##
-## file: drivers/staging/media/easycap/Kconfig
+## file: drivers/staging/media/Kconfig
##
-CONFIG_EASYCAP=m
+CONFIG_STAGING_MEDIA=y
##
## file: drivers/staging/media/go7007/Kconfig
@@ -1353,7 +1348,6 @@ CONFIG_LIRC_SASEM=m
CONFIG_LIRC_SERIAL=m
CONFIG_LIRC_SERIAL_TRANSMITTER=y
CONFIG_LIRC_SIR=m
-CONFIG_LIRC_TTUSBIR=m
CONFIG_LIRC_ZILOG=m
##
@@ -1368,9 +1362,13 @@ CONFIG_PC300_MLPPP=y
CONFIG_R8187SE=m
##
-## file: drivers/staging/rtl8192e/rtl8192e/Kconfig
+## file: drivers/staging/rtl8192e/Kconfig
##
CONFIG_RTLLIB=m
+
+##
+## file: drivers/staging/rtl8192e/rtl8192e/Kconfig
+##
CONFIG_RTL8192E=m
##
@@ -1390,18 +1388,6 @@ CONFIG_RTS5139=m
# CONFIG_RTS5139_DEBUG is not set
##
-## file: drivers/staging/rts_pstor/Kconfig
-##
-CONFIG_RTS_PSTOR=m
-
-##
-## file: drivers/staging/telephony/Kconfig
-##
-CONFIG_PHONE=m
-CONFIG_PHONE_IXJ=m
-CONFIG_PHONE_IXJ_PCMCIA=m
-
-##
## file: drivers/staging/usbip/Kconfig
##
CONFIG_USBIP_CORE=m
@@ -1545,11 +1531,6 @@ CONFIG_FB_TRIDENT=m
CONFIG_FB_VIRTUAL=m
##
-## file: drivers/video/backlight/Kconfig
-##
-CONFIG_BACKLIGHT_PROGEAR=m
-
-##
## file: drivers/video/console/Kconfig
##
CONFIG_VGA_CONSOLE=y
@@ -1606,6 +1587,13 @@ CONFIG_XEN_ACPI_PROCESSOR=m
CONFIG_PROC_VMCORE=y
##
+## file: init/Kconfig
+##
+## choice: Cputime accounting
+# CONFIG_IRQ_TIME_ACCOUNTING is not set
+## end choice
+
+##
## file: kernel/irq/Kconfig
##
CONFIG_SPARSE_IRQ=y
@@ -1696,11 +1684,6 @@ CONFIG_IRNET=m
CONFIG_LAPB=m
##
-## file: net/wanrouter/Kconfig
-##
-CONFIG_WAN_ROUTER=m
-
-##
## file: sound/drivers/Kconfig
##
CONFIG_SND_DUMMY=m
@@ -1759,3 +1742,16 @@ CONFIG_SND_YMFPCI=m
##
CONFIG_SND_HDA_INTEL=m
+##
+## file: unknown
+##
+CONFIG_BACKLIGHT_PROGEAR=m
+# CONFIG_BLK_DEV_UB is not set
+# CONFIG_DRM_NOUVEAU_DEBUG is not set
+CONFIG_EASYCAP=m
+CONFIG_HOTPLUG_PCI_FAKE=m
+CONFIG_KVM_CLOCK=y
+CONFIG_LIRC_TTUSBIR=m
+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
+
+
View
7 linux-3/debian/config/kernelarch-x86/config-arch-64
@@ -57,7 +57,12 @@ CONFIG_AGP=y
CONFIG_AGP_AMD64=y
##
-## file: drivers/i2c/busses/Kconfig
+## file: drivers/edac/Kconfig
+##
+CONFIG_EDAC_SBRIDGE=m
+
+##
+## file: drivers/i2c/Kconfig
##
CONFIG_I2C_STUB=m
View
42 linux-3/debian/patches/bugfix/all/KVM-Fix-bounds-checking-in-ioapic-indirect-register-.patch
@@ -0,0 +1,42 @@
+From: Andy Honig <ahonig@google.com>
+Date: Wed, 20 Feb 2013 14:49:16 -0800
+Subject: KVM: Fix bounds checking in ioapic indirect register reads
+ (CVE-2013-1798)
+
+commit a2c118bfab8bc6b8bb213abfc35201e441693d55 upstream.
+
+If the guest specifies a IOAPIC_REG_SELECT with an invalid value and follows
+that with a read of the IOAPIC_REG_WINDOW KVM does not properly validate
+that request. ioapic_read_indirect contains an
+ASSERT(redir_index < IOAPIC_NUM_PINS), but the ASSERT has no effect in
+non-debug builds. In recent kernels this allows a guest to cause a kernel
+oops by reading invalid memory. In older kernels (pre-3.3) this allows a
+guest to read from large ranges of host memory.
+
+Tested: tested against apic unit tests.
+
+Signed-off-by: Andrew Honig <ahonig@google.com>
+Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
+---
+ virt/kvm/ioapic.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c
+index ce82b94..5ba005c 100644
+--- a/virt/kvm/ioapic.c
++++ b/virt/kvm/ioapic.c
+@@ -74,9 +74,12 @@ static unsigned long ioapic_read_indirect(struct kvm_ioapic *ioapic,
+ u32 redir_index = (ioapic->ioregsel - 0x10) >> 1;
+ u64 redir_content;
+
+- ASSERT(redir_index < IOAPIC_NUM_PINS);
++ if (redir_index < IOAPIC_NUM_PINS)
++ redir_content =
++ ioapic->redirtbl[redir_index].bits;
++ else
++ redir_content = ~0ULL;
+
+- redir_content = ioapic->redirtbl[redir_index].bits;
+ result = (ioapic->ioregsel & 0x1) ?
+ (redir_content >> 32) & 0xffffffff :
+ redir_content & 0xffffffff;
View
160 linux-3/debian/patches/bugfix/all/efi_pstore-Introducing-workqueue-updating-sysfs.patch
@@ -0,0 +1,160 @@
+From: Seiji Aguchi <seiji.aguchi@hds.com>
+Date: Tue, 12 Feb 2013 13:04:41 -0800
+Subject: efi_pstore: Introducing workqueue updating sysfs
+
+commit a93bc0c6e07ed9bac44700280e65e2945d864fd4 upstream.
+
+[Problem]
+efi_pstore creates sysfs entries, which enable users to access to NVRAM,
+in a write callback. If a kernel panic happens in an interrupt context,
+it may fail because it could sleep due to dynamic memory allocations during
+creating sysfs entries.
+
+[Patch Description]
+This patch removes sysfs operations from a write callback by introducing
+a workqueue updating sysfs entries which is scheduled after the write
+callback is called.
+
+Also, the workqueue is kicked in a just oops case.
+A system will go down in other cases such as panic, clean shutdown and emergency
+restart. And we don't need to create sysfs entries because there is no chance for
+users to access to them.
+
+efi_pstore will be robust against a kernel panic in an interrupt context with this patch.
+
+Signed-off-by: Seiji Aguchi <seiji.aguchi@hds.com>
+Acked-by: Matt Fleming <matt.fleming@intel.com>
+Signed-off-by: Tony Luck <tony.luck@intel.com>
+[bwh: Backported to 3.8: adjust context]
+---
+ drivers/firmware/efivars.c | 85 +++++++++++++++++++++++++++++++++++++++++---
+ include/linux/efi.h | 3 +-
+ 2 files changed, 82 insertions(+), 6 deletions(-)
+
+--- a/drivers/firmware/efivars.c
++++ b/drivers/firmware/efivars.c
+@@ -165,6 +165,13 @@ efivar_create_sysfs_entry(struct efivars
+ efi_char16_t *variable_name,
+ efi_guid_t *vendor_guid);
+
++/*
++ * Prototype for workqueue functions updating sysfs entry
++ */
++
++static void efivar_update_sysfs_entries(struct work_struct *);
++static DECLARE_WORK(efivar_work, efivar_update_sysfs_entries);
++
+ /* Return the number of unicode characters in data */
+ static unsigned long
+ utf16_strnlen(efi_char16_t *s, size_t maxlength)
+@@ -1428,11 +1435,8 @@ static int efi_pstore_write(enum pstore_
+
+ spin_unlock_irqrestore(&efivars->lock, flags);
+
+- if (size)
+- ret = efivar_create_sysfs_entry(efivars,
+- utf16_strsize(efi_name,
+- DUMP_NAME_LEN * 2),
+- efi_name, &vendor);
++ if (reason == KMSG_DUMP_OOPS)
++ schedule_work(&efivar_work);
+
+ *id = part;
+ return ret;
+@@ -1670,6 +1674,75 @@ static ssize_t efivar_delete(struct file
+ return count;
+ }
+
++static bool variable_is_present(efi_char16_t *variable_name, efi_guid_t *vendor)
++{
++ struct efivar_entry *entry, *n;
++ struct efivars *efivars = &__efivars;
++ unsigned long strsize1, strsize2;
++ bool found = false;
++
++ strsize1 = utf16_strsize(variable_name, 1024);
++ list_for_each_entry_safe(entry, n, &efivars->list, list) {
++ strsize2 = utf16_strsize(entry->var.VariableName, 1024);
++ if (strsize1 == strsize2 &&
++ !memcmp(variable_name, &(entry->var.VariableName),
++ strsize2) &&
++ !efi_guidcmp(entry->var.VendorGuid,
++ *vendor)) {
++ found = true;
++ break;
++ }
++ }
++ return found;
++}
++
++static void efivar_update_sysfs_entries(struct work_struct *work)
++{
++ struct efivars *efivars = &__efivars;
++ efi_guid_t vendor;
++ efi_char16_t *variable_name;
++ unsigned long variable_name_size = 1024;
++ efi_status_t status = EFI_NOT_FOUND;
++ bool found;
++
++ /* Add new sysfs entries */
++ while (1) {
++ variable_name = kzalloc(variable_name_size, GFP_KERNEL);
++ if (!variable_name) {
++ pr_err("efivars: Memory allocation failed.\n");
++ return;
++ }
++
++ spin_lock_irq(&efivars->lock);
++ found = false;
++ while (1) {
++ variable_name_size = 1024;
++ status = efivars->ops->get_next_variable(
++ &variable_name_size,
++ variable_name,
++ &vendor);
++ if (status != EFI_SUCCESS) {
++ break;
++ } else {
++ if (!variable_is_present(variable_name,
++ &vendor)) {
++ found = true;
++ break;
++ }
++ }
++ }
++ spin_unlock_irq(&efivars->lock);
++
++ if (!found) {
++ kfree(variable_name);
++ break;
++ } else
++ efivar_create_sysfs_entry(efivars,
++ variable_name_size,
++ variable_name, &vendor);
++ }
++}
++
+ /*
+ * Let's not leave out systab information that snuck into
+ * the efivars driver
+@@ -2000,6 +2073,8 @@ err_put:
+ static void __exit
+ efivars_exit(void)
+ {
++ cancel_work_sync(&efivar_work);
++
+ if (efi_enabled(EFI_RUNTIME_SERVICES)) {
+ unregister_efivars(&__efivars);
+ kobject_put(efi_kobj);
+--- a/include/linux/efi.h
++++ b/include/linux/efi.h
+@@ -740,7 +740,8 @@ struct efivars {
+ * 1) ->list - adds, removals, reads, writes
+ * 2) ops.[gs]et_variable() calls.
+ * It must not be held when creating sysfs entries or calling kmalloc.
+- * ops.get_next_variable() is only called from register_efivars(),
++ * ops.get_next_variable() is only called from register_efivars()
++ * or efivar_update_sysfs_entries(),
+ * which is protected by the BKL, so that path is safe.
+ */
+ spinlock_t lock;
View
156 linux-3/debian/patches/bugfix/all/efivars-Handle-duplicate-names-from-get_next_variabl.patch
@@ -0,0 +1,156 @@
+From: Matt Fleming <matt.fleming@intel.com>
+Date: Thu, 7 Mar 2013 11:59:14 +0000
+Subject: efivars: Handle duplicate names from get_next_variable()
+
+commit e971318bbed610e28bb3fde9d548e6aaf0a6b02e upstream.
+
+Some firmware exhibits a bug where the same VariableName and
+VendorGuid values are returned on multiple invocations of
+GetNextVariableName(). See,
+
+ https://bugzilla.kernel.org/show_bug.cgi?id=47631
+
+As a consequence of such a bug, Andre reports hitting the following
+WARN_ON() in the sysfs code after updating the BIOS on his, "Gigabyte
+Technology Co., Ltd. To be filled by O.E.M./Z77X-UD3H, BIOS F19e
+11/21/2012)" machine,
+
+[ 0.581554] EFI Variables Facility v0.08 2004-May-17
+[ 0.584914] ------------[ cut here ]------------
+[ 0.585639] WARNING: at /home/andre/linux/fs/sysfs/dir.c:536 sysfs_add_one+0xd4/0x100()
+[ 0.586381] Hardware name: To be filled by O.E.M.
+[ 0.587123] sysfs: cannot create duplicate filename '/firmware/efi/vars/SbAslBufferPtrVar-01f33c25-764d-43ea-aeea-6b5a41f3f3e8'
+[ 0.588694] Modules linked in:
+[ 0.589484] Pid: 1, comm: swapper/0 Not tainted 3.8.0+ #7
+[ 0.590280] Call Trace:
+[ 0.591066] [<ffffffff81208954>] ? sysfs_add_one+0xd4/0x100
+[ 0.591861] [<ffffffff810587bf>] warn_slowpath_common+0x7f/0xc0
+[ 0.592650] [<ffffffff810588bc>] warn_slowpath_fmt+0x4c/0x50
+[ 0.593429] [<ffffffff8134dd85>] ? strlcat+0x65/0x80
+[ 0.594203] [<ffffffff81208954>] sysfs_add_one+0xd4/0x100
+[ 0.594979] [<ffffffff81208b78>] create_dir+0x78/0xd0
+[ 0.595753] [<ffffffff81208ec6>] sysfs_create_dir+0x86/0xe0
+[ 0.596532] [<ffffffff81347e4c>] kobject_add_internal+0x9c/0x220
+[ 0.597310] [<ffffffff81348307>] kobject_init_and_add+0x67/0x90
+[ 0.598083] [<ffffffff81584a71>] ? efivar_create_sysfs_entry+0x61/0x1c0
+[ 0.598859] [<ffffffff81584b2b>] efivar_create_sysfs_entry+0x11b/0x1c0
+[ 0.599631] [<ffffffff8158517e>] register_efivars+0xde/0x420
+[ 0.600395] [<ffffffff81d430a7>] ? edd_init+0x2f5/0x2f5
+[ 0.601150] [<ffffffff81d4315f>] efivars_init+0xb8/0x104
+[ 0.601903] [<ffffffff8100215a>] do_one_initcall+0x12a/0x180
+[ 0.602659] [<ffffffff81d05d80>] kernel_init_freeable+0x13e/0x1c6
+[ 0.603418] [<ffffffff81d05586>] ? loglevel+0x31/0x31
+[ 0.604183] [<ffffffff816a6530>] ? rest_init+0x80/0x80
+[ 0.604936] [<ffffffff816a653e>] kernel_init+0xe/0xf0
+[ 0.605681] [<ffffffff816ce7ec>] ret_from_fork+0x7c/0xb0
+[ 0.606414] [<ffffffff816a6530>] ? rest_init+0x80/0x80
+[ 0.607143] ---[ end trace 1609741ab737eb29 ]---
+
+There's not much we can do to work around and keep traversing the
+variable list once we hit this firmware bug. Our only solution is to
+terminate the loop because, as Lingzhu reports, some machines get
+stuck when they encounter duplicate names,
+
+ > I had an IBM System x3100 M4 and x3850 X5 on which kernel would
+ > get stuck in infinite loop creating duplicate sysfs files because,
+ > for some reason, there are several duplicate boot entries in nvram
+ > getting GetNextVariableName into a circle of iteration (with
+ > period > 2).
+
+Also disable the workqueue, as efivar_update_sysfs_entries() uses
+GetNextVariableName() to figure out which variables have been created
+since the last iteration. That algorithm isn't going to work if
+GetNextVariableName() returns duplicates. Note that we don't disable
+EFI variable creation completely on the affected machines, it's just
+that any pstore dump-* files won't appear in sysfs until the next
+boot.
+
+Reported-by: Andre Heider <a.heider@gmail.com>
+Reported-by: Lingzhu Xiang <lxiang@redhat.com>
+Tested-by: Lingzhu Xiang <lxiang@redhat.com>
+Cc: Seiji Aguchi <seiji.aguchi@hds.com>
+Signed-off-by: Matt Fleming <matt.fleming@intel.com>
+---
+ drivers/firmware/efivars.c | 48 +++++++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 47 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c
+index 1e9d9b9..d64661f 100644
+--- a/drivers/firmware/efivars.c
++++ b/drivers/firmware/efivars.c
+@@ -170,6 +170,7 @@ efivar_create_sysfs_entry(struct efivars *efivars,
+
+ static void efivar_update_sysfs_entries(struct work_struct *);
+ static DECLARE_WORK(efivar_work, efivar_update_sysfs_entries);
++static bool efivar_wq_enabled = true;
+
+ /* Return the number of unicode characters in data */
+ static unsigned long
+@@ -1444,7 +1445,7 @@ static int efi_pstore_write(enum pstore_type_id type,
+
+ spin_unlock_irqrestore(&efivars->lock, flags);
+
+- if (reason == KMSG_DUMP_OOPS)
++ if (reason == KMSG_DUMP_OOPS && efivar_wq_enabled)
+ schedule_work(&efivar_work);
+
+ *id = part;
+@@ -1975,6 +1976,35 @@ void unregister_efivars(struct efivars *efivars)
+ }
+ EXPORT_SYMBOL_GPL(unregister_efivars);
+
++/*
++ * Print a warning when duplicate EFI variables are encountered and
++ * disable the sysfs workqueue since the firmware is buggy.
++ */
++static void dup_variable_bug(efi_char16_t *s16, efi_guid_t *vendor_guid,
++ unsigned long len16)
++{
++ size_t i, len8 = len16 / sizeof(efi_char16_t);
++ char *s8;
++
++ /*
++ * Disable the workqueue since the algorithm it uses for
++ * detecting new variables won't work with this buggy
++ * implementation of GetNextVariableName().
++ */
++ efivar_wq_enabled = false;
++
++ s8 = kzalloc(len8, GFP_KERNEL);
++ if (!s8)
++ return;
++
++ for (i = 0; i < len8; i++)
++ s8[i] = s16[i];
++
++ printk(KERN_WARNING "efivars: duplicate variable: %s-%pUl\n",
++ s8, vendor_guid);
++ kfree(s8);
++}
++
+ int register_efivars(struct efivars *efivars,
+ const struct efivar_operations *ops,
+ struct kobject *parent_kobj)
+@@ -2025,6 +2055,22 @@ int register_efivars(struct efivars *efivars,
+ case EFI_SUCCESS:
+ variable_name_size = var_name_strnsize(variable_name,
+ variable_name_size);
++
++ /*
++ * Some firmware implementations return the
++ * same variable name on multiple calls to
++ * get_next_variable(). Terminate the loop
++ * immediately as there is no guarantee that
++ * we'll ever see a different variable name,
++ * and may end up looping here forever.
++ */
++ if (variable_is_present(variable_name, &vendor_guid)) {
++ dup_variable_bug(variable_name, &vendor_guid,
++ variable_name_size);
++ status = EFI_NOT_FOUND;
++ break;
++ }
++
+ efivar_create_sysfs_entry(efivars,
+ variable_name_size,
+ variable_name,
View
101 linux-3/debian/patches/bugfix/all/efivars-explicitly-calculate-length-of-VariableName.patch
@@ -0,0 +1,101 @@
+From: Matt Fleming <matt.fleming@intel.com>
+Date: Fri, 1 Mar 2013 14:49:12 +0000
+Subject: efivars: explicitly calculate length of VariableName
+
+commit ec50bd32f1672d38ddce10fb1841cbfda89cfe9a upstream.
+
+It's not wise to assume VariableNameSize represents the length of
+VariableName, as not all firmware updates VariableNameSize in the same
+way (some don't update it at all if EFI_SUCCESS is returned). There
+are even implementations out there that update VariableNameSize with
+values that are both larger than the string returned in VariableName
+and smaller than the buffer passed to GetNextVariableName(), which
+resulted in the following bug report from Michael Schroeder,
+
+ > On HP z220 system (firmware version 1.54), some EFI variables are
+ > incorrectly named :
+ >
+ > ls -d /sys/firmware/efi/vars/*8be4d* | grep -v -- -8be returns
+ > /sys/firmware/efi/vars/dbxDefault-pport8be4df61-93ca-11d2-aa0d-00e098032b8c
+ > /sys/firmware/efi/vars/KEKDefault-pport8be4df61-93ca-11d2-aa0d-00e098032b8c
+ > /sys/firmware/efi/vars/SecureBoot-pport8be4df61-93ca-11d2-aa0d-00e098032b8c
+ > /sys/firmware/efi/vars/SetupMode-Information8be4df61-93ca-11d2-aa0d-00e098032b8c
+
+The issue here is that because we blindly use VariableNameSize without
+verifying its value, we can potentially read garbage values from the
+buffer containing VariableName if VariableNameSize is larger than the
+length of VariableName.
+
+Since VariableName is a string, we can calculate its size by searching
+for the terminating NULL character.
+
+Reported-by: Frederic Crozat <fcrozat@suse.com>
+Cc: Matthew Garrett <mjg59@srcf.ucam.org>
+Cc: Josh Boyer <jwboyer@redhat.com>
+Cc: Michael Schroeder <mls@suse.com>
+Cc: Lee, Chun-Yi <jlee@suse.com>
+Cc: Lingzhu Xiang <lxiang@redhat.com>
+Cc: Seiji Aguchi <seiji.aguchi@hds.com>
+Signed-off-by: Matt Fleming <matt.fleming@intel.com>
+---
+ drivers/firmware/efivars.c | 32 +++++++++++++++++++++++++++++++-
+ 1 file changed, 31 insertions(+), 1 deletion(-)
+
+--- a/drivers/firmware/efivars.c
++++ b/drivers/firmware/efivars.c
+@@ -1044,6 +1044,31 @@ static bool variable_is_present(efi_char
+ return found;
+ }
+
++/*
++ * Returns the size of variable_name, in bytes, including the
++ * terminating NULL character, or variable_name_size if no NULL
++ * character is found among the first variable_name_size bytes.
++ */
++static unsigned long var_name_strnsize(efi_char16_t *variable_name,
++ unsigned long variable_name_size)
++{
++ unsigned long len;
++ efi_char16_t c;
++
++ /*
++ * The variable name is, by definition, a NULL-terminated
++ * string, so make absolutely sure that variable_name_size is
++ * the value we expect it to be. If not, return the real size.
++ */
++ for (len = 2; len <= variable_name_size; len += sizeof(c)) {
++ c = variable_name[(len / sizeof(c)) - 1];
++ if (!c)
++ break;
++ }
++
++ return min(len, variable_name_size);
++}
++
+ static void efivar_update_sysfs_entries(struct work_struct *work)
+ {
+ struct efivars *efivars = &__efivars;
+@@ -1084,10 +1109,13 @@ static void efivar_update_sysfs_entries(
+ if (!found) {
+ kfree(variable_name);
+ break;
+- } else
++ } else {
++ variable_name_size = var_name_strnsize(variable_name,
++ variable_name_size);
+ efivar_create_sysfs_entry(efivars,
+ variable_name_size,
+ variable_name, &vendor);
++ }
+ }
+ }
+
+@@ -1318,6 +1346,8 @@ int register_efivars(struct efivars *efi
+ &vendor_guid);
+ switch (status) {
+ case EFI_SUCCESS:
++ variable_name_size = var_name_strnsize(variable_name,
++ variable_name_size);
+ efivar_create_sysfs_entry(efivars,
+ variable_name_size,
+ variable_name,
View
133 linux-3/debian/patches/bugfix/all/exec-use-ELOOP-for-max-recursion-depth.patch
@@ -1,133 +0,0 @@
-From: Kees Cook <keescook@chromium.org>
-Date: Thu, 6 Dec 2012 17:00:21 +1100
-Subject: [2/2] exec: use -ELOOP for max recursion depth
-
-commit a4706fd3dc5d23f58da814d03f3ef92fd9a4fc16 upstream.
-
-To avoid an explosion of request_module calls on a chain of abusive
-scripts, fail maximum recursion with -ELOOP instead of -ENOEXEC. As soon
-as maximum recursion depth is hit, the error will fail all the way back
-up the chain, aborting immediately.
-
-This also has the side-effect of stopping the user's shell from attempting
-to reexecute the top-level file as a shell script. As seen in the
-dash source:
-
- if (cmd != path_bshell && errno == ENOEXEC) {
- *argv-- = cmd;
- *argv = cmd = path_bshell;
- goto repeat;
- }
-
-The above logic was designed for running scripts automatically that lacked
-the "#!" header, not to re-try failed recursion. On a legitimate -ENOEXEC,
-things continue to behave as the shell expects.
-
-Additionally, when tracking recursion, the binfmt handlers should not be
-involved. The recursion being tracked is the depth of calls through
-search_binary_handler(), so that function should be exclusively responsible
-for tracking the depth.
-
-Signed-off-by: Kees Cook <keescook@chromium.org>
-Cc: halfdog <me@halfdog.net>
-Cc: P J P <ppandit@redhat.com>
-Cc: Alexander Viro <viro@zeniv.linux.org.uk>
-Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-[bwh: Backported to 3.6: adjust context]
----
- fs/binfmt_em86.c | 1 -
- fs/binfmt_misc.c | 6 ------
- fs/binfmt_script.c | 4 +---
- fs/exec.c | 10 +++++-----
- include/linux/binfmts.h | 2 --
- 5 files changed, 6 insertions(+), 17 deletions(-)
-
---- a/fs/binfmt_em86.c
-+++ b/fs/binfmt_em86.c
-@@ -42,7 +42,6 @@ static int load_em86(struct linux_binprm
- return -ENOEXEC;
- }
-
-- bprm->recursion_depth++; /* Well, the bang-shell is implicit... */
- allow_write_access(bprm->file);
- fput(bprm->file);
- bprm->file = NULL;
---- a/fs/binfmt_misc.c
-+++ b/fs/binfmt_misc.c
-@@ -117,10 +117,6 @@ static int load_misc_binary(struct linux
- if (!enabled)
- goto _ret;
-
-- retval = -ENOEXEC;
-- if (bprm->recursion_depth > BINPRM_MAX_RECURSION)
-- goto _ret;
--
- /* to keep locking time low, we copy the interpreter string */
- read_lock(&entries_lock);
- fmt = check_file(bprm);
-@@ -200,8 +196,6 @@ static int load_misc_binary(struct linux
- if (retval < 0)
- goto _error;
-
-- bprm->recursion_depth++;
--
- retval = search_binary_handler (bprm, regs);
- if (retval < 0)
- goto _error;
---- a/fs/binfmt_script.c
-+++ b/fs/binfmt_script.c
-@@ -22,15 +22,13 @@ static int load_script(struct linux_binp
- char interp[BINPRM_BUF_SIZE];
- int retval;
-
-- if ((bprm->buf[0] != '#') || (bprm->buf[1] != '!') ||
-- (bprm->recursion_depth > BINPRM_MAX_RECURSION))
-+ if ((bprm->buf[0] != '#') || (bprm->buf[1] != '!'))
- return -ENOEXEC;
- /*
- * This section does the #! interpretation.
- * Sorta complicated, but hopefully it will work. -TYT
- */
-
-- bprm->recursion_depth++;
- allow_write_access(bprm->file);
- fput(bprm->file);
- bprm->file = NULL;
---- a/fs/exec.c
-+++ b/fs/exec.c
-@@ -1371,6 +1371,10 @@ int search_binary_handler(struct linux_b
- struct linux_binfmt *fmt;
- pid_t old_pid, old_vpid;
-
-+ /* This allows 4 levels of binfmt rewrites before failing hard. */
-+ if (depth > 5)
-+ return -ELOOP;
-+
- retval = security_bprm_check(bprm);
- if (retval)
- return retval;
-@@ -1395,12 +1399,8 @@ int search_binary_handler(struct linux_b
- if (!try_module_get(fmt->module))
- continue;
- read_unlock(&binfmt_lock);
-+ bprm->recursion_depth = depth + 1;
- retval = fn(bprm, regs);
-- /*
-- * Restore the depth counter to its starting value
-- * in this call, so we don't have to rely on every
-- * load_binary function to restore it on return.
-- */
- bprm->recursion_depth = depth;
- if (retval >= 0) {
- if (depth == 0) {
---- a/include/linux/binfmts.h
-+++ b/include/linux/binfmts.h
-@@ -54,8 +54,6 @@ struct linux_binprm {
- #define BINPRM_FLAGS_EXECFD_BIT 1
- #define BINPRM_FLAGS_EXECFD (1 << BINPRM_FLAGS_EXECFD_BIT)
-
--#define BINPRM_MAX_RECURSION 4
--
- /* Function parameter for binfmt->coredump */
- struct coredump_params {
- siginfo_t *siginfo;
View
36 linux-3/debian/patches/bugfix/all/kernel-signal.c-use-__ARCH_HAS_SA_RESTORER-instead-o.patch
@@ -0,0 +1,36 @@
+From: Andrew Morton <akpm@linux-foundation.org>
+Date: Wed, 13 Mar 2013 14:59:34 -0700
+Subject: kernel/signal.c: use __ARCH_HAS_SA_RESTORER instead of SA_RESTORER
+
+commit 522cff142d7d2f9230839c9e1f21a4d8bcc22a4a upstream.
+
+__ARCH_HAS_SA_RESTORER is the preferred conditional for use in 3.9 and
+later kernels, per Kees.
+
+Cc: Emese Revfy <re.emese@gmail.com>
+Cc: Emese Revfy <re.emese@gmail.com>
+Cc: PaX Team <pageexec@freemail.hu>
+Cc: Al Viro <viro@zeniv.linux.org.uk>
+Cc: Oleg Nesterov <oleg@redhat.com>
+Cc: "Eric W. Biederman" <ebiederm@xmission.com>
+Cc: Serge Hallyn <serge.hallyn@canonical.com>
+Cc: Julien Tinnes <jln@google.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+---
+ kernel/signal.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/kernel/signal.c b/kernel/signal.c
+index 43b0d4a..dd72567 100644
+--- a/kernel/signal.c
++++ b/kernel/signal.c
+@@ -485,7 +485,7 @@ flush_signal_handlers(struct task_struct *t, int force_default)
+ if (force_default || ka->sa.sa_handler != SIG_IGN)
+ ka->sa.sa_handler = SIG_DFL;
+ ka->sa.sa_flags = 0;
+-#ifdef SA_RESTORER
++#ifdef __ARCH_HAS_SA_RESTORER
+ ka->sa.sa_restorer = NULL;
+ #endif
+ sigemptyset(&ka->sa.sa_mask);
View
36 linux-3/debian/patches/bugfix/all/mm-Try-harder-to-allocate-vmemmap-blocks.patch
@@ -0,0 +1,36 @@
+From: Ben Hutchings <ben@decadent.org.uk>
+Date: Mon, 11 Feb 2013 00:56:24 +0000
+Subject: mm: Try harder to allocate vmemmap blocks
+Bug-Debian: http://bugs.debian.org/699913
+
+Hot-adding memory on x86_64 normally requires huge page allocation.
+When this is done to a VM guest, it's usually because the system is
+already tight on memory, so the request tends to fail. Try to avoid
+this by adding __GFP_REPEAT to the allocation flags.
+
+Reported-and-tested-by: Bernhard Schmidt <Bernhard.Schmidt@lrz.de>
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+---
+ mm/sparse-vmemmap.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c
+index 1b7e22a..22b7e18 100644
+--- a/mm/sparse-vmemmap.c
++++ b/mm/sparse-vmemmap.c
+@@ -53,10 +53,12 @@ void * __meminit vmemmap_alloc_block(unsigned long size, int node)
+ struct page *page;
+
+ if (node_state(node, N_HIGH_MEMORY))
+- page = alloc_pages_node(node,
+- GFP_KERNEL | __GFP_ZERO, get_order(size));
++ page = alloc_pages_node(
++ node, GFP_KERNEL | __GFP_ZERO | __GFP_REPEAT,
++ get_order(size));
+ else
+- page = alloc_pages(GFP_KERNEL | __GFP_ZERO,
++ page = alloc_pages(
++ GFP_KERNEL | __GFP_ZERO | __GFP_REPEAT,
+ get_order(size));
+ if (page)
+ return page_address(page);
View
48 linux-3/debian/patches/bugfix/all/pch_gbe-ptp_pch-Fix-the-dependency-direction-between.patch
@@ -1,48 +0,0 @@
-From: Ben Hutchings <bhutchings@solarflare.com>
-Date: Fri, 16 Nov 2012 15:43:59 +0000
-Subject: [5/5] pch_gbe, ptp_pch: Fix the dependency direction between these
- drivers
-
-commit 18d359ceb04485df0e387e04b0e52a761c4c58a0 upstream.
-
-In commit a24006ed12616bde1bbdb26868495906a212d8dc ('ptp: Enable clock
-drivers along with associated net/PHY drivers') I wrongly made
-PTP_1588_CLOCK_PCH depend on PCH_GBE. The dependency is really the
-other way around. Therefore make PCH_GBE select PTP_1588_CLOCK_PCH
-and remove the 'default y' from the latter.
-
-Reported-by: Randy Dunlap <rdunlap@xenotime.net>
-Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
-Acked-by: Randy Dunlap <rdunlap@xenotime.net>
-Signed-off-by: David S. Miller <davem@davemloft.net>
----
- drivers/net/ethernet/oki-semi/pch_gbe/Kconfig | 1 +
- drivers/ptp/Kconfig | 2 --
- 2 files changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/Kconfig b/drivers/net/ethernet/oki-semi/pch_gbe/Kconfig
-index 00bc4fc..34d05bf 100644
---- a/drivers/net/ethernet/oki-semi/pch_gbe/Kconfig
-+++ b/drivers/net/ethernet/oki-semi/pch_gbe/Kconfig
-@@ -7,6 +7,7 @@ config PCH_GBE
- depends on PCI
- select NET_CORE
- select MII
-+ select PTP_1588_CLOCK_PCH
- ---help---
- This is a gigabit ethernet driver for EG20T PCH.
- EG20T PCH is the platform controller hub that is used in Intel's
-diff --git a/drivers/ptp/Kconfig b/drivers/ptp/Kconfig
-index 70c5836..1ea6f1d 100644
---- a/drivers/ptp/Kconfig
-+++ b/drivers/ptp/Kconfig
-@@ -72,9 +72,7 @@ config DP83640_PHY
-
- config PTP_1588_CLOCK_PCH
- tristate "Intel PCH EG20T as PTP clock"
-- depends on PCH_GBE
- select PTP_1588_CLOCK
-- default y
- help
- This driver adds support for using the PCH EG20T as a PTP
- clock. The hardware supports time stamping of PTP packets
View
77 linux-3/debian/patches/bugfix/all/pps-ptp-Remove-dependencies-on-EXPERIMENTAL.patch
@@ -1,77 +0,0 @@
-From: Ben Hutchings <bhutchings@solarflare.com>
-Date: Wed, 31 Oct 2012 15:31:29 +0000
-Subject: [1/5] pps, ptp: Remove dependencies on EXPERIMENTAL
-
-commit c56283034ce28f99de494b69896528ae90cd9730 upstream.
-
-These are now established subsystems, and we want drivers to be able
-to select PPS and PTP_1588_CLOCK without depending on EXPERIMENTAL.
-Further, the use of EXPERIMENTAL is now deprecated in general.
-
-Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
----
- drivers/net/ethernet/intel/Kconfig | 4 ++--
- drivers/net/ethernet/oki-semi/pch_gbe/Kconfig | 1 -
- drivers/pps/Kconfig | 1 -
- drivers/ptp/Kconfig | 1 -
- 4 files changed, 2 insertions(+), 5 deletions(-)
-
-diff --git a/drivers/net/ethernet/intel/Kconfig b/drivers/net/ethernet/intel/Kconfig
-index 0cafe4f..9e49217 100644
---- a/drivers/net/ethernet/intel/Kconfig
-+++ b/drivers/net/ethernet/intel/Kconfig
-@@ -123,7 +123,7 @@ config IGB_DCA
- config IGB_PTP
- bool "PTP Hardware Clock (PHC)"
- default n
-- depends on IGB && EXPERIMENTAL
-+ depends on IGB
- select PPS
- select PTP_1588_CLOCK
- ---help---
-@@ -225,7 +225,7 @@ config IXGBE_DCB
- config IXGBE_PTP
- bool "PTP Clock Support"
- default n
-- depends on IXGBE && EXPERIMENTAL
-+ depends on IXGBE
- select PPS
- select PTP_1588_CLOCK
- ---help---
-diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/Kconfig b/drivers/net/ethernet/oki-semi/pch_gbe/Kconfig
-index 5296cc8..9867bc6 100644
---- a/drivers/net/ethernet/oki-semi/pch_gbe/Kconfig
-+++ b/drivers/net/ethernet/oki-semi/pch_gbe/Kconfig
-@@ -26,7 +26,6 @@ if PCH_GBE
- config PCH_PTP
- bool "PCH PTP clock support"
- default n
-- depends on EXPERIMENTAL
- select PPS
- select PTP_1588_CLOCK
- select PTP_1588_CLOCK_PCH
-diff --git a/drivers/pps/Kconfig b/drivers/pps/Kconfig
-index 258ca59..982d16b 100644
---- a/drivers/pps/Kconfig
-+++ b/drivers/pps/Kconfig
-@@ -6,7 +6,6 @@ menu "PPS support"
-
- config PPS
- tristate "PPS support"
-- depends on EXPERIMENTAL
- ---help---
- PPS (Pulse Per Second) is a special pulse provided by some GPS
- antennae. Userland can use it to get a high-precision time
-diff --git a/drivers/ptp/Kconfig b/drivers/ptp/Kconfig
-index ffdf712..a6e4b7c 100644
---- a/drivers/ptp/Kconfig
-+++ b/drivers/ptp/Kconfig
-@@ -9,7 +9,6 @@ comment "Enable Device Drivers -> PPS to see the PTP clock options."
-
- config PTP_1588_CLOCK
- tristate "PTP clock support"
-- depends on EXPERIMENTAL
- depends on PPS
- help
- The IEEE 1588 standard defines a method to precisely
View
784 linux-3/debian/patches/bugfix/all/ptp-Enable-clock-drivers-along-with-associated-net-P.patch
@@ -1,784 +0,0 @@
-From: Ben Hutchings <bhutchings@solarflare.com>
-Date: Wed, 31 Oct 2012 15:33:52 +0000
-Subject: [3/5] ptp: Enable clock drivers along with associated net/PHY
- drivers
-
-commit a24006ed12616bde1bbdb26868495906a212d8dc upstream.
-
-Where a PTP clock driver is associated with a net or PHY driver, it
-should be enabled automatically whenever that driver is enabled.
-Therefore:
-
-- Make PTP clock drivers select rather than depending on PTP_1588_CLOCK
-- Remove separate boolean options for PTP clock drivers that are built
- as part of net driver modules. (This also fixes cases where the PTP
- subsystem is wrongly forced to be built-in.)
-- Set 'default y' for PTP clock drivers that depend on specific net
- drivers but are built separately
-
-Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-[bwh: Backported to 3.7: adjust context; drop removal of #ifdefs that
- aren't present]
----
---- a/drivers/net/ethernet/intel/Kconfig
-+++ b/drivers/net/ethernet/intel/Kconfig
-@@ -93,6 +93,7 @@ config E1000E
- config IGB
- tristate "Intel(R) 82575/82576 PCI-Express Gigabit Ethernet support"
- depends on PCI
-+ select PTP_1588_CLOCK
- ---help---
- This driver supports Intel(R) 82575/82576 gigabit ethernet family of
- adapters. For more information on how to identify your adapter, go
-@@ -120,18 +121,6 @@ config IGB_DCA
- driver. DCA is a method for warming the CPU cache before data
- is used, with the intent of lessening the impact of cache misses.
-
--config IGB_PTP
-- bool "PTP Hardware Clock (PHC)"
-- default n
-- depends on IGB
-- select PTP_1588_CLOCK
-- ---help---
-- Say Y here if you want to use PTP Hardware Clock (PHC) in the
-- driver. Only the basic clock operations have been implemented.
--
-- Every timestamp and clock read operations must consult the
-- overflow counter to form a correct time value.
--
- config IGBVF
- tristate "Intel(R) 82576 Virtual Function Ethernet support"
- depends on PCI
-@@ -179,6 +168,7 @@ config IXGBE
- tristate "Intel(R) 10GbE PCI Express adapters support"
- depends on PCI && INET
- select MDIO
-+ select PTP_1588_CLOCK
- ---help---
- This driver supports Intel(R) 10GbE PCI Express family of
- adapters. For more information on how to identify your adapter, go
-@@ -221,18 +211,6 @@ config IXGBE_DCB
-
- If unsure, say N.
-
--config IXGBE_PTP
-- bool "PTP Clock Support"
-- default n
-- depends on IXGBE
-- select PTP_1588_CLOCK
-- ---help---
-- Say Y here if you want support for 1588 Timestamping with a
-- PHC device, using the PTP 1588 Clock support. This is
-- required to enable timestamping support for the device.
--
-- If unsure, say N.
--
- config IXGBEVF
- tristate "Intel(R) 82599 Virtual Function Ethernet support"
- depends on PCI_MSI
---- a/drivers/net/ethernet/intel/igb/Makefile
-+++ b/drivers/net/ethernet/intel/igb/Makefile
-@@ -34,6 +34,4 @@ obj-$(CONFIG_IGB) += igb.o
-
- igb-objs := igb_main.o igb_ethtool.o e1000_82575.o \
- e1000_mac.o e1000_nvm.o e1000_phy.o e1000_mbx.o \
-- e1000_i210.o
--
--igb-$(CONFIG_IGB_PTP) += igb_ptp.o
-+ e1000_i210.o igb_ptp.o
---- a/drivers/net/ethernet/intel/igb/igb.h
-+++ b/drivers/net/ethernet/intel/igb/igb.h
-@@ -34,11 +34,9 @@
- #include "e1000_mac.h"
- #include "e1000_82575.h"
-
--#ifdef CONFIG_IGB_PTP
- #include <linux/clocksource.h>
- #include <linux/net_tstamp.h>
- #include <linux/ptp_clock_kernel.h>
--#endif /* CONFIG_IGB_PTP */
- #include <linux/bitops.h>
- #include <linux/if_vlan.h>
-
-@@ -373,7 +371,6 @@ struct igb_adapter {
- u32 wvbr;
- u32 *shadow_vfta;
-
--#ifdef CONFIG_IGB_PTP
- struct ptp_clock *ptp_clock;
- struct ptp_clock_info ptp_caps;
- struct delayed_work ptp_overflow_work;
-@@ -382,7 +379,6 @@ struct igb_adapter {
- spinlock_t tmreg_lock;
- struct cyclecounter cc;
- struct timecounter tc;
--#endif /* CONFIG_IGB_PTP */
-
- char fw_version[32];
- };
-@@ -436,7 +432,6 @@ extern bool igb_has_link(struct igb_adap
- extern void igb_set_ethtool_ops(struct net_device *);
- extern void igb_power_up_link(struct igb_adapter *);
- extern void igb_set_fw_version(struct igb_adapter *);
--#ifdef CONFIG_IGB_PTP
- extern void igb_ptp_init(struct igb_adapter *adapter);
- extern void igb_ptp_stop(struct igb_adapter *adapter);
- extern void igb_ptp_reset(struct igb_adapter *adapter);
-@@ -447,7 +442,6 @@ extern void igb_ptp_rx_hwtstamp(struct i
- struct sk_buff *skb);
- extern int igb_ptp_hwtstamp_ioctl(struct net_device *netdev,
- struct ifreq *ifr, int cmd);
--#endif /* CONFIG_IGB_PTP */
-
- static inline s32 igb_reset_phy(struct e1000_hw *hw)
- {
---- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
-+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
-@@ -2301,7 +2301,6 @@ static int igb_get_ts_info(struct net_de
- struct igb_adapter *adapter = netdev_priv(dev);
-
- switch (adapter->hw.mac.type) {
--#ifdef CONFIG_IGB_PTP
- case e1000_82576:
- case e1000_82580:
- case e1000_i350:
-@@ -2337,7 +2336,6 @@ static int igb_get_ts_info(struct net_de
- (1 << HWTSTAMP_FILTER_PTP_V2_EVENT);
-
- return 0;
--#endif /* CONFIG_IGB_PTP */
- default:
- return -EOPNOTSUPP;
- }
---- a/drivers/net/ethernet/intel/igb/igb_main.c
-+++ b/drivers/net/ethernet/intel/igb/igb_main.c
-@@ -1706,10 +1706,8 @@ void igb_reset(struct igb_adapter *adapt
- /* Enable h/w to recognize an 802.1Q VLAN Ethernet packet */
- wr32(E1000_VET, ETHERNET_IEEE_VLAN_TYPE);
-
--#ifdef CONFIG_IGB_PTP
- /* Re-enable PTP, where applicable. */
- igb_ptp_reset(adapter);
--#endif /* CONFIG_IGB_PTP */
-
- igb_get_phy_info(hw);
- }
-@@ -2141,10 +2139,8 @@ static int __devinit igb_probe(struct pc
-
- #endif
-
--#ifdef CONFIG_IGB_PTP
- /* do hw tstamp init after resetting */
- igb_ptp_init(adapter);
--#endif /* CONFIG_IGB_PTP */
-
- dev_info(&pdev->dev, "Intel(R) Gigabit Ethernet Network Connection\n");
- /* print bus type/speed/width info */
-@@ -2219,9 +2215,7 @@ static void __devexit igb_remove(struct
- struct e1000_hw *hw = &adapter->hw;
-
- pm_runtime_get_noresume(&pdev->dev);
--#ifdef CONFIG_IGB_PTP
- igb_ptp_stop(adapter);
--#endif /* CONFIG_IGB_PTP */
-
- /*
- * The watchdog timer may be rescheduled, so explicitly
-@@ -3112,10 +3106,8 @@ void igb_configure_rx_ring(struct igb_ad
- srrctl |= (PAGE_SIZE / 2) >> E1000_SRRCTL_BSIZEPKT_SHIFT;
- #endif
- srrctl |= E1000_SRRCTL_DESCTYPE_HDR_SPLIT_ALWAYS;
--#ifdef CONFIG_IGB_PTP
- if (hw->mac.type >= e1000_82580)
- srrctl |= E1000_SRRCTL_TIMESTAMP;
--#endif /* CONFIG_IGB_PTP */
- /* Only set Drop Enable if we are supporting multiple queues */
- if (adapter->vfs_allocated_count || adapter->num_rx_queues > 1)
- srrctl |= E1000_SRRCTL_DROP_EN;
-@@ -4159,11 +4151,9 @@ static __le32 igb_tx_cmd_type(u32 tx_fla
- if (tx_flags & IGB_TX_FLAGS_VLAN)
- cmd_type |= cpu_to_le32(E1000_ADVTXD_DCMD_VLE);
-
--#ifdef CONFIG_IGB_PTP
- /* set timestamp bit if present */
- if (unlikely(tx_flags & IGB_TX_FLAGS_TSTAMP))
- cmd_type |= cpu_to_le32(E1000_ADVTXD_MAC_TSTAMP);
--#endif /* CONFIG_IGB_PTP */
-
- /* set segmentation bits for TSO */
- if (tx_flags & IGB_TX_FLAGS_TSO)
-@@ -4372,9 +4362,7 @@ static inline int igb_maybe_stop_tx(stru
- netdev_tx_t igb_xmit_frame_ring(struct sk_buff *skb,
- struct igb_ring *tx_ring)
- {
--#ifdef CONFIG_IGB_PTP
- struct igb_adapter *adapter = netdev_priv(tx_ring->netdev);
--#endif /* CONFIG_IGB_PTP */
- struct igb_tx_buffer *first;
- int tso;
- u32 tx_flags = 0;
-@@ -4397,7 +4385,6 @@ netdev_tx_t igb_xmit_frame_ring(struct s
- first->bytecount = skb->len;
- first->gso_segs = 1;
-
--#ifdef CONFIG_IGB_PTP
- if (unlikely((skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) &&
- !(adapter->ptp_tx_skb))) {
- skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
-@@ -4407,7 +4394,6 @@ netdev_tx_t igb_xmit_frame_ring(struct s
- if (adapter->hw.mac.type == e1000_82576)
- schedule_work(&adapter->ptp_tx_work);
- }
--#endif /* CONFIG_IGB_PTP */
-
- if (vlan_tx_tag_present(skb)) {
- tx_flags |= IGB_TX_FLAGS_VLAN;
-@@ -4800,7 +4786,6 @@ static irqreturn_t igb_msix_other(int ir
- mod_timer(&adapter->watchdog_timer, jiffies + 1);
- }
-
--#ifdef CONFIG_IGB_PTP
- if (icr & E1000_ICR_TS) {
- u32 tsicr = rd32(E1000_TSICR);
-
-@@ -4811,7 +4796,6 @@ static irqreturn_t igb_msix_other(int ir
- schedule_work(&adapter->ptp_tx_work);
- }
- }
--#endif /* CONFIG_IGB_PTP */
-
- wr32(E1000_EIMS, adapter->eims_other);
-
-@@ -5545,7 +5529,6 @@ static irqreturn_t igb_intr_msi(int irq,
- mod_timer(&adapter->watchdog_timer, jiffies + 1);
- }
-
--#ifdef CONFIG_IGB_PTP
- if (icr & E1000_ICR_TS) {
- u32 tsicr = rd32(E1000_TSICR);
-
-@@ -5556,7 +5539,6 @@ static irqreturn_t igb_intr_msi(int irq,
- schedule_work(&adapter->ptp_tx_work);
- }
- }
--#endif /* CONFIG_IGB_PTP */
-
- napi_schedule(&q_vector->napi);
-
-@@ -5599,7 +5581,6 @@ static irqreturn_t igb_intr(int irq, voi
- mod_timer(&adapter->watchdog_timer, jiffies + 1);
- }
-
--#ifdef CONFIG_IGB_PTP
- if (icr & E1000_ICR_TS) {
- u32 tsicr = rd32(E1000_TSICR);
-
-@@ -5610,7 +5591,6 @@ static irqreturn_t igb_intr(int irq, voi
- schedule_work(&adapter->ptp_tx_work);
- }
- }
--#endif /* CONFIG_IGB_PTP */
-
- napi_schedule(&q_vector->napi);
-
-@@ -5999,9 +5979,7 @@ static bool igb_clean_rx_irq(struct igb_
- goto next_desc;
- }
-
--#ifdef CONFIG_IGB_PTP
- igb_ptp_rx_hwtstamp(q_vector, rx_desc, skb);
--#endif /* CONFIG_IGB_PTP */
- igb_rx_hash(rx_ring, rx_desc, skb);
- igb_rx_checksum(rx_ring, rx_desc, skb);
- igb_rx_vlan(rx_ring, rx_desc, skb);
-@@ -6207,10 +6185,8 @@ static int igb_ioctl(struct net_device *
- case SIOCGMIIREG:
- case SIOCSMIIREG:
- return igb_mii_ioctl(netdev, ifr, cmd);
--#ifdef CONFIG_IGB_PTP
- case SIOCSHWTSTAMP:
- return igb_ptp_hwtstamp_ioctl(netdev, ifr, cmd);
--#endif /* CONFIG_IGB_PTP */
- default:
- return -EOPNOTSUPP;
- }
---- a/drivers/net/ethernet/intel/ixgbe/Makefile
-+++ b/drivers/net/ethernet/intel/ixgbe/Makefile
-@@ -34,11 +34,10 @@ obj-$(CONFIG_IXGBE) += ixgbe.o
-
- ixgbe-objs := ixgbe_main.o ixgbe_common.o ixgbe_ethtool.o ixgbe_debugfs.o\
- ixgbe_82599.o ixgbe_82598.o ixgbe_phy.o ixgbe_sriov.o \
-- ixgbe_mbx.o ixgbe_x540.o ixgbe_lib.o
-+ ixgbe_mbx.o ixgbe_x540.o ixgbe_lib.o ixgbe_ptp.o
-
- ixgbe-$(CONFIG_IXGBE_DCB) += ixgbe_dcb.o ixgbe_dcb_82598.o \
- ixgbe_dcb_82599.o ixgbe_dcb_nl.o
-
--ixgbe-$(CONFIG_IXGBE_PTP) += ixgbe_ptp.o
- ixgbe-$(CONFIG_IXGBE_HWMON) += ixgbe_sysfs.o
- ixgbe-$(CONFIG_FCOE:m=y) += ixgbe_fcoe.o
---- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h
-+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
-@@ -36,11 +36,9 @@
- #include <linux/aer.h>
- #include <linux/if_vlan.h>
-
--#ifdef CONFIG_IXGBE_PTP
- #include <linux/clocksource.h>
- #include <linux/net_tstamp.h>
- #include <linux/ptp_clock_kernel.h>
--#endif /* CONFIG_IXGBE_PTP */
-
- #include "ixgbe_type.h"
- #include "ixgbe_common.h"
-@@ -571,7 +569,6 @@ struct ixgbe_adapter {
- u32 interrupt_event;
- u32 led_reg;
-
--#ifdef CONFIG_IXGBE_PTP
- struct ptp_clock *ptp_clock;
- struct ptp_clock_info ptp_caps;
- unsigned long last_overflow_check;
-@@ -581,7 +578,6 @@ struct ixgbe_adapter {
- int rx_hwtstamp_filter;
- u32 base_incval;
- u32 cycle_speed;
--#endif /* CONFIG_IXGBE_PTP */
-
- /* SR-IOV */
- DECLARE_BITMAP(active_vfs, IXGBE_MAX_VF_FUNCTIONS);
-@@ -739,7 +735,6 @@ static inline struct netdev_queue *txrin
- return netdev_get_tx_queue(ring->netdev, ring->queue_index);
- }
-
--#ifdef CONFIG_IXGBE_PTP
- extern void ixgbe_ptp_init(struct ixgbe_adapter *adapter);
- extern void ixgbe_ptp_stop(struct ixgbe_adapter *adapter);
- extern void ixgbe_ptp_overflow_check(struct ixgbe_adapter *adapter);
-@@ -752,6 +747,5 @@ extern int ixgbe_ptp_hwtstamp_ioctl(stru
- struct ifreq *ifr, int cmd);
- extern void ixgbe_ptp_start_cyclecounter(struct ixgbe_adapter *adapter);
- extern void ixgbe_ptp_check_pps_event(struct ixgbe_adapter *adapter, u32 eicr);
--#endif /* CONFIG_IXGBE_PTP */
-
- #endif /* _IXGBE_H_ */
---- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
-+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
-@@ -2669,7 +2669,6 @@ static int ixgbe_get_ts_info(struct net_
- struct ixgbe_adapter *adapter = netdev_priv(dev);
-
- switch (adapter->hw.mac.type) {
--#ifdef CONFIG_IXGBE_PTP
- case ixgbe_mac_X540:
- case ixgbe_mac_82599EB:
- info->so_timestamping =
-@@ -2695,7 +2694,6 @@ static int ixgbe_get_ts_info(struct net_
- (1 << HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ) |
- (1 << HWTSTAMP_FILTER_PTP_V2_EVENT);
- break;
--#endif /* CONFIG_IXGBE_PTP */
- default:
- return ethtool_op_get_ts_info(dev, info);
- break;
---- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
-+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
-@@ -791,10 +791,8 @@ static bool ixgbe_clean_tx_irq(struct ix
- total_bytes += tx_buffer->bytecount;
- total_packets += tx_buffer->gso_segs;
-
--#ifdef CONFIG_IXGBE_PTP
- if (unlikely(tx_buffer->tx_flags & IXGBE_TX_FLAGS_TSTAMP))
- ixgbe_ptp_tx_hwtstamp(q_vector, tx_buffer->skb);
--#endif
-
- /* free the skb */
- dev_kfree_skb_any(tx_buffer->skb);
-@@ -1369,9 +1367,7 @@ static void ixgbe_process_skb_fields(str
-
- ixgbe_rx_checksum(rx_ring, rx_desc, skb);
-
--#ifdef CONFIG_IXGBE_PTP
- ixgbe_ptp_rx_hwtstamp(rx_ring->q_vector, rx_desc, skb);
--#endif
-
- if ((dev->features & NETIF_F_HW_VLAN_RX) &&
- ixgbe_test_staterr(rx_desc, IXGBE_RXD_STAT_VP)) {
-@@ -2324,10 +2320,8 @@ static inline void ixgbe_irq_enable(stru
- break;
- }
-
--#ifdef CONFIG_IXGBE_PTP
- if (adapter->hw.mac.type == ixgbe_mac_X540)
- mask |= IXGBE_EIMS_TIMESYNC;
--#endif
-
- if ((adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) &&
- !(adapter->flags2 & IXGBE_FLAG2_FDIR_REQUIRES_REINIT))
-@@ -2393,10 +2387,8 @@ static irqreturn_t ixgbe_msix_other(int
-
- ixgbe_check_fan_failure(adapter, eicr);
-
--#ifdef CONFIG_IXGBE_PTP
- if (unlikely(eicr & IXGBE_EICR_TIMESYNC))
- ixgbe_ptp_check_pps_event(adapter, eicr);
--#endif
-
- /* re-enable the original interrupt state, no lsc, no queues */
- if (!test_bit(__IXGBE_DOWN, &adapter->state))
-@@ -2588,10 +2580,8 @@ static irqreturn_t ixgbe_intr(int irq, v
- }
-
- ixgbe_check_fan_failure(adapter, eicr);
--#ifdef CONFIG_IXGBE_PTP
- if (unlikely(eicr & IXGBE_EICR_TIMESYNC))
- ixgbe_ptp_check_pps_event(adapter, eicr);
--#endif
-
- /* would disable interrupts here but EIAM disabled it */
- napi_schedule(&q_vector->napi);
-@@ -5482,9 +5472,7 @@ static void ixgbe_watchdog_link_is_up(st
- break;
- }
-
--#ifdef CONFIG_IXGBE_PTP
- ixgbe_ptp_start_cyclecounter(adapter);
--#endif
-
- e_info(drv, "NIC Link is Up %s, Flow Control: %s\n",
- (link_speed == IXGBE_LINK_SPEED_10GB_FULL ?
-@@ -5526,9 +5514,7 @@ static void ixgbe_watchdog_link_is_down(
- if (ixgbe_is_sfp(hw) && hw->mac.type == ixgbe_mac_82598EB)
- adapter->flags2 |= IXGBE_FLAG2_SEARCH_FOR_SFP;
-
--#ifdef CONFIG_IXGBE_PTP
- ixgbe_ptp_start_cyclecounter(adapter);
--#endif
-
- e_info(drv, "NIC Link is Down\n");
- netif_carrier_off(netdev);
-@@ -5833,9 +5819,7 @@ static void ixgbe_service_task(struct wo
- ixgbe_watchdog_subtask(adapter);
- ixgbe_fdir_reinit_subtask(adapter);
- ixgbe_check_hang_subtask(adapter);
--#ifdef CONFIG_IXGBE_PTP
- ixgbe_ptp_overflow_check(adapter);
--#endif
-
- ixgbe_service_event_complete(adapter);
- }
-@@ -5988,10 +5972,8 @@ static __le32 ixgbe_tx_cmd_type(u32 tx_f
- if (tx_flags & IXGBE_TX_FLAGS_HW_VLAN)
- cmd_type |= cpu_to_le32(IXGBE_ADVTXD_DCMD_VLE);
-
--#ifdef CONFIG_IXGBE_PTP
- if (tx_flags & IXGBE_TX_FLAGS_TSTAMP)
- cmd_type |= cpu_to_le32(IXGBE_ADVTXD_MAC_TSTAMP);
--#endif
-
- /* set segmentation enable bits for TSO/FSO */
- #ifdef IXGBE_FCOE
-@@ -6393,12 +6375,10 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct
-
- skb_tx_timestamp(skb);
-
--#ifdef CONFIG_IXGBE_PTP
- if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)) {
- skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
- tx_flags |= IXGBE_TX_FLAGS_TSTAMP;
- }
--#endif
-
- #ifdef CONFIG_PCI_IOV
- /*
-@@ -6547,10 +6527,8 @@ static int ixgbe_ioctl(struct net_device
- struct ixgbe_adapter *adapter = netdev_priv(netdev);
-
- switch (cmd) {
--#ifdef CONFIG_IXGBE_PTP
- case SIOCSHWTSTAMP:
- return ixgbe_ptp_hwtstamp_ioctl(adapter, req, cmd);
--#endif
- default:
- return mdio_mii_ioctl(&adapter->hw.phy.mdio, if_mii(req), cmd);
- }
-@@ -7364,9 +7342,7 @@ static int __devinit ixgbe_probe(struct
-
- device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
-
--#ifdef CONFIG_IXGBE_PTP
- ixgbe_ptp_init(adapter);
--#endif /* CONFIG_IXGBE_PTP*/
-
- /* save off EEPROM version number */
- hw->eeprom.ops.read(hw, 0x2e, &adapter->eeprom_verh);
-@@ -7505,9 +7481,7 @@ static void __devexit ixgbe_remove(struc
- set_bit(__IXGBE_DOWN, &adapter->state);
- cancel_work_sync(&adapter->service_task);
-
--#ifdef CONFIG_IXGBE_PTP
- ixgbe_ptp_stop(adapter);
--#endif
-
- #ifdef CONFIG_IXGBE_DCA
- if (adapter->flags & IXGBE_FLAG_DCA_ENABLED) {
---- a/drivers/net/ethernet/oki-semi/pch_gbe/Kconfig
-+++ b/drivers/net/ethernet/oki-semi/pch_gbe/Kconfig
-@@ -20,17 +20,3 @@ config PCH_GBE
- purpose use.
- ML7223/ML7831 is companion chip for Intel Atom E6xx series.
- ML7223/ML7831 is completely compatible for Intel EG20T PCH.
--
--if PCH_GBE
--
--config PCH_PTP
-- bool "PCH PTP clock support"
-- default n
-- select PTP_1588_CLOCK
-- select PTP_1588_CLOCK_PCH
-- ---help---
-- Say Y here if you want to use Precision Time Protocol (PTP) in the
-- driver. PTP is a method to precisely synchronize distributed clocks
-- over Ethernet networks.
--
--endif # PCH_GBE
---- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h
-+++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h
-@@ -649,7 +649,6 @@ extern void pch_gbe_free_tx_resources(st
- extern void pch_gbe_free_rx_resources(struct pch_gbe_adapter *adapter,
- struct pch_gbe_rx_ring *rx_ring);
- extern void pch_gbe_update_stats(struct pch_gbe_adapter *adapter);
--#ifdef CONFIG_PCH_PTP
- extern u32 pch_ch_control_read(struct pci_dev *pdev);
- extern void pch_ch_control_write(struct pci_dev *pdev, u32 val);
- extern u32 pch_ch_event_read(struct pci_dev *pdev);
-@@ -659,7 +658,6 @@ extern u32 pch_src_uuid_hi_read(struct p
- extern u64 pch_rx_snap_read(struct pci_dev *pdev);
- extern u64 pch_tx_snap_read(struct pci_dev *pdev);
- extern int pch_set_station_address(u8 *addr, struct pci_dev *pdev);
--#endif
-
- /* pch_gbe_param.c */
- extern void pch_gbe_check_options(struct pch_gbe_adapter *adapter);
---- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
-+++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
-@@ -21,10 +21,8 @@
- #include "pch_gbe.h"
- #include "pch_gbe_api.h"
- #include <linux/module.h>
--#ifdef CONFIG_PCH_PTP
- #include <linux/net_tstamp.h>
- #include <linux/ptp_classify.h>
--#endif
-
- #define DRV_VERSION "1.01"
- const char pch_driver_version[] = DRV_VERSION;
-@@ -98,7 +96,6 @@ const char pch_driver_version[] = DRV_VE
-
- #define PCH_GBE_INT_DISABLE_ALL 0
-
--#ifdef CONFIG_PCH_PTP
- /* Macros for ieee1588 */
- /* 0x40 Time Synchronization Channel Control Register Bits */
- #define MASTER_MODE (1<<0)
-@@ -113,7 +110,6 @@ const char pch_driver_version[] = DRV_VE
-
- #define PTP_L4_MULTICAST_SA "01:00:5e:00:01:81"
- #define PTP_L2_MULTICAST_SA "01:1b:19:00:00:00"
--#endif
-
- static unsigned int copybreak __read_mostly = PCH_GBE_COPYBREAK_DEFAULT;
-
-@@ -122,7 +118,6 @@ static void pch_gbe_mdio_write(struct ne
- int data);
- static void pch_gbe_set_multi(struct net_device *netdev);
-
--#ifdef CONFIG_PCH_PTP
- static struct sock_filter ptp_filter[] = {
- PTP_FILTER
- };
-@@ -291,7 +286,6 @@ static int hwtstamp_ioctl(struct net_dev
-
- return copy_to_user(ifr->ifr_data, &cfg, sizeof(cfg)) ? -EFAULT : 0;
- }
--#endif
-
- inline void pch_gbe_mac_load_mac_addr(struct pch_gbe_hw *hw)
- {
-@@ -1244,9 +1238,7 @@ static void pch_gbe_tx_queue(struct pch_
- (int)sizeof(struct pch_gbe_tx_desc) * ring_num,
- &hw->reg->TX_DSC_SW_P);
-
--#ifdef CONFIG_PCH_PTP
- pch_tx_timestamp(adapter, skb);
--#endif
-
- dev_kfree_skb_any(skb);
- }
-@@ -1730,9 +1722,7 @@ pch_gbe_clean_rx(struct pch_gbe_adapter
- /* Write meta date of skb */
- skb_put(skb, length);
-
--#ifdef CONFIG_PCH_PTP
- pch_rx_timestamp(adapter, skb);
--#endif
-
- skb->protocol = eth_type_trans(skb, netdev);
- if (tcp_ip_status & PCH_GBE_RXD_ACC_STAT_TCPIPOK)
-@@ -2334,10 +2324,8 @@ static int pch_gbe_ioctl(struct net_devi
-
- pr_debug("cmd : 0x%04x\n", cmd);
-
--#ifdef CONFIG_PCH_PTP
- if (cmd == SIOCSHWTSTAMP)
- return hwtstamp_ioctl(netdev, ifr, cmd);
--#endif
-
- return generic_mii_ioctl(&adapter->mii, if_mii(ifr), cmd, NULL);
- }
-@@ -2623,14 +2611,12 @@ static int pch_gbe_probe(struct pci_dev
- goto err_free_netdev;
- }
-
--#ifdef CONFIG_PCH_PTP
- adapter->ptp_pdev = pci_get_bus_and_slot(adapter->pdev->bus->number,
- PCI_DEVFN(12, 4));
- if (ptp_filter_init(ptp_filter, ARRAY_SIZE(ptp_filter))) {
- pr_err("Bad ptp filter\n");
- return -EINVAL;
- }
--#endif
-
- netdev->netdev_ops = &pch_gbe_netdev_ops;
- netdev->watchdog_timeo = PCH_GBE_WATCHDOG_PERIOD;
---- a/drivers/net/ethernet/sfc/Kconfig
-+++ b/drivers/net/ethernet/sfc/Kconfig
-@@ -34,10 +34,3 @@ config SFC_SRIOV
- This enables support for the SFC9000 I/O Virtualization
- features, allowing accelerated network performance in
- virtualized environments.
--config SFC_PTP
-- bool "Solarflare SFC9000-family PTP support"
-- depends on SFC && PTP_1588_CLOCK && !(SFC=y && PTP_1588_CLOCK=m)
-- default y
-- ---help---
-- This enables support for the Precision Time Protocol (PTP)
-- on SFC9000-family NICs
---- a/drivers/net/ethernet/sfc/Makefile
-+++ b/drivers/net/ethernet/sfc/Makefile
-@@ -2,9 +2,8 @@ sfc-y += efx.o nic.o falcon.o siena.o
- falcon_xmac.o mcdi_mac.o \
- selftest.o ethtool.o qt202x_phy.o mdio_10g.o \
- tenxpress.o txc43128_phy.o falcon_boards.o \
-- mcdi.o mcdi_phy.o mcdi_mon.o
-+ mcdi.o mcdi_phy.o mcdi_mon.o ptp.o
- sfc-$(CONFIG_SFC_MTD) += mtd.o
- sfc-$(CONFIG_SFC_SRIOV) += siena_sriov.o
--sfc-$(CONFIG_SFC_PTP) += ptp.o
-
- obj-$(CONFIG_SFC) += sfc.o
---- a/drivers/net/ethernet/sfc/net_driver.h
-+++ b/drivers/net/ethernet/sfc/net_driver.h
-@@ -868,9 +868,7 @@ struct efx_nic {
- struct work_struct peer_work;
- #endif
-
--#ifdef CONFIG_SFC_PTP
- struct efx_ptp_data *ptp_data;
--#endif
-
- /* The following fields may be written more often */
-
---- a/drivers/net/ethernet/sfc/nic.h
-+++ b/drivers/net/ethernet/sfc/nic.h
-@@ -252,7 +252,6 @@ extern int efx_sriov_set_vf_spoofchk(str
- bool spoofchk);
-
- struct ethtool_ts_info;
--#ifdef CONFIG_SFC_PTP
- extern void efx_ptp_probe(struct efx_nic *efx);
- extern int efx_ptp_ioctl(struct efx_nic *efx, struct ifreq *ifr, int cmd);
- extern int efx_ptp_get_ts_info(struct net_device *net_dev,
-@@ -260,31 +259,6 @@ extern int efx_ptp_get_ts_info(struct ne
- extern bool efx_ptp_is_ptp_tx(struct efx_nic *efx, struct sk_buff *skb);
- extern int efx_ptp_tx(struct efx_nic *efx, struct sk_buff *skb);
- extern void efx_ptp_event(struct efx_nic *efx, efx_qword_t *ev);
--#else
--static inline void efx_ptp_probe(struct efx_nic *efx) {}
--static inline int efx_ptp_ioctl(struct efx_nic *efx, struct ifreq *ifr, int cmd)
--{
-- return -EOPNOTSUPP;
--}
--static inline int efx_ptp_get_ts_info(struct net_device *net_dev,
-- struct ethtool_ts_info *ts_info)
--{
-- ts_info->so_timestamping = (SOF_TIMESTAMPING_SOFTWARE |
-- SOF_TIMESTAMPING_RX_SOFTWARE);
-- ts_info->phc_index = -1;
--
-- return 0;
--}
--static inline bool efx_ptp_is_ptp_tx(struct efx_nic *efx, struct sk_buff *skb)
--{
-- return false;
--}
--static inline int efx_ptp_tx(struct efx_nic *efx, struct sk_buff *skb)
--{
-- return NETDEV_TX_OK;
--}
--static inline void efx_ptp_event(struct efx_nic *efx, efx_qword_t *ev) {}
--#endif
-
- extern const struct efx_nic_type falcon_a1_nic_type;
- extern const struct efx_nic_type falcon_b0_nic_type;
---- a/drivers/ptp/Kconfig
-+++ b/drivers/ptp/Kconfig
-@@ -25,8 +25,9 @@ config PTP_1588_CLOCK
-
- config PTP_1588_CLOCK_GIANFAR
- tristate "Freescale eTSEC as PTP clock"
-- depends on PTP_1588_CLOCK
- depends on GIANFAR
-+ select PTP_1588_CLOCK
-+ default y
- help
- This driver adds support for using the eTSEC as a PTP
- clock. This clock is only useful if your PTP programs are
-@@ -38,8 +39,9 @@ config PTP_1588_CLOCK_GIANFAR
-
- config PTP_1588_CLOCK_IXP46X
- tristate "Intel IXP46x as PTP clock"
-- depends on PTP_1588_CLOCK
- depends on IXP4XX_ETH
-+ select PTP_1588_CLOCK
-+ default y
- help
- This driver adds support for using the IXP46X as a PTP
- clock. This clock is only useful if your PTP programs are
-@@ -50,13 +52,13 @@ config PTP_1588_CLOCK_IXP46X
- will be called ptp_ixp46x.
-
- comment "Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks."
-- depends on PTP_1588_CLOCK && (PHYLIB=n || NETWORK_PHY_TIMESTAMPING=n)
-+ depends on PHYLIB=n || NETWORK_PHY_TIMESTAMPING=n
-
- config DP83640_PHY
- tristate "Driver for the National Semiconductor DP83640 PHYTER"
-- depends on PTP_1588_CLOCK
- depends on NETWORK_PHY_TIMESTAMPING
- depends on PHYLIB
-+ select PTP_1588_CLOCK
- ---help---
- Supports the DP83640 PHYTER with IEEE 1588 features.
-
-@@ -70,8 +72,9 @@ config DP83640_PHY
-
- config PTP_1588_CLOCK_PCH
- tristate "Intel PCH EG20T as PTP clock"
-- depends on PTP_1588_CLOCK
- depends on PCH_GBE
-+ select PTP_1588_CLOCK
-+ default y
- help
- This driver adds support for using the PCH EG20T as a PTP
- clock. The hardware supports time stamping of PTP packets
View
69 linux-3/debian/patches/bugfix/all/ptp-Make-PTP_1588_CLOCK-select-rather-than-depend-on.patch
@@ -1,69 +0,0 @@
-From: Ben Hutchings <bhutchings@solarflare.com>
-Date: Wed, 31 Oct 2012 15:32:44 +0000