Commit 9f16cd8f authored by BrLi's avatar BrLi

Merge with AlmAck

parents 13b1f172 e40e390a
......@@ -4,7 +4,7 @@ source ../linux.conf
pkgname=acpi_call
_pkgname=acpi_call
pkgver=1.1.0
pkgrel=43
pkgrel=44
pkgdesc="A kernel module that enables you to call parameterless ACPI methods by writing the method name to /proc/acpi/call, e.g. to turn off discrete graphics card in a dual graphics environment (like NVIDIA Optimus)."
arch=('x86_64')
url=("http://github.com/mkottman/acpi_call")
......
post_install() {
EXTRAMODULES='extramodules-4.15-CHAKRA'
EXTRAMODULES='extramodules-4.16-CHAKRA'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
echo ""
echo "[+] modprobe acpi_call"
......@@ -12,7 +12,7 @@ post_upgrade() {
}
post_remove() {
EXTRAMODULES='extramodules-4.15-CHAKRA'
EXTRAMODULES='extramodules-4.16-CHAKRA'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}
......
......@@ -3,7 +3,7 @@ source ../linux.conf
pkgname=bbswitch
pkgver=0.8
pkgrel=37
pkgrel=38
pkgdesc="kernel module allowing to switch dedicated graphics card on Optimus laptops"
arch=('x86_64')
url=("http://github.com/Bumblebee-Project/bbswitch")
......
post_install() {
EXTRAMODULES='extramodules-4.15-CHAKRA'
EXTRAMODULES='extramodules-4.16-CHAKRA'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
echo 'In order to use nvidia module, reboot the system.'
}
post_upgrade() {
EXTRAMODULES='extramodules-4.15-CHAKRA'
EXTRAMODULES='extramodules-4.16-CHAKRA'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}
post_remove() {
EXTRAMODULES='extramodules-4.15-CHAKRA'
EXTRAMODULES='extramodules-4.16-CHAKRA'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}
......@@ -3,7 +3,7 @@ source ../linux.conf
pkgname=broadcom-wl
pkgver=6.30.223.271
pkgrel=19
pkgrel=20
pkgdesc='Broadcom 802.11abgn hybrid Linux networking device driver'
url='http://www.broadcom.com/support/802.11/linux_sta.php'
arch=('x86_64')
......
......@@ -2,12 +2,12 @@
# kernel.
pkgname=btrfs-progs
pkgver=4.15.1
pkgver=4.16
pkgrel=2
pkgdesc='Btrfs filesystem utilities'
arch=('x86_64')
depends=('glibc' 'util-linux' 'e2fsprogs' 'lzo2' 'zlib' 'zstd')
makedepends=('git' 'asciidoc' 'xmlto')
makedepends=('git' 'asciidoc' 'xmlto' 'systemd' 'python3-setuptools')
url='http://btrfs.wiki.kernel.org/'
license=('GPL2')
source=("https://github.com/kdave/${pkgname}/archive/v${pkgver}.tar.gz"
......@@ -15,7 +15,7 @@ source=("https://github.com/kdave/${pkgname}/archive/v${pkgver}.tar.gz"
'initcpio-hook-btrfs'
'btrfs-scrub@.service'
'btrfs-scrub@.timer')
md5sums=('90e22a853bb5680f9b6192cdb0b5ea34'
md5sums=('8b071de61c6a33ba0e1fef78a6eed51c'
'7241ba3a4286d08da0d50b7176941112'
'b09688a915a0ec8f40e2f5aacbabc9ad'
'794b867e09451284c545bae112aa0cfd'
......@@ -25,7 +25,7 @@ options=(!staticlibs)
build() {
cd $pkgname-$pkgver
./autogen.sh
./autogen.sh
./configure --prefix=/usr
make
}
......
pkgbase=cython
pkgname=('cython3' 'cython2')
pkgver=0.27.3
pkgbase=cython
pkgver=0.28.2
pkgrel=1
pkgdesc="C-Extensions for Python"
arch=(x86_64)
......@@ -8,7 +8,7 @@ url="http://cython.org"
license=('APACHE')
makedepends=('python3-setuptools' 'python2-setuptools')
source=($pkgbase-$pkgver.tar.gz::"https://github.com/cython/cython/archive/$pkgver.tar.gz")
sha256sums=('648feb8a257574a3e4ef854475e7d767732ef26e870d2f9fcc1ca5b244b3ac89')
sha256sums=('d8fad58f7484466ff64a3d54f76943a3e2aef72a4efa1506eccca6ddc3ee547a')
prepare() {
cp -r cython-$pkgver cython2-$pkgver
......@@ -25,6 +25,9 @@ build() {
package_cython3() {
depends=(python3 python3-setuptools)
provides=(python3-cython)
conflicts=(python3-cython)
replaces=(python3-cython)
cd cython-$pkgver
python3 setup.py install --root="$pkgdir" --skip-build
......@@ -37,6 +40,9 @@ package_cython3() {
package_cython2() {
depends=(python2 python2-setuptools)
provides=(python2-cython)
conflicts=(python2-cython)
replaces=(python2-cython)
cd cython2-$pkgver
python2 setup.py install --root="$pkgdir" --skip-build
......
pkgname=libimobiledevice
pkgver=1.2.0
pkgrel=6
pkgver=1.2.0+66+g5a85432
pkgrel=1
pkgdesc="Library that talks the protocols to support iPhone and iPod Touch devices on Linux"
url="http://libimobiledevice.org/"
arch=('x86_64')
license=('GPL2' 'LGPL2.1')
depends=('libusbmuxd' 'usbmuxd' 'gnutls')
makedepends=('python2' 'python2-cython' 'python3' 'python3-cython' 'libplist' 'autoconf-archive')
source=(http://libimobiledevice.org/downloads/$pkgname-$pkgver.tar.bz2
0001-Fix-installation_proxy-when-using-GnuTLS-instead-of-.patch
CVE-2016-5104.patch
0001-Add-new-function-to-get-the-underlying-file-descript.patch
0001-Updated-gnutls-certificate-callback-to-new-API-backw.patch
0001-idevice-Update-GnuTLS-code-to-support-iOS-10.patch
0001-userpref-GnuTLS-Fix-pairing-record-generation-and-im.patch)
sha256sums=('786b0de0875053bf61b5531a86ae8119e320edab724fc62fe2150cc931f11037'
'9fb1523276f9ab4273f0065728c52792ec6c99c09d587c28175c748175106a09'
'30d8032244859adc85f11df00a5b3adb017160821ddf4b22a8528f9b104c0951'
'a4a1844dfedc933cb998afbbe4b2066d8bcedf8d305990715160b957f754922c'
'9e03d66e15ad036e7e3b8639b07788a0c1959016444766ad63f708e722bd516c'
'173291a36ea08226c221643580c007f44e430867f345d8106395cce0f52a38c5'
'7d3c5a89ce6611c219d80255a1cce4a02de4ca00fb58c32e87733d9a0e20c4ce')
makedepends=('python2' 'cython2' 'python3' 'cython3' 'libplist' 'autoconf-archive' git python2-setuptools python3-setuptools)
_commit=5a85432719fb3d18027d528f87d2a44b76fd3e12 # master
source=("git+https://github.com/libimobiledevice/libimobiledevice/#commit=$_commit")
sha256sums=('SKIP')
pkgver() {
cd $pkgname
git describe --tags | sed 's/-/+/g'
}
check() {
cd build-py2
make check
}
prepare() {
cd "$pkgname-$pkgver"
patch -Np1 -i ../0001-Fix-installation_proxy-when-using-GnuTLS-instead-of-.patch
patch -Np1 -i ../CVE-2016-5104.patch
patch -Np1 -i ../0001-Add-new-function-to-get-the-underlying-file-descript.patch
patch -Np1 -i ../0001-Updated-gnutls-certificate-callback-to-new-API-backw.patch
patch -Np1 -i ../0001-idevice-Update-GnuTLS-code-to-support-iOS-10.patch
patch -Np1 -i ../0001-userpref-GnuTLS-Fix-pairing-record-generation-and-im.patch
sed -e 's/AC_PYTHON_DEVEL/AX_PYTHON_DEVEL/' -i m4/cython_python.m4
autoreconf -fi
cd $pkgname
NOCONFIGURE=1 ./autogen.sh
}
build() {
mkdir build-py2
pushd build-py2
PYTHON=/usr/bin/python2 CYTHON=/usr/bin/cython2 ../$pkgname-$pkgver/configure --prefix=/usr --disable-openssl
PYTHON=/usr/bin/python2 CYTHON=/usr/bin/cython2 ../$pkgname/configure --prefix=/usr --disable-openssl
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make
popd
mkdir build-py3
pushd build-py3
PYTHON=/usr/bin/python3 CYTHON=/usr/bin/cython3 ../$pkgname-$pkgver/configure --prefix=/usr --disable-openssl
PYTHON=/usr/bin/python3 CYTHON=/usr/bin/cython3 ../$pkgname/configure --prefix=/usr --disable-openssl
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make
}
......
......@@ -9,13 +9,11 @@ pkgdesc="Kernel headers sanitized for use in userspace"
arch=('x86_64')
url="http://www.gnu.org/software/libc"
license=('GPL2')
source=(http://www.kernel.org/pub/linux/kernel/v4.x/linux-${_basekernel}.tar.xz
http://www.kernel.org/pub/linux/kernel/v4.x/linux-${_basekernel}.tar.sign
http://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.xz
http://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.sign)
sha256sums=('5a26478906d5005f4f809402e981518d2b8844949199f60c4b6e1f986ca2a769'
source=(https://www.kernel.org/pub/linux/kernel/v4.x/linux-${pkgver%.*}.tar.{xz,sign}
https://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.{xz,sign})
sha256sums=('63f6dc8e3c9f3a0273d5d6f4dca38a2413ca3a5f689329d05b750e4c87bb21b9'
'SKIP'
'6be2c185839d730769a8e6bcf46ca0962845732e25ed4801fe1ea995218b1133'
'336252cb15f2f2574461c1d3daabf5dc207842526085802270e1e5223f645db3'
'SKIP')
validpgpkeys=('ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
'647F28654894E3BD457199BE38DBBDC86092693E') # Greg Kroah-Hartman
......
......@@ -29,7 +29,7 @@ source=("http://www.kernel.org/pub/linux/kernel/v4.x/linux-${pkgver}.tar.xz"
'cpupower.systemd'
'cpupower.service'
'usbipd.service')
sha256sums=('4a7452fcf97c93e73e7d04264a75da550772c912e9749bcf509331cad8b716a1'
sha256sums=('0d6971a81da97e38b974c5eba31a74803bfe41aabc46d406c3acda56306c81a3'
'4fa509949d6863d001075fa3e8671eff2599c046d20c98bb4a70778595cd1c3f'
'fbf6e0ce6eb0ef15703fe212958de6ca46e62188900b5e9f9272ed3cc9cfd54e'
'a89284d0ecb556ca53a66d1c2087b5fd6d0a901ab2769cd3aebb93f4478905dc'
......
......@@ -6,8 +6,8 @@
# These are the "basic variables" appliable for the normal kernel group
_kernelname="-CHAKRA"
_kernelver=4.15.14
_basekernel=4.15
_kernelver=4.16.3
_basekernel=4.16
_extramodules=extramodules-${_basekernel}${_kernelname}
_kver="$(cat /lib/modules/${_extramodules}/version)"
......
......@@ -15,15 +15,15 @@
#core_packages
#linux
#linux-api-headers
linux-tools
vhba-module
broadcom-wl
acpi_call
ndiswrapper
btrfs-progs
r8168
bbswitch
#linux-tools
Please register or sign in to reply
#vhba-module
#broadcom-wl
#acpi_call
#ndiswrapper
#btrfs-progs
#r8168
#
#bbswitch
nvidia-utils
nvidia
#../lib32/lib32-nvidia-utils
......
From ff9d06de19e83c0c5a00a4d46376b4d1032c4f99 Mon Sep 17 00:00:00 2001
Message-Id: <ff9d06de19e83c0c5a00a4d46376b4d1032c4f99.1524129246.git.jan.steffens@gmail.com>
From: Serge Hallyn <serge.hallyn@canonical.com>
Date: Fri, 31 May 2013 19:12:12 +0100
Subject: [PATCH 1/6] add sysctl to disallow unprivileged CLONE_NEWUSER by
default
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
[bwh: Remove unneeded binary sysctl bits]
Signed-off-by: Daniel Micay <danielmicay@gmail.com>
---
kernel/fork.c | 15 +++++++++++++++
kernel/sysctl.c | 12 ++++++++++++
kernel/user_namespace.c | 3 +++
3 files changed, 30 insertions(+)
diff --git a/kernel/fork.c b/kernel/fork.c
index e5d9d405ae4e..c4be89c51f25 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -103,6 +103,11 @@
#define CREATE_TRACE_POINTS
#include <trace/events/task.h>
+#ifdef CONFIG_USER_NS
+extern int unprivileged_userns_clone;
+#else
+#define unprivileged_userns_clone 0
+#endif
/*
* Minimum number of threads to boot the kernel
@@ -1591,6 +1596,10 @@ static __latent_entropy struct task_struct *copy_process(
if ((clone_flags & (CLONE_NEWUSER|CLONE_FS)) == (CLONE_NEWUSER|CLONE_FS))
return ERR_PTR(-EINVAL);
+ if ((clone_flags & CLONE_NEWUSER) && !unprivileged_userns_clone)
+ if (!capable(CAP_SYS_ADMIN))
+ return ERR_PTR(-EPERM);
+
/*
* Thread groups must share signals as well, and detached threads
* can only be started up within the thread group.
@@ -2385,6 +2394,12 @@ SYSCALL_DEFINE1(unshare, unsigned long, unshare_flags)
if (unshare_flags & CLONE_NEWNS)
unshare_flags |= CLONE_FS;
+ if ((unshare_flags & CLONE_NEWUSER) && !unprivileged_userns_clone) {
+ err = -EPERM;
+ if (!capable(CAP_SYS_ADMIN))
+ goto bad_unshare_out;
+ }
+
err = check_unshare_flags(unshare_flags);
if (err)
goto bad_unshare_out;
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index f98f28c12020..7256d339a32a 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -105,6 +105,9 @@ extern int core_uses_pid;
extern char core_pattern[];
extern unsigned int core_pipe_limit;
#endif
+#ifdef CONFIG_USER_NS
+extern int unprivileged_userns_clone;
+#endif
extern int pid_max;
extern int pid_max_min, pid_max_max;
extern int percpu_pagelist_fraction;
@@ -515,6 +518,15 @@ static struct ctl_table kern_table[] = {
.proc_handler = proc_dointvec,
},
#endif
+#ifdef CONFIG_USER_NS
+ {
+ .procname = "unprivileged_userns_clone",
+ .data = &unprivileged_userns_clone,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = proc_dointvec,
+ },
+#endif
#ifdef CONFIG_PROC_SYSCTL
{
.procname = "tainted",
diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
index 246d4d4ce5c7..f64432b45cec 100644
--- a/kernel/user_namespace.c
+++ b/kernel/user_namespace.c
@@ -26,6 +26,9 @@
#include <linux/bsearch.h>
#include <linux/sort.h>
+/* sysctl */
+int unprivileged_userns_clone;
+
static struct kmem_cache *user_ns_cachep __read_mostly;
static DEFINE_MUTEX(userns_state_mutex);
--
2.17.0
From 3dcbf4dd14d295c3a238d73e9f791a827b906058 Mon Sep 17 00:00:00 2001
Message-Id: <3dcbf4dd14d295c3a238d73e9f791a827b906058.1524129246.git.jan.steffens@gmail.com>
In-Reply-To: <ff9d06de19e83c0c5a00a4d46376b4d1032c4f99.1524129246.git.jan.steffens@gmail.com>
References: <ff9d06de19e83c0c5a00a4d46376b4d1032c4f99.1524129246.git.jan.steffens@gmail.com>
From: Jim Bride <jim.bride@linux.intel.com>
Date: Mon, 6 Nov 2017 13:38:57 -0800
Subject: [PATCH 2/6] drm/i915/edp: Only use the alternate fixed mode if it's
asked for
In commit dc911f5bd8aa ("drm/i915/edp: Allow alternate fixed mode for
eDP if available."), the patch allows for the use of an alternate fixed
mode if it is available, but the patch was not ensuring that the only
time the alternate mode is used is when it is specifically requested.
This patch adds an additional comparison to intel_edp_compare_alt_mode
to ensure that we only use the alternate mode if it is directly
requested.
Fixes: dc911f5bd8aac ("Allow alternate fixed mode for eDP if available.")
Cc: David Weinehall <david.weinehall@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Jim Bride <jim.bride@linux.intel.com>
---
drivers/gpu/drm/i915/intel_dp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index a29868cd30c7..b6d07b615b12 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1597,7 +1597,8 @@ static bool intel_edp_compare_alt_mode(struct drm_display_mode *m1,
m1->vdisplay == m2->vdisplay &&
m1->vsync_start == m2->vsync_start &&
m1->vsync_end == m2->vsync_end &&
- m1->vtotal == m2->vtotal);
+ m1->vtotal == m2->vtotal &&
+ m1->vrefresh == m2->vrefresh);
return bres;
}
--
2.17.0
From 1b03bcc6faecde170f9bea83accdde7bbd36df96 Mon Sep 17 00:00:00 2001
Message-Id: <1b03bcc6faecde170f9bea83accdde7bbd36df96.1524129246.git.jan.steffens@gmail.com>
In-Reply-To: <ff9d06de19e83c0c5a00a4d46376b4d1032c4f99.1524129246.git.jan.steffens@gmail.com>
References: <ff9d06de19e83c0c5a00a4d46376b4d1032c4f99.1524129246.git.jan.steffens@gmail.com>
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Fri, 6 Apr 2018 16:19:38 +0200
Subject: [PATCH 3/6] Partially revert "swiotlb: remove various exports"
This partially reverts commit 4bd89ed39b2ab8dc4ac4b6c59b07d420b0213bec.
The proprietary NVIDIA driver needs one of the exports.
---
lib/swiotlb.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index c43ec2271469..77d699f14af7 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -1016,6 +1016,7 @@ swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl, int nelems,
}
return nelems;
}
+EXPORT_SYMBOL(swiotlb_map_sg_attrs);
/*
* Unmap a set of streaming mode DMA translations. Again, cpu read rules
--
2.17.0
This diff is collapsed.
From 23675bf063a1b39fccd29e7f573ec6729a11b3fa Mon Sep 17 00:00:00 2001
Message-Id: <23675bf063a1b39fccd29e7f573ec6729a11b3fa.1524129246.git.jan.steffens@gmail.com>
In-Reply-To: <ff9d06de19e83c0c5a00a4d46376b4d1032c4f99.1524129246.git.jan.steffens@gmail.com>
References: <ff9d06de19e83c0c5a00a4d46376b4d1032c4f99.1524129246.git.jan.steffens@gmail.com>
From: Harry Wentland <harry.wentland@amd.com>
Date: Thu, 12 Apr 2018 10:51:52 -0400
Subject: [PATCH 5/6] Revert "drm/amd/display: disable CRTCs with NULL FB on
their primary plane (V2)"
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This seems to cause flickering and lock-ups for a wide range of users.
Revert until we've found a proper fix for the flickering and lock-ups.
This reverts commit 36cc549d59864b7161f0e23d710c1c4d1b9cf022.
Cc: Shirish S <shirish.s@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 31 -------------------
1 file changed, 31 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 63c67346d316..8a6e6fbc78cd 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -4776,60 +4776,29 @@ static int dm_update_planes_state(struct dc *dc,
return ret;
}
-static int dm_atomic_check_plane_state_fb(struct drm_atomic_state *state,
- struct drm_crtc *crtc)
-{
- struct drm_plane *plane;
- struct drm_crtc_state *crtc_state;
-
- WARN_ON(!drm_atomic_get_new_crtc_state(state, crtc));
-
- drm_for_each_plane_mask(plane, state->dev, crtc->state->plane_mask) {
- struct drm_plane_state *plane_state =
- drm_atomic_get_plane_state(state, plane);
-
- if (IS_ERR(plane_state))
- return -EDEADLK;
-
- crtc_state = drm_atomic_get_crtc_state(plane_state->state, crtc);
- if (IS_ERR(crtc_state))
- return PTR_ERR(crtc_state);
-
- if (crtc->primary == plane && crtc_state->active) {
- if (!plane_state->fb)
- return -EINVAL;
- }
- }
- return 0;
-}
-
static int amdgpu_dm_atomic_check(struct drm_device *dev,
struct drm_atomic_state *state)
{
struct amdgpu_device *adev = dev->dev_private;
struct dc *dc = adev->dm.dc;
struct dm_atomic_state *dm_state = to_dm_atomic_state(state);
struct drm_connector *connector;
struct drm_connector_state *old_con_state, *new_con_state;
struct drm_crtc *crtc;
struct drm_crtc_state *old_crtc_state, *new_crtc_state;
int ret, i;
/*
* This bool will be set for true for any modeset/reset
* or plane update which implies non fast surface update.
*/
bool lock_and_validation_needed = false;
ret = drm_atomic_helper_check_modeset(dev, state);
if (ret)
goto fail;
for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) {
- ret = dm_atomic_check_plane_state_fb(state, crtc);
- if (ret)
- goto fail;
-
if (!drm_atomic_crtc_needs_modeset(new_crtc_state) &&
!new_crtc_state->color_mgmt_changed)
continue;
--
2.17.0
From fb08717dc5ecf3ada73f93663b528d9d4ce4380b Mon Sep 17 00:00:00 2001
Message-Id: <fb08717dc5ecf3ada73f93663b528d9d4ce4380b.1524129246.git.jan.steffens@gmail.com>
In-Reply-To: <ff9d06de19e83c0c5a00a4d46376b4d1032c4f99.1524129246.git.jan.steffens@gmail.com>
References: <ff9d06de19e83c0c5a00a4d46376b4d1032c4f99.1524129246.git.jan.steffens@gmail.com>
From: Igor Russkikh <igor.russkikh@aquantia.com>
Date: Wed, 11 Apr 2018 15:23:24 +0300
Subject: [PATCH 6/6] net: aquantia: Regression on reset with 1.x firmware
On ASUS XG-C100C with 1.5.44 firmware a special mode called "dirty wake"
is active. With this mode when motherboard gets powered (but no poweron
happens yet), NIC automatically enables powersave link and watches
for WOL packet.
This normally allows to powerup the PC after AC power failures.
Not all motherboards or bios settings gives power to PCI slots,
so this mode is not enabled on all the hardware.
4.16 linux driver introduced full hardware reset sequence
This is required since before that we had no NIC hardware
reset implemented and there were side effects of "not clean start".
But this full reset is incompatible with "dirty wake" WOL feature
it keeps the PHY link in a special mode forever. As a consequence,
driver sees no link and no traffic.
To fix this we forcibly change FW state to idle state before doing
the full reset. This makes FW to restore link state.
Fixes: c8c82eb net: aquantia: Introduce global AQC hardware reset sequence
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
.../aquantia/atlantic/hw_atl/hw_atl_utils.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c
index d3b847ec7465..c58b2c227260 100644
--- a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c
+++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c
@@ -48,6 +48,8 @@
#define FORCE_FLASHLESS 0
static int hw_atl_utils_ver_match(u32 ver_expected, u32 ver_actual);
+static int hw_atl_utils_mpi_set_state(struct aq_hw_s *self,
+ enum hal_atl_utils_fw_state_e state);
int hw_atl_utils_initfw(struct aq_hw_s *self, const struct aq_fw_ops **fw_ops)
{
@@ -247,6 +249,20 @@ int hw_atl_utils_soft_reset(struct aq_hw_s *self)
self->rbl_enabled = (boot_exit_code != 0);
+ /* FW 1.x may bootup in an invalid POWER state (WOL feature).
+ * We should work around this by forcing its state back to DEINIT
+ */
+ if (!hw_atl_utils_ver_match(HW_ATL_FW_VER_1X,
+ aq_hw_read_reg(self,
+ HW_ATL_MPI_FW_VERSION))) {
+ int err = 0;
+
+ hw_atl_utils_mpi_set_state(self, MPI_DEINIT);
+ AQ_HW_WAIT_FOR((aq_hw_read_reg(self, HW_ATL_MPI_STATE_ADR) &
+ HW_ATL_MPI_STATE_MSK) == MPI_DEINIT,
+ 10, 1000U);
+ }
+
if (self->rbl_enabled)
return hw_atl_utils_soft_reset_rbl(self);
else
--
2.17.0
......@@ -11,23 +11,34 @@ url="http://www.kernel.org/"
license=('GPL2')
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'libelf')
options=('!strip')
source=(http://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.{xz,sign}
http://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.{xz,sign}
# the main kernel config files
config.x86_64
# standard config files for mkinitcpio ramdisk
linux.preset
# pacman hooks
60-linux.hook
90-linux.hook)
sha256sums=('5a26478906d5005f4f809402e981518d2b8844949199f60c4b6e1f986ca2a769'
source=(
https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.{xz,sign}
https://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.{xz,sign}
config.x86_64 # the main kernel config file
60-linux.hook # pacman hook for depmod
90-linux.hook # pacman hook for initramfs regeneration
linux.preset # standard config files for mkinitcpio ramdisk
0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch
0002-drm-i915-edp-Only-use-the-alternate-fixed-mode-if-it.patch
0003-Partially-revert-swiotlb-remove-various-exports.patch
0004-Fix-vboxguest-on-guests-with-more-than-4G-RAM.patch
0005-Revert-drm-amd-display-disable-CRTCs-with-NULL-FB-on.patch
0006-net-aquantia-Regression-on-reset-with-1.x-firmware.patch
)
sha256sums=('63f6dc8e3c9f3a0273d5d6f4dca38a2413ca3a5f689329d05b750e4c87bb21b9'
'SKIP'
'6be2c185839d730769a8e6bcf46ca0962845732e25ed4801fe1ea995218b1133'
'336252cb15f2f2574461c1d3daabf5dc207842526085802270e1e5223f645db3'
'SKIP'
'50b72cb7e96708c60958374aafd146bafc016e7714d7c3722c3b4320e0a9978d'
'f0d90e756f14533ee67afda280500511a62465b4f76adcc5effa95a40045179c'
'ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21'
'75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919')
'75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919'
'f0d90e756f14533ee67afda280500511a62465b4f76adcc5effa95a40045179c'
'a6119b46856ed2652c509fed380052e6df2be89c69a0d748cf7d8745bf35b871'
'545566a7358d711b8d4f9924df685e2410549e20d99e5d1c0dfaccdfeafda60d'
'bef6dd7b3a749ec072614ea4ed0bd5ea1d90519731f3438e4938d5b957032cc5'
'd647211e288436bcc010019a69f4ebf9a94c33b423c650aea8098969208ec836'
'6fb4fb81dab69ff432767e02585b3eb6a5a39c941e4bc2a6d4940ee17116c14e'
'd49a70d3b3f60c81d93735871f01ea60cafca87588d8d0d01801b2aec92e0e93')
validpgpkeys=(
'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
'647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
......@@ -38,15 +49,29 @@ prepare() {
# add upstream patch
msg "adding upstream patch"
patch -p1 -i "${srcdir}/patch-${pkgver}"
chmod +x scripts/checkpatch.pl
chmod +x tools/objtool/sync-check.sh
patch -p1 -i ../patch-${pkgver}
# security patches
# add latest fixes from stable queue, if needed
# http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
# disable USER_NS for non-root users by default
patch -Np1 -i ../0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch
# https://bugs.archlinux.org/task/56711
patch -Np1 -i ../0002-drm-i915-edp-Only-use-the-alternate-fixed-mode-if-it.patch
# NVIDIA driver compat
patch -Np1 -i ../0003-Partially-revert-swiotlb-remove-various-exports.patch
# https://bugs.archlinux.org/task/58153
patch -Np1 -i ../0004-Fix-vboxguest-on-guests-with-more-than-4G-RAM.patch
# https://bugs.archlinux.org/task/58158
patch -Np1 -i ../0005-Revert-drm-amd-display-disable-CRTCs-with-NULL-FB-on.patch
# https://bugs.archlinux.org/task/58174
patch -Np1 -i ../0006-net-aquantia-Regression-on-reset-with-1.x-firmware.patch
cat "${srcdir}/config.x86_64" > ./.config
if [ "${_kernelname}" != "" ]; then
......@@ -95,7 +120,7 @@ package_linux() {
cd ${_srcname}
# get kernel version
_kernver="$(make LOCALVERSION= kernelrelease)"
_kernver="$(make kernelrelease)"
_basekernel=${_kernver%%-*}
_basekernel=${_basekernel%.*}
......@@ -171,9 +196,6 @@ package_linux-headers() {
install -Dt "${_builddir}/drivers/md" -m644 drivers/md/*.h
install -Dt "${_builddir}/net/mac80211" -m644 net/mac80211/*.h
# http://bugs.archlinux.org/task/9912
install -Dt "${_builddir}/drivers/media/dvb-core" -m644 drivers/media/dvb-core/*.h
# http://bugs.archlinux.org/task/13146
install -Dt "${_builddir}/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/lgdt330x.h
install -Dt "${_builddir}/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
# arg 2: the old package version
KERNEL_NAME=-CHAKRA