new kernel

This commit is contained in:
ertugerata
2015-09-23 01:05:31 +03:00
parent d108b2c433
commit f6f9670c6d
176 changed files with 255038 additions and 81 deletions
+9 -2
View File
@@ -11,7 +11,7 @@
<Summary>Kernel module allowing to switch dedicated graphics card on Optimus laptops</Summary>
<Description>kernel module allowing to switch dedicated graphics card on Optimus laptops</Description>
<BuildDependencies>
<Dependency version="4.1.7">kernel-module-headers</Dependency>
<Dependency version="4.1.8">kernel-module-headers</Dependency>
</BuildDependencies>
<Archive sha1sum="e282ee682d794e3962baa4dead01917c42571e78" type="targz">https://github.com/Bumblebee-Project/bbswitch/archive/v0.8.tar.gz</Archive>
<Patches>
@@ -20,7 +20,7 @@
<Package>
<Name>module-bbswitch</Name>
<RuntimeDependencies>
<Dependency version="4.1.7">kernel</Dependency>
<Dependency version="4.1.8">kernel</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="library" permanent="true">/lib/modules</Path>
@@ -34,6 +34,13 @@
</Package>
<History>
<Update release="29">
<Date>2015-09-23</Date>
<Version>0.8</Version>
<Comment>Rebuild for kernel-4.1.8.</Comment>
<Name>Ertuğrul Erata</Name>
<Email>ertugrulerata@gmail.com</Email>
</Update>
<Update release="28">
<Date>2015-09-18</Date>
<Version>0.8</Version>
+9 -2
View File
@@ -15,7 +15,7 @@
<Archive sha1sum="e02beac9cc713011551c483ae5f20f065f5b88c7" type="targz" target="i686">http://www.broadcom.com/docs/linux_sta/hybrid-v35-nodebug-pcoem-6_30_223_248.tar.gz</Archive>
<Archive sha1sum="bd55f1fdc6b0a4d0a70dc4ba4bb4169a824e238c" type="targz" target="x86_64">http://www.broadcom.com/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-6_30_223_248.tar.gz</Archive>
<BuildDependencies>
<Dependency version="4.1.7">kernel-module-headers</Dependency>
<Dependency version="4.1.8">kernel-module-headers</Dependency>
</BuildDependencies>
<Patches>
<Patch level="1">patch/linux-40.patch</Patch>
@@ -30,7 +30,7 @@
<Package>
<Name>module-broadcom-wl</Name>
<RuntimeDependencies>
<Dependency version="4.1.7">kernel</Dependency>
<Dependency version="4.1.8">kernel</Dependency>
<Dependency release="current">module-broadcom-wl-userspace</Dependency>
</RuntimeDependencies>
<Replaces>
@@ -62,6 +62,13 @@
</Package>
<History>
<Update release="49">
<Date>2015-09-23</Date>
<Version>6.30.223.248</Version>
<Comment>Rebuild for kernel 4.1.8.</Comment>
<Name>Ertuğrul Erata</Name>
<Email>ertugrulerata@gmail.com</Email>
</Update>
<Update release="48">
<Date>2015-09-18</Date>
<Version>6.30.223.248</Version>
@@ -14,14 +14,14 @@
<Description>This package provides the kernel modules needed for mouse integration and shared folder support between VirtualBox host and guest systems.</Description>
<Archive sha1sum="82194515516139801fdc690198495b043d1c9cbe" type="tarxz">http://source.pisilinux.org/1.0/module-virtualbox-guest-4.3.28.tar.xz</Archive>
<BuildDependencies>
<Dependency version="4.1.7">kernel-module-headers</Dependency>
<Dependency version="4.1.8">kernel-module-headers</Dependency>
</BuildDependencies>
</Source>
<Package>
<Name>module-virtualbox-guest</Name>
<RuntimeDependencies>
<Dependency version="4.1.7">kernel</Dependency>
<Dependency version="4.1.8">kernel</Dependency>
<Dependency>baselayout</Dependency>
<Dependency version="current">module-virtualbox-guest-userspace</Dependency>
</RuntimeDependencies>
@@ -52,7 +52,14 @@
</Package>
<History>
<Update release="49">
<Update release="50">
<Date>2015-08-23</Date>
<Version>4.3.28</Version>
<Comment>Rebuild for kernel-4.1.8.</Comment>
<Name>Ertuğrul Erata</Name>
<Email>ertugrulerata@gmail.com</Email>
</Update>
<Update release="49">
<Date>2015-08-18</Date>
<Version>4.3.28</Version>
<Comment>Rebuild for kernel-4.1.7.</Comment>
+9 -2
View File
@@ -14,14 +14,14 @@
<Description>This package provides the kernel support for VirtualBox.</Description>
<Archive sha1sum="8850ebc24e00640835b682a5f8bbc8f05313d2d7" type="tarxz">http://source.pisilinux.org/1.0/module-virtualbox-4.3.28.tar.xz</Archive>
<BuildDependencies>
<Dependency version="4.1.7">kernel-module-headers</Dependency>
<Dependency version="4.1.8">kernel-module-headers</Dependency>
</BuildDependencies>
</Source>
<Package>
<Name>module-virtualbox</Name>
<RuntimeDependencies>
<Dependency version="4.1.7">kernel</Dependency>
<Dependency version="4.1.8">kernel</Dependency>
<Dependency version="current">module-virtualbox-userspace</Dependency>
</RuntimeDependencies>
<Files>
@@ -47,6 +47,13 @@
</Package>
<History>
<Update release="53">
<Date>2015-09-23</Date>
<Version>4.3.28</Version>
<Comment>Rebuild for kernel-4.1.8.</Comment>
<Name>Ertuğrul Erata</Name>
<Email>ertugrulerata@gmail.com</Email>
</Update>
<Update release="52">
<Date>2015-09-18</Date>
<Version>4.3.28</Version>
+10 -3
View File
@@ -15,7 +15,7 @@
<Description>module-ndiswrapper allows you to use Windows XP drivers for WLAN cards without proper Linux drivers.</Description>
<Archive sha1sum="75fbbda677fe91ee07a6f6a8e19b1f3e2479540f" type="targz">http://download.sourceforge.net/ndiswrapper/ndiswrapper-1.59.tar.gz</Archive>
<BuildDependencies>
<Dependency version="4.1.6">kernel-module-headers</Dependency>
<Dependency version="4.1.8">kernel-module-headers</Dependency>
</BuildDependencies>
<Patches>
<Patch>support_kernel-4.0.patch</Patch>
@@ -28,7 +28,7 @@
<Package>
<Name>ndiswrapper</Name>
<RuntimeDependencies>
<Dependency version="4.1.6">kernel</Dependency>
<Dependency version="4.1.8">kernel</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="library" permanent="true">/lib/modules</Path>
@@ -44,7 +44,14 @@
</Package>
<History>
<Update release="2">
<Update release="3">
<Date>2014-09-23</Date>
<Version>1.59</Version>
<Comment>Rebuild for kernel-4.1.8.</Comment>
<Name>PisiLinux Community</Name>
<Email>admins@pisilinux.org</Email>
</Update>
<Update release="2">
<Date>2014-08-18</Date>
<Version>1.59</Version>
<Comment>Rebuild for kernel-4.1.6.</Comment>
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86_64 4.1.7 Kernel Configuration
# Linux/x86_64 4.1.8 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
Binary file not shown.
@@ -0,0 +1,181 @@
3rdparty/mkbuild.pl | 92 +++++++++++++++++++++++++++++++++++++++++++++
Documentation/3rdparty.txt | 76 +++++++++++++++++++++++++++++++++++++
2 files changed, 168 insertions(+)
diff -Nurp linux-2.6.37/3rdparty/mkbuild.pl linux-2.6.37.3rdparty/3rdparty/mkbuild.pl
--- linux-2.6.37/3rdparty/mkbuild.pl 1970-01-01 02:00:00.000000000 +0200
+++ linux-2.6.37.3rdparty/3rdparty/mkbuild.pl 2004-04-23 14:59:03.000000000 +0300
@@ -0,0 +1,92 @@
+#!/usr/bin/perl -w
+#
+# Version 1.0
+#
+# Copyright 2001 Jeff Garzik <jgarzik@mandrakesoft.com>
+# Copyright 2002 Juan Quintela <quintela@mandrakesoft.com>
+# Copyright 2003 Nicolas Planel <nplanel@mandrakesoft.com>
+#
+# This software may be used and distributed according to the terms
+# of the GNU General Public License, incorporated herein by reference.
+#
+#
+# Run "mkbuild.pl"
+#
+# This program generates the following files
+# Makefile
+# Makefile.drivers
+# Config.in
+# using the information in the subdirs of this directory.
+#
+# subdirs need to have:
+# a Config.in file
+# a Makefile with a O_TARGET/L_TARGET targets
+# The config.in should set a CONFIG_<module_dir_name> to m/y.
+
+use strict;
+
+opendir(THISDIR, ".");
+# get dirs without . and .. garbage
+my (@modules) = grep(!/\.\.?$/,grep(-d, readdir(THISDIR)));
+closedir(THISDIR);
+
+generate_kconfig(@modules);
+generate_makefile(@modules);
+exit(0);
+
+##########################################################################
+
+sub generate_makefile {
+ my (@modules) = @_;
+
+ local *F;
+ open F, "> Makefile" or die "Cannot create new Makefile: $!\n";
+ print F <<'EOM';
+#
+# THIS IS AN AUTOMATICALLY GENERATED FILE. DO NOT EDIT.
+#
+
+EOM
+ printf F "obj- := 3rdparty.o # Dummy rule to force built-in.o to be made\n";
+ printf F "obj-\$(%s) += %s\n", to_CONFIG($_), $_ . '/' foreach @modules;
+}
+
+sub generate_kconfig {
+ my (@modules) = @_;
+
+ local *F;
+ open F, "> Kconfig" or die "Cannot create Kconfig: $!\n";
+ print F <<"EOM";
+#
+# THIS IS AN AUTOMATICALLY GENERATED FILE. DO NOT EDIT.
+#
+
+menu "Unofficial 3rd party kernel additions"
+
+EOM
+
+ foreach (@modules) {
+ die "No Kconfig in $_.\n" if ! -r "$_/Kconfig";
+ print F "source 3rdparty/$_/Kconfig\n";
+ }
+ print F "\n\nendmenu\n";
+}
+
+sub to_CONFIG {
+ local $_ = $_[0];
+ tr/a-z/A-Z/;
+ s/[\-\. ]/_/g;
+ "CONFIG_$_";
+}
+
+sub find_target {
+ my ($module_dir) = @_;
+
+ local *F;
+ open(F, "$module_dir/Makefile") or die "$module_dir/Makefile: $!\n";
+ while (<F>) {
+ chomp;
+ return $1 if (/[LO]_TARGET.*:=\s+(\S+)/);
+ }
+}
+
diff -Nurp linux-2.6.37/Documentation/3rdparty.txt linux-2.6.37.3rdparty/Documentation/3rdparty.txt
--- linux-2.6.37/Documentation/3rdparty.txt 1970-01-01 02:00:00.000000000 +0200
+++ linux-2.6.37.3rdparty/Documentation/3rdparty.txt 2003-11-22 01:07:26.000000000 +0200
@@ -0,0 +1,76 @@
+
+Third-Party Kernel Source Module Support, or
+an easy way to add modules to your kernel build.
+
+
+
+Vendors quite often add additional drivers and features to the kernel
+which require nothing more than modifying Kconfig, Makefile, and
+adding one or more files to a sub-directory. As a single discrete task,
+this is not a problem. However, using patches to add modules to the
+kernel very often results in patch conflicts, resulting in needless time
+wastage as developers regenerate an otherwise working kernel patch.
+
+This is designed as a solution to these problems. It is NOT designed as
+a replacement for the kernel build system, but merely as a tool for
+vendors and system administrators to ease the pain of patch management.
+
+The key feature of this system is the distinct lack of patches. Drivers
+are installed via unpacking a tarball.
+
+
+
+Adding a directory to the build (usually from a tarball)
+--------------------------------------------------------
+If a directory exists inside the 3rdparty sub-directory that contains a
+proper Makefile, it can be added to the build. It also needs a
+Kconfig file.
+
+ cd /usr/src/linux-2.4.3/3rdparty
+ bzcat /tmp/my-driver2.tar.bz2 | tar xf - # creates "my2" dir
+
+
+Limitations
+-----------
+There are some limitations to this system. This system is only
+designed to support a very common case. If you find yourself running
+into limitations (kernel build experts can spot them right off),
+then you should probably be patching the kernel instead of using
+mkbuild.pl for that particular module.
+
+FIXME: actually list the limitations
+
+
+
+Other notes
+-----------
+Link order is controlled by the order of mkbuild.pl executions.
+
+"make mrproper" will erase Makefile.meta, and empty Kconfig, Makefile,
+and Makefile.drivers.
+
+IMPORTANT NOTE: Because this feature modifies the kernel's makefiles and
+configuration system, you MUST complete all mkbuild.pl runs before
+running any "make" command.
+
+Building in the 3rdparty dir
+----------------------------
+
+If you use modules that:
+ - are contained in one subdir with the name of the module
+ - has a Makefile
+ - has a Kconfig file
+
+The system calls the ./mkbuild.pl script. It will search for
+subdirectories, and will try to build each of them as a module.
+Things to note:
+
+ The dependencies will be done in a module called:
+
+ 3rdparty/<module_dir_name>/<module_name>
+
+depending of CONFIG_<module_name_in_uppercase>.
+
+<module_name> is the value of O_TARGET/L_TARGET.
+
+
@@ -0,0 +1,181 @@
Include 3rdparty directory into the main build-system.
Original author is unknown.
(Was either Juan Quintela or Jeff Garzik)
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Thomas Backlund <tmb@mageia.org>
Makefile | 2 +-
arch/alpha/Kconfig | 1 +
arch/ia64/Kconfig | 2 ++
arch/mips/Kconfig | 2 ++
arch/powerpc/Kconfig | 2 ++
arch/sparc/Kconfig | 2 ++
arch/x86/Kconfig | 2 ++
scripts/kconfig/Makefile | 31 +++++++++++++++++--------------
8 files changed, 29 insertions(+), 15 deletions(-)
diff -Nurp linux-4.1/arch/alpha/Kconfig linux-4.1-3rd/arch/alpha/Kconfig
--- linux-4.1/arch/alpha/Kconfig 2015-06-22 07:05:43.000000000 +0200
+++ linux-4.1-3rd/arch/alpha/Kconfig 2015-06-25 20:44:03.221647317 +0200
@@ -750,3 +750,4 @@ source "crypto/Kconfig"
source "lib/Kconfig"
+source "3rdparty/Kconfig"
diff -Nurp linux-4.1/arch/ia64/Kconfig linux-4.1-3rd/arch/ia64/Kconfig
--- linux-4.1/arch/ia64/Kconfig 2015-06-22 07:05:43.000000000 +0200
+++ linux-4.1-3rd/arch/ia64/Kconfig 2015-06-25 20:44:03.231647227 +0200
@@ -636,3 +636,5 @@ source "lib/Kconfig"
config IOMMU_HELPER
def_bool (IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB || IA64_GENERIC || SWIOTLB)
+
+source "3rdparty/Kconfig"
diff -Nurp linux-4.1/arch/mips/Kconfig linux-4.1-3rd/arch/mips/Kconfig
--- linux-4.1/arch/mips/Kconfig 2015-06-22 07:05:43.000000000 +0200
+++ linux-4.1-3rd/arch/mips/Kconfig 2015-06-25 20:44:03.231647227 +0200
@@ -2893,3 +2893,5 @@ source "crypto/Kconfig"
source "lib/Kconfig"
source "arch/mips/kvm/Kconfig"
+
+source "3rdparty/Kconfig"
diff -Nurp linux-4.1/arch/powerpc/Kconfig linux-4.1-3rd/arch/powerpc/Kconfig
--- linux-4.1/arch/powerpc/Kconfig 2015-06-22 07:05:43.000000000 +0200
+++ linux-4.1-3rd/arch/powerpc/Kconfig 2015-06-25 20:44:03.231647227 +0200
@@ -1090,3 +1090,5 @@ config PPC_LIB_RHEAP
bool
source "arch/powerpc/kvm/Kconfig"
+
+source "3rdparty/Kconfig"
diff -Nurp linux-4.1/arch/sparc/Kconfig linux-4.1-3rd/arch/sparc/Kconfig
--- linux-4.1/arch/sparc/Kconfig 2015-06-22 07:05:43.000000000 +0200
+++ linux-4.1-3rd/arch/sparc/Kconfig 2015-06-25 20:44:03.231647227 +0200
@@ -569,3 +569,5 @@ source "security/Kconfig"
source "crypto/Kconfig"
source "lib/Kconfig"
+
+source "3rdparty/Kconfig"
diff -Nurp linux-4.1/arch/x86/Kconfig linux-4.1-3rd/arch/x86/Kconfig
--- linux-4.1/arch/x86/Kconfig 2015-06-22 07:05:43.000000000 +0200
+++ linux-4.1-3rd/arch/x86/Kconfig 2015-06-25 20:44:03.231647227 +0200
@@ -2594,3 +2594,5 @@ source "crypto/Kconfig"
source "arch/x86/kvm/Kconfig"
source "lib/Kconfig"
+
+source "3rdparty/Kconfig"
diff -Nurp linux-4.1/Makefile linux-4.1-3rd/Makefile
--- linux-4.1/Makefile 2015-06-22 07:05:43.000000000 +0200
+++ linux-4.1-3rd/Makefile 2015-06-25 20:44:03.231647227 +0200
@@ -556,7 +556,7 @@ scripts: scripts_basic include/config/au
# Objects we will link into vmlinux / subdirs we need to visit
init-y := init/
-drivers-y := drivers/ sound/ firmware/
+drivers-y := drivers/ sound/ firmware/ 3rdparty/
net-y := net/
libs-y := lib/
core-y := usr/
diff -Nurp linux-4.1/scripts/kconfig/Makefile linux-4.1-3rd/scripts/kconfig/Makefile
--- linux-4.1/scripts/kconfig/Makefile 2015-06-22 07:05:43.000000000 +0200
+++ linux-4.1-3rd/scripts/kconfig/Makefile 2015-06-25 20:47:50.109596717 +0200
@@ -18,26 +18,26 @@ endif
# We need this, in case the user has it in its environment
unexport CONFIG_
-xconfig: $(obj)/qconf
+xconfig: $(obj)/qconf 3rdparty/Makefile
$< $(silent) $(Kconfig)
-gconfig: $(obj)/gconf
+gconfig: $(obj)/gconf 3rdparty/Makefile
$< $(silent) $(Kconfig)
-menuconfig: $(obj)/mconf
+menuconfig: $(obj)/mconf 3rdparty/Makefile
$< $(silent) $(Kconfig)
-config: $(obj)/conf
+config: $(obj)/conf 3rdparty/Makefile
$< $(silent) --oldaskconfig $(Kconfig)
-nconfig: $(obj)/nconf
+nconfig: $(obj)/nconf 3rdparty/Makefile
$< $(silent) $(Kconfig)
-silentoldconfig: $(obj)/conf
+silentoldconfig: $(obj)/conf 3rdparty/Makefile
$(Q)mkdir -p include/config include/generated
$< $(silent) --$@ $(Kconfig)
-localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
+localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf 3rdparty/Makefile
$(Q)mkdir -p include/config include/generated
$(Q)perl $< --$@ $(srctree) $(Kconfig) > .tmp.config
$(Q)if [ -f .config ]; then \
@@ -80,7 +80,7 @@ simple-targets := oldconfig allnoconfig
alldefconfig randconfig listnewconfig olddefconfig
PHONY += $(simple-targets)
-$(simple-targets): $(obj)/conf
+$(simple-targets): $(obj)/conf 3rdparty/Makefile
$< $(silent) --$@ $(Kconfig)
PHONY += oldnoconfig savedefconfig defconfig
@@ -88,12 +88,12 @@ PHONY += oldnoconfig savedefconfig defco
# oldnoconfig is an alias of olddefconfig, because people already are dependent
# on its behavior(sets new symbols to their default value but not 'n') with the
# counter-intuitive name.
-oldnoconfig: olddefconfig
+oldnoconfig: olddefconfig 3rdparty/Makefile
-savedefconfig: $(obj)/conf
+savedefconfig: $(obj)/conf 3rdparty/Makefile
$< $(silent) --$@=defconfig $(Kconfig)
-defconfig: $(obj)/conf
+defconfig: $(obj)/conf 3rdparty/Makefile
ifeq ($(KBUILD_DEFCONFIG),)
$< $(silent) --defconfig $(Kconfig)
else
@@ -101,7 +101,7 @@ else
$(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig)
endif
-%_defconfig: $(obj)/conf
+%_defconfig: $(obj)/conf 3rdparty/Makefile
$(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig)
configfiles=$(wildcard $(srctree)/kernel/configs/$@ $(srctree)/arch/$(SRCARCH)/configs/$@)
@@ -112,12 +112,12 @@ configfiles=$(wildcard $(srctree)/kernel
+$(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig
PHONY += kvmconfig
-kvmconfig: kvm_guest.config
+kvmconfig: kvm_guest.config 3rdparty/Makefile
@:
PHONY += tinyconfig
tinyconfig:
- $(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config
+ $(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config 3rdparty/Makefile
# Help text used by make help
help:
@@ -176,6 +176,9 @@ gconf-objs := gconf.o zconf.tab.o
hostprogs-y := conf nconf mconf kxgettext qconf gconf
+3rdparty/Makefile:
+ pushd $(srctree)/3rdparty ; $(PERL) ./mkbuild.pl ; popd
+
clean-files := qconf.moc .tmp_qtcheck .tmp_gtkcheck
clean-files += zconf.tab.c zconf.lex.c zconf.hash.c gconf.glade.h
clean-files += config.pot linux.pot
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,20 @@
--- linux-2.6.35/3rdparty/acerhk/acerhk.c.orig 2010-10-03 12:50:33.000000000 +0000
+++ linux-2.6.35/3rdparty/acerhk/acerhk.c 2010-10-03 13:13:22.093868410 +0000
@@ -2730,7 +2730,7 @@ static void acerhk_proc_cleanup(void)
/* {{{ file operations */
-static int acerhk_ioctl( struct inode *inode, struct file *file,
+static long acerhk_ioctl( struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg )
{
int retval;
@@ -2827,7 +2827,7 @@ static int acerhk_release( struct inode
static struct file_operations acerhk_fops = {
owner: THIS_MODULE,
- ioctl: acerhk_ioctl,
+ unlocked_ioctl: acerhk_ioctl,
open: acerhk_open,
#ifdef ACERDEBUG
write: acerhk_write,
@@ -0,0 +1,33 @@
CFLAGS use isn't allowed anymore with 2.6.24, we must use EXTRA_CFLAGS
in its place
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
--- linux-2.6.23/3rdparty/acerhk/Makefile.orig 2007-11-08 21:32:43.000000000 -0200
+++ linux-2.6.23/3rdparty/acerhk/Makefile 2007-11-08 21:33:28.000000000 -0200
@@ -14,7 +14,7 @@
CONFIG_ACERHK?=m
obj-$(CONFIG_ACERHK) += acerhk.o
-CFLAGS+=-c -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe
+EXTRA_CFLAGS+=-c -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe
INCLUDE=-I$(KERNELSRC)/include
ifeq ($(KERNELMAJOR), 2.6)
@@ -41,13 +41,13 @@ acerhk.ko: $(SOURCE) acerhk.h
$(MAKE) -C $(KERNELSRC) SUBDIRS=$(PWD) modules
acerhk.o: $(SOURCE) acerhk.h
- $(CC) $(INCLUDE) $(CFLAGS) -DMODVERSIONS -DMODULE -D__KERNEL__ -o $(TARGET) $(SOURCE)
+ $(CC) $(INCLUDE) $(EXTRA_CFLAGS) -DMODVERSIONS -DMODULE -D__KERNEL__ -o $(TARGET) $(SOURCE)
asm: $(SOURCE)
ifeq ($(KERNELMAJOR), 2.6)
- $(CC) $(INCLUDE) $(INCLUDE)/asm-i386/mach-default $(CFLAGS) -fverbose-asm -S -DMODVERSIONS -DMODULE -D__KERNEL__ $(SOURCE)
+ $(CC) $(INCLUDE) $(INCLUDE)/asm-i386/mach-default $(EXTRA_CFLAGS) -fverbose-asm -S -DMODVERSIONS -DMODULE -D__KERNEL__ $(SOURCE)
else
- $(CC) $(INCLUDE) $(CFLAGS) -fverbose-asm -S -DMODVERSIONS -DMODULE -D__KERNEL__ $(SOURCE)
+ $(CC) $(INCLUDE) $(EXTRA_CFLAGS) -fverbose-asm -S -DMODVERSIONS -DMODULE -D__KERNEL__ $(SOURCE)
endif
clean:
@@ -0,0 +1,22 @@
Fix acerhk build with FUNCTION_TRACER enabled.
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
---
3rdparty/acerhk/Makefile | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff -p -up linux-2.6.31/3rdparty/acerhk/Makefile.orig linux-2.6.31/3rdparty/acerhk/Makefile
--- linux-2.6.31/3rdparty/acerhk/Makefile.orig 2009-10-02 16:39:06.000000000 -0300
+++ linux-2.6.31/3rdparty/acerhk/Makefile 2009-10-02 16:45:13.000000000 -0300
@@ -14,7 +14,10 @@
CONFIG_ACERHK?=m
obj-$(CONFIG_ACERHK) += acerhk.o
-EXTRA_CFLAGS+=-c -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe
+CFLAGS_acerhk.o += -c -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe
+ifdef CONFIG_FUNCTION_TRACER
+CFLAGS_REMOVE_acerhk.o = -pg
+endif
INCLUDE=-I$(KERNELSRC)/include
ifeq ($(KERNELMAJOR), 2.6)
@@ -0,0 +1,23 @@
AUTOCONF_INCLUDED is not defined anymore in 2.6.38, so old include got exposed.
Fix by removing the offending bits.
Signed-off-by: Thomas Backlund <tmb@mageia.org>
3rdparty/acerhk/acerhk.c | 4 ----
1 file changed, 4 deletions(-)
--- linux-2.6.38/3rdparty/acerhk/acerhk.c.orig 2011-03-20 13:57:32.000000000 +0200
+++ linux-2.6.38/3rdparty/acerhk/acerhk.c 2011-03-20 15:00:45.768659568 +0200
@@ -35,10 +35,6 @@
*
*/
-#ifndef AUTOCONF_INCLUDED
-#include <linux/config.h>
-#endif
-
/* This driver is heavily dependent on the architecture, don't let
* anyone without an X86 machine use it. On laptops with AMD64
* architecture this driver is only useable in 32 bit mode.
@@ -0,0 +1,37 @@
Fix Makefile and add Kconfig for the acerhk driver
---
3rdparty/acerhk/Kconfig | 8 8 + 0 - 0 !
3rdparty/acerhk/Makefile | 6 3 + 3 - 0 !
2 files changed, 11 insertions(+), 3 deletions(-)
Index: linux-2.6.21/3rdparty/acerhk/Makefile
===================================================================
--- linux-2.6.21.orig/3rdparty/acerhk/Makefile 2007-05-15 15:34:48.000000000 +0200
+++ linux-2.6.21/3rdparty/acerhk/Makefile 2007-05-15 15:37:17.000000000 +0200
@@ -1,10 +1,10 @@
# change KERNELSRC to the location of your kernel build tree only if
# autodetection does not work
#KERNELSRC=/usr/src/linux
-KERNELSRC?=/lib/modules/`uname -r`/build
+#KERNELSRC?=/lib/modules/`uname -r`/build
# Starting with 2.6.18, the kernel version is in utsrelease.h instead of version.h, accomodate both cases
-KERNELVERSION=$(shell awk -F\" '/REL/ {print $$2}' $(shell grep -s -l REL $(KERNELSRC)/include/linux/version.h $(KERNELSRC)/include/linux/utsrelease.h))
-KERNELMAJOR=$(shell echo $(KERNELVERSION)|head -c3)
+#KERNELVERSION=$(shell awk -F\" '/REL/ {print $$2}' $(shell grep -s -l REL $(KERNELSRC)/include/linux/version.h $(KERNELSRC)/include/linux/utsrelease.h))
+#KERNELMAJOR=$(shell echo $(KERNELVERSION)|head -c3)
# next line is for kernel 2.6, if you integrate the driver in the kernel tree
# /usr/src/linux/drivers/acerhk - or something similar
Index: linux-2.6.21/3rdparty/acerhk/Kconfig
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.21/3rdparty/acerhk/Kconfig 2007-05-15 15:39:30.000000000 +0200
@@ -0,0 +1,8 @@
+config ACERHK
+ tristate "Acerhk driver"
+ depends on EXPERIMENTAL && X86
+ ---help---
+ This is an experimental acer keyboard driver for
+ acer laptops. If you have a notebook with a ipw2X00
+ wireless card, it allows you to turn off the rf_kill
+
@@ -0,0 +1,67 @@
Updated for owner removal from struct proc_dir_entry (2.6.30)
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
---
3rdparty/acerhk/acerhk.c | 7 -------
1 file changed, 7 deletions(-)
diff -p -up linux-2.6.29/3rdparty/acerhk/acerhk.c.orig linux-2.6.29/3rdparty/acerhk/acerhk.c
--- linux-2.6.29/3rdparty/acerhk/acerhk.c.orig 2009-05-22 02:42:44.000000000 -0300
+++ linux-2.6.29/3rdparty/acerhk/acerhk.c 2009-05-22 02:43:45.000000000 -0300
@@ -2626,7 +2626,6 @@ static int acerhk_proc_init(void)
printk(KERN_INFO"acerhk: could not create /proc/driver/acerhk\n");
}
else {
- proc_acer_dir->owner = THIS_MODULE;
/* now create several files, first general info ... */
entry = create_proc_read_entry("info",
0444, proc_acer_dir, acerhk_proc_info, NULL);
@@ -2635,7 +2634,6 @@ static int acerhk_proc_init(void)
remove_proc_entry("driver/acerhk", NULL);
retval = 0;
} else {
- entry->owner = THIS_MODULE;
/* ... last pressed key ... */
entry = create_proc_read_entry("key",
0444, proc_acer_dir, acerhk_proc_key, NULL);
@@ -2645,7 +2643,6 @@ static int acerhk_proc_init(void)
remove_proc_entry("driver/acerhk", NULL);
retval = 0;
} else {
- entry->owner = THIS_MODULE;
/* ... and led control file */
entry = create_proc_entry("led", 0222, proc_acer_dir);
if (entry == NULL) {
@@ -2657,7 +2654,6 @@ static int acerhk_proc_init(void)
}
else {
entry->write_proc = acerhk_proc_led;
- entry->owner = THIS_MODULE;
/* ... and wireless led controll file */
entry = create_proc_entry("wirelessled", 0222, proc_acer_dir);
if (entry == NULL) {
@@ -2670,7 +2666,6 @@ static int acerhk_proc_init(void)
}
else {
entry->write_proc = acerhk_proc_wirelessled;
- entry->owner = THIS_MODULE;
/* ... and bluetooth led controll file */
entry = create_proc_entry("blueled", 0222, proc_acer_dir);
if (entry == NULL) {
@@ -2683,7 +2678,6 @@ static int acerhk_proc_init(void)
retval = 0;
} else {
entry->write_proc = acerhk_proc_blueled;
- entry->owner = THIS_MODULE;
retval = 1;
#ifdef ACERDEBUG
/* add extra file for debugging purposes */
@@ -2700,7 +2694,6 @@ static int acerhk_proc_init(void)
}
else {
entry->write_proc = acerhk_proc_debug;
- entry->owner = THIS_MODULE;
retval = 1;
}
#endif
@@ -0,0 +1,47 @@
Fix Makefile and add Kconfig for the aes2501 driver.
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
---
linux-2.6.23/3rdparty/aes2501/Kconfig | 10 ++++++++++
linux-2.6.23/3rdparty/aes2501/Makefile | 19 +------------------
2 files changed, 11 insertions(+), 18 deletions(-)
diff -p -up linux-2.6.23/3rdparty/aes2501/Kconfig.orig linux-2.6.23/3rdparty/aes2501/Kconfig
--- linux-2.6.23/3rdparty/aes2501/Kconfig.orig 2008-01-13 23:14:47.000000000 -0200
+++ linux-2.6.23/3rdparty/aes2501/Kconfig 2008-01-13 23:35:21.000000000 -0200
@@ -0,0 +1,10 @@
+config AES2501
+ tristate "AuthenTec AES2501 Fingerprint Sensor Driver"
+ depends on USB
+ default m
+ ---help---
+ Say Y here if you have a AuthenTec AES2501 Fingerprint
+ Sensor device.
+
+ To compile this driver as a module, choose M here: the
+ module will be called aes2501.
diff -p -up linux-2.6.23/3rdparty/aes2501/Makefile.orig linux-2.6.23/3rdparty/aes2501/Makefile
--- linux-2.6.23/3rdparty/aes2501/Makefile.orig 2008-01-13 23:14:36.000000000 -0200
+++ linux-2.6.23/3rdparty/aes2501/Makefile 2008-01-13 23:21:33.000000000 -0200
@@ -1,19 +1,2 @@
-
-obj-m := aes2501.o
-
-KERNELDIR ?= /lib/modules/$(shell uname -r)/build
-
-PWD := $(shell pwd)
-
-all: usertest
- $(MAKE) -C $(KERNELDIR) M=$(PWD)
-
-usertest:
- gcc -I. -o usertest usertest.c
-
-clean:
- rm -f *.o *~ aes2501.ko aes2501.mod.c Module.symvers usertest
- rm -rf .tmp_versions
- rm -f .*.cmd
-
+obj-$(CONFIG_AES2501) := aes2501.o
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,21 @@
Prevent oops on module removal when we don't have the device available.
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
---
linux-2.6.23/3rdparty/aes2501/aes2501.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff -p -up linux-2.6.23/3rdparty/aes2501/aes2501.c.orig linux-2.6.23/3rdparty/aes2501/aes2501.c
--- linux-2.6.23/3rdparty/aes2501/aes2501.c.orig 2008-01-13 23:37:38.000000000 -0200
+++ linux-2.6.23/3rdparty/aes2501/aes2501.c 2008-01-13 23:38:26.000000000 -0200
@@ -1616,7 +1616,8 @@ static int __init aes2501_init(void)
static void __exit aes2501_exit(void)
{
- _dev->stop_scan = 1;
+ if (_dev)
+ _dev->stop_scan = 1;
destroy_workqueue(comm_queue);
usb_deregister(&aes2501_driver);
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,32 @@
Adapt for strnicmp has been replaced by strncasecmp,
and removed upstream in v4.0-rc1~98:
From af3cd13501eb04ca61d017ff4406f1cbffafdc04 Mon Sep 17 00:00:00 2001
From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Date: Thu, 12 Feb 2015 15:02:15 -0800
Subject: lib/string.c: remove strnicmp()
Signed-off-by: Thomas Backlund <tmb@mageia.org>
--- linux/3rdparty/ndiswrapper/ndis.c.orig
+++ linux/3rdparty/ndiswrapper/ndis.c
@@ -438,7 +438,7 @@ static int read_setting(struct nt_list *
struct wrap_device_setting *setting;
mutex_lock(&loader_mutex);
nt_list_for_each_entry(setting, setting_list, list) {
- if (strnicmp(keyname, setting->name, length) == 0) {
+ if (strncasecmp(keyname, setting->name, length) == 0) {
TRACE2("setting %s='%s'", keyname, setting->value);
mutex_unlock(&loader_mutex);
*param = ndis_encode_setting(setting, type);
@@ -502,7 +502,7 @@ wstdcall void WIN_FUNC(NdisWriteConfigur
mutex_lock(&loader_mutex);
nt_list_for_each_entry(setting, &nmb->wnd->wd->settings, list) {
- if (strnicmp(keyname, setting->name, ansi.length) == 0) {
+ if (strncasecmp(keyname, setting->name, ansi.length) == 0) {
mutex_unlock(&loader_mutex);
if (ndis_decode_setting(setting, param))
*status = NDIS_STATUS_FAILURE;
@@ -0,0 +1,7 @@
--- linux-2.6.24.orig/3rdparty/ndiswrapper/Kconfig 1969-12-31 21:00:00.000000000 -0300
+++ linux-2.6.24/3rdparty/ndiswrapper/Kconfig 2007-11-26 15:11:31.000000000 -0200
@@ -0,0 +1,4 @@
+
+config NDISWRAPPER
+ tristate "NDIS driver wrapper support"
+ depends on PCI && USB && !X86_64_XEN
@@ -0,0 +1,45 @@
--- linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/Makefile.orig 2013-11-28 21:42:10.000000000 +0200
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/Makefile 2013-11-30 21:41:19.550504380 +0200
@@ -9,24 +9,10 @@ DISTFILES = \
winnt_types.h workqueue.c wrapmem.c wrapmem.h wrapndis.c wrapndis.h \
wrapper.c wrapper.h
-# By default, we try to compile the modules for the currently running
-# kernel. But it's the first approximation, as we will re-read the
-# version from the kernel sources.
-KVERS_UNAME ?= $(shell uname -r)
-
# KBUILD is the path to the Linux kernel build tree. It is usually the
# same as the kernel source tree, except when the kernel was compiled in
# a separate directory.
-KBUILD ?= $(shell readlink -f /lib/modules/$(KVERS_UNAME)/build)
-
-ifeq (,$(KBUILD))
-$(error Kernel build tree not found - please set KBUILD to configured kernel)
-endif
-
-KCONFIG := $(KBUILD)/.config
-ifeq (,$(wildcard $(KCONFIG)))
-$(error No .config found in $(KBUILD), please set KBUILD to configured kernel)
-endif
+KBUILD ?= $(srctree)
ifneq (,$(wildcard $(KBUILD)/include/linux/version.h))
ifneq (,$(wildcard $(KBUILD)/include/generated/uapi/linux/version.h))
@@ -43,16 +29,9 @@ endif
ifeq (,$(wildcard $(VERSION_H)))
VERSION_H := $(KBUILD)/include/linux/version.h
endif
-ifeq (,$(wildcard $(VERSION_H)))
-$(error Please run 'make modules_prepare' in $(KBUILD))
-endif
KVERS := $(shell sed -ne 's/"//g;s/^\#define UTS_RELEASE //p' $(VERSION_H))
-ifeq (,$(KVERS))
-$(error Cannot find UTS_RELEASE in $(VERSION_H), please report)
-endif
-
INST_DIR = /lib/modules/$(KVERS)/misc
SRC_DIR=$(shell pwd)
@@ -0,0 +1,33 @@
Fix build with kernel-3.14
Signed-off-by: Thomas Backlund <tmb@mageia.org>
3rdparty/ndiswrapper/crt.c | 2 +-
3rdparty/ndiswrapper/ntoskernel.h | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
--- linux/3rdparty/ndiswrapper/crt.c.orig 2014-04-26 19:10:55.000000000 +0300
+++ linux/3rdparty/ndiswrapper/crt.c 2014-04-26 19:25:27.766116082 +0300
@@ -467,7 +467,7 @@ noregparm int WIN_FUNC(_win_memcmp,3)
noregparm void WIN_FUNC(_win_srand,1)
(UINT seed)
{
- net_srandom(seed);
+ prandom_seed((__force u32) seed);
}
noregparm int WIN_FUNC(rand,0)
--- linux/3rdparty/ndiswrapper/ntoskernel.h.orig 2014-04-26 19:42:32.000000000 +0300
+++ linux/3rdparty/ndiswrapper/ntoskernel.h 2014-04-26 19:59:13.662522942 +0300
@@ -798,9 +798,8 @@ do { \
#define nt_spin_unlock_irqrestore(lock, flags) \
do { \
nt_spin_unlock(lock); \
- preempt_enable_no_resched(); \
+ preempt_enable(); \
local_irq_restore(flags); \
- preempt_check_resched(); \
} while (0)
static inline ULONG SPAN_PAGES(void *ptr, SIZE_T length)
@@ -0,0 +1,978 @@
3rdparty/rfswitch/FILES | 6
3rdparty/rfswitch/ISSUES | 28 +++
3rdparty/rfswitch/Kconfig | 22 ++
3rdparty/rfswitch/LICENSE | 339 +++++++++++++++++++++++++++++++++++++++++++++
3rdparty/rfswitch/Makefile | 119 +++++++++++++++
3rdparty/rfswitch/README | 44 +++++
3rdparty/rfswitch/av5100.c | 174 +++++++++++++++++++++++
3rdparty/rfswitch/pbe5.c | 205 +++++++++++++++++++++++++++
8 files changed, 937 insertions(+)
diff -Nurp linux-2.6.37/3rdparty/rfswitch/av5100.c linux-2.6.37.3rdparty/3rdparty/rfswitch/av5100.c
--- linux-2.6.37/3rdparty/rfswitch/av5100.c 1970-01-01 02:00:00.000000000 +0200
+++ linux-2.6.37.3rdparty/3rdparty/rfswitch/av5100.c 2008-03-28 05:25:28.000000000 +0200
@@ -0,0 +1,174 @@
+/*******************************************************************************
+
+ Copyright(c) 2003 - 2004 Intel Corporation. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of version 2 of the GNU General Public License as
+ published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program; if not, write to the Free Software Foundation, Inc., 59
+ Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ The full GNU General Public License is included in this distribution in the
+ file called LICENSE.
+
+ Contact Information:
+ James P. Ketrenos <ipw2100-admin@linux.intel.com>
+ Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
+
+*******************************************************************************/
+#include <linux/compiler.h>
+#include <linux/errno.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/netdevice.h>
+#include <linux/version.h>
+#include <linux/proc_fs.h>
+#include <linux/ioport.h>
+#include <asm/uaccess.h>
+#include <asm/io.h>
+
+
+#define DRV_NAME "av5100"
+#define DRV_VERSION "1.3"
+#define DRV_DESCRIPTION "SW RF kill switch for Averatec 5100P"
+#define DRV_COPYRIGHT "Copyright(c) 2003-2004 Intel Corporation"
+
+static int radio = 1;
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+
+MODULE_PARM(radio, "i");
+
+#else /* LINUX_VERSION_CODE < 2.6.0 */
+
+#include <linux/moduleparam.h>
+module_param(radio, int, 1);
+
+#endif /* LINUX_VERSION_CODE < 2.6.0 */
+
+MODULE_PARM_DESC(radio, "controls state of radio (1=on, 0=off)");
+
+MODULE_DESCRIPTION(DRV_DESCRIPTION);
+MODULE_AUTHOR(DRV_COPYRIGHT);
+MODULE_LICENSE("GPL");
+
+#define AV5100_RADIO_ON (0xe0)
+#define AV5100_RADIO_OFF (0xe1)
+
+static int av5100_radio = AV5100_RADIO_OFF;
+
+static void av5100_set_radio(int state)
+{
+ printk(KERN_INFO DRV_NAME ": Radio being turned %s\n",
+ (state == AV5100_RADIO_ON) ? "ON" : "OFF");
+ outl(0x80020800, 0xcf8);
+ outb(0x6f, 0x0072);
+ outl(0x1800ffff, 0x1184);
+ outb(state, 0x00b2);
+ av5100_radio = state;
+}
+
+
+/*
+ * proc stuff
+ */
+static struct proc_dir_entry *dir_base = NULL;
+
+static int proc_set_radio(struct file *file, const char *buffer,
+ unsigned long count, void *data)
+{
+ av5100_set_radio(buffer[0] == '0' ? AV5100_RADIO_OFF : AV5100_RADIO_ON);
+
+ return count;
+}
+
+static int proc_get_radio(char *page, char **start, off_t offset,
+ int count, int *eof, void *data)
+{
+ int len = 0;
+
+ len += snprintf(page, count, DRV_NAME ": %d\n",
+ av5100_radio == AV5100_RADIO_OFF ? 0 : 1);
+
+ *eof = 1;
+ return len;
+}
+
+
+static void av5100_proc_cleanup(void)
+{
+ if (dir_base) {
+ remove_proc_entry("radio", dir_base);
+ remove_proc_entry(DRV_NAME, &proc_root);
+ dir_base = NULL;
+ }
+}
+
+
+static int av5100_proc_init(void)
+{
+ struct proc_dir_entry *ent;
+ int err = 0;
+
+ dir_base = create_proc_entry(DRV_NAME, S_IFDIR, &proc_root);
+ if (dir_base == NULL) {
+ printk(KERN_ERR DRV_NAME ": Unable to initialise /proc/"
+ DRV_NAME "\n");
+ err = -ENOMEM;
+ goto fail;
+ }
+
+
+ ent = create_proc_entry("radio", S_IFREG | S_IRUGO | S_IWUSR,
+ dir_base);
+ if (ent) {
+ ent->read_proc = proc_get_radio;
+ ent->write_proc = proc_set_radio;
+ } else {
+ printk(KERN_ERR
+ "Unable to initialize /proc/" DRV_NAME "/radio\n");
+ err = -ENOMEM;
+ goto fail;
+ }
+
+ return 0;
+
+ fail:
+ av5100_proc_cleanup();
+ return err;
+}
+
+/*
+ * module stuff
+ */
+static int __init av5100_init(void)
+{
+ av5100_proc_init();
+
+ av5100_set_radio((radio == 1) ? AV5100_RADIO_ON : AV5100_RADIO_OFF);
+
+ return 0;
+}
+
+static void __exit av5100_exit(void)
+{
+ av5100_set_radio(AV5100_RADIO_OFF);
+
+ av5100_proc_cleanup();
+}
+
+module_init(av5100_init);
+module_exit(av5100_exit);
+
+/*
+ 1 2 3 4 5 6 7
+12345678901234567890123456789012345678901234567890123456789012345678901234567890
+*/
diff -Nurp linux-2.6.37/3rdparty/rfswitch/FILES linux-2.6.37.3rdparty/3rdparty/rfswitch/FILES
--- linux-2.6.37/3rdparty/rfswitch/FILES 1970-01-01 02:00:00.000000000 +0200
+++ linux-2.6.37.3rdparty/3rdparty/rfswitch/FILES 2004-07-09 07:44:19.000000000 +0300
@@ -0,0 +1,6 @@
+Makefile Used for building on 2.4, 2.6, internally and exteranlly
+
+FILES This file
+
+av5100.c Averatec 5100P SW Switch Module
+pbe5.c Packard Bell Easynote SW Switch Module
diff -Nurp linux-2.6.37/3rdparty/rfswitch/ISSUES linux-2.6.37.3rdparty/3rdparty/rfswitch/ISSUES
--- linux-2.6.37/3rdparty/rfswitch/ISSUES 1970-01-01 02:00:00.000000000 +0200
+++ linux-2.6.37.3rdparty/3rdparty/rfswitch/ISSUES 2004-07-09 07:43:22.000000000 +0300
@@ -0,0 +1,28 @@
+
+ISSUES
+------------ ----- ----- ---- --- -- -
+
+No packets! - RF kill switch
+
+If the module loads, but no packets are transferred you may have a SW based
+radio kill switch. All laptops have some capability to disable the radio
+via a button or switch. On some laptops that switch is physically tied to the
+IPW2100; simply toggling the switch should enable the radio.
+
+On other laptops, the switch is a button that when pressed requires some
+software driver to send some hardware command to some other piece of hardware
+on the laptop, that then controls the radio. The driver currently has support
+for the Averatec 5100P laptop's SW switch. Support will be added for other
+laptop vendors as we become aware of them and figure out how to enable the
+radio.
+
+To know if the radio is being disabled via the RF switch, perform the following:
+
+% cat /proc/net/ipw2100/eth1/state
+Radio is disabled by RF switch
+
+If it says that, then your RF switch is currently disabling the radio. The
+driver doesn't currently support switching back to the on state if you have a
+physical RF switch (the radio may turn on and packets will work, but the proc
+entry won't be updated)
+
diff -Nurp linux-2.6.37/3rdparty/rfswitch/Kconfig linux-2.6.37.3rdparty/3rdparty/rfswitch/Kconfig
--- linux-2.6.37/3rdparty/rfswitch/Kconfig 1970-01-01 02:00:00.000000000 +0200
+++ linux-2.6.37.3rdparty/3rdparty/rfswitch/Kconfig 2008-05-27 23:39:10.000000000 +0300
@@ -0,0 +1,22 @@
+menu "RF Switch"
+ depends on EXPERIMENTAL
+
+config RFSWITCH
+ tristate "RF Switch"
+ depends on EXPERIMENTAL
+
+config AVERATEC_5100P
+ tristate "averatec 5100P driver"
+ depends on RFSWITCH
+ ---help---
+ This is an experimental driver for the wireless switch
+ of some laptops (usefull with some ipw2x00 cards)
+
+config PACKARDBELL_E5
+ tristate "pbe5 driver"
+ depends on RFSWITCH
+ ---help---
+ This is an experimental driver for the wireless switch
+ of some laptops (usefull with some ipw2x00 cards)
+
+endmenu
diff -Nurp linux-2.6.37/3rdparty/rfswitch/LICENSE linux-2.6.37.3rdparty/3rdparty/rfswitch/LICENSE
--- linux-2.6.37/3rdparty/rfswitch/LICENSE 1970-01-01 02:00:00.000000000 +0200
+++ linux-2.6.37.3rdparty/3rdparty/rfswitch/LICENSE 2004-07-09 07:43:22.000000000 +0300
@@ -0,0 +1,339 @@
+
+"This software program is licensed subject to the GNU General Public License
+(GPL). Version 2, June 1991, available at
+<http://www.fsf.org/copyleft/gpl.html>"
+
+GNU General Public License
+
+Version 2, June 1991
+
+Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+
+Everyone is permitted to copy and distribute verbatim copies of this license
+document, but changing it is not allowed.
+
+Preamble
+
+The licenses for most software are designed to take away your freedom to
+share and change it. By contrast, the GNU General Public License is intended
+to guarantee your freedom to share and change free software--to make sure
+the software is free for all its users. This General Public License applies
+to most of the Free Software Foundation's software and to any other program
+whose authors commit to using it. (Some other Free Software Foundation
+software is covered by the GNU Library General Public License instead.) You
+can apply it to your programs, too.
+
+When we speak of free software, we are referring to freedom, not price. Our
+General Public Licenses are designed to make sure that you have the freedom
+to distribute copies of free software (and charge for this service if you
+wish), that you receive source code or can get it if you want it, that you
+can change the software or use pieces of it in new free programs; and that
+you know you can do these things.
+
+To protect your rights, we need to make restrictions that forbid anyone to
+deny you these rights or to ask you to surrender the rights. These
+restrictions translate to certain responsibilities for you if you distribute
+copies of the software, or if you modify it.
+
+For example, if you distribute copies of such a program, whether gratis or
+for a fee, you must give the recipients all the rights that you have. You
+must make sure that they, too, receive or can get the source code. And you
+must show them these terms so they know their rights.
+
+We protect your rights with two steps: (1) copyright the software, and (2)
+offer you this license which gives you legal permission to copy, distribute
+and/or modify the software.
+
+Also, for each author's protection and ours, we want to make certain that
+everyone understands that there is no warranty for this free software. If
+the software is modified by someone else and passed on, we want its
+recipients to know that what they have is not the original, so that any
+problems introduced by others will not reflect on the original authors'
+reputations.
+
+Finally, any free program is threatened constantly by software patents. We
+wish to avoid the danger that redistributors of a free program will
+individually obtain patent licenses, in effect making the program
+proprietary. To prevent this, we have made it clear that any patent must be
+licensed for everyone's free use or not licensed at all.
+
+The precise terms and conditions for copying, distribution and modification
+follow.
+
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+0. This License applies to any program or other work which contains a notice
+ placed by the copyright holder saying it may be distributed under the
+ terms of this General Public License. The "Program", below, refers to any
+ such program or work, and a "work based on the Program" means either the
+ Program or any derivative work under copyright law: that is to say, a
+ work containing the Program or a portion of it, either verbatim or with
+ modifications and/or translated into another language. (Hereinafter,
+ translation is included without limitation in the term "modification".)
+ Each licensee is addressed as "you".
+
+ Activities other than copying, distribution and modification are not
+ covered by this License; they are outside its scope. The act of running
+ the Program is not restricted, and the output from the Program is covered
+ only if its contents constitute a work based on the Program (independent
+ of having been made by running the Program). Whether that is true depends
+ on what the Program does.
+
+1. You may copy and distribute verbatim copies of the Program's source code
+ as you receive it, in any medium, provided that you conspicuously and
+ appropriately publish on each copy an appropriate copyright notice and
+ disclaimer of warranty; keep intact all the notices that refer to this
+ License and to the absence of any warranty; and give any other recipients
+ of the Program a copy of this License along with the Program.
+
+ You may charge a fee for the physical act of transferring a copy, and you
+ may at your option offer warranty protection in exchange for a fee.
+
+2. You may modify your copy or copies of the Program or any portion of it,
+ thus forming a work based on the Program, and copy and distribute such
+ modifications or work under the terms of Section 1 above, provided that
+ you also meet all of these conditions:
+
+ * a) You must cause the modified files to carry prominent notices stating
+ that you changed the files and the date of any change.
+
+ * b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any part
+ thereof, to be licensed as a whole at no charge to all third parties
+ under the terms of this License.
+
+ * c) If the modified program normally reads commands interactively when
+ run, you must cause it, when started running for such interactive
+ use in the most ordinary way, to print or display an announcement
+ including an appropriate copyright notice and a notice that there is
+ no warranty (or else, saying that you provide a warranty) and that
+ users may redistribute the program under these conditions, and
+ telling the user how to view a copy of this License. (Exception: if
+ the Program itself is interactive but does not normally print such
+ an announcement, your work based on the Program is not required to
+ print an announcement.)
+
+ These requirements apply to the modified work as a whole. If identifiable
+ sections of that work are not derived from the Program, and can be
+ reasonably considered independent and separate works in themselves, then
+ this License, and its terms, do not apply to those sections when you
+ distribute them as separate works. But when you distribute the same
+ sections as part of a whole which is a work based on the Program, the
+ distribution of the whole must be on the terms of this License, whose
+ permissions for other licensees extend to the entire whole, and thus to
+ each and every part regardless of who wrote it.
+
+ Thus, it is not the intent of this section to claim rights or contest
+ your rights to work written entirely by you; rather, the intent is to
+ exercise the right to control the distribution of derivative or
+ collective works based on the Program.
+
+ In addition, mere aggregation of another work not based on the Program
+ with the Program (or with a work based on the Program) on a volume of a
+ storage or distribution medium does not bring the other work under the
+ scope of this License.
+
+3. You may copy and distribute the Program (or a work based on it, under
+ Section 2) in object code or executable form under the terms of Sections
+ 1 and 2 above provided that you also do one of the following:
+
+ * a) Accompany it with the complete corresponding machine-readable source
+ code, which must be distributed under the terms of Sections 1 and 2
+ above on a medium customarily used for software interchange; or,
+
+ * b) Accompany it with a written offer, valid for at least three years,
+ to give any third party, for a charge no more than your cost of
+ physically performing source distribution, a complete machine-
+ readable copy of the corresponding source code, to be distributed
+ under the terms of Sections 1 and 2 above on a medium customarily
+ used for software interchange; or,
+
+ * c) Accompany it with the information you received as to the offer to
+ distribute corresponding source code. (This alternative is allowed
+ only for noncommercial distribution and only if you received the
+ program in object code or executable form with such an offer, in
+ accord with Subsection b above.)
+
+ The source code for a work means the preferred form of the work for
+ making modifications to it. For an executable work, complete source code
+ means all the source code for all modules it contains, plus any
+ associated interface definition files, plus the scripts used to control
+ compilation and installation of the executable. However, as a special
+ exception, the source code distributed need not include anything that is
+ normally distributed (in either source or binary form) with the major
+ components (compiler, kernel, and so on) of the operating system on which
+ the executable runs, unless that component itself accompanies the
+ executable.
+
+ If distribution of executable or object code is made by offering access
+ to copy from a designated place, then offering equivalent access to copy
+ the source code from the same place counts as distribution of the source
+ code, even though third parties are not compelled to copy the source
+ along with the object code.
+
+4. You may not copy, modify, sublicense, or distribute the Program except as
+ expressly provided under this License. Any attempt otherwise to copy,
+ modify, sublicense or distribute the Program is void, and will
+ automatically terminate your rights under this License. However, parties
+ who have received copies, or rights, from you under this License will not
+ have their licenses terminated so long as such parties remain in full
+ compliance.
+
+5. You are not required to accept this License, since you have not signed
+ it. However, nothing else grants you permission to modify or distribute
+ the Program or its derivative works. These actions are prohibited by law
+ if you do not accept this License. Therefore, by modifying or
+ distributing the Program (or any work based on the Program), you
+ indicate your acceptance of this License to do so, and all its terms and
+ conditions for copying, distributing or modifying the Program or works
+ based on it.
+
+6. Each time you redistribute the Program (or any work based on the
+ Program), the recipient automatically receives a license from the
+ original licensor to copy, distribute or modify the Program subject to
+ these terms and conditions. You may not impose any further restrictions
+ on the recipients' exercise of the rights granted herein. You are not
+ responsible for enforcing compliance by third parties to this License.
+
+7. If, as a consequence of a court judgment or allegation of patent
+ infringement or for any other reason (not limited to patent issues),
+ conditions are imposed on you (whether by court order, agreement or
+ otherwise) that contradict the conditions of this License, they do not
+ excuse you from the conditions of this License. If you cannot distribute
+ so as to satisfy simultaneously your obligations under this License and
+ any other pertinent obligations, then as a consequence you may not
+ distribute the Program at all. For example, if a patent license would
+ not permit royalty-free redistribution of the Program by all those who
+ receive copies directly or indirectly through you, then the only way you
+ could satisfy both it and this License would be to refrain entirely from
+ distribution of the Program.
+
+ If any portion of this section is held invalid or unenforceable under any
+ particular circumstance, the balance of the section is intended to apply
+ and the section as a whole is intended to apply in other circumstances.
+
+ It is not the purpose of this section to induce you to infringe any
+ patents or other property right claims or to contest validity of any
+ such claims; this section has the sole purpose of protecting the
+ integrity of the free software distribution system, which is implemented
+ by public license practices. Many people have made generous contributions
+ to the wide range of software distributed through that system in
+ reliance on consistent application of that system; it is up to the
+ author/donor to decide if he or she is willing to distribute software
+ through any other system and a licensee cannot impose that choice.
+
+ This section is intended to make thoroughly clear what is believed to be
+ a consequence of the rest of this License.
+
+8. If the distribution and/or use of the Program is restricted in certain
+ countries either by patents or by copyrighted interfaces, the original
+ copyright holder who places the Program under this License may add an
+ explicit geographical distribution limitation excluding those countries,
+ so that distribution is permitted only in or among countries not thus
+ excluded. In such case, this License incorporates the limitation as if
+ written in the body of this License.
+
+9. The Free Software Foundation may publish revised and/or new versions of
+ the General Public License from time to time. Such new versions will be
+ similar in spirit to the present version, but may differ in detail to
+ address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the Program
+ specifies a version number of this License which applies to it and "any
+ later version", you have the option of following the terms and
+ conditions either of that version or of any later version published by
+ the Free Software Foundation. If the Program does not specify a version
+ number of this License, you may choose any version ever published by the
+ Free Software Foundation.
+
+10. If you wish to incorporate parts of the Program into other free programs
+ whose distribution conditions are different, write to the author to ask
+ for permission. For software which is copyrighted by the Free Software
+ Foundation, write to the Free Software Foundation; we sometimes make
+ exceptions for this. Our decision will be guided by the two goals of
+ preserving the free status of all derivatives of our free software and
+ of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+ PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
+ EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
+ ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH
+ YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
+ NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
+ DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
+ DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM
+ (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
+ INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF
+ THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR
+ OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+END OF TERMS AND CONDITIONS
+
+How to Apply These Terms to Your New Programs
+
+If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it free
+software which everyone can redistribute and change under these terms.
+
+To do so, attach the following notices to the program. It is safest to
+attach them to the start of each source file to most effectively convey the
+exclusion of warranty; and each file should have at least the "copyright"
+line and a pointer to where the full notice is found.
+
+one line to give the program's name and an idea of what it does.
+Copyright (C) yyyy name of author
+
+This program is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2 of the License, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59
+Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this when
+it starts in an interactive mode:
+
+Gnomovision version 69, Copyright (C) year name of author Gnomovision comes
+with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free
+software, and you are welcome to redistribute it under certain conditions;
+type 'show c' for details.
+
+The hypothetical commands 'show w' and 'show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may be
+called something other than 'show w' and 'show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+'Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+signature of Ty Coon, 1 April 1989
+Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General Public
+License instead of this License.
diff -Nurp linux-2.6.37/3rdparty/rfswitch/Makefile linux-2.6.37.3rdparty/3rdparty/rfswitch/Makefile
--- linux-2.6.37/3rdparty/rfswitch/Makefile 1970-01-01 02:00:00.000000000 +0200
+++ linux-2.6.37.3rdparty/3rdparty/rfswitch/Makefile 2008-03-28 05:17:16.000000000 +0200
@@ -0,0 +1,119 @@
+#
+# Makefile for the SW RF Switch kernel modules
+#
+# NOTE: This make file can serve as both an external Makefile (launched
+# directly by the user), or as the sub-dir Makefile used by the kernel
+# build system.
+
+
+CONFIG_AVERATEC_5100P=m
+CONFIG_PACKARDBELL_E5=m
+
+
+
+list-m :=
+list-$(CONFIG_AVERATEC_5100P) += av5100
+list-$(CONFIG_PACKARDBELL_E5) += pbe5
+
+
+obj-$(CONFIG_AVERATEC_5100P) += av5100.o
+obj-$(CONFIG_PACKARDBELL_E5) += pbe5.o
+
+#
+# Begin dual Makefile mode here. First we provide support for when we
+# are being invoked by the kernel build system
+#
+ifneq ($(KERNELRELEASE),)
+
+ifneq ($(PATCHLEVEL),6) # If we are not on a 2.6, then do 2.4 specific things
+
+O_TARGET := rfswitch.o
+
+include $(TOPDIR)/Rules.make
+
+endif # End if 2.4 specific settings
+
+else
+# Here we begin the portion that is executed if the user invoked this Makefile
+# directly.
+
+# KSRC should be set to the path to your sources
+# modules are installed into KMISC
+KVER := $(shell uname -r)
+KSRC := /lib/modules/$(KVER)/build
+KMISC := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
+
+# KSRC_OUTPUT should be overridden if you are using a 2.6 kernel that
+# has it's output sent elsewhere via KBUILD_OUTPUT= or O=
+KSRC_OUTPUT := $(KSRC)
+
+# If we find Rules.make, we can assume we're using the old 2.4 style building
+OLDMAKE=$(wildcard $(KSRC)/Rules.make)
+PWD=$(shell pwd)
+
+VERFILE := $(KSRC_OUTPUT)/include/linux/version.h
+KERNELRELEASE := $(shell \
+ if [ -r $(VERFILE) ]; then \
+ (cat $(VERFILE); echo UTS_RELEASE) | \
+ $(CC) -I$(KSRC_OUTPUT) $(CFLAGS) -E - | \
+ tail -n 1 | \
+ xargs echo; \
+ else \
+ uname -r; \
+ fi)
+
+MODPATH := $(DESTDIR)/lib/modules/$(KERNELRELEASE)
+
+all: modules
+
+clean:
+ rm -f *.mod.c *.mod *.o *.ko .*.cmd .*.flags Modules.symvers
+ rm -rf $(PWD)/tmp
+
+
+ifeq ($(OLDMAKE),)
+
+TMP=$(PWD)/tmp
+MODVERDIR=$(TMP)/.tmp_versions
+
+modules:
+ifdef ($(KSRC_OUTPUT)/.tmp_versions)
+ mkdir -p $(MODVERDIR)
+ -cp $(KSRC_OUTPUT)/.tmp_versions/*.mod $(MODVERDIR)
+endif
+ifeq ($(KSRC),$(KSRC_OUTPUT)) # We're not outputting elsewhere
+ifdef ($(KSRC)/.tmp_versions)
+ -cp $(KSRC)/.tmp_versions/*.mod $(MODVERDIR)
+endif
+ $(MAKE) -C $(KSRC) SUBDIRS=$(PWD) MODVERDIR=$(MODVERDIR) modules
+else # We've got a kernel with seperate output, copy the config, and use O=
+ mkdir -p $(TMP)
+ cp $(KSRC_OUTPUT)/.config $(TMP)
+ $(MAKE) -C $(KSRC) SUBDIRS=$(PWD) MODVERDIR=$(MODVERDIR) O=$(PWD)/tmp modules
+endif
+
+install: modules
+ install -d $(KMISC)
+ install -m 644 -c $(addsuffix .ko,$(list-m)) $(KMISC)
+ /sbin/depmod -a
+
+
+else # We're on 2.4, and things are slightly different
+
+modules:
+ $(MAKE) -C $(KSRC) SUBDIRS=$(PWD) BUILD_DIR=$(PWD) modules
+
+install: modules
+ install -d $(KMISC)
+ install -m 644 -c $(addsuffix .o,$(list-m)) $(KMISC)
+ /sbin/depmod -a
+
+endif
+
+uninstall:
+ cd $(KMISC)
+ rm -rf $(addsuffix .ko,$(list-m))
+ cd -
+ /sbin/depmod -a
+
+endif
diff -Nurp linux-2.6.37/3rdparty/rfswitch/pbe5.c linux-2.6.37.3rdparty/3rdparty/rfswitch/pbe5.c
--- linux-2.6.37/3rdparty/rfswitch/pbe5.c 1970-01-01 02:00:00.000000000 +0200
+++ linux-2.6.37.3rdparty/3rdparty/rfswitch/pbe5.c 2008-03-28 05:25:16.000000000 +0200
@@ -0,0 +1,205 @@
+/*******************************************************************************
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of version 2 of the GNU General Public License as
+ published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program; if not, write to the Free Software Foundation, Inc., 59
+ Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ The full GNU General Public License is included in this distribution in the
+ file called LICENSE.
+
+ Author:
+ Pedro Ramalhais <pmr09313@students.fct.unl.pt>
+
+ Based on:
+ av5100.c from http://ipw2100.sourceforge.net/
+
+*******************************************************************************/
+
+#include <linux/compiler.h>
+#include <linux/errno.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/netdevice.h>
+#include <linux/version.h>
+#include <linux/proc_fs.h>
+#include <linux/ioport.h>
+#include <asm/uaccess.h>
+#include <asm/io.h>
+
+#define DRV_NAME "pbe5"
+#define DRV_VERSION "1.3"
+#define DRV_DESCRIPTION "SW RF kill switch for Packard Bell EasyNote E5"
+#define DRV_AUTHOR "Pedro Ramalhais"
+#define DRV_LICENSE "GPL"
+
+static int radio = 1;
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+
+MODULE_PARM(radio, "i");
+
+#else /* LINUX_VERSION_CODE < 2.6.0 */
+
+#include <linux/moduleparam.h>
+module_param(radio, int, 1);
+
+#endif /* LINUX_VERSION_CODE < 2.6.0 */
+
+MODULE_PARM_DESC(radio, "controls state of radio (1=on, 0=off)");
+
+MODULE_DESCRIPTION(DRV_DESCRIPTION);
+MODULE_AUTHOR(DRV_AUTHOR);
+MODULE_LICENSE(DRV_LICENSE);
+
+/*
+ * NOTE: These values were obtained from disassembling the Icon.exe program
+ * installed in the Packard Bell EasyNote E5 laptop. The names were guessed,
+ * so don't rely on them.
+ */
+#define PBE5_PORT_TOGGLE 0x0b3
+#define PBE5_VALUE_TOGGLE_ON 0x01
+#define PBE5_VALUE_TOGGLE_OFF 0x00
+#define PBE5_PORT_APPLY 0x0b2
+#define PBE5_VALUE_APPLY 0xef
+
+// Some "booleans" =;-)
+#define PBE5_RADIO_OFF 0
+#define PBE5_RADIO_ON 1
+
+static int pbe5_radio_status = PBE5_RADIO_ON;
+
+unsigned char pbe5_get_radio(void)
+{
+ unsigned char val = 0x00;
+
+ val = inb(PBE5_PORT_TOGGLE);
+
+ return val;
+}
+
+static void pbe5_set_radio(int state_set)
+{
+ pbe5_radio_status = pbe5_get_radio();
+
+ if (pbe5_radio_status != state_set) {
+ // Set the radio toggle register
+ outb(PBE5_VALUE_TOGGLE_ON, PBE5_PORT_TOGGLE);
+ // Commit the radio toggle register value
+ outb(PBE5_VALUE_APPLY, PBE5_PORT_APPLY);
+ // Update the radio status
+ pbe5_radio_status = pbe5_get_radio();
+
+ printk(KERN_INFO DRV_NAME ": Radio turned %s\n",
+ (state_set == PBE5_RADIO_ON) ? "ON" : "OFF");
+ } else {
+ printk(KERN_INFO DRV_NAME ": Radio already %s\n",
+ (state_set == PBE5_RADIO_ON) ? "ON" : "OFF");
+ }
+}
+
+
+/*
+ * proc stuff
+ */
+static struct proc_dir_entry *dir_base = NULL;
+
+static int proc_set_radio(struct file *file, const char *buffer,
+ unsigned long count, void *data)
+{
+ pbe5_set_radio(buffer[0] == '0' ? PBE5_RADIO_OFF : PBE5_RADIO_ON);
+
+ return count;
+}
+
+static int proc_get_radio(char *page, char **start, off_t offset,
+ int count, int *eof, void *data)
+{
+ int len = 0;
+
+ len += snprintf(page, count, DRV_NAME ": %d\n",
+ pbe5_radio_status == PBE5_RADIO_OFF ? 0 : 1);
+
+ *eof = 1;
+ return len;
+}
+
+
+static void pbe5_proc_cleanup(void)
+{
+ if (dir_base) {
+ remove_proc_entry("radio", dir_base);
+ remove_proc_entry(DRV_NAME, &proc_root);
+ dir_base = NULL;
+ }
+}
+
+
+static int pbe5_proc_init(void)
+{
+ struct proc_dir_entry *ent;
+ int err = 0;
+
+ dir_base = create_proc_entry(DRV_NAME, S_IFDIR, &proc_root);
+ if (dir_base == NULL) {
+ printk(KERN_ERR DRV_NAME ": Unable to initialise /proc/"
+ DRV_NAME "\n");
+ err = -ENOMEM;
+ goto fail;
+ }
+
+
+ ent = create_proc_entry("radio", S_IFREG | S_IRUGO | S_IWUSR,
+ dir_base);
+ if (ent) {
+ ent->read_proc = proc_get_radio;
+ ent->write_proc = proc_set_radio;
+ } else {
+ printk(KERN_ERR
+ "Unable to initialize /proc/" DRV_NAME "/radio\n");
+ err = -ENOMEM;
+ goto fail;
+ }
+
+ return 0;
+
+ fail:
+ pbe5_proc_cleanup();
+ return err;
+}
+
+/*
+ * module stuff
+ */
+static int __init pbe5_init(void)
+{
+ pbe5_proc_init();
+
+ pbe5_set_radio((radio == 1) ? PBE5_RADIO_ON : PBE5_RADIO_OFF);
+
+ return 0;
+}
+
+static void __exit pbe5_exit(void)
+{
+ pbe5_set_radio(PBE5_RADIO_OFF);
+
+ pbe5_proc_cleanup();
+}
+
+module_init(pbe5_init);
+module_exit(pbe5_exit);
+
+/*
+ 1 2 3 4 5 6 7
+12345678901234567890123456789012345678901234567890123456789012345678901234567890
+*/
diff -Nurp linux-2.6.37/3rdparty/rfswitch/README linux-2.6.37.3rdparty/3rdparty/rfswitch/README
--- linux-2.6.37/3rdparty/rfswitch/README 1970-01-01 02:00:00.000000000 +0200
+++ linux-2.6.37.3rdparty/3rdparty/rfswitch/README 2004-07-09 17:26:20.000000000 +0300
@@ -0,0 +1,44 @@
+Radio Kill Switch
+------------ ----- ----- ---- --- -- -
+Most laptops provide the ability for the user to physically disable the radio.
+Some vendors have implemented this as a physical switch that requires no
+software to turn the radio off and on. On other laptops, however, the switch
+is controlled through a button being pressed and a software driver then making
+calls to turn the radio off and on. This is referred to as a "software based
+RF kill switch"
+
+Currently this project provides modules for controlling the software RF kill
+switch on the Averatec 5100P and Packard Bell EasyNote E5. The code may work
+on other laptops, but these are the only models on which it has been tested.
+
+To determine if you have a system that might be compatible with one of the
+provided SW RF Kill switch modules, you can run:
+
+
+ To check for the Packard Bell (to use module pbe) --
+
+ % dd if=/dev/mem bs=1 skip=983040 count=65535 2>/dev/null | strings | egrep "NEW-PC|Insyde Software MobilePRO BIOS"
+
+ To check for the Averatec (to use module av5100) --
+
+ % dd if=/dev/mem bs=1 skip=983040 count=65535 2>/dev/null | strings | egrep "AVERATEC"
+
+If you have one of those laptop models you can imply loading the av5100/pbe5
+module and the radio will be toggled on and off. In addition, you can turn
+the driver on and off by writing either a 1 or 0 to /proc/av5100/radio or
+/proc/pbe5/radio. If you automatically load the av5100/pbe5 module when your
+system boots, you may wish to use the radio module parameter to control the
+state of the radio upon loading:
+
+ modprobe av5100 radio=0
+ modprobe pbe5 radio=0
+
+results in the module loading with the radio turned off. You can then turn the
+radio on by:
+
+ echo 1 > /proc/av5100/radio
+ echo 1 > /proc/pbe5/radio
+
+If you have a SW RF kill switch and can not use one of the above modules,
+please join us on IRC (irc.freenode.net) on channel #ipw2100 and someone may
+be able to help.
@@ -0,0 +1,19 @@
fix build with 3.0
Signed-off-by: Thomas Backlund <tmb@mageia.org>
3rdparty/rfswitch/Makefile | 2 --
1 file changed, 2 deletions(-)
--- a/3rdparty/rfswitch/Makefile.orig 2011-07-15 02:37:27.000000000 +0300
+++ a/3rdparty/rfswitch/Makefile 2011-07-15 13:47:10.463914526 +0300
@@ -29,8 +29,6 @@ ifneq ($(PATCHLEVEL),6) # If we are not
O_TARGET := rfswitch.o
-include $(TOPDIR)/Rules.make
-
endif # End if 2.4 specific settings
else
@@ -0,0 +1,51 @@
Remove 'proc_root' usage
Commit c74c120a21d87b0b6925ada5830d8cac21e852d9 (Linus's tree) removed
the export of 'proc_root' variable, because you can create on the proc's
root directory by passing NULL where you would pass 'proc_root'.
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Index: linux-2.6.25/3rdparty/rfswitch/av5100.c
===================================================================
--- linux-2.6.25.orig/3rdparty/rfswitch/av5100.c
+++ linux-2.6.25/3rdparty/rfswitch/av5100.c
@@ -107,7 +107,7 @@ static void av5100_proc_cleanup(void)
{
if (dir_base) {
remove_proc_entry("radio", dir_base);
- remove_proc_entry(DRV_NAME, &proc_root);
+ remove_proc_entry(DRV_NAME, NULL);
dir_base = NULL;
}
}
@@ -118,7 +118,7 @@ static int av5100_proc_init(void)
struct proc_dir_entry *ent;
int err = 0;
- dir_base = create_proc_entry(DRV_NAME, S_IFDIR, &proc_root);
+ dir_base = create_proc_entry(DRV_NAME, S_IFDIR, NULL);
if (dir_base == NULL) {
printk(KERN_ERR DRV_NAME ": Unable to initialise /proc/"
DRV_NAME "\n");
Index: linux-2.6.25/3rdparty/rfswitch/pbe5.c
===================================================================
--- linux-2.6.25.orig/3rdparty/rfswitch/pbe5.c
+++ linux-2.6.25/3rdparty/rfswitch/pbe5.c
@@ -138,7 +138,7 @@ static void pbe5_proc_cleanup(void)
{
if (dir_base) {
remove_proc_entry("radio", dir_base);
- remove_proc_entry(DRV_NAME, &proc_root);
+ remove_proc_entry(DRV_NAME, NULL);
dir_base = NULL;
}
}
@@ -149,7 +149,7 @@ static int pbe5_proc_init(void)
struct proc_dir_entry *ent;
int err = 0;
- dir_base = create_proc_entry(DRV_NAME, S_IFDIR, &proc_root);
+ dir_base = create_proc_entry(DRV_NAME, S_IFDIR, NULL);
if (dir_base == NULL) {
printk(KERN_ERR DRV_NAME ": Unable to initialise /proc/"
DRV_NAME "\n");
@@ -0,0 +1,23 @@
From 842e61cb85813b1ed8a1646cbe6739950c0c9822 Mon Sep 17 00:00:00 2001
From: Larry Finger <Larry.Finger@lwfinger.net>
Date: Thu, 7 May 2015 19:08:17 +0000
Subject: [PATCH] rtl8723bs: Fix Makefile to allow warnings
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git linux.old/3rdparty/rtl8723bs/Makefile linux/3rdparty/rtl8723bs/Makefile
index a4d9f45..4da73fa 100644
--- linux.old/3rdparty/rtl8723bs/Makefile
+++ linux/3rdparty/rtl8723bs/Makefile
@@ -3,7 +3,7 @@ EXTRA_CFLAGS += -O1
#EXTRA_CFLAGS += -O3
#EXTRA_CFLAGS += -Wall
#EXTRA_CFLAGS += -Wextra
-EXTRA_CFLAGS += -Werror
+#EXTRA_CFLAGS += -Werror
#EXTRA_CFLAGS += -pedantic
#EXTRA_CFLAGS += -Wshadow -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,189 @@
3rdparty/viahss/Kconfig | 14 +++++++
3rdparty/viahss/Makefile | 3 +
3rdparty/viahss/README.html | 68 ++++++++++++++++++++++++++++++++++++
3rdparty/viahss/viahss.c | 83 ++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 168 insertions(+)
diff -Nurp linux-2.6.37/3rdparty/viahss/Kconfig linux-2.6.37.3rdparty/3rdparty/viahss/Kconfig
--- linux-2.6.37/3rdparty/viahss/Kconfig 1970-01-01 02:00:00.000000000 +0200
+++ linux-2.6.37.3rdparty/3rdparty/viahss/Kconfig 2003-12-01 01:53:51.000000000 +0200
@@ -0,0 +1,14 @@
+config VIAHSS
+ tristate "VIA High Speed Serial"
+ depends on SERIAL_CORE && m
+ ---help---
+ VIA High Speed Serial is a little kernel module (1 KB) which enables
+ high speed serial port modes of VIA VT82C686A or VT82C686B
+ southbridge-equipped motherboards. With this module, you can use the
+ serial port at 230400 bit/s so that you can get the full 128000 bit/s
+ from ISDN-TA. The module has been tested with both 686A and 686B
+ chipsets.
+
+ To compile this driver as a module, choose M here: the
+ module will be called viahss.
+
diff -Nurp linux-2.6.37/3rdparty/viahss/Makefile linux-2.6.37.3rdparty/3rdparty/viahss/Makefile
--- linux-2.6.37/3rdparty/viahss/Makefile 1970-01-01 02:00:00.000000000 +0200
+++ linux-2.6.37.3rdparty/3rdparty/viahss/Makefile 2003-12-01 01:43:23.000000000 +0200
@@ -0,0 +1,3 @@
+
+obj-$(CONFIG_VIAHSS) += viahss.o
+
diff -Nurp linux-2.6.37/3rdparty/viahss/README.html linux-2.6.37.3rdparty/3rdparty/viahss/README.html
--- linux-2.6.37/3rdparty/viahss/README.html 1970-01-01 02:00:00.000000000 +0200
+++ linux-2.6.37.3rdparty/3rdparty/viahss/README.html 2003-12-01 01:58:23.000000000 +0200
@@ -0,0 +1,68 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
+ <title>High speed serial port for VIA VT82C686 chipsets for linux</title>
+</head>
+<body>
+<H3>Setting the serial port speed over 115,200bps</H3>
+<br>
+If you have motherboard which has VIA VT82C686A or VT82C686B chipset
+you can set serial ports in high speed mode with this kernel module.
+I use module with external ISDN-TA and haven't had any problems
+so far but I cannot guarantee that you won't have buffer overflows if
+you use full 230K or 460K speed all the time (FIFO's are still 16550A size).
+ISDN with two channels maxes out at 128 Kb which means that it doesn't
+really stress serial ports at 230400. Unlike SHSMOD-patches you don't have
+to patch serial driver and module takes only 1KB of memory when it's
+loaded which should leave enough room for other programs. It should
+be also possible to make this work from userspace but accessing
+pci devices is so much easier from kernel.
+
+<H3>How to use module</H3>
+Get the <A href=http://www.kati.fi/viahss/viahss-0.92.tar.gz>package</A>
+and compile it using included makefiles.
+<H3>For 2.4</H3>
+If you have kernel in some other location than /usr/src/linux edit Makefile
+before compiling. You can also install module with "make install". After
+you have loaded module in kernel (use modprobe or insmod) you can set serial
+ports to use high speed modes with setserial.<br>
+<H3>For 2.5/2.6</H3>
+Copy Makefile-2.6 on top of Makefile and do make. After loading module set
+serial speed with setserial. (NOTE: This gives a warning on depracated
+method).
+
+<br>
+# setserial /dev/ttyS0 spd_cust divisor 0x8002
+<br><br>
+which sets COM1: speed to 230400. With 0x8001 you should get 460800
+but I haven't tested it. If you want to use COM2: use ttyS1 instead of ttyS0.
+
+After this you should set program which you are using to use 38400 bps
+speed which is now actually 230K or 460K. For more information check
+setserial man page (spd_cust).
+
+You can use serial port work as normal if you do<br>
+<br>
+# setserial /dev/ttyS0 spd_normal <br><br>
+After this you can also remove viahss module with rmmod if you need to. Module doesn't intefere with normal serial port usage so you can leave
+it loaded if you don't need that extra 1KB which module uses.
+<H3>Download</H3>
+<A href=http://www.kati.fi/viahss/viahss-0.92.tar.gz>viahss-0.92.tar.gz</A>
+
+<H3>Acknowledgments</H3>
+
+Thanks to Kimmo Rintala for help with divisor settings.<br>
+I also like to thank Jeff Garzik for help with VIA datasheets.<br>
+Port to 2.5/2.6 by Kingsly John with the help of <A href=http://lwn.net>LWN</A>
+
+<H3>Version History</H3>
+0.90 First release<br>
+0.91 Fixed Makefile <br>
+0.92 Fixed for 2.5/2.6<br>
+
+<H3>Contact</H3>
+
+You can reach me by email: <A href=mailto:jrauti@iki.fi>jrauti@iki.fi</A>
+</body>
+</html>
diff -Nurp linux-2.6.37/3rdparty/viahss/viahss.c linux-2.6.37.3rdparty/3rdparty/viahss/viahss.c
--- linux-2.6.37/3rdparty/viahss/viahss.c 1970-01-01 02:00:00.000000000 +0200
+++ linux-2.6.37.3rdparty/3rdparty/viahss/viahss.c 2003-07-17 09:49:59.000000000 +0300
@@ -0,0 +1,83 @@
+/*
+ * VIA VT 82c686[AB] high speed serial port enabler
+ * Version 0.92
+ * Copyright (c) 2000-2001 Juhani Rautiainen <jrauti@iki.fi>
+ *
+ * 0.92:
+ * Ported to 2.5/2.6 by Kingsly John
+ * - Corrected locking (no more cli() and sti())
+ * - New makefile
+ *
+ * Can be freely distributed and used under the terms of the GNU GPL.
+*/
+
+#include <linux/module.h>
+#include <linux/config.h>
+#include <linux/version.h>
+#include <linux/init.h>
+#include <linux/pci.h>
+
+const unsigned short confindex=0x3F0,confdata=0x3F1;
+const unsigned char spcidx=0xEE;
+
+spinlock_t driver_lock = SPIN_LOCK_UNLOCKED;
+
+static int __init viahss_init(void)
+{
+ struct pci_dev *pcidev = NULL;
+ unsigned char confval,val;
+ pcidev = pci_find_device (PCI_VENDOR_ID_VIA,PCI_DEVICE_ID_VIA_82C686,NULL);
+ if (pcidev) {
+ spin_lock_irq(&driver_lock);
+ /* start config */
+ pci_read_config_byte(pcidev,0x85,&confval);
+ confval |= 0x2;
+ pci_write_config_byte (pcidev, 0x85,confval);
+ /* activate high speed bits */
+ outb(spcidx,confindex); /* set index */
+ val = (unsigned char) inb(confdata);
+ val |= 0xC0; /* both ports on high speed*/
+ outb (spcidx,confindex);
+ outb (val,confdata);
+ /*stop config*/
+ confval &= ~0x2;
+ pci_write_config_byte(pcidev, 0x85, confval);
+ spin_unlock_irq(&driver_lock);
+ printk (KERN_INFO "VIA VT82C686[AB] serial port high speed enabled\n");
+ }
+ else {
+ printk (KERN_INFO "Couldn't locate VIA chipset\n");
+ return -ENODEV;
+ }
+ return 0;
+}
+
+static void __exit viahss_exit(void)
+{
+ struct pci_dev *pcidev = NULL;
+ unsigned char confval,val;
+ pcidev = pci_find_device (PCI_VENDOR_ID_VIA,PCI_DEVICE_ID_VIA_82C686,NULL);
+ if (pcidev) {
+ spin_lock_irq(&driver_lock);
+ /* start config */
+ pci_read_config_byte(pcidev,0x85,&confval);
+ confval |= 0x2;
+ pci_write_config_byte (pcidev, 0x85,confval);
+ /* activate high speed bits */
+ outb(spcidx,confindex); /* set index */
+ val = (unsigned char) inb(confdata);
+ val &= ~0xC0; /* both ports off high speed*/
+ outb (spcidx,confindex);
+ outb (val,confdata);
+ /*stop config*/
+ confval &= ~0x2;
+ pci_write_config_byte(pcidev, 0x85, confval);
+ spin_unlock_irq(&driver_lock);
+ printk (KERN_INFO "VIA VT82C686[AB] serial port high speed disabled\n");
+ }
+}
+
+module_init(viahss_init);
+module_exit(viahss_exit);
+MODULE_DESCRIPTION("VIA VT82C686[AB] high speed serial port enabler");
+MODULE_AUTHOR("Juhani Rautiainen <jrauti@iki.fi>");
@@ -0,0 +1,20 @@
--- linux-2.6.35-rc6-git-mnb0.1/3rdparty/viahss/viahss.c.orig 2010-07-30 21:17:30.000000000 +0300
+++ linux-2.6.35-rc6-git-mnb0.1/3rdparty/viahss/viahss.c 2010-07-30 23:10:21.324978822 +0300
@@ -25,7 +25,7 @@ static int __init viahss_init(void)
{
struct pci_dev *pcidev = NULL;
unsigned char confval,val;
- pcidev = pci_find_device (PCI_VENDOR_ID_VIA,PCI_DEVICE_ID_VIA_82C686,NULL);
+ pcidev = pci_get_device (PCI_VENDOR_ID_VIA,PCI_DEVICE_ID_VIA_82C686,NULL);
if (pcidev) {
spin_lock_irq(&driver_lock);
/* start config */
@@ -55,7 +55,7 @@ static void __exit viahss_exit(void)
{
struct pci_dev *pcidev = NULL;
unsigned char confval,val;
- pcidev = pci_find_device (PCI_VENDOR_ID_VIA,PCI_DEVICE_ID_VIA_82C686,NULL);
+ pcidev = pci_get_device (PCI_VENDOR_ID_VIA,PCI_DEVICE_ID_VIA_82C686,NULL);
if (pcidev) {
spin_lock_irq(&driver_lock);
/* start config */
@@ -0,0 +1,19 @@
fix build with 3.0
Signed-off-by: Thomas Backlund <tmb@mageia.org>
3rdparty/viahss/viahss.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/3rdparty/viahss/viahss.c.orig 2011-07-15 02:37:27.000000000 +0300
+++ a/3rdparty/viahss/viahss.c 2011-07-15 13:48:13.204291256 +0300
@@ -19,7 +19,7 @@
const unsigned short confindex=0x3F0,confdata=0x3F1;
const unsigned char spcidx=0xEE;
-spinlock_t driver_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(driver_lock);
static int __init viahss_init(void)
{
@@ -0,0 +1,18 @@
linux/config.h is gone in 2.6.21
---
3rdparty/viahss/viahss.c | 1 0 + 1 - 0 !
1 files changed, 1 deletion(-)
Index: linux-2.6.21/3rdparty/viahss/viahss.c
===================================================================
--- linux-2.6.21.orig/3rdparty/viahss/viahss.c 2003-07-17 08:49:59.000000000 +0200
+++ linux-2.6.21/3rdparty/viahss/viahss.c 2007-05-14 17:06:56.000000000 +0200
@@ -12,7 +12,6 @@
*/
#include <linux/module.h>
-#include <linux/config.h>
#include <linux/version.h>
#include <linux/init.h>
#include <linux/pci.h>
@@ -0,0 +1,7 @@
--- linux-2.6.25/3rdparty/viahss/viahss.c.orig 2008-06-28 22:50:05.000000000 +0300
+++ linux-2.6.25/3rdparty/viahss/viahss.c 2008-06-29 14:26:55.000000000 +0300
@@ -80,3 +80,4 @@ module_init(viahss_init);
module_exit(viahss_exit);
MODULE_DESCRIPTION("VIA VT82C686[AB] high speed serial port enabler");
MODULE_AUTHOR("Juhani Rautiainen <jrauti@iki.fi>");
+MODULE_LICENSE("GPL");
@@ -0,0 +1,3 @@
# Mageia SVN does not like binaries in /packages tree
# it can still be used for out ov svn builds
@@ -0,0 +1,64 @@
From eb38f3a4f6e86f8bb10a3217ebd85ecc5d763aae Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 3 Sep 2015 22:20:00 -0700
Subject: [PATCH] Input: evdev - do not report errors form flush()
We've got bug reports showing the old systemd-logind (at least
system-210) aborting unexpectedly, and this turned out to be because
of an invalid error code from close() call to evdev devices. close()
is supposed to return only either EINTR or EBADFD, while the device
returned ENODEV. logind was overreacting to it and decided to kill
itself when an unexpected error code was received. What a tragedy.
The bad error code comes from flush fops, and actually evdev_flush()
returns ENODEV when device is disconnected or client's access to it is
revoked. But in these cases the fact that flush did not actually happen is
not an error, but rather normal behavior. For non-disconnected devices
result of flush is also not that interesting as there is no potential of
data loss and even if it fails application has no way of handling the
error. Because of that we are better off always returning success from
evdev_flush().
Also returning EINTR from flush()/close() is discouraged (as it is not
clear how application should handle this error), so let's stop taking
evdev->mutex interruptibly.
Bugzilla: http://bugzilla.suse.com/show_bug.cgi?id=939834
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
drivers/input/evdev.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index 9d35499..08d4964 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -290,19 +290,14 @@ static int evdev_flush(struct file *file, fl_owner_t id)
{
struct evdev_client *client = file->private_data;
struct evdev *evdev = client->evdev;
- int retval;
- retval = mutex_lock_interruptible(&evdev->mutex);
- if (retval)
- return retval;
+ mutex_lock(&evdev->mutex);
- if (!evdev->exist || client->revoked)
- retval = -ENODEV;
- else
- retval = input_flush_device(&evdev->handle, file);
+ if (evdev->exist && !client->revoked)
+ input_flush_device(&evdev->handle, file);
mutex_unlock(&evdev->mutex);
- return retval;
+ return 0;
}
static void evdev_free(struct device *dev)
--
2.3.8
@@ -0,0 +1,32 @@
From 88299efb05387c2c94120fdc9661aab2ec3a1ad8 Mon Sep 17 00:00:00 2001
From: Thomas Backlund <tmb@mageia.org>
Date: Fri, 3 Apr 2015 00:10:34 +0259
Subject: [PATCH] Revert "cpufreq: pcc: Enable autoload of pcc-cpufreq for ACPI
processors"
This reverts commit 7e7e8fe69820c6fa31395dbbd8e348e3c69cd2a9.
---
drivers/cpufreq/pcc-cpufreq.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/cpufreq/pcc-cpufreq.c b/drivers/cpufreq/pcc-cpufreq.c
index 2a0d589..4d2c8e8 100644
--- a/drivers/cpufreq/pcc-cpufreq.c
+++ b/drivers/cpufreq/pcc-cpufreq.c
@@ -603,13 +603,6 @@ static void __exit pcc_cpufreq_exit(void)
free_percpu(pcc_cpu_info);
}
-static const struct acpi_device_id processor_device_ids[] = {
- {ACPI_PROCESSOR_OBJECT_HID, },
- {ACPI_PROCESSOR_DEVICE_HID, },
- {},
-};
-MODULE_DEVICE_TABLE(acpi, processor_device_ids);
-
MODULE_AUTHOR("Matthew Garrett, Naga Chumbalkar");
MODULE_VERSION(PCC_VERSION);
MODULE_DESCRIPTION("Processor Clocking Control interface driver");
--
2.3.1
@@ -0,0 +1,28 @@
Subject: CLEVO M360S acpi irq workaround
Some Hardware vendor use CLEVO M360S Laptop OEM.
This acpi IRQ routing is not correct. we use normal IRQ routing for default.
Signed-off-by: Go Taniguchi <go@turbolinux.co.jp>
---
arch/x86/kernel/acpi/boot.c | 8 ++++++++
1 file changed, 8 insertions(+)
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -1615,6 +1615,14 @@ static struct dmi_system_id __initdata a
},
},
{
+ .callback = disable_acpi_irq,
+ .ident = "CLEVO M360S",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "CLEVO Co."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "M360S"),
+ },
+ },
+ {
/*
* Latest BIOS for IBM 600E (1.16) has bad pcinum
* for LPC bridge, which is needed for the PCI
@@ -0,0 +1,21 @@
Limit Clevo M720SR to C2, going to C3 makes the machine freeze. This
needs more investigation, sis chipset/bios problem may be?
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
---
drivers/acpi/processor_idle.c | 3 +++
1 file changed, 3 insertions(+)
--- linux-2.6.33-rc8-git4-t2/drivers/acpi/processor_idle.c.orig 2010-02-20 12:45:35.000000000 +0200
+++ linux-2.6.33-rc8-git4-t2/drivers/acpi/processor_idle.c 2010-02-20 12:53:39.679099592 +0200
@@ -110,6 +110,9 @@ static struct dmi_system_id __cpuinitdat
DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"),
DMI_MATCH(DMI_BIOS_VERSION,"SHE845M0.86C.0013.D.0302131307")},
(void *)2},
+ { set_max_cstate, "Clevo M720SR", {
+ DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_PRODUCT_NAME,"M720SR")}, (void *)2},
{ set_max_cstate, "Pavilion zv5000", {
DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
DMI_MATCH(DMI_PRODUCT_NAME,"Pavilion zv5000 (DS502A#ABA)")},
@@ -0,0 +1,33 @@
>From 9f04e51293b130474504216a477bb2a73cbf59e1 Mon Sep 17 00:00:00 2001
From: Anssi Hannula <anssi.hannula@iki.fi>
Date: Thu, 22 Mar 2012 22:29:11 +0200
Subject: [PATCH] ata: prefer ata drivers over ide drivers when both are built
Currently the old IDE drivers are preferred over ATA drivers when both
are built, since ide/ is listed first in drivers/Makefile and therefore
the IDE drivers end up before ATA drivers in modules.order which is used
by depmod/modprobe for module ordering.
Change it so that ATA drivers are preferred over IDE driver by moving
the ide/ entry under ata/ in drivers/Makefile.
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
---
drivers/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/Makefile b/drivers/Makefile
index 932e8bf..e8df3d0 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -64,9 +64,9 @@ obj-y += base/ block/ misc/ mfd/ nfc/
obj-$(CONFIG_DMA_SHARED_BUFFER) += dma-buf/
obj-$(CONFIG_NUBUS) += nubus/
obj-y += macintosh/
-obj-$(CONFIG_IDE) += ide/
obj-$(CONFIG_SCSI) += scsi/
obj-$(CONFIG_ATA) += ata/
+obj-$(CONFIG_IDE) += ide/
obj-$(CONFIG_TARGET_CORE) += target/
obj-$(CONFIG_MTD) += mtd/
obj-$(CONFIG_SPI) += spi/
@@ -0,0 +1,58 @@
From 41c0126b3f22ef36b97b3c38b8f29569848a5ce2 Mon Sep 17 00:00:00 2001
From: Tahsin Erdogan <tahsin@google.com>
Date: Tue, 19 May 2015 13:55:21 -0700
Subject: block: Make CFQ default to IOPS mode on SSDs
CFQ idling causes reduced IOPS throughput on non-rotational disks.
Since disk head seeking is not applicable to SSDs, it doesn't really
help performance by anticipating future near-by IO requests.
By turning off idling (and switching to IOPS mode), we allow other
processes to dispatch IO requests down to the driver and so increase IO
throughput.
Following FIO benchmark results were taken on a cloud SSD offering with
idling on and off:
Idling iops avg-lat(ms) stddev bw
------------------------------------------------------
On 7054 90.107 38.697 28217KB/s
Off 29255 21.836 11.730 117022KB/s
fio --name=temp --size=100G --time_based --ioengine=libaio \
--randrepeat=0 --direct=1 --invalidate=1 --verify=0 \
--verify_fatal=0 --rw=randread --blocksize=4k --group_reporting=1 \
--filename=/dev/sdb --runtime=10 --iodepth=64 --numjobs=10
And the following is from a local SSD run:
Idling iops avg-lat(ms) stddev bw
------------------------------------------------------
On 19320 33.043 14.068 77281KB/s
Off 21626 29.465 12.662 86507KB/s
fio --name=temp --size=5G --time_based --ioengine=libaio \
--randrepeat=0 --direct=1 --invalidate=1 --verify=0 \
--verify_fatal=0 --rw=randread --blocksize=4k --group_reporting=1 \
--filename=/fio_data --runtime=10 --iodepth=64 --numjobs=10
Reviewed-by: Nauman Rafique <nauman@google.com>
Signed-off-by: Tahsin Erdogan <tahsin@google.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 5da8e6e..402be01 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -4460,7 +4460,7 @@ static int cfq_init_queue(struct request_queue *q, struct elevator_type *e)
cfqd->cfq_slice[1] = cfq_slice_sync;
cfqd->cfq_target_latency = cfq_target_latency;
cfqd->cfq_slice_async_rq = cfq_slice_async_rq;
- cfqd->cfq_slice_idle = cfq_slice_idle;
+ cfqd->cfq_slice_idle = blk_queue_nonrot(q) ? 0 : cfq_slice_idle;
cfqd->cfq_group_idle = cfq_group_idle;
cfqd->cfq_latency = 1;
cfqd->hw_tag = -1;
--
cgit v0.10.2
@@ -0,0 +1,95 @@
From 0bb979472a7401022109e81dd89d777adea58710 Mon Sep 17 00:00:00 2001
From: Jens Axboe <axboe@fb.com>
Date: Wed, 10 Jun 2015 08:01:20 -0600
Subject: cfq-iosched: fix the setting of IOPS mode on SSDs
A previous commit wanted to make CFQ default to IOPS mode on
non-rotational storage, however it did so when the queue was
initialized and the non-rotational flag is only set later on
in the probe.
Add an elevator hook that gets called off the add_disk() path,
at that point we know that feature probing has finished, and
we can reliably check for the various flags that drivers can
set.
Fixes: 41c0126b ("block: Make CFQ default to IOPS mode on SSDs")
Tested-by: Romain Francoise <romain@orebokech.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index c808ad8..d1d0cb2 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -4508,7 +4508,7 @@ static int cfq_init_queue(struct request_queue *q, struct elevator_type *e)
cfqd->cfq_slice[1] = cfq_slice_sync;
cfqd->cfq_target_latency = cfq_target_latency;
cfqd->cfq_slice_async_rq = cfq_slice_async_rq;
- cfqd->cfq_slice_idle = blk_queue_nonrot(q) ? 0 : cfq_slice_idle;
+ cfqd->cfq_slice_idle = cfq_slice_idle;
cfqd->cfq_group_idle = cfq_group_idle;
cfqd->cfq_latency = 1;
cfqd->hw_tag = -1;
@@ -4525,6 +4525,18 @@ out_free:
return ret;
}
+static void cfq_registered_queue(struct request_queue *q)
+{
+ struct elevator_queue *e = q->elevator;
+ struct cfq_data *cfqd = e->elevator_data;
+
+ /*
+ * Default to IOPS mode with no idling for SSDs
+ */
+ if (blk_queue_nonrot(q))
+ cfqd->cfq_slice_idle = 0;
+}
+
/*
* sysfs parts below -->
*/
@@ -4640,6 +4652,7 @@ static struct elevator_type iosched_cfq = {
.elevator_may_queue_fn = cfq_may_queue,
.elevator_init_fn = cfq_init_queue,
.elevator_exit_fn = cfq_exit_queue,
+ .elevator_registered_fn = cfq_registered_queue,
},
.icq_size = sizeof(struct cfq_io_cq),
.icq_align = __alignof__(struct cfq_io_cq),
diff --git a/block/elevator.c b/block/elevator.c
index 59794d0..5f04527 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -810,6 +810,8 @@ int elv_register_queue(struct request_queue *q)
}
kobject_uevent(&e->kobj, KOBJ_ADD);
e->registered = 1;
+ if (e->type->ops.elevator_registered_fn)
+ e->type->ops.elevator_registered_fn(q);
}
return error;
}
diff --git a/include/linux/elevator.h b/include/linux/elevator.h
index 45a9147..638b324 100644
--- a/include/linux/elevator.h
+++ b/include/linux/elevator.h
@@ -39,6 +39,7 @@ typedef void (elevator_deactivate_req_fn) (struct request_queue *, struct reques
typedef int (elevator_init_fn) (struct request_queue *,
struct elevator_type *e);
typedef void (elevator_exit_fn) (struct elevator_queue *);
+typedef void (elevator_registered_fn) (struct request_queue *);
struct elevator_ops
{
@@ -68,6 +69,7 @@ struct elevator_ops
elevator_init_fn *elevator_init_fn;
elevator_exit_fn *elevator_exit_fn;
+ elevator_registered_fn *elevator_registered_fn;
};
#define ELV_NAME_MAX (16)
--
cgit v0.10.2
@@ -0,0 +1,21 @@
Disable floppy autoloading as it makes systems without real hw,
but that has the pnp headers hang.
See https://bugs.mageia.org/show_bug.cgi?id=4696
Signed-off-by: Thomas Backlund <tmb@mageia.org>
diff -Nurp linux-3.3.3-rc1/drivers/block/floppy.c.orig linux-3.3.3-rc1/drivers/block/floppy.c
--- linux-3.3.3-rc1/drivers/block/floppy.c.orig 2012-03-19 01:15:34.000000000 +0200
+++ linux-3.3.3-rc1/drivers/block/floppy.c 2012-04-22 02:58:10.238498303 +0300
@@ -4621,8 +4621,7 @@ static const struct pnp_device_id floppy
{"PNP0700", 0},
{}
};
-
-MODULE_DEVICE_TABLE(pnp, floppy_pnpids);
+/* MODULE_DEVICE_TABLE(pnp, floppy_pnpids); */
#else
@@ -0,0 +1,35 @@
agp/intel: add new host bridge id for Q57 system
Add new Host Bridge ID found on a Q57 based system from Positivo. I
don't know what abbreviation id for this would be best, may be Q_HB
instead of UNKNOWN currently used would be better.
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
[ rebased for 3.8-rc3 /tmb ]
Signed-off-by: Thomas Backlund <tmb@mageia.org>
Removed the parts of the patch that are already applied in the kernel by
the commit 67384fe3fd450536342330f684ea1f7dcaef8130:
"char/agp: add another Ironlake host bridge"
Rediffed for kernel 3.10.24.
Signed-off-by: Eugene A. Shatokhin <eugene.shatokhin@rosalab.ru>
drivers/char/agp/intel-gtt.c | 2 ++
1 file changed, 2 insertions(+)
diff -Nurp linux-3.8-rc3/drivers/char/agp/intel-gtt.c linux-3.8-rc3.q57/drivers/char/agp/intel-gtt.c
--- linux-3.8-rc3/drivers/char/agp/intel-gtt.c 2013-01-10 08:17:09.690594184 +0200
+++ linux-3.8-rc3.q57/drivers/char/agp/intel-gtt.c 2013-01-10 08:38:56.649888839 +0200
@@ -1303,6 +1303,8 @@ static const struct intel_gtt_driver_des
&g4x_gtt_driver },
{ PCI_DEVICE_ID_INTEL_IRONLAKE_D_IG,
"HD Graphics", &ironlake_gtt_driver },
+ { PCI_DEVICE_ID_INTEL_IRONLAKE_D2_HB,
+ "HD Graphics", &ironlake_gtt_driver },
{ PCI_DEVICE_ID_INTEL_IRONLAKE_M_IG,
"HD Graphics", &ironlake_gtt_driver },
{ 0, NULL, NULL }
@@ -0,0 +1,20 @@
This patch adds module aliases for matching the old dm-raid45 patch
by heinzm@redhat.com carried by kernel-tmb series in order to make
sure there is an upgrade path.
Signed-off-by: Thomas Backlund <tmb@mageia.org>
drivers/md/dm-raid.c | 2 ++
1 file changed, 2 insertions(+)
--- linux-2.6.38.2-mga2/drivers/md/dm-raid.c.orig 2011-03-15 03:20:32.000000000 +0200
+++ linux-2.6.38.2-mga2/drivers/md/dm-raid.c 2011-04-02 21:52:21.331302590 +0300
@@ -693,5 +693,7 @@ MODULE_DESCRIPTION(DM_NAME " raid4/5/6 t
MODULE_ALIAS("dm-raid4");
MODULE_ALIAS("dm-raid5");
MODULE_ALIAS("dm-raid6");
+MODULE_ALIAS("dm-raid45");
+MODULE_ALIAS("dm-raid4-5");
MODULE_AUTHOR("Neil Brown <dm-devel@redhat.com>");
MODULE_LICENSE("GPL");
@@ -0,0 +1,29 @@
This patch adds missing module aliases for the old ieee1394 stack
to make it easier for endusers.
Note: firewire-sbp2 and firewire-ohci already contains the needed aliases.
Signed-off-by: Thomas Backlund <tmb@mageia.org>
diff -Nurp linux-2.6.38.4/drivers/firewire/core-transaction.c linux-2.6.38.4.fw/drivers/firewire/core-transaction.c
--- linux-2.6.38.4/drivers/firewire/core-transaction.c 2011-03-15 03:20:32.000000000 +0200
+++ linux-2.6.38.4.fw/drivers/firewire/core-transaction.c 2011-04-22 16:22:28.461386738 +0300
@@ -1174,6 +1174,9 @@ static struct fw_address_handler registe
MODULE_AUTHOR("Kristian Hoegsberg <krh@bitplanet.net>");
MODULE_DESCRIPTION("Core IEEE1394 transaction logic");
MODULE_LICENSE("GPL");
+MODULE_ALIAS("ieee1394");
+MODULE_ALIAS("raw1394");
+MODULE_ALIAS("video1394");
static const u32 vendor_textual_descriptor[] = {
/* textual descriptor leaf () */
diff -Nurp linux-2.6.38.4/drivers/firewire/net.c linux-2.6.38.4.fw/drivers/firewire/net.c
--- linux-2.6.38.4/drivers/firewire/net.c 2011-03-15 03:20:32.000000000 +0200
+++ linux-2.6.38.4.fw/drivers/firewire/net.c 2011-04-22 16:20:34.008883920 +0300
@@ -1719,3 +1719,4 @@ MODULE_AUTHOR("Jay Fenlason <fenlason@re
MODULE_DESCRIPTION("IP over IEEE1394 as per RFC 2734/3146");
MODULE_LICENSE("GPL");
MODULE_DEVICE_TABLE(ieee1394, fwnet_id_table);
+MODULE_ALIAS("eth1394");
@@ -0,0 +1,53 @@
From 42378f40dd5bbe59fa41b0499f10789eb5d44d89 Mon Sep 17 00:00:00 2001
From: Thomas Backlund <tmb@mageia.org>
Date: Tue, 18 Aug 2015 22:24:50 +0300
Subject: [PATCH] Revert "ext4: remove block_device_ejected"
This reverts commit 08439fec266c3cc5702953b4f54bdf5649357de0.
its reported on stable@ ml to break usb storage
Signed-off-by: Thomas Backlund <tmb@mageia.org>
---
fs/ext4/super.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index ca9d4a2..9829003 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -324,6 +324,22 @@ static void save_error_info(struct super_block *sb, const char *func,
ext4_commit_super(sb, 1);
}
+/*
+ * The del_gendisk() function uninitializes the disk-specific data
+ * structures, including the bdi structure, without telling anyone
+ * else. Once this happens, any attempt to call mark_buffer_dirty()
+ * (for example, by ext4_commit_super), will cause a kernel OOPS.
+ * This is a kludge to prevent these oops until we can put in a proper
+ * hook in del_gendisk() to inform the VFS and file system layers.
+ */
+static int block_device_ejected(struct super_block *sb)
+{
+ struct inode *bd_inode = sb->s_bdev->bd_inode;
+ struct backing_dev_info *bdi = inode_to_bdi(bd_inode);
+
+ return bdi->dev == NULL;
+}
+
static void ext4_journal_commit_callback(journal_t *journal, transaction_t *txn)
{
struct super_block *sb = journal->j_private;
@@ -4590,7 +4606,7 @@ static int ext4_commit_super(struct super_block *sb, int sync)
struct buffer_head *sbh = EXT4_SB(sb)->s_sbh;
int error = 0;
- if (!sbh)
+ if (!sbh || block_device_ejected(sb))
return error;
if (buffer_write_io_error(sbh)) {
/*
--
2.4.5
@@ -0,0 +1,338 @@
fs/aufs/Kconfig | 2 +-
fs/dcache.c | 1 +
fs/file_table.c | 2 ++
fs/inode.c | 2 ++
fs/namespace.c | 2 ++
fs/notify/group.c | 4 ++++
fs/notify/mark.c | 4 ++++
fs/open.c | 2 ++
fs/read_write.c | 2 ++
fs/splice.c | 2 ++
security/commoncap.c | 2 ++
security/device_cgroup.c | 2 ++
security/security.c | 10 ++++++++++
13 files changed, 36 insertions(+), 1 deletion(-)
diff -Nurp linux-4.1-aufs4/fs/aufs/Kconfig linux-4.1-aufs4-mod/fs/aufs/Kconfig
--- linux-4.1-aufs4/fs/aufs/Kconfig 2015-06-25 20:09:18.250319377 +0200
+++ linux-4.1-aufs4-mod/fs/aufs/Kconfig 2015-06-25 20:11:30.629136790 +0200
@@ -1,5 +1,5 @@
config AUFS_FS
- bool "Aufs (Advanced multi layered unification filesystem) support"
+ tristate "Aufs (Advanced multi layered unification filesystem) support"
help
Aufs is a stackable unification filesystem such as Unionfs,
which unifies several directories and provides a merged single
diff -Nurp linux-4.1-aufs4/fs/dcache.c linux-4.1-aufs4-mod/fs/dcache.c
--- linux-4.1-aufs4/fs/dcache.c 2015-06-25 20:09:18.280319109 +0200
+++ linux-4.1-aufs4-mod/fs/dcache.c 2015-06-25 20:11:30.629136790 +0200
@@ -1269,6 +1269,7 @@ rename_retry:
seq = 1;
goto again;
}
+EXPORT_SYMBOL_GPL(d_walk);
/*
* Search for at least 1 mount point in the dentry's subdirs.
diff -Nurp linux-4.1-aufs4/fs/file_table.c linux-4.1-aufs4-mod/fs/file_table.c
--- linux-4.1-aufs4/fs/file_table.c 2015-06-22 07:05:43.000000000 +0200
+++ linux-4.1-aufs4-mod/fs/file_table.c 2015-06-25 23:47:57.011958835 +0200
@@ -147,6 +147,7 @@ over:
}
return ERR_PTR(-ENFILE);
}
+EXPORT_SYMBOL(get_empty_filp);
/**
* alloc_file - allocate and initialize a 'struct file'
@@ -308,6 +309,7 @@ void put_filp(struct file *file)
file_free(file);
}
}
+EXPORT_SYMBOL(put_filp);
void __init files_init(unsigned long mempages)
{
diff -Nurp linux-4.1-aufs4/fs/inode.c linux-4.1-aufs4-mod/fs/inode.c
--- linux-4.1-aufs4/fs/inode.c 2015-06-22 07:05:43.000000000 +0200
+++ linux-4.1-aufs4-mod/fs/inode.c 2015-06-25 22:45:45.000000000 +0200
@@ -58,6 +58,7 @@ static struct hlist_head *inode_hashtabl
static __cacheline_aligned_in_smp DEFINE_SPINLOCK(inode_hash_lock);
__cacheline_aligned_in_smp DEFINE_SPINLOCK(inode_sb_list_lock);
+EXPORT_SYMBOL(inode_sb_list_lock);
/*
* Empty aops. Can be used for the cases where the user does not
@@ -1575,6 +1576,7 @@ static int update_time(struct inode *ino
return update_time(inode, time, flags);
}
+EXPORT_SYMBOL(update_time);
/**
* touch_atime - update the access time
diff -Nurp linux-4.1-aufs4/fs/namespace.c linux-4.1-aufs4-mod/fs/namespace.c
--- linux-4.1-aufs4/fs/namespace.c 2015-06-22 07:05:43.000000000 +0200
+++ linux-4.1-aufs4-mod/fs/namespace.c 2015-06-25 20:11:30.629136790 +0200
@@ -463,6 +463,7 @@ void __mnt_drop_write(struct vfsmount *m
mnt_dec_writers(real_mount(mnt));
preempt_enable();
}
+EXPORT_SYMBOL_GPL(__mnt_drop_write);
/**
* mnt_drop_write - give up write access to a mount
@@ -1768,6 +1769,7 @@ int iterate_mounts(int (*f)(struct vfsmo
}
return 0;
}
+EXPORT_SYMBOL(iterate_mounts);
static void cleanup_group_ids(struct mount *mnt, struct mount *end)
{
diff -Nurp linux-4.1-aufs4/fs/notify/group.c linux-4.1-aufs4-mod/fs/notify/group.c
--- linux-4.1-aufs4/fs/notify/group.c 2015-06-22 07:05:43.000000000 +0200
+++ linux-4.1-aufs4-mod/fs/notify/group.c 2015-06-25 20:11:30.629136790 +0200
@@ -22,6 +22,7 @@
#include <linux/srcu.h>
#include <linux/rculist.h>
#include <linux/wait.h>
+#include <linux/module.h>
#include <linux/fsnotify_backend.h>
#include "fsnotify.h"
@@ -72,6 +73,7 @@ void fsnotify_get_group(struct fsnotify_
{
atomic_inc(&group->refcnt);
}
+EXPORT_SYMBOL(fsnotify_get_group);
/*
* Drop a reference to a group. Free it if it's through.
@@ -81,6 +83,7 @@ void fsnotify_put_group(struct fsnotify_
if (atomic_dec_and_test(&group->refcnt))
fsnotify_final_destroy_group(group);
}
+EXPORT_SYMBOL(fsnotify_put_group);
/*
* Create a new fsnotify_group and hold a reference for the group returned.
@@ -109,6 +112,7 @@ struct fsnotify_group *fsnotify_alloc_gr
return group;
}
+EXPORT_SYMBOL(fsnotify_alloc_group);
int fsnotify_fasync(int fd, struct file *file, int on)
{
diff -Nurp linux-4.1-aufs4/fs/notify/mark.c linux-4.1-aufs4-mod/fs/notify/mark.c
--- linux-4.1-aufs4/fs/notify/mark.c 2015-06-22 07:05:43.000000000 +0200
+++ linux-4.1-aufs4-mod/fs/notify/mark.c 2015-06-25 20:11:30.629136790 +0200
@@ -109,6 +109,7 @@ void fsnotify_put_mark(struct fsnotify_m
mark->free_mark(mark);
}
}
+EXPORT_SYMBOL(fsnotify_put_mark);
/* Calculate mask of events for a list of marks */
u32 fsnotify_recalc_mask(struct hlist_head *head)
@@ -202,6 +203,7 @@ void fsnotify_destroy_mark(struct fsnoti
fsnotify_destroy_mark_locked(mark, group);
mutex_unlock(&group->mark_mutex);
}
+EXPORT_SYMBOL(fsnotify_destroy_mark);
/*
* Destroy all marks in the given list. The marks must be already detached from
@@ -386,6 +388,7 @@ int fsnotify_add_mark(struct fsnotify_ma
mutex_unlock(&group->mark_mutex);
return ret;
}
+EXPORT_SYMBOL(fsnotify_add_mark);
/*
* Given a list of marks, find the mark associated with given group. If found
@@ -455,6 +458,7 @@ void fsnotify_init_mark(struct fsnotify_
atomic_set(&mark->refcnt, 1);
mark->free_mark = free_mark;
}
+EXPORT_SYMBOL(fsnotify_init_mark);
static int fsnotify_mark_destroy(void *ignored)
{
diff -Nurp linux-4.1-aufs4/fs/open.c linux-4.1-aufs4-mod/fs/open.c
--- linux-4.1-aufs4/fs/open.c 2015-06-22 07:05:43.000000000 +0200
+++ linux-4.1-aufs4-mod/fs/open.c 2015-06-25 23:49:02.741362661 +0200
@@ -62,6 +62,7 @@ int do_truncate(struct dentry *dentry, l
mutex_unlock(&dentry->d_inode->i_mutex);
return ret;
}
+EXPORT_SYMBOL(do_truncate);
long vfs_truncate(struct path *path, loff_t length)
{
@@ -676,6 +677,7 @@ int open_check_o_direct(struct file *f)
}
return 0;
}
+EXPORT_SYMBOL(open_check_o_direct);
static int do_dentry_open(struct file *f,
int (*open)(struct inode *, struct file *),
diff -Nurp linux-4.1-aufs4/fs/read_write.c linux-4.1-aufs4-mod/fs/read_write.c
--- linux-4.1-aufs4/fs/read_write.c 2015-06-25 20:09:18.280319109 +0200
+++ linux-4.1-aufs4-mod/fs/read_write.c 2015-06-25 23:43:56.804138140 +0200
@@ -504,6 +504,7 @@ vfs_readf_t vfs_readf(struct file *file)
return new_sync_read;
return ERR_PTR(-ENOSYS);
}
+EXPORT_SYMBOL(vfs_readf);
vfs_writef_t vfs_writef(struct file *file)
{
@@ -515,6 +516,7 @@ vfs_writef_t vfs_writef(struct file *fil
return new_sync_write;
return ERR_PTR(-ENOSYS);
}
+EXPORT_SYMBOL(vfs_writef);
ssize_t __kernel_write(struct file *file, const char *buf, size_t count, loff_t *pos)
{
diff -Nurp linux-4.1-aufs4/fs/splice.c linux-4.1-aufs4-mod/fs/splice.c
--- linux-4.1-aufs4/fs/splice.c 2015-06-25 20:09:18.280319109 +0200
+++ linux-4.1-aufs4-mod/fs/splice.c 2015-06-25 20:11:30.629136790 +0200
@@ -1114,6 +1114,7 @@ long do_splice_from(struct pipe_inode_in
return splice_write(pipe, out, ppos, len, flags);
}
+EXPORT_SYMBOL(do_splice_from);
/*
* Attempt to initiate a splice from a file to a pipe.
@@ -1140,6 +1141,7 @@ long do_splice_to(struct file *in, loff_
return splice_read(in, ppos, pipe, len, flags);
}
+EXPORT_SYMBOL(do_splice_to);
/**
* splice_direct_to_actor - splices data directly between two non-pipes
diff -Nurp linux-4.1-aufs4/security/commoncap.c linux-4.1-aufs4-mod/security/commoncap.c
--- linux-4.1-aufs4/security/commoncap.c 2015-06-22 07:05:43.000000000 +0200
+++ linux-4.1-aufs4-mod/security/commoncap.c 2015-06-25 20:11:30.629136790 +0200
@@ -975,9 +975,11 @@ int cap_mmap_addr(unsigned long addr)
}
return ret;
}
+EXPORT_SYMBOL(cap_mmap_addr);
int cap_mmap_file(struct file *file, unsigned long reqprot,
unsigned long prot, unsigned long flags)
{
return 0;
}
+EXPORT_SYMBOL(cap_mmap_file);
diff -Nurp linux-4.1-aufs4/security/device_cgroup.c linux-4.1-aufs4-mod/security/device_cgroup.c
--- linux-4.1-aufs4/security/device_cgroup.c 2015-06-22 07:05:43.000000000 +0200
+++ linux-4.1-aufs4-mod/security/device_cgroup.c 2015-06-25 20:11:30.629136790 +0200
@@ -7,6 +7,7 @@
#include <linux/device_cgroup.h>
#include <linux/cgroup.h>
#include <linux/ctype.h>
+#include <linux/export.h>
#include <linux/list.h>
#include <linux/uaccess.h>
#include <linux/seq_file.h>
@@ -849,6 +850,7 @@ int __devcgroup_inode_permission(struct
return __devcgroup_check_permission(type, imajor(inode), iminor(inode),
access);
}
+EXPORT_SYMBOL(__devcgroup_inode_permission);
int devcgroup_inode_mknod(int mode, dev_t dev)
{
diff -Nurp linux-4.1-aufs4/security/security.c linux-4.1-aufs4-mod/security/security.c
--- linux-4.1-aufs4/security/security.c 2015-06-22 07:05:43.000000000 +0200
+++ linux-4.1-aufs4-mod/security/security.c 2015-06-25 20:11:30.629136790 +0200
@@ -430,6 +430,7 @@ int security_path_rmdir(struct path *dir
return 0;
return security_ops->path_rmdir(dir, dentry);
}
+EXPORT_SYMBOL(security_path_rmdir);
int security_path_unlink(struct path *dir, struct dentry *dentry)
{
@@ -446,6 +447,7 @@ int security_path_symlink(struct path *d
return 0;
return security_ops->path_symlink(dir, dentry, old_name);
}
+EXPORT_SYMBOL(security_path_symlink);
int security_path_link(struct dentry *old_dentry, struct path *new_dir,
struct dentry *new_dentry)
@@ -454,6 +456,7 @@ int security_path_link(struct dentry *ol
return 0;
return security_ops->path_link(old_dentry, new_dir, new_dentry);
}
+EXPORT_SYMBOL(security_path_link);
int security_path_rename(struct path *old_dir, struct dentry *old_dentry,
struct path *new_dir, struct dentry *new_dentry,
@@ -481,6 +484,7 @@ int security_path_truncate(struct path *
return 0;
return security_ops->path_truncate(path);
}
+EXPORT_SYMBOL(security_path_truncate);
int security_path_chmod(struct path *path, umode_t mode)
{
@@ -488,6 +492,7 @@ int security_path_chmod(struct path *pat
return 0;
return security_ops->path_chmod(path, mode);
}
+EXPORT_SYMBOL(security_path_chmod);
int security_path_chown(struct path *path, kuid_t uid, kgid_t gid)
{
@@ -495,6 +500,7 @@ int security_path_chown(struct path *pat
return 0;
return security_ops->path_chown(path, uid, gid);
}
+EXPORT_SYMBOL(security_path_chown);
int security_path_chroot(struct path *path)
{
@@ -580,6 +586,7 @@ int security_inode_readlink(struct dentr
return 0;
return security_ops->inode_readlink(dentry);
}
+EXPORT_SYMBOL(security_inode_readlink);
int security_inode_follow_link(struct dentry *dentry, struct nameidata *nd)
{
@@ -594,6 +601,7 @@ int security_inode_permission(struct ino
return 0;
return security_ops->inode_permission(inode, mask);
}
+EXPORT_SYMBOL(security_inode_permission);
int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
{
@@ -716,6 +724,7 @@ int security_file_permission(struct file
return fsnotify_perm(file, mask);
}
+EXPORT_SYMBOL(security_file_permission);
int security_file_alloc(struct file *file)
{
@@ -775,6 +784,7 @@ int security_mmap_file(struct file *file
return ret;
return ima_file_mmap(file, prot);
}
+EXPORT_SYMBOL(security_mmap_file);
int security_mmap_addr(unsigned long addr)
{
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,100 @@
Adapt mach64 to build with 2.6.31 series kernels
Signed-off-by: Thomas Backlund <tmb@mandriva.org>
diff -urp linux-2.6.31-rc3-git5-mnb1/drivers/gpu/drm/mach64/mach64_dma.c linux-2.6.31-rc3-git5-mnb1/drivers/gpu/drm/mach64.fixed/mach64_dma.c
--- linux-2.6.31-rc3-git5-mnb1/drivers/gpu/drm/mach64/mach64_dma.c 2009-07-23 00:24:12.000000000 +0300
+++ linux-2.6.31-rc3-git5-mnb1/drivers/gpu/drm/mach64.fixed/mach64_dma.c 2009-07-23 02:28:21.000000000 +0300
@@ -1006,7 +1006,7 @@ static int mach64_do_dma_init(struct drm
DRM_DEBUG("\n");
- dev_priv = drm_alloc(sizeof(drm_mach64_private_t), DRM_MEM_DRIVER);
+ dev_priv = kmalloc(sizeof(drm_mach64_private_t), GFP_KERNEL);
if (dev_priv == NULL)
return -ENOMEM;
@@ -1386,8 +1386,7 @@ int mach64_do_cleanup_dma(struct drm_dev
mach64_destroy_freelist(dev);
- drm_free(dev_priv, sizeof(drm_mach64_private_t),
- DRM_MEM_DRIVER);
+ kfree(dev_priv);
dev->dev_private = NULL;
}
@@ -1476,8 +1475,8 @@ int mach64_init_freelist(struct drm_devi
for (i = 0; i < dma->buf_count; i++) {
if ((entry =
(drm_mach64_freelist_t *)
- drm_alloc(sizeof(drm_mach64_freelist_t),
- DRM_MEM_BUFLISTS)) == NULL)
+ kmalloc(sizeof(drm_mach64_freelist_t),
+ GFP_KERNEL)) == NULL)
return -ENOMEM;
memset(entry, 0, sizeof(drm_mach64_freelist_t));
entry->buf = dma->buflist[i];
@@ -1500,18 +1499,18 @@ void mach64_destroy_freelist(struct drm_
list_for_each_safe(ptr, tmp, &dev_priv->pending) {
list_del(ptr);
entry = list_entry(ptr, drm_mach64_freelist_t, list);
- drm_free(entry, sizeof(*entry), DRM_MEM_BUFLISTS);
+ kfree(entry);
}
list_for_each_safe(ptr, tmp, &dev_priv->placeholders) {
list_del(ptr);
entry = list_entry(ptr, drm_mach64_freelist_t, list);
- drm_free(entry, sizeof(*entry), DRM_MEM_BUFLISTS);
+ kfree(entry);
}
list_for_each_safe(ptr, tmp, &dev_priv->free_list) {
list_del(ptr);
entry = list_entry(ptr, drm_mach64_freelist_t, list);
- drm_free(entry, sizeof(*entry), DRM_MEM_BUFLISTS);
+ kfree(entry);
}
}
diff -urp linux-2.6.31-rc3-git5-mnb1/drivers/gpu/drm/mach64/mach64_state.c linux-2.6.31-rc3-git5-mnb1/drivers/gpu/drm/mach64.fixed/mach64_state.c
--- linux-2.6.31-rc3-git5-mnb1/drivers/gpu/drm/mach64/mach64_state.c 2009-07-23 00:24:12.000000000 +0300
+++ linux-2.6.31-rc3-git5-mnb1/drivers/gpu/drm/mach64.fixed/mach64_state.c 2009-07-23 02:29:24.000000000 +0300
@@ -490,12 +490,12 @@ static __inline__ int copy_from_user_ver
unsigned long n = bytes; /* dwords remaining in buffer */
u32 *from, *orig_from;
- from = drm_alloc(bytes, DRM_MEM_DRIVER);
+ from = kmalloc(bytes, GFP_KERNEL);
if (from == NULL)
return -ENOMEM;
if (DRM_COPY_FROM_USER(from, ufrom, bytes)) {
- drm_free(from, bytes, DRM_MEM_DRIVER);
+ kfree(from);
return -EFAULT;
}
orig_from = from; /* we'll be modifying the "from" ptr, so save it */
@@ -526,19 +526,19 @@ static __inline__ int copy_from_user_ver
to += count;
} else {
DRM_ERROR("Got bad command: 0x%04x\n", reg);
- drm_free(orig_from, bytes, DRM_MEM_DRIVER);
+ kfree(orig_from);
return -EACCES;
}
} else {
DRM_ERROR
("Got bad command count(=%u) dwords remaining=%lu\n",
count, n);
- drm_free(orig_from, bytes, DRM_MEM_DRIVER);
+ kfree(orig_from);
return -EINVAL;
}
}
- drm_free(orig_from, bytes, DRM_MEM_DRIVER);
+ kfree(orig_from);
if (n == 0)
return 0;
else {
@@ -0,0 +1,27 @@
--- linux-2.6.35/drivers/gpu/drm/mach64/mach64_state.c.orig 2010-10-03 13:29:10.000000000 +0300
+++ linux-2.6.35/drivers/gpu/drm/mach64/mach64_state.c 2010-10-03 14:04:45.991164007 +0300
@@ -41,15 +41,15 @@
*
*/
struct drm_ioctl_desc mach64_ioctls[] = {
- DRM_IOCTL_DEF(DRM_MACH64_INIT, mach64_dma_init, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
- DRM_IOCTL_DEF(DRM_MACH64_CLEAR, mach64_dma_clear, DRM_AUTH),
- DRM_IOCTL_DEF(DRM_MACH64_SWAP, mach64_dma_swap, DRM_AUTH),
- DRM_IOCTL_DEF(DRM_MACH64_IDLE, mach64_dma_idle, DRM_AUTH),
- DRM_IOCTL_DEF(DRM_MACH64_RESET, mach64_engine_reset, DRM_AUTH),
- DRM_IOCTL_DEF(DRM_MACH64_VERTEX, mach64_dma_vertex, DRM_AUTH),
- DRM_IOCTL_DEF(DRM_MACH64_BLIT, mach64_dma_blit, DRM_AUTH),
- DRM_IOCTL_DEF(DRM_MACH64_FLUSH, mach64_dma_flush, DRM_AUTH),
- DRM_IOCTL_DEF(DRM_MACH64_GETPARAM, mach64_get_param, DRM_AUTH),
+ DRM_IOCTL_DEF_DRV(MACH64_INIT, mach64_dma_init, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
+ DRM_IOCTL_DEF_DRV(MACH64_CLEAR, mach64_dma_clear, DRM_AUTH),
+ DRM_IOCTL_DEF_DRV(MACH64_SWAP, mach64_dma_swap, DRM_AUTH),
+ DRM_IOCTL_DEF_DRV(MACH64_IDLE, mach64_dma_idle, DRM_AUTH),
+ DRM_IOCTL_DEF_DRV(MACH64_RESET, mach64_engine_reset, DRM_AUTH),
+ DRM_IOCTL_DEF_DRV(MACH64_VERTEX, mach64_dma_vertex, DRM_AUTH),
+ DRM_IOCTL_DEF_DRV(MACH64_BLIT, mach64_dma_blit, DRM_AUTH),
+ DRM_IOCTL_DEF_DRV(MACH64_FLUSH, mach64_dma_flush, DRM_AUTH),
+ DRM_IOCTL_DEF_DRV(MACH64_GETPARAM, mach64_get_param, DRM_AUTH),
};
int mach64_max_ioctl = DRM_ARRAY_SIZE(mach64_ioctls);
@@ -0,0 +1,24 @@
Fix build for 2.6.37
Signed-off-by: Thomas Backlund <tmb@mandriva.org>
--- a/drivers/gpu/drm/mach64/mach64_drv.c.orig 2011-01-02 16:55:48.000000000 +0200
+++ a/drivers/gpu/drm/mach64/mach64_drv.c 2011-01-02 17:53:54.808775632 +0200
@@ -51,8 +51,6 @@ static struct drm_driver driver = {
.irq_uninstall = mach64_driver_irq_uninstall,
.irq_handler = mach64_driver_irq_handler,
.reclaim_buffers = drm_core_reclaim_buffers,
- .get_map_ofs = drm_core_get_map_ofs,
- .get_reg_ofs = drm_core_get_reg_ofs,
.ioctls = mach64_ioctls,
.dma_ioctl = mach64_dma_buffers,
.fops = {
@@ -63,6 +61,7 @@ static struct drm_driver driver = {
.mmap = drm_mmap,
.poll = drm_poll,
.fasync = drm_fasync,
+ .llseek = noop_llseek,
},
.pci_driver = {
.name = DRIVER_NAME,
@@ -0,0 +1,44 @@
fix build with linux-3.0
Signed-off-by: Thomas Backlund <tmb@mageia.org>
drivers/gpu/drm/mach64/mach64_drv.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
--- a/drivers/gpu/drm/mach64/mach64_drv.c.orig 2011-07-15 02:48:40.000000000 +0300
+++ a/drivers/gpu/drm/mach64/mach64_drv.c 2011-07-15 13:24:41.454753025 +0300
@@ -63,10 +63,6 @@ static struct drm_driver driver = {
.fasync = drm_fasync,
.llseek = noop_llseek,
},
- .pci_driver = {
- .name = DRIVER_NAME,
- .id_table = pciidlist,
- },
.name = DRIVER_NAME,
.desc = DRIVER_DESC,
@@ -76,15 +72,20 @@ static struct drm_driver driver = {
.patchlevel = DRIVER_PATCHLEVEL,
};
+static struct pci_driver mach64_pci_driver = {
+ .name = DRIVER_NAME,
+ .id_table = pciidlist,
+};
+
static int __init mach64_init(void)
{
driver.num_ioctls = mach64_max_ioctl;
- return drm_init(&driver);
+ return drm_pci_init(&driver, &mach64_pci_driver);
}
static void __exit mach64_exit(void)
{
- drm_exit(&driver);
+ drm_pci_exit(&driver, &mach64_pci_driver);
}
module_init(mach64_init);
@@ -0,0 +1,17 @@
--- linux/drivers/gpu/drm/mach64/mach64_drv.c.orig 2013-10-13 12:19:41.000000000 +0300
+++ linux/drivers/gpu/drm/mach64/mach64_drv.c 2013-10-13 14:27:25.684247911 +0300
@@ -46,13 +46,12 @@ static const struct file_operations mach
.unlocked_ioctl = drm_ioctl,
.mmap = drm_mmap,
.poll = drm_poll,
- .fasync = drm_fasync,
.llseek = noop_llseek,
};
static struct drm_driver driver = {
.driver_features =
- DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_HAVE_DMA
+ DRIVER_USE_AGP | DRIVER_PCI_DMA | DRIVER_HAVE_DMA
| DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED,
.lastclose = mach64_driver_lastclose,
.get_vblank_counter = mach64_get_vblank_counter,
@@ -0,0 +1,31 @@
Adapt for kernel-3.17
DRM_ARRAY_SIZE is a duplicate of ARRAY_SIZE and have been dropped.
drm_dev_to_irq has been dropped, so call dev->pdev->irq directly
for code simplicity.
Signed-off-by: Thomas Backlund <tmb@mageia.org>
diff -urp linux/drivers/gpu/drm/mach64/mach64_state.c.orig linux/drivers/gpu/drm/mach64/mach64_state.c
--- linux/drivers/gpu/drm/mach64/mach64_state.c.orig
+++ linux/drivers/gpu/drm/mach64/mach64_state.c
@@ -52,7 +52,7 @@ struct drm_ioctl_desc mach64_ioctls[] =
DRM_IOCTL_DEF_DRV(MACH64_GETPARAM, mach64_get_param, DRM_AUTH),
};
-int mach64_max_ioctl = DRM_ARRAY_SIZE(mach64_ioctls);
+int mach64_max_ioctl = ARRAY_SIZE(mach64_ioctls);
/* ================================================================
* DMA hardware state programming functions
@@ -895,7 +895,7 @@ int mach64_get_param(struct drm_device *
value = mach64_do_get_frames_queued(dev_priv);
break;
case MACH64_PARAM_IRQ_NR:
- value = drm_dev_to_irq(dev);
+ value = dev->pdev->irq;
break;
default:
return -EINVAL;
@@ -0,0 +1,142 @@
Fix build with kernel 3.18
Signed-off-by: Thomas Backlund <tmb@mageia.org>
diff -urp linux/drivers/gpu/drm/mach64.orig/mach64_dma.c linux/drivers/gpu/drm/mach64/mach64_dma.c
--- linux/drivers/gpu/drm/mach64.orig/mach64_dma.c 2014-11-29 22:01:54.000000000 +0200
+++ linux/drivers/gpu/drm/mach64/mach64_dma.c 2014-11-30 00:02:06.906821818 +0200
@@ -1038,21 +1038,21 @@ static int mach64_do_dma_init(struct drm
INIT_LIST_HEAD(&dev_priv->placeholders);
INIT_LIST_HEAD(&dev_priv->pending);
- dev_priv->sarea = drm_getsarea(dev);
+ dev_priv->sarea = drm_legacy_getsarea(dev);
if (!dev_priv->sarea) {
DRM_ERROR("can not find sarea!\n");
dev->dev_private = (void *)dev_priv;
mach64_do_cleanup_dma(dev);
return -EINVAL;
}
- dev_priv->fb = drm_core_findmap(dev, init->fb_offset);
+ dev_priv->fb = drm_legacy_findmap(dev, init->fb_offset);
if (!dev_priv->fb) {
DRM_ERROR("can not find frame buffer map!\n");
dev->dev_private = (void *)dev_priv;
mach64_do_cleanup_dma(dev);
return -EINVAL;
}
- dev_priv->mmio = drm_core_findmap(dev, init->mmio_offset);
+ dev_priv->mmio = drm_legacy_findmap(dev, init->mmio_offset);
if (!dev_priv->mmio) {
DRM_ERROR("can not find mmio map!\n");
dev->dev_private = (void *)dev_priv;
@@ -1060,7 +1060,7 @@ static int mach64_do_dma_init(struct drm
return -EINVAL;
}
- dev_priv->ring_map = drm_core_findmap(dev, init->ring_offset);
+ dev_priv->ring_map = drm_legacy_findmap(dev, init->ring_offset);
if (!dev_priv->ring_map) {
DRM_ERROR("can not find ring map!\n");
dev->dev_private = (void *)dev_priv;
@@ -1072,7 +1072,7 @@ static int mach64_do_dma_init(struct drm
((u8 *) dev_priv->sarea->handle + init->sarea_priv_offset);
if (!dev_priv->is_pci) {
- drm_core_ioremap(dev_priv->ring_map, dev);
+ drm_legacy_ioremap(dev_priv->ring_map, dev);
if (!dev_priv->ring_map->handle) {
DRM_ERROR("can not ioremap virtual address for"
" descriptor ring\n");
@@ -1082,7 +1082,7 @@ static int mach64_do_dma_init(struct drm
}
dev->agp_buffer_token = init->buffers_offset;
dev->agp_buffer_map =
- drm_core_findmap(dev, init->buffers_offset);
+ drm_legacy_findmap(dev, init->buffers_offset);
if (!dev->agp_buffer_map) {
DRM_ERROR("can not find dma buffer map!\n");
dev->dev_private = (void *)dev_priv;
@@ -1093,7 +1093,7 @@ static int mach64_do_dma_init(struct drm
dev isn't passed all the way though the mach64 - DA */
dev_priv->dev_buffers = dev->agp_buffer_map;
- drm_core_ioremap(dev->agp_buffer_map, dev);
+ drm_legacy_ioremap(dev->agp_buffer_map, dev);
if (!dev->agp_buffer_map->handle) {
DRM_ERROR("can not ioremap virtual address for"
" dma buffer\n");
@@ -1102,7 +1102,7 @@ static int mach64_do_dma_init(struct drm
return -ENOMEM;
}
dev_priv->agp_textures =
- drm_core_findmap(dev, init->agp_textures_offset);
+ drm_legacy_findmap(dev, init->agp_textures_offset);
if (!dev_priv->agp_textures) {
DRM_ERROR("can not find agp texture region!\n");
dev->dev_private = (void *)dev_priv;
@@ -1376,10 +1376,10 @@ int mach64_do_cleanup_dma(struct drm_dev
if (!dev_priv->is_pci) {
if (dev_priv->ring_map)
- drm_core_ioremapfree(dev_priv->ring_map, dev);
+ drm_legacy_ioremapfree(dev_priv->ring_map, dev);
if (dev->agp_buffer_map) {
- drm_core_ioremapfree(dev->agp_buffer_map, dev);
+ drm_legacy_ioremapfree(dev->agp_buffer_map, dev);
dev->agp_buffer_map = NULL;
}
}
diff -urp linux/drivers/gpu/drm/mach64.orig/mach64_drv.c linux/drivers/gpu/drm/mach64/mach64_drv.c
--- linux/drivers/gpu/drm/mach64.orig/mach64_drv.c 2014-11-29 22:01:54.000000000 +0200
+++ linux/drivers/gpu/drm/mach64/mach64_drv.c 2014-11-29 23:14:21.918009653 +0200
@@ -34,6 +34,7 @@
#include "mach64_drv.h"
#include <drm/drm_pciids.h>
+#include <drm/drm_legacy.h>
static struct pci_device_id pciidlist[] = {
mach64_PCI_IDS
@@ -44,7 +45,7 @@ static const struct file_operations mach
.open = drm_open,
.release = drm_release,
.unlocked_ioctl = drm_ioctl,
- .mmap = drm_mmap,
+ .mmap = drm_legacy_mmap,
.poll = drm_poll,
.llseek = noop_llseek,
};
diff -urp linux/drivers/gpu/drm/mach64.orig/mach64_drv.h linux/drivers/gpu/drm/mach64/mach64_drv.h
--- linux/drivers/gpu/drm/mach64.orig/mach64_drv.h 2014-11-29 22:01:54.000000000 +0200
+++ linux/drivers/gpu/drm/mach64/mach64_drv.h 2014-11-29 23:58:20.111491646 +0200
@@ -35,6 +35,8 @@
#ifndef __MACH64_DRV_H__
#define __MACH64_DRV_H__
+#include <drm/drm_legacy.h>
+
/* General customization:
*/
@@ -102,12 +104,12 @@ typedef struct drm_mach64_private {
u32 back_offset_pitch;
u32 depth_offset_pitch;
- drm_local_map_t *sarea;
- drm_local_map_t *fb;
- drm_local_map_t *mmio;
- drm_local_map_t *ring_map;
- drm_local_map_t *dev_buffers; /* this is a pointer to a structure in dev */
- drm_local_map_t *agp_textures;
+ struct drm_local_map *sarea;
+ struct drm_local_map *fb;
+ struct drm_local_map *mmio;
+ struct drm_local_map *ring_map;
+ struct drm_local_map *dev_buffers; /* this is a pointer to a structure in dev */
+ struct drm_local_map *agp_textures;
} drm_mach64_private_t;
extern struct drm_ioctl_desc mach64_ioctls[];
@@ -0,0 +1,47 @@
This moves the .fops to a separate struct as required by kernel-3.3
Signed-off-by: Thomas Backlund <tmb@mageia.org>
b/drivers/gpu/drm/mach64/mach64_drv.c | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
--- a/drivers/gpu/drm/mach64/mach64_drv.c
+++ b/drivers/gpu/drm/mach64/mach64_drv.c
@@ -39,6 +39,17 @@ static struct pci_device_id pciidlist[]
mach64_PCI_IDS
};
+static const struct file_operations mach64_driver_fops = {
+ .owner = THIS_MODULE,
+ .open = drm_open,
+ .release = drm_release,
+ .unlocked_ioctl = drm_ioctl,
+ .mmap = drm_mmap,
+ .poll = drm_poll,
+ .fasync = drm_fasync,
+ .llseek = noop_llseek,
+};
+
static struct drm_driver driver = {
.driver_features =
DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_HAVE_DMA
@@ -54,17 +65,7 @@ static struct drm_driver driver = {
.reclaim_buffers = drm_core_reclaim_buffers,
.ioctls = mach64_ioctls,
.dma_ioctl = mach64_dma_buffers,
- .fops = {
- .owner = THIS_MODULE,
- .open = drm_open,
- .release = drm_release,
- .unlocked_ioctl = drm_ioctl,
- .mmap = drm_mmap,
- .poll = drm_poll,
- .fasync = drm_fasync,
- .llseek = noop_llseek,
- },
-
+ .fops = &mach64_driver_fops,
.name = DRIVER_NAME,
.desc = DRIVER_DESC,
.date = DRIVER_DATE,
@@ -0,0 +1,15 @@
reclaim_buffers is gone in 3.6
Signed-off-by: Thomas Backlund <tmb@mageia.org>
--- linux/drivers/gpu/drm/mach64/mach64_drv.c.orig 2012-10-17 22:26:58.000000000 +0300
+++ linux/drivers/gpu/drm/mach64/mach64_drv.c 2012-10-17 23:05:10.212566630 +0300
@@ -62,7 +62,6 @@ static struct drm_driver driver = {
.irq_postinstall = mach64_driver_irq_postinstall,
.irq_uninstall = mach64_driver_irq_uninstall,
.irq_handler = mach64_driver_irq_handler,
- .reclaim_buffers = drm_core_reclaim_buffers,
.ioctls = mach64_ioctls,
.dma_ioctl = mach64_dma_buffers,
.fops = &mach64_driver_fops,
@@ -0,0 +1,61 @@
diff -Nurp linux-3.7-rc8/drivers/gpu/drm/mach64.orig/mach64_dma.c linux-3.7-rc8/drivers/gpu/drm/mach64/mach64_dma.c
--- linux-3.7-rc8/drivers/gpu/drm/mach64.orig/mach64_dma.c 2012-12-06 19:50:10.000000000 +0200
+++ linux-3.7-rc8/drivers/gpu/drm/mach64/mach64_dma.c 2012-12-06 20:19:10.590681644 +0200
@@ -34,8 +34,8 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "drmP.h"
-#include "drm.h"
+#include <drm/drmP.h>
+#include <drm/drm.h>
#include "mach64_drm.h"
#include "mach64_drv.h"
diff -Nurp linux-3.7-rc8/drivers/gpu/drm/mach64.orig/mach64_drv.c linux-3.7-rc8/drivers/gpu/drm/mach64/mach64_drv.c
--- linux-3.7-rc8/drivers/gpu/drm/mach64.orig/mach64_drv.c 2012-12-06 19:50:10.000000000 +0200
+++ linux-3.7-rc8/drivers/gpu/drm/mach64/mach64_drv.c 2012-12-06 20:20:13.062073838 +0200
@@ -28,12 +28,12 @@
*/
#include <linux/module.h>
-#include "drmP.h"
-#include "drm.h"
+#include <drm/drmP.h>
+#include <drm/drm.h>
#include "mach64_drm.h"
#include "mach64_drv.h"
-#include "drm_pciids.h"
+#include <drm/drm_pciids.h>
static struct pci_device_id pciidlist[] = {
mach64_PCI_IDS
diff -Nurp linux-3.7-rc8/drivers/gpu/drm/mach64.orig/mach64_irq.c linux-3.7-rc8/drivers/gpu/drm/mach64/mach64_irq.c
--- linux-3.7-rc8/drivers/gpu/drm/mach64.orig/mach64_irq.c 2012-12-06 19:50:10.000000000 +0200
+++ linux-3.7-rc8/drivers/gpu/drm/mach64/mach64_irq.c 2012-12-06 20:20:40.192678476 +0200
@@ -35,8 +35,8 @@
* Leif Delgass <ldelgass@retinalburn.net>
*/
-#include "drmP.h"
-#include "drm.h"
+#include <drm/drmP.h>
+#include <drm/drm.h>
#include "mach64_drm.h"
#include "mach64_drv.h"
diff -Nurp linux-3.7-rc8/drivers/gpu/drm/mach64.orig/mach64_state.c linux-3.7-rc8/drivers/gpu/drm/mach64/mach64_state.c
--- linux-3.7-rc8/drivers/gpu/drm/mach64.orig/mach64_state.c 2012-12-06 19:50:10.000000000 +0200
+++ linux-3.7-rc8/drivers/gpu/drm/mach64/mach64_state.c 2012-12-06 20:21:00.783137370 +0200
@@ -30,8 +30,8 @@
* José Fonseca <j_r_fonseca@yahoo.co.uk>
*/
-#include "drmP.h"
-#include "drm.h"
+#include <drm/drmP.h>
+#include <drm/drm.h>
#include "mach64_drm.h"
#include "mach64_drv.h"
@@ -0,0 +1,20 @@
Update mach64 for changes in drm_ioctl done in 2.6.33:
"drm: convert drm_ioctl to unlocked_ioctl" (commit ed8b670)
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
---
drivers/gpu/drm/mach64/mach64_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -p -up linux-2.6.33/drivers/gpu/drm/mach64/mach64_drv.c.orig linux-2.6.33/drivers/gpu/drm/mach64/mach64_drv.c
--- linux-2.6.33/drivers/gpu/drm/mach64/mach64_drv.c.orig 2010-03-16 19:27:22.517068880 -0300
+++ linux-2.6.33/drivers/gpu/drm/mach64/mach64_drv.c 2010-03-16 19:27:54.890318416 -0300
@@ -59,7 +59,7 @@ static struct drm_driver driver = {
.owner = THIS_MODULE,
.open = drm_open,
.release = drm_release,
- .ioctl = drm_ioctl,
+ .unlocked_ioctl = drm_ioctl,
.mmap = drm_mmap,
.poll = drm_poll,
.fasync = drm_fasync,
@@ -0,0 +1,12 @@
diff -p -up linux-2.6.32/drivers/gpu/drm/mach64/mach64_dma.c.orig linux-2.6.32/drivers/gpu/drm/mach64/mach64_dma.c
--- linux-2.6.32/drivers/gpu/drm/mach64/mach64_dma.c.orig 2010-01-06 11:35:13.784843304 -0200
+++ linux-2.6.32/drivers/gpu/drm/mach64/mach64_dma.c 2010-01-06 11:37:50.793843502 -0200
@@ -835,7 +835,7 @@ static int mach64_bm_dma_test(struct drm
/* FIXME: get a dma buffer from the freelist here */
DRM_DEBUG("Allocating data memory ...\n");
cpu_addr_dmah =
- drm_pci_alloc(dev, 0x1000, 0x1000, 0xfffffffful);
+ drm_pci_alloc(dev, 0x1000, 0x1000);
if (!cpu_addr_dmah) {
DRM_INFO("data-memory allocation failed!\n");
return -ENOMEM;
@@ -0,0 +1,97 @@
Fix/cleanup mach64 drm module for building with current kernel.
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
---
drivers/gpu/drm/mach64/mach64_dma.c | 9 +--------
drivers/gpu/drm/mach64/mach64_drv.c | 11 +----------
drivers/gpu/drm/mach64/mach64_state.c | 4 ++--
3 files changed, 4 insertions(+), 20 deletions(-)
diff -p -up linux-2.6.28/drivers/gpu/drm/mach64/mach64_dma.c.orig linux-2.6.28/drivers/gpu/drm/mach64/mach64_dma.c
--- linux-2.6.28/drivers/gpu/drm/mach64/mach64_dma.c.orig 2008-12-10 12:19:14.000000000 -0500
+++ linux-2.6.28/drivers/gpu/drm/mach64/mach64_dma.c 2008-12-10 13:34:19.000000000 -0500
@@ -834,14 +834,8 @@ static int mach64_bm_dma_test(struct drm
/* FIXME: get a dma buffer from the freelist here */
DRM_DEBUG("Allocating data memory ...\n");
-#ifdef __FreeBSD__
- DRM_UNLOCK();
-#endif
cpu_addr_dmah =
drm_pci_alloc(dev, 0x1000, 0x1000, 0xfffffffful);
-#ifdef __FreeBSD__
- DRM_LOCK();
-#endif
if (!cpu_addr_dmah) {
DRM_INFO("data-memory allocation failed!\n");
return -ENOMEM;
@@ -1375,8 +1369,7 @@ int mach64_do_cleanup_dma(struct drm_dev
* may not have been called from userspace and after dev_private
* is freed, it's too late.
*/
- if (dev->irq)
- drm_irq_uninstall(dev);
+ drm_irq_uninstall(dev);
if (dev->dev_private) {
drm_mach64_private_t *dev_priv = dev->dev_private;
diff -p -up linux-2.6.28/drivers/gpu/drm/mach64/mach64_drv.c.orig linux-2.6.28/drivers/gpu/drm/mach64/mach64_drv.c
--- linux-2.6.28/drivers/gpu/drm/mach64/mach64_drv.c.orig 2008-12-10 12:13:13.000000000 -0500
+++ linux-2.6.28/drivers/gpu/drm/mach64/mach64_drv.c 2008-12-10 12:16:54.000000000 -0500
@@ -38,7 +38,6 @@ static struct pci_device_id pciidlist[]
mach64_PCI_IDS
};
-static int probe(struct pci_dev *pdev, const struct pci_device_id *ent);
static struct drm_driver driver = {
.driver_features =
DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_HAVE_DMA
@@ -68,8 +67,6 @@ static struct drm_driver driver = {
.pci_driver = {
.name = DRIVER_NAME,
.id_table = pciidlist,
- .probe = probe,
- .remove = __devexit_p(drm_cleanup_pci),
},
.name = DRIVER_NAME,
@@ -80,16 +77,10 @@ static struct drm_driver driver = {
.patchlevel = DRIVER_PATCHLEVEL,
};
-static int probe(struct pci_dev *pdev, const struct pci_device_id *ent)
-{
- return drm_get_dev(pdev, ent, &driver);
-}
-
-
static int __init mach64_init(void)
{
driver.num_ioctls = mach64_max_ioctl;
- return drm_init(&driver, pciidlist);
+ return drm_init(&driver);
}
static void __exit mach64_exit(void)
diff -p -up linux-2.6.28/drivers/gpu/drm/mach64/mach64_state.c.orig linux-2.6.28/drivers/gpu/drm/mach64/mach64_state.c
--- linux-2.6.28/drivers/gpu/drm/mach64/mach64_state.c.orig 2008-12-10 12:13:13.000000000 -0500
+++ linux-2.6.28/drivers/gpu/drm/mach64/mach64_state.c 2008-12-10 13:38:54.000000000 -0500
@@ -455,7 +455,7 @@ static int mach64_do_get_frames_queued(d
head = ring->head;
start = (MACH64_MAX_QUEUED_FRAMES -
- DRM_MIN(MACH64_MAX_QUEUED_FRAMES, sarea_priv->frames_queued));
+ min(MACH64_MAX_QUEUED_FRAMES, sarea_priv->frames_queued));
if (head == tail) {
sarea_priv->frames_queued = 0;
@@ -895,7 +895,7 @@ int mach64_get_param(struct drm_device *
value = mach64_do_get_frames_queued(dev_priv);
break;
case MACH64_PARAM_IRQ_NR:
- value = dev->irq;
+ value = drm_dev_to_irq(dev);
break;
default:
return -EINVAL;
@@ -0,0 +1,10 @@
--- linux/drivers/gpu/drm/mach64/mach64_drv.c.orig 2011-12-25 00:48:42.814932355 +0200
+++ linux/drivers/gpu/drm/mach64/mach64_drv.c 2011-12-25 00:47:43.393625260 +0200
@@ -27,6 +27,7 @@
* Leif Delgass <ldelgass@retinalburn.net>
*/
+#include <linux/module.h>
#include "drmP.h"
#include "drm.h"
#include "mach64_drm.h"
@@ -0,0 +1,102 @@
Fix build with kernel-3.14
Signed-off-by: Thomas Backlund <tmb@mageia.org>
drivers/gpu/drm/mach64/mach64_dma.c | 10 +++++-----
drivers/gpu/drm/mach64/mach64_drv.h | 2 +-
drivers/gpu/drm/mach64/mach64_irq.c | 2 +-
drivers/gpu/drm/mach64/mach64_state.c | 6 +++---
4 files changed, 10 insertions(+), 10 deletions(-)
diff -urp linux/drivers/gpu/drm/mach64.orig/mach64_dma.c linux/drivers/gpu/drm/mach64/mach64_dma.c
--- linux/drivers/gpu/drm/mach64.orig/mach64_dma.c 2014-04-26 19:10:55.000000000 +0300
+++ linux/drivers/gpu/drm/mach64/mach64_dma.c 2014-04-26 20:26:05.263501325 +0300
@@ -696,9 +696,9 @@ do { \
DRM_INFO( "ADVANCE_RING() wr=0x%06x tail=0x%06x\n", \
_ring_write, _ring_tail ); \
} \
- DRM_MEMORYBARRIER(); \
+ mb(); \
mach64_clear_dma_eol( &_ring[(_ring_tail - 2) & _ring_mask] ); \
- DRM_MEMORYBARRIER(); \
+ mb(); \
dev_priv->ring.tail = _ring_write; \
mach64_ring_tick( dev_priv, &(dev_priv)->ring ); \
} while (0)
@@ -912,7 +912,7 @@ static int mach64_bm_dma_test(struct drm
DRM_DEBUG(" data[%d] = 0x%08x\n", i, data[i]);
}
- DRM_MEMORYBARRIER();
+ mb();
DRM_DEBUG("waiting for idle...\n");
if ((i = mach64_do_wait_for_idle(dev_priv))) {
@@ -1716,10 +1716,10 @@ static int mach64_dma_get_buffers(struct
buf->file_priv = file_priv;
- if (DRM_COPY_TO_USER(&d->request_indices[i], &buf->idx,
+ if (copy_to_user(&d->request_indices[i], &buf->idx,
sizeof(buf->idx)))
return -EFAULT;
- if (DRM_COPY_TO_USER(&d->request_sizes[i], &buf->total,
+ if (copy_to_user(&d->request_sizes[i], &buf->total,
sizeof(buf->total)))
return -EFAULT;
diff -urp linux/drivers/gpu/drm/mach64.orig/mach64_drv.h linux/drivers/gpu/drm/mach64/mach64_drv.h
--- linux/drivers/gpu/drm/mach64.orig/mach64_drv.h 2014-04-26 19:10:55.000000000 +0300
+++ linux/drivers/gpu/drm/mach64/mach64_drv.h 2014-04-26 20:28:43.693457652 +0300
@@ -166,7 +166,7 @@ extern int mach64_get_param(struct drm_d
extern u32 mach64_get_vblank_counter(struct drm_device *dev, int crtc);
extern int mach64_enable_vblank(struct drm_device *dev, int crtc);
extern void mach64_disable_vblank(struct drm_device *dev, int crtc);
-extern irqreturn_t mach64_driver_irq_handler(DRM_IRQ_ARGS);
+extern irqreturn_t mach64_driver_irq_handler(int irq, void *arg);
extern void mach64_driver_irq_preinstall(struct drm_device *dev);
extern int mach64_driver_irq_postinstall(struct drm_device *dev);
extern void mach64_driver_irq_uninstall(struct drm_device *dev);
diff -urp linux/drivers/gpu/drm/mach64.orig/mach64_irq.c linux/drivers/gpu/drm/mach64/mach64_irq.c
--- linux/drivers/gpu/drm/mach64.orig/mach64_irq.c 2014-04-26 19:10:55.000000000 +0300
+++ linux/drivers/gpu/drm/mach64/mach64_irq.c 2014-04-26 20:32:01.464898140 +0300
@@ -40,7 +40,7 @@
#include "mach64_drm.h"
#include "mach64_drv.h"
-irqreturn_t mach64_driver_irq_handler(DRM_IRQ_ARGS)
+irqreturn_t mach64_driver_irq_handler(int irq, void *arg)
{
struct drm_device *dev = arg;
drm_mach64_private_t *dev_priv = dev->dev_private;
diff -urp linux/drivers/gpu/drm/mach64.orig/mach64_state.c linux/drivers/gpu/drm/mach64/mach64_state.c
--- linux/drivers/gpu/drm/mach64.orig/mach64_state.c 2014-04-26 19:10:55.000000000 +0300
+++ linux/drivers/gpu/drm/mach64/mach64_state.c 2014-04-26 20:07:16.701527488 +0300
@@ -494,7 +494,7 @@ static __inline__ int copy_from_user_ver
if (from == NULL)
return -ENOMEM;
- if (DRM_COPY_FROM_USER(from, ufrom, bytes)) {
+ if (copy_from_user(from, ufrom, bytes)) {
kfree(from);
return -EFAULT;
}
@@ -640,7 +640,7 @@ static __inline__ int copy_from_user_bli
{
to = (u32 *)((char *)to + MACH64_HOSTDATA_BLIT_OFFSET);
- if (DRM_COPY_FROM_USER(to, ufrom, bytes)) {
+ if (copy_from_user(to, ufrom, bytes)) {
return -EFAULT;
}
@@ -901,7 +901,7 @@ int mach64_get_param(struct drm_device *
return -EINVAL;
}
- if (DRM_COPY_TO_USER(param->value, &value, sizeof(int))) {
+ if (copy_to_user(param->value, &value, sizeof(int))) {
DRM_ERROR("copy_to_user\n");
return -EFAULT;
}
@@ -0,0 +1,38 @@
Theese got dropped in 3.12-rc
Restore for now to get the mach64 driver to build
TODO: Need to check mesa & drm if it's dropped there too...
--- linux/include/drm/drm_pciids.h.orig 2013-10-13 11:05:33.000000000 +0300
+++ linux/include/drm/drm_pciids.h 2013-10-13 14:30:43.625995248 +0300
@@ -711,6 +711,29 @@
{0x102b, 0x2527, PCI_ANY_ID, PCI_ANY_ID, 0, 0, MGA_CARD_TYPE_G550}, \
{0, 0, 0}
+#define mach64_PCI_IDS \
+ {0x1002, 0x4749, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
+ {0x1002, 0x4750, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
+ {0x1002, 0x4751, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
+ {0x1002, 0x4742, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
+ {0x1002, 0x4744, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
+ {0x1002, 0x4c49, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
+ {0x1002, 0x4c50, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
+ {0x1002, 0x4c51, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
+ {0x1002, 0x4c42, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
+ {0x1002, 0x4c44, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
+ {0x1002, 0x474c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
+ {0x1002, 0x474f, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
+ {0x1002, 0x4752, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
+ {0x1002, 0x4753, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
+ {0x1002, 0x474d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
+ {0x1002, 0x474e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
+ {0x1002, 0x4c52, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
+ {0x1002, 0x4c53, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
+ {0x1002, 0x4c4d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
+ {0x1002, 0x4c4e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
+ {0, 0, 0}
+
#define sisdrv_PCI_IDS \
{0x1039, 0x0300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
{0x1039, 0x5300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,37 @@
Subject: Add blacklist of usb hid modules
IBM Blade Center HS20 can connect PS2 kerboard and mouse, It is USB emulation.
This devices need HID_QUIRK_IGNORE option.
This patch is workaround.
[ rediffed for 2.6.28 -- herton ]
Signed-off-by: Go Taniguchi <go@turbolinux.co.jp>
---
drivers/hid/hid-core.c | 2 ++
drivers/hid/hid-ids.h | 2 ++
2 files changed, 4 insertions(+)
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -2062,6 +2062,8 @@ static const struct hid_device_id hid_ig
{ HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1005) },
{ HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1006) },
{ HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1007) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_IBM, 0x4001) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_IBM, 0x4002) },
{ HID_USB_DEVICE(USB_VENDOR_ID_IMATION, USB_DEVICE_ID_DISC_STAKKA) },
{ HID_USB_DEVICE(USB_VENDOR_ID_JABRA, USB_DEVICE_ID_JABRA_SPEAK_410) },
{ HID_USB_DEVICE(USB_VENDOR_ID_JABRA, USB_DEVICE_ID_JABRA_SPEAK_510) },
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -46,6 +46,8 @@
#define USB_VENDOR_ID_AFATECH 0x15a4
#define USB_DEVICE_ID_AFATECH_AF9016 0x9016
+#define USB_VENDOR_ID_IBM 0x04b3
+
#define USB_VENDOR_ID_AIPTEK 0x08ca
#define USB_DEVICE_ID_AIPTEK_01 0x0001
#define USB_DEVICE_ID_AIPTEK_10 0x0010
@@ -0,0 +1,23 @@
---
drivers/ide/sis5513.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff -p -up linux-2.6.28/drivers/ide/sis5513.c.orig linux-2.6.28/drivers/ide/sis5513.c
--- linux-2.6.28/drivers/ide/sis5513.c.orig 2008-12-08 12:41:13.000000000 -0500
+++ linux-2.6.28/drivers/ide/sis5513.c 2008-12-08 12:51:32.000000000 -0500
@@ -412,6 +412,15 @@ static int __devinit sis_find_family(str
pci_name(dev));
}
}
+ else if (trueid == 0x180) { /* sis965L */
+ u16 pci_command;
+ pci_read_config_word(dev, PCI_COMMAND, &pci_command);
+ pci_command &= ~PCI_COMMAND_INTX_DISABLE;
+ pci_write_config_word(dev, PCI_COMMAND, pci_command);
+ chipset_family = ATA_133;
+ printk(KERN_INFO DRV_NAME " %s: SiS 965 IDE UDMA133 controller\n",
+ pci_name(dev));
+ }
}
if (!chipset_family) { /* Belongs to pci-quirks */
@@ -0,0 +1,19 @@
From Thierry Vignaud <tvignaud@mandriva.com> (Mandriva)
We now lacks /usr/include/linux/pci_ids.h which break ldetect build...
Can you readd it please?
Thanks
---
include/linux/Kbuild | 1 +
1 file changed, 1 insertion(+)
--- linux/include/uapi/linux/Kbuild.include-kbuild-export-pci_ids.orig
+++ linux/include/uapi/linux/Kbuild
@@ -277,6 +277,7 @@ header-y += param.h
header-y += parport.h
header-y += patchkey.h
header-y += pci.h
+header-y += pci_ids.h
header-y += pci_regs.h
header-y += perf_event.h
header-y += personality.h
@@ -0,0 +1,47 @@
From 993b3a3f80a7842a48cd46c2b41e1b3ef6302468 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Fri, 24 Oct 2014 14:55:24 -0700
Subject: [PATCH] Input: i8042 - quirks for Fujitsu Lifebook A544 and Lifebook
AH544
These models need i8042.notimeout, otherwise the touchpad will not work.
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=69731
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1111138
Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
drivers/input/serio/i8042-x86ia64io.h | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
index a0bcbb6..aa9b299 100644
--- a/drivers/input/serio/i8042-x86ia64io.h
+++ b/drivers/input/serio/i8042-x86ia64io.h
@@ -364,6 +364,22 @@ static const struct dmi_system_id __initconst i8042_dmi_notimeout_table[] = {
},
},
{
+ /* Fujitsu A544 laptop */
+ /* https://bugzilla.redhat.com/show_bug.cgi?id=1111138 */
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK A544"),
+ },
+ },
+ {
+ /* Fujitsu AH544 laptop */
+ /* https://bugzilla.kernel.org/show_bug.cgi?id=69731 */
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK AH544"),
+ },
+ },
+ {
/* Fujitsu U574 laptop */
/* https://bugzilla.kernel.org/show_bug.cgi?id=69731 */
.matches = {
--
2.1.2
@@ -0,0 +1,13 @@
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c
index f976df4..32c883b 100644
--- a/drivers/media/usb/pwc/pwc-if.c
+++ b/drivers/media/usb/pwc/pwc-if.c
@@ -119,7 +119,7 @@ static void usb_pwc_disconnect(struct us
static void pwc_isoc_cleanup(struct pwc_device *pdev);
static struct usb_driver pwc_driver = {
- .name = "Philips webcam", /* name */
+ .name = "pwc", /* name */
.id_table = pwc_device_table,
.probe = usb_pwc_probe, /* probe() */
.disconnect = usb_pwc_disconnect, /* disconnect() */
@@ -0,0 +1,49 @@
Subject: mpt scsi modules for VMWare's emulated
The attached patch is a workaround for a bug in VMWare's emulated LSI
Fusion SCSI HBA. The emulated firmware returns zero for the maximum
number of attached devices; the real firmware returns a positive
number. Therefore, the kernel that boots and works fine on bare metal
will fail on VMWare because this firmware value is handed to the SCSI
midlayer, which then skips the entire bus scan.
F7 bz 241935
The patch below was submitted by Eric Moore of LSI to the linux-scsi
mailing list:
http://marc.info/?l=linux-scsi&m=117432237404247
then immediately rejected by Christoph Hellwig, who prefers that
VMWare fix their emulation instead.
This patch is workaround.
---
drivers/message/fusion/mptbase.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -3051,8 +3051,19 @@ GetPortFacts(MPT_ADAPTER *ioc, int portn
pfacts->MaxPersistentIDs = le16_to_cpu(pfacts->MaxPersistentIDs);
pfacts->MaxLanBuckets = le16_to_cpu(pfacts->MaxLanBuckets);
- max_id = (ioc->bus_type == SAS) ? pfacts->PortSCSIID :
- pfacts->MaxDevices;
+ switch (ioc->bus_type) {
+ case SAS:
+ max_id = pfacts->PortSCSIID;
+ break;
+ case FC:
+ max_id = pfacts->MaxDevices;
+ break;
+ case SPI:
+ default:
+ max_id = MPT_MAX_SCSI_DEVICES;
+ break;
+ }
+
ioc->devices_per_bus = (max_id > 255) ? 256 : max_id;
ioc->number_of_buses = (ioc->devices_per_bus < 256) ? 1 : max_id/256;
@@ -0,0 +1,33 @@
Adapt to netlink changes in 3.6
Signed-off-by: Thomas Backlund <tmb@mageia.org>
--- linux/net/ipv4/netfilter/ipt_IFWLOG.c.orig 2012-10-17 22:44:57.000000000 +0300
+++ linux/net/ipv4/netfilter/ipt_IFWLOG.c 2012-10-17 23:17:10.012725918 +0300
@@ -56,9 +56,9 @@ static void send_packet(const struct nl_
return;
}
- nlh = NLMSG_PUT(skb, 0, 0, 0, size - sizeof(*nlh));
+ nlh = nlmsg_put(skb, 0, 0, 0, size - sizeof(*nlh), 0);
- memcpy(NLMSG_DATA(nlh), (const void *) msg, sizeof(*msg));
+ memcpy(nlmsg_data(nlh), (const void *) msg, sizeof(*msg));
NETLINK_CB(skb).pid = 0; /* from kernel */
NETLINK_CB(skb).dst_group = IFWLOGNLGRP_DEF;
@@ -169,9 +169,11 @@ static struct xt_target ipt_IFWLOG = {
static int __init ipt_ifwlog_init(void)
{
int err;
+ struct netlink_kernel_cfg cfg = {
+ .groups = IFWLOGNLGRP_MAX,
+ };
- nl = netlink_kernel_create(&init_net, NETLINK_IFWLOG, IFWLOGNLGRP_MAX,
- NULL, NULL, THIS_MODULE);
+ nl = netlink_kernel_create(&init_net, NETLINK_IFWLOG, THIS_MODULE, &cfg);
if (!nl) {
PRINTR(KERN_WARNING "IFWLOG: cannot create netlink socket\n");
return -ENOMEM;
@@ -0,0 +1,32 @@
--- linux-2.6.35-rc6-git-mnb0.1/net/ipv4/netfilter/ipt_IFWLOG.c.orig 2010-07-30 21:17:30.000000000 +0300
+++ linux-2.6.35-rc6-git-mnb0.1/net/ipv4/netfilter/ipt_IFWLOG.c 2010-07-31 13:46:33.834611944 +0300
@@ -135,7 +135,7 @@ static void ipt_IFWLOG_packet(const stru
}
static unsigned int ipt_IFWLOG_target(struct sk_buff *skb,
- const struct xt_target_param *target_param)
+ const struct xt_action_param *target_param)
{
const struct ipt_IFWLOG_info *info = target_param->targinfo;
@@ -144,17 +144,17 @@ static unsigned int ipt_IFWLOG_target(st
return IPT_CONTINUE;
}
-static bool ipt_IFWLOG_checkentry(const struct xt_tgchk_param *tgchk_param)
+static int ipt_IFWLOG_checkentry(const struct xt_tgchk_param *tgchk_param)
{
const struct ipt_IFWLOG_info *info = tgchk_param->targinfo;
if (info->prefix[sizeof(info->prefix)-1] != '\0') {
DEBUGP("IFWLOG: prefix term %i\n",
info->prefix[sizeof(info->prefix)-1]);
- return false;
+ return -EINVAL;
}
- return true;
+ return 0;
}
static struct xt_target ipt_IFWLOG = {
@@ -0,0 +1,15 @@
net/ipv4/netfilter/ipt_IFWLOG.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-2.6.37-rc3-git1-tmb0.3/net/ipv4/netfilter/ipt_IFWLOG.c.orig 2010-11-24 21:58:36.000000000 +0200
+++ linux-2.6.37-rc3-git1-tmb0.3/net/ipv4/netfilter/ipt_IFWLOG.c 2010-11-25 13:08:55.719379646 +0200
@@ -141,7 +141,7 @@ static unsigned int ipt_IFWLOG_target(st
ipt_IFWLOG_packet(skb, target_param->in, target_param->out, info);
- return IPT_CONTINUE;
+ return XT_CONTINUE;
}
static int ipt_IFWLOG_checkentry(const struct xt_tgchk_param *tgchk_param)
@@ -0,0 +1,20 @@
--- linux-3.7-rc8/net/ipv4/netfilter/ipt_IFWLOG.c.orig 2012-12-06 19:50:10.000000000 +0200
+++ linux-3.7-rc8/net/ipv4/netfilter/ipt_IFWLOG.c 2012-12-06 20:55:23.669152916 +0200
@@ -60,7 +60,7 @@ static void send_packet(const struct nl_
memcpy(nlmsg_data(nlh), (const void *) msg, sizeof(*msg));
- NETLINK_CB(skb).pid = 0; /* from kernel */
+ NETLINK_CB(skb).portid = 0; /* from kernel */
NETLINK_CB(skb).dst_group = IFWLOGNLGRP_DEF;
if (nl) {
@@ -173,7 +173,7 @@ static int __init ipt_ifwlog_init(void)
.groups = IFWLOGNLGRP_MAX,
};
- nl = netlink_kernel_create(&init_net, NETLINK_IFWLOG, THIS_MODULE, &cfg);
+ nl = netlink_kernel_create(&init_net, NETLINK_IFWLOG, &cfg);
if (!nl) {
PRINTR(KERN_WARNING "IFWLOG: cannot create netlink socket\n");
return -ENOMEM;
@@ -0,0 +1,264 @@
ipt_IFWLOG: Mandriva changes
This patch holds all the Mandriva changes done in ipt_IFWLOG
netfilter module.
This work is mostly done by Thomas Backlund, Herton R. Krzesinski
and Luiz Fernando N. Capitulino.
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
---
include/linux/netfilter_ipv4/Kbuild | 1
include/linux/netfilter_ipv4/ipt_IFWLOG.h | 23 +++++-
net/ipv4/netfilter/ipt_IFWLOG.c | 108 +++++++++++++++---------------
3 files changed, 77 insertions(+), 55 deletions(-)
diff -p -up linux-2.6.28/include/linux/netfilter_ipv4/ipt_IFWLOG.h.orig linux-2.6.28/include/linux/netfilter_ipv4/ipt_IFWLOG.h
--- linux-2.6.28/include/linux/netfilter_ipv4/ipt_IFWLOG.h.orig 2008-12-12 10:55:07.000000000 -0500
+++ linux-2.6.28/include/linux/netfilter_ipv4/ipt_IFWLOG.h 2008-12-12 10:56:30.000000000 -0500
@@ -1,10 +1,25 @@
-#ifndef _IPT_IFWLOG_H
-#define _IPT_IFWLOG_H
+#ifndef _LINUX_IPT_IFWLOG_H
+#define _LINUX_IPT_IFWLOG_H
#ifndef NETLINK_IFWLOG
-#define NETLINK_IFWLOG 19
+#define NETLINK_IFWLOG 20
#endif
+#ifndef __KERNEL__
+/* Multicast groups - backwards compatiblility for userspace */
+#define IFWLOG_NLGRP_NONE 0x00000000
+#define IFWLOG_NLGRP_DEF 0x00000001 /* default message group */
+#endif
+
+enum {
+ IFWLOGNLGRP_NONE,
+#define IFWLOGNLGRP_NONE IFWLOGNLGRP_NONE
+ IFWLOGNLGRP_DEF,
+#define IFWLOGNLGRP_DEF IFWLOGNLGRP_DEF
+ __IFWLOGNLGRP_MAX
+};
+#define IFWLOGNLGRP_MAX (__IFWLOGNLGRP_MAX - 1)
+
#define PREFSIZ 32
struct nl_msg { /* Netlink message */
@@ -23,4 +38,4 @@ struct ipt_IFWLOG_info {
char prefix[PREFSIZ];
};
-#endif /* _IPT_IFWLOG_H */
+#endif /* _LINUX_IPT_IFWLOG_H */
diff -p -up linux-2.6.28/net/ipv4/netfilter/ipt_IFWLOG.c.orig linux-2.6.28/net/ipv4/netfilter/ipt_IFWLOG.c
--- linux-2.6.28/net/ipv4/netfilter/ipt_IFWLOG.c.orig 2008-12-12 10:55:07.000000000 -0500
+++ linux-2.6.28/net/ipv4/netfilter/ipt_IFWLOG.c 2008-12-12 10:57:16.000000000 -0500
@@ -4,6 +4,14 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
+ *
+ * 2007-10-10 Thomas Backlund <tmb@mandriva.org>: build fixes for 2.6.22.9
+ * 2007-11-11 Herton Krzesinski <herton@mandriva.com>: build fixes for 2.6.24-rc
+ * 2007-12-03 Luiz Capitulino <lcapitulino@mandriva.com.br>: v1.1
+ * - Better multicast group usage
+ * - Coding style fixes
+ * - Do not return -EINVAL by default in ipt_ifwlog_init()
+ * - Minor refinements
*/
#include <linux/module.h>
@@ -19,12 +27,10 @@
#include <linux/string.h>
#include <linux/netfilter.h>
+#include <linux/netfilter/x_tables.h>
#include <linux/netfilter_ipv4/ip_tables.h>
#include <linux/netfilter_ipv4/ipt_IFWLOG.h>
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Samir Bellabes <sbellabes@mandriva.com>");
-MODULE_DESCRIPTION("Interactive firewall logging and module");
#if 0
#define DEBUGP PRINTR
@@ -36,44 +42,41 @@ MODULE_DESCRIPTION("Interactive firewall
static struct sock *nl;
-#define GROUP 10
-
/* send struct to userspace */
-static void send_packet(struct nl_msg msg)
+static void send_packet(const struct nl_msg *msg)
{
struct sk_buff *skb = NULL;
struct nlmsghdr *nlh;
+ unsigned int size;
- skb = alloc_skb(NLMSG_SPACE(sizeof(struct nl_msg)), GFP_ATOMIC);
+ size = NLMSG_SPACE(sizeof(*msg));
+ skb = alloc_skb(size, GFP_ATOMIC);
if (!skb) {
PRINTR(KERN_WARNING "IFWLOG: OOM can't allocate skb\n");
- return ;
+ return;
}
- nlh = NLMSG_PUT(skb, 0, 0, 0, sizeof(struct nl_msg) - sizeof(*nlh));
+ nlh = NLMSG_PUT(skb, 0, 0, 0, size - sizeof(*nlh));
- memcpy(NLMSG_DATA(nlh), (const void*)&msg, sizeof(struct nl_msg));
+ memcpy(NLMSG_DATA(nlh), (const void *) msg, sizeof(*msg));
NETLINK_CB(skb).pid = 0; /* from kernel */
- NETLINK_CB(skb).dst_pid = 0; /* multicast */
- NETLINK_CB(skb).dst_group = 10;
+ NETLINK_CB(skb).dst_group = IFWLOGNLGRP_DEF;
if (nl) {
DEBUGP(KERN_WARNING
"IFWLOG: nlmsg_len=%ld\nnlmsg_type=%d nlmsg_flags=%d\nnlmsg_seq=%ld nlmsg_pid = %ld\n",
(long)nlh->nlmsg_len, nlh->nlmsg_type, nlh->nlmsg_flags,
(long)nlh->nlmsg_seq, (long)nlh->nlmsg_pid);
- DEBUGP(KERN_WARNING "prefix : %s\n", msg.prefix);
+ DEBUGP(KERN_WARNING "prefix : %s\n", msg->prefix);
- netlink_broadcast(nl, skb, 0, 10, GFP_ATOMIC);
- return ;
+ netlink_broadcast(nl, skb, 0, IFWLOGNLGRP_DEF, GFP_ATOMIC);
+ return;
}
- nlmsg_failure:
- if (skb)
- kfree_skb(skb);
- PRINTR(KERN_WARNING "IFWLOG: Error sending netlink packet\n");
- return ;
+nlmsg_failure:
+ kfree_skb(skb);
+ PRINTR(KERN_WARNING "IFWLOG: Error sending netlink packet\n");
}
/* fill struct for userspace */
@@ -128,73 +131,76 @@ static void ipt_IFWLOG_packet(const stru
do_gettimeofday((struct timeval *)&tv);
msg.timestamp_sec = tv.tv_sec;
- send_packet(msg);
+ send_packet(&msg);
}
-static unsigned int ipt_IFWLOG_target(struct sk_buff **pskb,
- const struct net_device *in,
- const struct net_device *out,
- unsigned int hooknum,
- const void *targinfo,
- void *userinfo)
+static unsigned int ipt_IFWLOG_target(struct sk_buff *skb,
+ const struct xt_target_param *target_param)
{
- const struct ipt_IFWLOG_info *info = targinfo;
+ const struct ipt_IFWLOG_info *info = target_param->targinfo;
- ipt_IFWLOG_packet(*pskb, in, out, info);
+ ipt_IFWLOG_packet(skb, target_param->in, target_param->out, info);
return IPT_CONTINUE;
}
-static int ipt_IFWLOG_checkentry(const char *tablename,
- const struct ipt_entry *e,
- void *targinfo,
- unsigned int targinfosize,
- unsigned int hook_mask)
+static bool ipt_IFWLOG_checkentry(const struct xt_tgchk_param *tgchk_param)
{
- const struct ipt_IFWLOG_info *info = targinfo;
+ const struct ipt_IFWLOG_info *info = tgchk_param->targinfo;
if (info->prefix[sizeof(info->prefix)-1] != '\0') {
DEBUGP("IFWLOG: prefix term %i\n",
info->prefix[sizeof(info->prefix)-1]);
- return 0;
+ return false;
}
- return 1;
+ return true;
}
-static struct ipt_target ipt_IFWLOG = {
+static struct xt_target ipt_IFWLOG = {
.name = "IFWLOG",
+ .family = AF_INET,
.target = ipt_IFWLOG_target,
.targetsize = sizeof(struct ipt_IFWLOG_info),
.checkentry = ipt_IFWLOG_checkentry,
.me = THIS_MODULE,
};
-static int __init init(void)
+static int __init ipt_ifwlog_init(void)
{
- nl = (struct sock*) netlink_kernel_create(NETLINK_IFWLOG, GROUP, NULL, THIS_MODULE);
- if (!nl) {
- PRINTR(KERN_WARNING "IFWLOG: cannot create netlink socket\n");
- return -EINVAL;
- }
+ int err;
- if (ipt_register_target(&ipt_IFWLOG)) {
+ nl = netlink_kernel_create(&init_net, NETLINK_IFWLOG, IFWLOGNLGRP_MAX,
+ NULL, NULL, THIS_MODULE);
+ if (!nl) {
+ PRINTR(KERN_WARNING "IFWLOG: cannot create netlink socket\n");
+ return -ENOMEM;
+ }
+
+ err = xt_register_target(&ipt_IFWLOG);
+ if (err) {
if (nl && nl->sk_socket)
sock_release(nl->sk_socket);
- return -EINVAL;
+ return err;
}
PRINTR(KERN_INFO "IFWLOG: register target\n");
return 0;
}
-static void __exit fini(void)
+static void __exit ipt_ifwlog_fini(void)
{
if (nl && nl->sk_socket)
- sock_release(nl->sk_socket);
+ sock_release(nl->sk_socket);
PRINTR(KERN_INFO "IFWLOG: unregister target\n");
- ipt_unregister_target(&ipt_IFWLOG);
+ xt_unregister_target(&ipt_IFWLOG);
}
-module_init(init);
-module_exit(fini);
+module_init(ipt_ifwlog_init);
+module_exit(ipt_ifwlog_fini);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Samir Bellabes <sbellabes@mandriva.com>");
+MODULE_AUTHOR("Luiz Capitulino <lcapitulino@mandriva.com.br>");
+MODULE_DESCRIPTION("Interactive firewall logging and module");
+MODULE_VERSION("v1.1");
--- linux/include/uapi/linux/netfilter_ipv4/Kbuild.net-netfilter-IFWLOG-mdv.orig
+++ linux/include/uapi/linux/netfilter_ipv4/Kbuild
@@ -2,6 +2,7 @@ header-y += ip_queue.h
header-y += ip_tables.h
header-y += ipt_CLUSTERIP.h
header-y += ipt_ECN.h
+header-y += ipt_IFWLOG.h
header-y += ipt_LOG.h
header-y += ipt_REJECT.h
header-y += ipt_TTL.h
@@ -0,0 +1,269 @@
---
include/linux/netfilter_ipv4/ipt_IFWLOG.h | 26 +++
net/ipv4/netfilter/Kconfig | 11 +
net/ipv4/netfilter/Makefile | 1
net/ipv4/netfilter/ipt_IFWLOG.c | 200 ++++++++++++++++++++++++++++++
4 files changed, 238 insertions(+)
--- /dev/null
+++ b/net/ipv4/netfilter/ipt_IFWLOG.c
@@ -0,0 +1,200 @@
+/* Interactive Firewall for Mandriva
+ * Samir Bellabes <sbellabes@mandriva.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/module.h>
+#include <asm/types.h>
+#include <linux/jiffies.h>
+#include <linux/skbuff.h>
+#include <linux/ip.h>
+#include <net/icmp.h>
+#include <net/udp.h>
+#include <net/tcp.h>
+#include <net/sock.h>
+#include <linux/netlink.h>
+#include <linux/string.h>
+
+#include <linux/netfilter.h>
+#include <linux/netfilter_ipv4/ip_tables.h>
+#include <linux/netfilter_ipv4/ipt_IFWLOG.h>
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Samir Bellabes <sbellabes@mandriva.com>");
+MODULE_DESCRIPTION("Interactive firewall logging and module");
+
+#if 0
+#define DEBUGP PRINTR
+#else
+#define DEBUGP(format, args...)
+#endif
+
+#define PRINTR(format, args...) do { if(net_ratelimit()) printk(format, ##args); } while(0)
+
+static struct sock *nl;
+
+#define GROUP 10
+
+/* send struct to userspace */
+static void send_packet(struct nl_msg msg)
+{
+ struct sk_buff *skb = NULL;
+ struct nlmsghdr *nlh;
+
+ skb = alloc_skb(NLMSG_SPACE(sizeof(struct nl_msg)), GFP_ATOMIC);
+ if (!skb) {
+ PRINTR(KERN_WARNING "IFWLOG: OOM can't allocate skb\n");
+ return ;
+ }
+
+ nlh = NLMSG_PUT(skb, 0, 0, 0, sizeof(struct nl_msg) - sizeof(*nlh));
+
+ memcpy(NLMSG_DATA(nlh), (const void*)&msg, sizeof(struct nl_msg));
+
+ NETLINK_CB(skb).pid = 0; /* from kernel */
+ NETLINK_CB(skb).dst_pid = 0; /* multicast */
+ NETLINK_CB(skb).dst_group = 10;
+
+ if (nl) {
+ DEBUGP(KERN_WARNING
+ "IFWLOG: nlmsg_len=%ld\nnlmsg_type=%d nlmsg_flags=%d\nnlmsg_seq=%ld nlmsg_pid = %ld\n",
+ (long)nlh->nlmsg_len, nlh->nlmsg_type, nlh->nlmsg_flags,
+ (long)nlh->nlmsg_seq, (long)nlh->nlmsg_pid);
+ DEBUGP(KERN_WARNING "prefix : %s\n", msg.prefix);
+
+ netlink_broadcast(nl, skb, 0, 10, GFP_ATOMIC);
+ return ;
+ }
+
+ nlmsg_failure:
+ if (skb)
+ kfree_skb(skb);
+ PRINTR(KERN_WARNING "IFWLOG: Error sending netlink packet\n");
+ return ;
+}
+
+/* fill struct for userspace */
+static void ipt_IFWLOG_packet(const struct sk_buff *skb,
+ const struct net_device *in,
+ const struct net_device *out,
+ const struct ipt_IFWLOG_info *info)
+{
+ struct iphdr iph;
+ struct tcphdr tcph;
+ struct udphdr udph;
+ struct nl_msg msg;
+ struct iphdr _iph, *ih;
+ struct timeval tv;
+
+ memset(&msg, 0, sizeof(struct nl_msg));
+
+ ih = skb_header_pointer(skb, 0, sizeof(_iph), &_iph);
+ if (ih == NULL) {
+ PRINTR(KERN_WARNING "IFWLOG: skb truncated");
+ return;
+ }
+
+ /* save interface name */
+ if (in)
+ strcpy(msg.indev_name, in->name);
+ if (out)
+ strcpy(msg.outdev_name, out->name);
+
+ /* save log-prefix */
+ strcpy(msg.prefix, info->prefix);
+
+ /* save ip header */
+ skb_copy_bits(skb, 0, &iph, sizeof(iph));
+ memcpy(&msg.ip, &iph, sizeof(struct iphdr));
+
+ /* save transport header */
+ switch (iph.protocol){
+ case IPPROTO_TCP:
+ skb_copy_bits(skb, iph.ihl*4 , &tcph, sizeof(tcph));
+ memcpy(&msg.h.th, &tcph, sizeof(struct tcphdr));
+ break;
+ case IPPROTO_UDP:
+ skb_copy_bits(skb, iph.ihl*4 , &udph, sizeof(udph));
+ memcpy(&msg.h.uh, &udph, sizeof(struct udphdr));
+ break;
+ default:
+ break;
+ }
+
+ /* save timetamp */
+ do_gettimeofday((struct timeval *)&tv);
+ msg.timestamp_sec = tv.tv_sec;
+
+ send_packet(msg);
+}
+
+static unsigned int ipt_IFWLOG_target(struct sk_buff **pskb,
+ const struct net_device *in,
+ const struct net_device *out,
+ unsigned int hooknum,
+ const void *targinfo,
+ void *userinfo)
+{
+ const struct ipt_IFWLOG_info *info = targinfo;
+
+ ipt_IFWLOG_packet(*pskb, in, out, info);
+
+ return IPT_CONTINUE;
+}
+
+static int ipt_IFWLOG_checkentry(const char *tablename,
+ const struct ipt_entry *e,
+ void *targinfo,
+ unsigned int targinfosize,
+ unsigned int hook_mask)
+{
+ const struct ipt_IFWLOG_info *info = targinfo;
+
+ if (info->prefix[sizeof(info->prefix)-1] != '\0') {
+ DEBUGP("IFWLOG: prefix term %i\n",
+ info->prefix[sizeof(info->prefix)-1]);
+ return 0;
+ }
+
+ return 1;
+}
+
+static struct ipt_target ipt_IFWLOG = {
+ .name = "IFWLOG",
+ .target = ipt_IFWLOG_target,
+ .targetsize = sizeof(struct ipt_IFWLOG_info),
+ .checkentry = ipt_IFWLOG_checkentry,
+ .me = THIS_MODULE,
+};
+
+static int __init init(void)
+{
+ nl = (struct sock*) netlink_kernel_create(NETLINK_IFWLOG, GROUP, NULL, THIS_MODULE);
+ if (!nl) {
+ PRINTR(KERN_WARNING "IFWLOG: cannot create netlink socket\n");
+ return -EINVAL;
+ }
+
+ if (ipt_register_target(&ipt_IFWLOG)) {
+ if (nl && nl->sk_socket)
+ sock_release(nl->sk_socket);
+ return -EINVAL;
+ }
+
+ PRINTR(KERN_INFO "IFWLOG: register target\n");
+ return 0;
+}
+
+static void __exit fini(void)
+{
+ if (nl && nl->sk_socket)
+ sock_release(nl->sk_socket);
+ PRINTR(KERN_INFO "IFWLOG: unregister target\n");
+ ipt_unregister_target(&ipt_IFWLOG);
+}
+
+module_init(init);
+module_exit(fini);
--- a/net/ipv4/netfilter/Kconfig
+++ b/net/ipv4/netfilter/Kconfig
@@ -331,6 +331,17 @@ config IP_NF_TARGET_TTL
(e.g. when running oldconfig). It selects
CONFIG_NETFILTER_XT_TARGET_HL.
+config IP_NF_TARGET_IFWLOG
+ tristate 'IFWLOG target support'
+ depends on IP_NF_IPTABLES
+ help
+ This option adds a `IFWLOG' target, which is used by
+ Interactive Firewall for sending informations to a userspace
+ daemon
+
+ If you want to compile it as a module, say M here and read
+ Documentation/modules.txt. If unsure, say `N'.
+
# raw + specific targets
config IP_NF_RAW
tristate 'raw table support (required for NOTRACK/TRACE)'
--- /dev/null
+++ b/include/linux/netfilter_ipv4/ipt_IFWLOG.h
@@ -0,0 +1,26 @@
+#ifndef _IPT_IFWLOG_H
+#define _IPT_IFWLOG_H
+
+#ifndef NETLINK_IFWLOG
+#define NETLINK_IFWLOG 19
+#endif
+
+#define PREFSIZ 32
+
+struct nl_msg { /* Netlink message */
+ long timestamp_sec; /* time packet */
+ char indev_name[IFNAMSIZ]; /* name of the ingoing interface */
+ char outdev_name[IFNAMSIZ]; /* name of the outgoing interface */
+ unsigned char prefix[PREFSIZ]; /* informations on the logging reason */
+ struct iphdr ip;
+ union {
+ struct tcphdr th;
+ struct udphdr uh;
+ } h;
+};
+
+struct ipt_IFWLOG_info {
+ char prefix[PREFSIZ];
+};
+
+#endif /* _IPT_IFWLOG_H */
--- linux/net/ipv4/netfilter/Makefile.net-netfilter-IFWLOG.orig 2013-10-13 11:29:08.799136037 +0300
+++ linux/net/ipv4/netfilter/Makefile 2013-10-13 11:30:28.085842333 +0300
@@ -44,6 +44,7 @@ obj-$(CONFIG_IP_NF_MATCH_RPFILTER) += ip
# targets
obj-$(CONFIG_IP_NF_TARGET_CLUSTERIP) += ipt_CLUSTERIP.o
obj-$(CONFIG_IP_NF_TARGET_ECN) += ipt_ECN.o
+obj-$(CONFIG_IP_NF_TARGET_IFWLOG) += ipt_IFWLOG.o
obj-$(CONFIG_IP_NF_TARGET_MASQUERADE) += ipt_MASQUERADE.o
obj-$(CONFIG_IP_NF_TARGET_REJECT) += ipt_REJECT.o
obj-$(CONFIG_IP_NF_TARGET_SYNPROXY) += ipt_SYNPROXY.o
@@ -0,0 +1,11 @@
--- linux-2.6.35-rc6-git-mnb0.1/net/ipv4/netfilter/ipt_psd.c.orig 2010-07-30 21:17:30.000000000 +0300
+++ linux-2.6.35-rc6-git-mnb0.1/net/ipv4/netfilter/ipt_psd.c 2010-07-31 13:29:00.623601957 +0300
@@ -98,7 +98,7 @@ static inline int hashfunc(struct in_add
static bool
ipt_psd_match(const struct sk_buff *pskb,
- const struct xt_match_param *match_param)
+ struct xt_action_param *match_param)
{
struct iphdr *ip_hdr;
struct tcphdr *tcp_hdr;
@@ -0,0 +1,233 @@
ipt_psd: Mandriva changes
This patch holds all the Mandriva changes done in ipt_psd
netfilter module.
Most of the time they're just upgrades to match with new
API in the kernel.
This work is mostly done by Thomas Backlund, Herton R.
Krzesinski and Luiz Fernando N. Capitulino.
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
---
include/linux/netfilter_ipv4/Kbuild | 1
net/ipv4/netfilter/Kconfig | 8 ++
net/ipv4/netfilter/ipt_psd.c | 113 ++++++++++++++----------------------
3 files changed, 55 insertions(+), 67 deletions(-)
diff -p -up linux-2.6.28/net/ipv4/netfilter/ipt_psd.c.orig linux-2.6.28/net/ipv4/netfilter/ipt_psd.c
--- linux-2.6.28/net/ipv4/netfilter/ipt_psd.c.orig 2008-12-12 11:03:05.000000000 -0500
+++ linux-2.6.28/net/ipv4/netfilter/ipt_psd.c 2008-12-12 11:04:03.000000000 -0500
@@ -1,21 +1,24 @@
/*
- This is a module which is used for PSD (portscan detection)
- Derived from scanlogd v2.1 written by Solar Designer <solar@false.com>
- and LOG target module.
-
- Copyright (C) 2000,2001 astaro AG
-
- This file is distributed under the terms of the GNU General Public
- License (GPL). Copies of the GPL can be obtained from:
- ftp://prep.ai.mit.edu/pub/gnu/GPL
-
- 2000-05-04 Markus Hennig <hennig@astaro.de> : initial
- 2000-08-18 Dennis Koslowski <koslowski@astaro.de> : first release
- 2000-12-01 Dennis Koslowski <koslowski@astaro.de> : UDP scans detection added
- 2001-01-02 Dennis Koslowski <koslowski@astaro.de> : output modified
- 2001-02-04 Jan Rekorajski <baggins@pld.org.pl> : converted from target to match
- 2004-05-05 Martijn Lievaart <m@rtij.nl> : ported to 2.6
-*/
+ * This is a module which is used for PSD (portscan detection)
+ * Derived from scanlogd v2.1 written by Solar Designer <solar@false.com>
+ * and LOG target module.
+ *
+ * Copyright (C) 2000,2001 astaro AG
+ *
+ * This file is distributed under the terms of the GNU General Public
+ * License (GPL). Copies of the GPL can be obtained from:
+ * ftp://prep.ai.mit.edu/pub/gnu/GPL
+ *
+ * 2000-05-04 Markus Hennig <hennig@astaro.de> : initial
+ * 2000-08-18 Dennis Koslowski <koslowski@astaro.de> : first release
+ * 2000-12-01 Dennis Koslowski <koslowski@astaro.de> : UDP scans detection added
+ * 2001-01-02 Dennis Koslowski <koslowski@astaro.de> : output modified
+ * 2001-02-04 Jan Rekorajski <baggins@pld.org.pl> : converted from target to match
+ * 2004-05-05 Martijn Lievaart <m@rtij.nl> : ported to 2.6
+ * 2007-10-10 Thomas Backlund <tmb@mandriva.org>: 2.6.22 update
+ * 2007-11-14 Luiz Capitulino <lcapitulino@mandriva.com> : 2.6.22 API usage fixes
+ * 2007-11-26 Herton Ronaldo Krzesinski <herton@mandriva.com>: switch xt_match->match to bool
+ */
#include <linux/module.h>
#include <linux/skbuff.h>
@@ -54,7 +57,7 @@ struct port {
*/
struct host {
struct host *next; /* Next entry with the same hash */
- clock_t timestamp; /* Last update time */
+ unsigned long timestamp; /* Last update time */
struct in_addr src_addr; /* Source address */
struct in_addr dest_addr; /* Destination address */
unsigned short src_port; /* Source port */
@@ -93,33 +96,29 @@ static inline int hashfunc(struct in_add
return hash & (HASH_SIZE - 1);
}
-static int
+static bool
ipt_psd_match(const struct sk_buff *pskb,
- const struct net_device *in,
- const struct net_device *out,
- const void *matchinfo,
- int offset,
- int *hotdrop)
+ const struct xt_match_param *match_param)
{
struct iphdr *ip_hdr;
struct tcphdr *tcp_hdr;
struct in_addr addr;
u_int16_t src_port,dest_port;
u_int8_t tcp_flags, proto;
- clock_t now;
+ unsigned long now;
struct host *curr, *last, **head;
int hash, index, count;
/* Parameters from userspace */
- const struct ipt_psd_info *psdinfo = matchinfo;
+ const struct ipt_psd_info *psdinfo = match_param->matchinfo;
/* IP header */
- ip_hdr = pskb->nh.iph;
+ ip_hdr = ipip_hdr(pskb);
/* Sanity check */
if (ntohs(ip_hdr->frag_off) & IP_OFFSET) {
DEBUGP("PSD: sanity check failed\n");
- return 0;
+ return false;
}
/* TCP or UDP ? */
@@ -127,7 +126,7 @@ ipt_psd_match(const struct sk_buff *pskb
if (proto != IPPROTO_TCP && proto != IPPROTO_UDP) {
DEBUGP("PSD: protocol not supported\n");
- return 0;
+ return false;
}
/* Get the source address, source & destination ports, and TCP flags */
@@ -151,7 +150,7 @@ ipt_psd_match(const struct sk_buff *pskb
* them spoof us. [DHCP needs this feature - HW] */
if (!addr.s_addr) {
DEBUGP("PSD: spoofed source address (0.0.0.0)\n");
- return 0;
+ return false;
}
/* Use jiffies here not to depend on someone setting the time while we're
@@ -298,46 +297,26 @@ ipt_psd_match(const struct sk_buff *pskb
out_no_match:
spin_unlock(&state.lock);
- return 0;
+ return false;
out_match:
spin_unlock(&state.lock);
- return 1;
+ DEBUGP("PSD: Dropping packets from "NIPQUAD_FMT" \n",
+ NIPQUAD(curr->src_addr.s_addr));
+ return true;
}
-static int ipt_psd_checkentry(const char *tablename,
- const struct ipt_ip *e,
- void *matchinfo,
- unsigned int matchsize,
- unsigned int hook_mask)
-{
-/* const struct ipt_psd_info *psdinfo = targinfo;*/
-
- /* we accept TCP only */
-/* if (e->ip.proto != IPPROTO_TCP) { */
-/* DEBUGP("PSD: specified protocol may be TCP only\n"); */
-/* return 0; */
-/* } */
-
- if (matchsize != IPT_ALIGN(sizeof(struct ipt_psd_info))) {
- DEBUGP("PSD: matchsize %u != %u\n",
- matchsize,
- IPT_ALIGN(sizeof(struct ipt_psd_info)));
- return 0;
- }
-
- return 1;
-}
-
-static struct ipt_match ipt_psd_reg = {
- .name = "psd",
- .match = ipt_psd_match,
- .checkentry = ipt_psd_checkentry,
- .me = THIS_MODULE };
+static struct xt_match ipt_psd_reg = {
+ .name = "psd",
+ .family = AF_INET,
+ .match = ipt_psd_match,
+ .matchsize = sizeof(struct ipt_psd_info),
+ .me = THIS_MODULE
+};
-static int __init init(void)
+static int __init ipt_psd_init(void)
{
- if (ipt_register_match(&ipt_psd_reg))
+ if (xt_register_match(&ipt_psd_reg))
return -EINVAL;
memset(&state, 0, sizeof(state));
@@ -348,11 +327,11 @@ static int __init init(void)
return 0;
}
-static void __exit fini(void)
+static void __exit ipt_psd_fini(void)
{
- ipt_unregister_match(&ipt_psd_reg);
+ xt_unregister_match(&ipt_psd_reg);
printk("netfilter PSD unloaded - (c) astaro AG\n");
}
-module_init(init);
-module_exit(fini);
+module_init(ipt_psd_init);
+module_exit(ipt_psd_fini);
--- a/net/ipv4/netfilter/Kconfig
+++ b/net/ipv4/netfilter/Kconfig
@@ -69,6 +69,14 @@ config IP_NF_MATCH_ECN
(e.g. when running oldconfig). It selects
CONFIG_NETFILTER_XT_MATCH_ECN.
+config IP_NF_MATCH_PSD
+ tristate 'Port scanner detection support'
+ depends on NETFILTER_ADVANCED
+ help
+ Module used for PSD (portscan detection).
+
+ To compile it as a module, choose M here. If unsure, say N.
+
config IP_NF_MATCH_RPFILTER
tristate '"rpfilter" reverse path filter match support'
depends on NETFILTER_ADVANCED && (IP_NF_MANGLE || IP_NF_RAW)
--- linux/include/uapi/linux/netfilter_ipv4/Kbuild.orig
+++ linux/include/uapi/linux/netfilter_ipv4/Kbuild
@@ -8,4 +8,5 @@ header-y += ipt_REJECT.h
header-y += ipt_TTL.h
header-y += ipt_ah.h
header-y += ipt_ecn.h
+header-y += ipt_psd.h
header-y += ipt_ttl.h
@@ -0,0 +1,420 @@
---
include/linux/netfilter_ipv4/ipt_psd.h | 40 +++
net/ipv4/netfilter/Makefile | 1
net/ipv4/netfilter/ipt_psd.c | 358 +++++++++++++++++++++++++++++++++
3 files changed, 399 insertions(+)
--- /dev/null
+++ b/net/ipv4/netfilter/ipt_psd.c
@@ -0,0 +1,358 @@
+/*
+ This is a module which is used for PSD (portscan detection)
+ Derived from scanlogd v2.1 written by Solar Designer <solar@false.com>
+ and LOG target module.
+
+ Copyright (C) 2000,2001 astaro AG
+
+ This file is distributed under the terms of the GNU General Public
+ License (GPL). Copies of the GPL can be obtained from:
+ ftp://prep.ai.mit.edu/pub/gnu/GPL
+
+ 2000-05-04 Markus Hennig <hennig@astaro.de> : initial
+ 2000-08-18 Dennis Koslowski <koslowski@astaro.de> : first release
+ 2000-12-01 Dennis Koslowski <koslowski@astaro.de> : UDP scans detection added
+ 2001-01-02 Dennis Koslowski <koslowski@astaro.de> : output modified
+ 2001-02-04 Jan Rekorajski <baggins@pld.org.pl> : converted from target to match
+ 2004-05-05 Martijn Lievaart <m@rtij.nl> : ported to 2.6
+*/
+
+#include <linux/module.h>
+#include <linux/skbuff.h>
+#include <linux/ip.h>
+#include <net/tcp.h>
+#include <linux/spinlock.h>
+#include <linux/netfilter_ipv4/ip_tables.h>
+#include <linux/netfilter_ipv4/ipt_psd.h>
+
+#if 0
+#define DEBUGP printk
+#else
+#define DEBUGP(format, args...)
+#endif
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Dennis Koslowski <koslowski@astaro.com>");
+
+#define HF_DADDR_CHANGING 0x01
+#define HF_SPORT_CHANGING 0x02
+#define HF_TOS_CHANGING 0x04
+#define HF_TTL_CHANGING 0x08
+
+/*
+ * Information we keep per each target port
+ */
+struct port {
+ u_int16_t number; /* port number */
+ u_int8_t proto; /* protocol number */
+ u_int8_t and_flags; /* tcp ANDed flags */
+ u_int8_t or_flags; /* tcp ORed flags */
+};
+
+/*
+ * Information we keep per each source address.
+ */
+struct host {
+ struct host *next; /* Next entry with the same hash */
+ clock_t timestamp; /* Last update time */
+ struct in_addr src_addr; /* Source address */
+ struct in_addr dest_addr; /* Destination address */
+ unsigned short src_port; /* Source port */
+ int count; /* Number of ports in the list */
+ int weight; /* Total weight of ports in the list */
+ struct port ports[SCAN_MAX_COUNT - 1]; /* List of ports */
+ unsigned char tos; /* TOS */
+ unsigned char ttl; /* TTL */
+ unsigned char flags; /* HF_ flags bitmask */
+};
+
+/*
+ * State information.
+ */
+static struct {
+ spinlock_t lock;
+ struct host list[LIST_SIZE]; /* List of source addresses */
+ struct host *hash[HASH_SIZE]; /* Hash: pointers into the list */
+ int index; /* Oldest entry to be replaced */
+} state;
+
+/*
+ * Convert an IP address into a hash table index.
+ */
+static inline int hashfunc(struct in_addr addr)
+{
+ unsigned int value;
+ int hash;
+
+ value = addr.s_addr;
+ hash = 0;
+ do {
+ hash ^= value;
+ } while ((value >>= HASH_LOG));
+
+ return hash & (HASH_SIZE - 1);
+}
+
+static int
+ipt_psd_match(const struct sk_buff *pskb,
+ const struct net_device *in,
+ const struct net_device *out,
+ const void *matchinfo,
+ int offset,
+ int *hotdrop)
+{
+ struct iphdr *ip_hdr;
+ struct tcphdr *tcp_hdr;
+ struct in_addr addr;
+ u_int16_t src_port,dest_port;
+ u_int8_t tcp_flags, proto;
+ clock_t now;
+ struct host *curr, *last, **head;
+ int hash, index, count;
+
+ /* Parameters from userspace */
+ const struct ipt_psd_info *psdinfo = matchinfo;
+
+ /* IP header */
+ ip_hdr = pskb->nh.iph;
+
+ /* Sanity check */
+ if (ntohs(ip_hdr->frag_off) & IP_OFFSET) {
+ DEBUGP("PSD: sanity check failed\n");
+ return 0;
+ }
+
+ /* TCP or UDP ? */
+ proto = ip_hdr->protocol;
+
+ if (proto != IPPROTO_TCP && proto != IPPROTO_UDP) {
+ DEBUGP("PSD: protocol not supported\n");
+ return 0;
+ }
+
+ /* Get the source address, source & destination ports, and TCP flags */
+
+ addr.s_addr = ip_hdr->saddr;
+
+ tcp_hdr = (struct tcphdr*)((u_int32_t *)ip_hdr + ip_hdr->ihl);
+
+ /* Yep, it´s dirty */
+ src_port = tcp_hdr->source;
+ dest_port = tcp_hdr->dest;
+
+ if (proto == IPPROTO_TCP) {
+ tcp_flags = *((u_int8_t*)tcp_hdr + 13);
+ }
+ else {
+ tcp_flags = 0x00;
+ }
+
+ /* We're using IP address 0.0.0.0 for a special purpose here, so don't let
+ * them spoof us. [DHCP needs this feature - HW] */
+ if (!addr.s_addr) {
+ DEBUGP("PSD: spoofed source address (0.0.0.0)\n");
+ return 0;
+ }
+
+ /* Use jiffies here not to depend on someone setting the time while we're
+ * running; we need to be careful with possible return value overflows. */
+ now = jiffies;
+
+ spin_lock(&state.lock);
+
+ /* Do we know this source address already? */
+ count = 0;
+ last = NULL;
+ if ((curr = *(head = &state.hash[hash = hashfunc(addr)])))
+ do {
+ if (curr->src_addr.s_addr == addr.s_addr) break;
+ count++;
+ if (curr->next) last = curr;
+ } while ((curr = curr->next));
+
+ if (curr) {
+
+ /* We know this address, and the entry isn't too old. Update it. */
+ if (now - curr->timestamp <= (psdinfo->delay_threshold*HZ)/100 &&
+ time_after_eq(now, curr->timestamp)) {
+
+ /* Just update the appropriate list entry if we've seen this port already */
+ for (index = 0; index < curr->count; index++) {
+ if (curr->ports[index].number == dest_port) {
+ curr->ports[index].proto = proto;
+ curr->ports[index].and_flags &= tcp_flags;
+ curr->ports[index].or_flags |= tcp_flags;
+ goto out_no_match;
+ }
+ }
+
+ /* TCP/ACK and/or TCP/RST to a new port? This could be an outgoing connection. */
+ if (proto == IPPROTO_TCP && (tcp_hdr->ack || tcp_hdr->rst))
+ goto out_no_match;
+
+ /* Packet to a new port, and not TCP/ACK: update the timestamp */
+ curr->timestamp = now;
+
+ /* Logged this scan already? Then drop the packet. */
+ if (curr->weight >= psdinfo->weight_threshold)
+ goto out_match;
+
+ /* Specify if destination address, source port, TOS or TTL are not fixed */
+ if (curr->dest_addr.s_addr != ip_hdr->daddr)
+ curr->flags |= HF_DADDR_CHANGING;
+ if (curr->src_port != src_port)
+ curr->flags |= HF_SPORT_CHANGING;
+ if (curr->tos != ip_hdr->tos)
+ curr->flags |= HF_TOS_CHANGING;
+ if (curr->ttl != ip_hdr->ttl)
+ curr->flags |= HF_TTL_CHANGING;
+
+ /* Update the total weight */
+ curr->weight += (ntohs(dest_port) < 1024) ?
+ psdinfo->lo_ports_weight : psdinfo->hi_ports_weight;
+
+ /* Got enough destination ports to decide that this is a scan? */
+ /* Then log it and drop the packet. */
+ if (curr->weight >= psdinfo->weight_threshold)
+ goto out_match;
+
+ /* Remember the new port */
+ if (curr->count < SCAN_MAX_COUNT) {
+ curr->ports[curr->count].number = dest_port;
+ curr->ports[curr->count].proto = proto;
+ curr->ports[curr->count].and_flags = tcp_flags;
+ curr->ports[curr->count].or_flags = tcp_flags;
+ curr->count++;
+ }
+
+ goto out_no_match;
+ }
+
+ /* We know this address, but the entry is outdated. Mark it unused, and
+ * remove from the hash table. We'll allocate a new entry instead since
+ * this one might get re-used too soon. */
+ curr->src_addr.s_addr = 0;
+ if (last)
+ last->next = last->next->next;
+ else if (*head)
+ *head = (*head)->next;
+ last = NULL;
+ }
+
+ /* We don't need an ACK from a new source address */
+ if (proto == IPPROTO_TCP && tcp_hdr->ack)
+ goto out_no_match;
+
+ /* Got too many source addresses with the same hash value? Then remove the
+ * oldest one from the hash table, so that they can't take too much of our
+ * CPU time even with carefully chosen spoofed IP addresses. */
+ if (count >= HASH_MAX && last) last->next = NULL;
+
+ /* We're going to re-use the oldest list entry, so remove it from the hash
+ * table first (if it is really already in use, and isn't removed from the
+ * hash table already because of the HASH_MAX check above). */
+
+ /* First, find it */
+ if (state.list[state.index].src_addr.s_addr)
+ head = &state.hash[hashfunc(state.list[state.index].src_addr)];
+ else
+ head = &last;
+ last = NULL;
+ if ((curr = *head))
+ do {
+ if (curr == &state.list[state.index]) break;
+ last = curr;
+ } while ((curr = curr->next));
+
+ /* Then, remove it */
+ if (curr) {
+ if (last)
+ last->next = last->next->next;
+ else if (*head)
+ *head = (*head)->next;
+ }
+
+ /* Get our list entry */
+ curr = &state.list[state.index++];
+ if (state.index >= LIST_SIZE) state.index = 0;
+
+ /* Link it into the hash table */
+ head = &state.hash[hash];
+ curr->next = *head;
+ *head = curr;
+
+ /* And fill in the fields */
+ curr->timestamp = now;
+ curr->src_addr = addr;
+ curr->dest_addr.s_addr = ip_hdr->daddr;
+ curr->src_port = src_port;
+ curr->count = 1;
+ curr->weight = (ntohs(dest_port) < 1024) ?
+ psdinfo->lo_ports_weight : psdinfo->hi_ports_weight;
+ curr->ports[0].number = dest_port;
+ curr->ports[0].proto = proto;
+ curr->ports[0].and_flags = tcp_flags;
+ curr->ports[0].or_flags = tcp_flags;
+ curr->tos = ip_hdr->tos;
+ curr->ttl = ip_hdr->ttl;
+
+out_no_match:
+ spin_unlock(&state.lock);
+ return 0;
+
+out_match:
+ spin_unlock(&state.lock);
+ return 1;
+}
+
+static int ipt_psd_checkentry(const char *tablename,
+ const struct ipt_ip *e,
+ void *matchinfo,
+ unsigned int matchsize,
+ unsigned int hook_mask)
+{
+/* const struct ipt_psd_info *psdinfo = targinfo;*/
+
+ /* we accept TCP only */
+/* if (e->ip.proto != IPPROTO_TCP) { */
+/* DEBUGP("PSD: specified protocol may be TCP only\n"); */
+/* return 0; */
+/* } */
+
+ if (matchsize != IPT_ALIGN(sizeof(struct ipt_psd_info))) {
+ DEBUGP("PSD: matchsize %u != %u\n",
+ matchsize,
+ IPT_ALIGN(sizeof(struct ipt_psd_info)));
+ return 0;
+ }
+
+ return 1;
+}
+
+static struct ipt_match ipt_psd_reg = {
+ .name = "psd",
+ .match = ipt_psd_match,
+ .checkentry = ipt_psd_checkentry,
+ .me = THIS_MODULE };
+
+static int __init init(void)
+{
+ if (ipt_register_match(&ipt_psd_reg))
+ return -EINVAL;
+
+ memset(&state, 0, sizeof(state));
+
+ spin_lock_init(&(state.lock));
+
+ printk("netfilter PSD loaded - (c) astaro AG\n");
+ return 0;
+}
+
+static void __exit fini(void)
+{
+ ipt_unregister_match(&ipt_psd_reg);
+ printk("netfilter PSD unloaded - (c) astaro AG\n");
+}
+
+module_init(init);
+module_exit(fini);
--- /dev/null
+++ b/include/linux/netfilter_ipv4/ipt_psd.h
@@ -0,0 +1,40 @@
+#ifndef _IPT_PSD_H
+#define _IPT_PSD_H
+
+#include <linux/param.h>
+#include <linux/types.h>
+
+/*
+ * High port numbers have a lower weight to reduce the frequency of false
+ * positives, such as from passive mode FTP transfers.
+ */
+#define PORT_WEIGHT_PRIV 3
+#define PORT_WEIGHT_HIGH 1
+
+/*
+ * Port scan detection thresholds: at least COUNT ports need to be scanned
+ * from the same source, with no longer than DELAY ticks between ports.
+ */
+#define SCAN_MIN_COUNT 7
+#define SCAN_MAX_COUNT (SCAN_MIN_COUNT * PORT_WEIGHT_PRIV)
+#define SCAN_WEIGHT_THRESHOLD SCAN_MAX_COUNT
+#define SCAN_DELAY_THRESHOLD (300) /* old usage of HZ here was erroneously and broke under uml */
+
+/*
+ * Keep track of up to LIST_SIZE source addresses, using a hash table of
+ * HASH_SIZE entries for faster lookups, but limiting hash collisions to
+ * HASH_MAX source addresses per the same hash value.
+ */
+#define LIST_SIZE 0x100
+#define HASH_LOG 9
+#define HASH_SIZE (1 << HASH_LOG)
+#define HASH_MAX 0x10
+
+struct ipt_psd_info {
+ unsigned int weight_threshold;
+ unsigned int delay_threshold;
+ unsigned short lo_ports_weight;
+ unsigned short hi_ports_weight;
+};
+
+#endif /*_IPT_PSD_H*/
--- a/net/ipv4/netfilter/Makefile
+++ b/net/ipv4/netfilter/Makefile
@@ -49,6 +49,7 @@
# matches
obj-$(CONFIG_IP_NF_MATCH_AH) += ipt_ah.o
+obj-$(CONFIG_IP_NF_MATCH_PSD) += ipt_psd.o
obj-$(CONFIG_IP_NF_MATCH_RPFILTER) += ipt_rpfilter.o
# targets
@@ -0,0 +1,30 @@
---
drivers/net/ethernet/sis/sis190.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
--- linux/drivers/net/ethernet/sis/sis190.c.net-sis190-fix-list-usage.orig
+++ linux/drivers/net/ethernet/sis/sis190.c
@@ -1252,6 +1252,7 @@ static u16 sis190_default_phy(struct net
struct sis190_private *tp = netdev_priv(dev);
struct mii_if_info *mii_if = &tp->mii_if;
void __iomem *ioaddr = tp->mmio_addr;
+ struct list_head *l;
u16 status;
phy_home = phy_default = phy_lan = NULL;
@@ -1280,9 +1281,12 @@ static u16 sis190_default_phy(struct net
phy_default = phy_home;
else if (phy_lan)
phy_default = phy_lan;
- else
- phy_default = list_first_entry(&tp->first_phy,
- struct sis190_phy, list);
+ else {
+ l = &tp->first_phy;
+ l = l->next;
+ phy_default = list_first_entry(l, struct sis190_phy, list);
+
+ }
}
if (mii_if->phy_id != phy_default->phy_id) {
@@ -0,0 +1,28 @@
From: Alex Williamson <alex.williamson@redhat.com>
Subject: [PATCH] PCI: ACS quirks for Intel 9-series PCH root ports
Date: Fri, 01 May 2015 13:20:13 -0600
Intel confirms that 9-series chipset root ports provide ACS-equivalent
isolation when configured via the existing Intel PCH ACS quirk setup.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Acked-by: Don Dugger <donald.d.dugger@intel.com>
---
drivers/pci/quirks.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index c6dc1df..f126bd6 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -3740,6 +3740,8 @@ static const u16 pci_quirk_intel_pch_acs_ids[] = {
/* Wellsburg (X99) PCH */
0x8d10, 0x8d11, 0x8d12, 0x8d13, 0x8d14, 0x8d15, 0x8d16, 0x8d17,
0x8d18, 0x8d19, 0x8d1a, 0x8d1b, 0x8d1c, 0x8d1d, 0x8d1e,
+ /* Lynx Point (9 series) PCH */
+ 0x8c90, 0x8c92, 0x8c94, 0x8c96, 0x8c98, 0x8c9a, 0x8c9c, 0x8c9e,
};
static bool pci_quirk_intel_pch_acs_match(struct pci_dev *dev)
@@ -0,0 +1,60 @@
PCI: Add ALI M5229 comaptibility mode quirk
The libata driver will not work with an M5229 set into native IDE
mode (the old drivers/pci one does) if the M5229 does not provide
it's own IRQ.
The M5229 implementation embedded into the ALI M1543 uses the
M1543's ISA PIC to provide the interrupts and thus does not have
an valid PCI IRQ set. This quirk detects the abscence of IRQ and
sets the M5229 back into compatibility mode to use IRQs 14 and 15
so that libata works correctly.
Note, I belive that the check for an valid interrupt line is
correct, I only have an M5229 in an ALI M1543 to check this
on. It would be useful to confirm that a M5229 with an valid IRQ
does not trigger this quirk.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
---
drivers/pci/quirks.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -964,6 +964,34 @@ static void __devinit quirk_svwks_csb5id
}
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5IDE, quirk_svwks_csb5ide);
+/* Some systems set the ALI M5229 in the ALI M1543 bridge to native mode,
+ * which cannot be supported by the pata_ali.c driver (the old drivers/ide
+ * makes a compatibility effort to change the IDE interrupts).
+ */
+static void __devinit quirk_ali_ide_compatibility(struct pci_dev *pdev)
+{
+ u8 tmp;
+
+ /* pdev->irq and pdev->pin have yet to be initialised, so check
+ * by reading from the configuration header to see if we've got
+ * a valid interrupt line. */
+
+ pci_read_config_byte(pdev, PCI_INTERRUPT_LINE, &tmp);
+ if (tmp != 0xff)
+ return;
+
+ pci_read_config_byte(pdev, PCI_CLASS_PROG, &tmp);
+ if (tmp & 0x5) {
+ dev_info(&pdev->dev, "quirk: changing to IDE compatibility mode\n");
+
+ tmp &= ~0x05;
+ pdev->class &= ~0x05;
+ pci_write_config_byte(pdev, PCI_CLASS_PROG, tmp);
+ }
+}
+
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M5229, quirk_ali_ide_compatibility);
+
/*
* Intel 82801CAM ICH3-M datasheet says IDE modes must be the same
*/
@@ -0,0 +1,11 @@
--- ./drivers/pci/quirks.c.orig 2013-01-16 18:13:57.000000000 +0200
+++ ./drivers/pci/quirks.c 2013-01-16 18:42:24.331008402 +0200
@@ -1083,7 +1083,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SE
* which cannot be supported by the pata_ali.c driver (the old drivers/ide
* makes a compatibility effort to change the IDE interrupts).
*/
-static void __devinit quirk_ali_ide_compatibility(struct pci_dev *pdev)
+static void quirk_ali_ide_compatibility(struct pci_dev *pdev)
{
u8 tmp;
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,38 @@
--- ./drivers/platform/x86/shuttle-wmi.c.orig 2013-01-16 18:13:57.000000000 +0200
+++ ./drivers/platform/x86/shuttle-wmi.c 2013-01-16 18:41:13.676433242 +0200
@@ -294,7 +294,7 @@ static struct dmi_system_id shuttle_dmi_
{}
};
-static struct dmi_system_id __devinitdata shuttle_quirk_bl_dmi_ids[] = {
+static struct dmi_system_id shuttle_quirk_bl_dmi_ids[] = {
{
.ident = "Positivo M13",
.matches = {
@@ -1105,7 +1105,7 @@ fn_init_err:
return rc;
}
-static int __devinit shuttle_wmi_probe(struct platform_device *pdev)
+static int shuttle_wmi_probe(struct platform_device *pdev)
{
struct shuttle_wmi *priv;
int rc, i;
@@ -1181,7 +1181,7 @@ err_debugfs:
return rc;
}
-static int __devexit shuttle_wmi_remove(struct platform_device *pdev)
+static int shuttle_wmi_remove(struct platform_device *pdev)
{
struct shuttle_wmi *priv = platform_get_drvdata(pdev);
@@ -1211,7 +1211,7 @@ static struct platform_driver shuttle_wm
.pm = &shuttle_wmi_pm_ops,
},
.probe = shuttle_wmi_probe,
- .remove = __devexit_p(shuttle_wmi_remove),
+ .remove = shuttle_wmi_remove,
};
static struct platform_device *shuttle_wmi_device;
@@ -0,0 +1,74 @@
SCSI: Fix NULL pointer dereference in RTPM of block layer
The routines in scsi_pm.c assume that if a runtime-PM callback is
invoked for a SCSI device, it can only mean that the device's driver
has asked the block layer to handle the runtime power management (by
calling blk_pm_runtime_init(), which among other things sets q->dev).
However, this assumption turns out to be wrong for things like the ses
driver. Normally ses devices are not allowed to do runtime PM, but
userspace can override this setting. If this happens, the kernel gets
a NULL pointer dereference when blk_post_runtime_resume() tries to use
the uninitialized q->dev pointer.
This patch fixes the problem by checking q->dev in block layer before
handle runtime PM. Since ses doesn't define any PM callbacks and call
blk_pm_runtime_init(), the crash won't occur.
This fixes Bugzilla #101371.
https://bugzilla.kernel.org/show_bug.cgi?id=101371
Signed-off-by: Ken Xue <Ken.Xue@amd.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable@vger.kernel.org
---
block/blk-core.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/block/blk-core.c b/block/blk-core.c
index 60912e9..a07ab18 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -3280,6 +3280,9 @@ int blk_pre_runtime_suspend(struct request_queue *q)
{
int ret = 0;
+ if (!q->dev)
+ return ret;
+
spin_lock_irq(q->queue_lock);
if (q->nr_pending) {
ret = -EBUSY;
@@ -3307,6 +3310,9 @@ EXPORT_SYMBOL(blk_pre_runtime_suspend);
*/
void blk_post_runtime_suspend(struct request_queue *q, int err)
{
+ if (!q->dev)
+ return;
+
spin_lock_irq(q->queue_lock);
if (!err) {
q->rpm_status = RPM_SUSPENDED;
@@ -3331,6 +3337,9 @@ EXPORT_SYMBOL(blk_post_runtime_suspend);
*/
void blk_pre_runtime_resume(struct request_queue *q)
{
+ if (!q->dev)
+ return;
+
spin_lock_irq(q->queue_lock);
q->rpm_status = RPM_RESUMING;
spin_unlock_irq(q->queue_lock);
@@ -3353,6 +3362,9 @@ EXPORT_SYMBOL(blk_pre_runtime_resume);
*/
void blk_post_runtime_resume(struct request_queue *q, int err)
{
+ if (!q->dev)
+ return;
+
spin_lock_irq(q->queue_lock);
if (!err) {
q->rpm_status = RPM_ACTIVE;
--
1.9.1
@@ -0,0 +1,64 @@
Revert "SCSI: Fix NULL pointer dereference in runtime PM"
This reverts commit 49718f0fb8c9 ("SCSI: Fix NULL pointer dereference in
runtime PM")
The old commit may lead to a issue that blk_{pre|post}_runtime_suspend and
blk_{pre|post}_runtime_resume can not be called in pairs.
Take sr device as example, when sr device goes to runtime suspend,
blk_{pre|post}_runtime_suspend will be called since sr device defined
pm->runtime_suspend. But blk_{pre|post}_runtime_resume will not be called
since sr device doesn't have pm->runtime_resume. Then sr device can not
resume correctly anymore.
Signed-off-by: Ken Xue <Ken.Xue@amd.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable@vger.kernel.org
---
drivers/scsi/scsi_pm.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/scsi/scsi_pm.c b/drivers/scsi/scsi_pm.c
index e4b7998..459abe1 100644
--- a/drivers/scsi/scsi_pm.c
+++ b/drivers/scsi/scsi_pm.c
@@ -219,13 +219,13 @@ static int sdev_runtime_suspend(struct device *dev)
struct scsi_device *sdev = to_scsi_device(dev);
int err = 0;
- if (pm && pm->runtime_suspend) {
- err = blk_pre_runtime_suspend(sdev->request_queue);
- if (err)
- return err;
+ err = blk_pre_runtime_suspend(sdev->request_queue);
+ if (err)
+ return err;
+ if (pm && pm->runtime_suspend)
err = pm->runtime_suspend(dev);
- blk_post_runtime_suspend(sdev->request_queue, err);
- }
+ blk_post_runtime_suspend(sdev->request_queue, err);
+
return err;
}
@@ -248,11 +248,11 @@ static int sdev_runtime_resume(struct device *dev)
const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
int err = 0;
- if (pm && pm->runtime_resume) {
- blk_pre_runtime_resume(sdev->request_queue);
+ blk_pre_runtime_resume(sdev->request_queue);
+ if (pm && pm->runtime_resume)
err = pm->runtime_resume(dev);
- blk_post_runtime_resume(sdev->request_queue, err);
- }
+ blk_post_runtime_resume(sdev->request_queue, err);
+
return err;
}
--
1.9.1
@@ -0,0 +1,15 @@
---
drivers/scsi/megaraid/megaraid_mbox.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-3.8-rc3-mga0.1/drivers/scsi/megaraid/megaraid_mbox.c.scsi-megaraid-new-sysfs-name.orig 2013-01-10 08:17:11.000000000 +0200
+++ linux-3.8-rc3-mga0.1/drivers/scsi/megaraid/megaraid_mbox.c 2013-01-10 08:30:19.908301909 +0200
@@ -302,7 +302,7 @@ MODULE_DEVICE_TABLE(pci, pci_id_table_g)
static struct pci_driver megaraid_pci_driver = {
- .name = "megaraid",
+ .name = "megaraid_mbox",
.id_table = pci_id_table_g,
.probe = megaraid_probe_one,
.remove = megaraid_detach_one,
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,19 @@
fix build with 3.0
Signed-off-by: Thomas Backlund <tmb@mageia.org>
drivers/scsi/ppscsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/scsi/ppscsi.c.orig 2011-07-15 02:37:27.000000000 +0300
+++ a/drivers/scsi/ppscsi.c 2011-07-15 13:44:29.514928985 +0300
@@ -72,7 +72,7 @@
#define PPSC_DEF_NICE 0
#define PPSC_INITIATOR 7
-spinlock_t ppsc_spinlock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(ppsc_spinlock);
static char ppsc_bulk_map[256];
@@ -0,0 +1,31 @@
Fix for https://qa.mandriva.com/show_bug.cgi?id=45393
cmnd field of struct scsi_cmnd changed after commit "[SCSI] Let
scsi_cmnd->cmnd use request->cmd buffer"
(64a87b244b9297667ca80264aab849a36f494884)
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
---
drivers/scsi/ppscsi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/scsi/ppscsi.c
+++ b/drivers/scsi/ppscsi.c
@@ -1009,7 +1009,6 @@ int ppsc_biosparam (struct scsi_device *
static int ppsc_inquire (PHA *pha, int target, char *buf)
{
char inq[6] = {0x12,0,0,0,36,0};
- int i;
struct scsi_cmnd cmd;
struct scsi_device dev;
@@ -1017,7 +1016,7 @@ static int ppsc_inquire (PHA *pha, int t
dev.id = target;
cmd.device = &dev;
cmd.cmd_len = 6;
- for (i=0;i<6;i++) cmd.cmnd[i] = inq[i];
+ cmd.cmnd = inq;
cmd.sdb.table.nents = 0;
cmd.sdb.table.sgl = (void *) buf;
cmd.sdb.length = 36;
@@ -0,0 +1,36 @@
Update ppscsi for 2.6.24 changes.
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
---
drivers/scsi/ppscsi.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/drivers/scsi/ppscsi.c
+++ b/drivers/scsi/ppscsi.c
@@ -58,6 +58,7 @@
#include <linux/spinlock.h>
#include <linux/ioport.h>
#include <linux/workqueue.h>
+#include <linux/scatterlist.h>
#include <linux/parport.h>
@@ -484,7 +485,7 @@ static void ppsc_update_sg (PHA *pha)
if ((!pha->cur_len) && pha->sg_count) {
pha->sg_count--;
pha->sg_list++;
- pha->cur_buf = page_address(pha->sg_list->page) + pha->sg_list->offset;
+ pha->cur_buf = sg_virt(pha->sg_list);
pha->cur_len = pha->sg_list->length;
}
}
@@ -571,7 +572,7 @@ static void ppsc_engine (PHA *pha)
pha->sg_count--;
pha->sg_list =
(struct scatterlist *)pha->cur_cmd->request_buffer;
- pha->cur_buf = page_address(pha->sg_list->page) + pha->sg_list->offset;
+ pha->cur_buf = sg_virt(pha->sg_list);
pha->cur_len = pha->sg_list->length;
} else {
pha->cur_buf = pha->cur_cmd->request_buffer;
@@ -0,0 +1,88 @@
Update ppscsi for "[SCSI] implement scsi_data_buffer" change on Linux 2.6.25
(commit 30b0c37b27485a9cb897bfe3824f6f517b8c80d6)
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
---
drivers/scsi/ppscsi.c | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
--- a/drivers/scsi/ppscsi.c
+++ b/drivers/scsi/ppscsi.c
@@ -424,16 +424,16 @@ static void ppsc_start (PHA *pha)
bf &= (!((1<<pha->cur_cmd->device->id) & pha->slow_targets));
- r = pha->cur_cmd->use_sg;
+ r = scsi_sg_count(pha->cur_cmd);
if (r) {
b = 0;
- p = (struct scatterlist *)pha->cur_cmd->request_buffer;
+ p = scsi_sglist(pha->cur_cmd);
for (k=0;k<r;k++) {
b += p->length;
p++;
}
} else {
- b = pha->cur_cmd->request_bufflen;
+ b = scsi_bufflen(pha->cur_cmd);
}
bf &= (b > 127);
@@ -567,16 +567,16 @@ static void ppsc_engine (PHA *pha)
pha->data_dir = phase & PPSC_IO;
pha->data_count = 0;
- pha->sg_count = pha->cur_cmd->use_sg;
+ pha->sg_count = scsi_sg_count(pha->cur_cmd);
if (pha->sg_count) {
pha->sg_count--;
- pha->sg_list =
- (struct scatterlist *)pha->cur_cmd->request_buffer;
+ pha->sg_list = scsi_sglist(pha->cur_cmd);
pha->cur_buf = sg_virt(pha->sg_list);
pha->cur_len = pha->sg_list->length;
} else {
- pha->cur_buf = pha->cur_cmd->request_buffer;
- pha->cur_len = pha->cur_cmd->request_bufflen;
+ pha->cur_buf =
+ (char *)pha->cur_cmd->sdb.table.sgl;
+ pha->cur_len = scsi_bufflen(pha->cur_cmd);
}
pha->last_phase = phase;
@@ -622,7 +622,7 @@ static void ppsc_engine (PHA *pha)
if (pha->cur_cmd->cmnd[0] == REQUEST_SENSE) {
- sb = (char *)pha->cur_cmd->request_buffer;
+ sb = (char *)pha->cur_cmd->sdb.table.sgl;
printk("%s: Sense key: %x ASC: %x ASCQ: %x\n",
pha->device, sb[2] & 0xff,
sb[12] & 0xff, sb[13] & 0xff);
@@ -819,9 +819,9 @@ static void ppsc_cleanup (PHA *pha)
cmd->cmnd[4] = sizeof(cmd->sense_buffer);
cmd->cmnd[5] = 0;
cmd->cmd_len = 6;
- cmd->use_sg = 0;
- cmd->request_buffer = (char *) cmd->sense_buffer;
- cmd->request_bufflen = sizeof(cmd->sense_buffer);
+ cmd->sdb.table.nents = 0;
+ cmd->sdb.table.sgl = (void *) cmd->sense_buffer;
+ cmd->sdb.length = sizeof(cmd->sense_buffer);
pha->cur_cmd = cmd;
ppsc_do_claimed(pha,ppsc_start);
@@ -1018,9 +1018,9 @@ static int ppsc_inquire (PHA *pha, int t
cmd.device = &dev;
cmd.cmd_len = 6;
for (i=0;i<6;i++) cmd.cmnd[i] = inq[i];
- cmd.use_sg = 0;
- cmd.request_buffer = buf;
- cmd.request_bufflen = 36;
+ cmd.sdb.table.nents = 0;
+ cmd.sdb.table.sgl = (void *) buf;
+ cmd.sdb.length = 36;
return ppsc_command(&cmd);
}
@@ -0,0 +1,226 @@
---
drivers/scsi/Makefile | 2 +-
drivers/scsi/ppscsi.c | 22 ++++++++++++----------
drivers/scsi/ppscsi.h | 34 ++++++++++++++++++----------------
drivers/scsi/sparcsi.c | 6 +++---
4 files changed, 34 insertions(+), 30 deletions(-)
--- a/drivers/scsi/ppscsi.c
+++ b/drivers/scsi/ppscsi.c
@@ -57,6 +57,7 @@
#include <linux/string.h>
#include <linux/spinlock.h>
#include <linux/ioport.h>
+#include <linux/workqueue.h>
#include <linux/parport.h>
@@ -95,7 +96,8 @@ static void ppsc_attach (struct parport
return;
}
- add->port = parport_get_port (port);
+ atomic_inc(&port->ref_count);
+ add->port = port;
add->next = ppsc_port_list;
wmb ();
ppsc_port_list = add;
@@ -187,11 +189,11 @@ static void ppsc_set_intr (PHA *pha, voi
spin_unlock_irqrestore(&ppsc_spinlock,flags);
}
-static void ppsc_tq_int (void *data)
+static void ppsc_tq_int (struct work_struct *work)
{
void (*con)(PHA *);
unsigned long flags;
- PHA *pha = (PHA *)data;
+ PHA *pha = container_of(work, PHA, wq);
spin_lock_irqsave(&ppsc_spinlock,flags);
@@ -377,7 +379,7 @@ int ppsc_command (struct scsi_cmnd *cmd)
ppsc_do_claimed(pha,ppsc_start);
- while (pha->cur_cmd) scsi_sleep(1);
+ while (pha->cur_cmd) ssleep(1);
return cmd->result;
}
@@ -886,7 +888,7 @@ static void ppsc_reset_pha (PHA *pha)
ppsc_claim(pha);
pha->proto->connect(pha);
pha->proto->reset_bus(pha);
- scsi_sleep(4*HZ);
+ ssleep(4*HZ);
pha->proto->disconnect(pha);
ppsc_unclaim(pha);
@@ -905,7 +907,7 @@ int ppsc_reset (struct scsi_cmnd * cmd)
pha->abort_flag = PPSC_DO_RESET;
while (pha->cur_cmd && (k < PPSC_RESET_TMO)) {
- scsi_sleep(HZ/10);
+ ssleep(HZ/10);
k += HZ/10;
}
@@ -992,11 +994,11 @@ int ppsc_biosparam (struct scsi_device *
{
ip[0] = 0x40;
ip[1] = 0x20;
- ip[2] = (capacity +1) / (ip[0] * ip[1]);
+ ip[2] = (unsigned int)(capacity +1) >> 11;
if (ip[2] > 1024) {
ip[0] = 0xff;
ip[1] = 0x3f;
- ip[2] = (capacity +1) / (ip[0] * ip[1]);
+ ip[2] = (unsigned int)(capacity +1) / (0xff * 0x3f);
if (ip[2] > 1023)
ip[2] = 1023;
}
@@ -1084,7 +1086,7 @@ int ppsc_release_pha (PHA *pha)
}
-int ppsc_detect (PSP *proto, Scsi_Host_Template *tpnt, int verbose)
+int ppsc_detect (PSP *proto, struct scsi_host_template *tpnt, int verbose)
{
int i, m, p, d, n, s, z;
struct ppsc_port_list_struct *next_port = NULL; /* shut gcc up */
@@ -1146,7 +1148,7 @@ int ppsc_detect (PSP *proto, Scsi_Host_T
pha->device[p+1] = '0' + i;
pha->device[p+2] = 0;
- INIT_WORK(&pha->wq, ppsc_tq_int, pha);
+ INIT_WORK(&pha->wq, ppsc_tq_int);
init_timer (&pha->timer);
pha->timer.data = (unsigned long) pha;
--- a/drivers/scsi/sparcsi.c
+++ b/drivers/scsi/sparcsi.c
@@ -165,7 +165,7 @@ static int sparcsi_test_proto (PHA *pha)
WR(1,0x80); udelay(60);
WR(1,0);
- scsi_sleep(5*HZ);
+ ssleep(5*HZ);
pha->private[0] = 1;
}
@@ -363,14 +363,14 @@ static struct ppsc_protocol sparcsi_psp
sparcsi_reset_bus
};
-int sparcsi_detect (Scsi_Host_Template *tpnt)
+int sparcsi_detect (struct scsi_host_template *tpnt)
{
return ppsc_detect( &sparcsi_psp, tpnt, verbose);
}
#ifdef MODULE
-Scsi_Host_Template driver_template = PPSC_TEMPLATE(sparcsi);
+struct scsi_host_template driver_template = PPSC_TEMPLATE(sparcsi);
#include "scsi_module.c"
--- a/drivers/scsi/ppscsi.h
+++ b/drivers/scsi/ppscsi.h
@@ -13,14 +13,16 @@
#define PPSC_H_VERSION "0.92"
#include <linux/module.h>
-#include <linux/config.h>
+#include <linux/version.h>
#include <linux/stddef.h>
#include <linux/types.h>
#include <asm/io.h>
#include <linux/blkdev.h>
-#include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi.h>
+#include <scsi/scsi_host.h>
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_device.h>
/* ppscsi global functions */
@@ -40,31 +42,31 @@ extern int ppsc_release(struct Scsi_Host
/* imports for hosts.c */
#ifdef CONFIG_PPSCSI_T348
-extern int t348_detect( Scsi_Host_Template *);
+extern int t348_detect( struct scsi_host_template *);
#endif
#ifdef CONFIG_PPSCSI_T358
-extern int t358_detect( Scsi_Host_Template *);
+extern int t358_detect( struct scsi_host_template *);
#endif
#ifdef CONFIG_PPSCSI_ONSCSI
-extern int onscsi_detect( Scsi_Host_Template *);
+extern int onscsi_detect( struct scsi_host_template *);
#endif
#ifdef CONFIG_PPSCSI_EPST
-extern int epst_detect( Scsi_Host_Template *);
+extern int epst_detect( struct scsi_host_template *);
#endif
#ifdef CONFIG_PPSCSI_EPSA2
-extern int epsa2_detect( Scsi_Host_Template *);
+extern int epsa2_detect( struct scsi_host_template *);
#endif
#ifdef CONFIG_PPSCSI_VPI0
-extern int vpi0_detect( Scsi_Host_Template *);
+extern int vpi0_detect( struct scsi_host_template *);
#endif
#ifdef CONFIG_PPSCSI_SPARCSI
-extern int sparcsi_detect( Scsi_Host_Template *);
+extern int sparcsi_detect( struct scsi_host_template *);
#endif
#endif
@@ -303,7 +305,7 @@ struct ppsc_protocol {
typedef struct ppsc_protocol PSP;
-extern int ppsc_detect( PSP *, Scsi_Host_Template *, int);
+extern int ppsc_detect( PSP *, struct scsi_host_template *, int);
#ifdef PPSC_HA_MODULE
@@ -322,11 +324,11 @@ static STT stt[4] = { {"host0",8,host0},
{"host3",8,host3} };
#endif
-MODULE_PARM(host0,"1-8i");
-MODULE_PARM(host1,"1-8i");
-MODULE_PARM(host2,"1-8i");
-MODULE_PARM(host3,"1-8i");
-MODULE_PARM(verbose,"i");
+module_param_array(host0, int, NULL, 0);
+module_param_array(host1, int, NULL, 0);
+module_param_array(host2, int, NULL, 0);
+module_param_array(host3, int, NULL, 0);
+module_param(verbose, int, 0);
static struct ppsc_host_adapter host_structs[4];
--- a/drivers/scsi/Makefile
+++ b/drivers/scsi/Makefile
@@ -136,7 +136,7 @@ obj-$(CONFIG_PPSCSI_ONSCSI) += onscsi.o
obj-$(CONFIG_PPSCSI_EPSA2) += epsa2.o
obj-$(CONFIG_PPSCSI_EPST) += epst.o
obj-$(CONFIG_PPSCSI_VPI0) += vpi0.o
-obj-$(CONFIG_PPSCSI_VPI2) += vpi2.o
+obj-n += vpi2.o
obj-$(CONFIG_PPSCSI_SPARCSI) += sparcsi.o
obj-$(CONFIG_CHR_DEV_ST) += st.o
@@ -0,0 +1,411 @@
#
# Mageia kernel series file
#
# This file describes the order in which patches should be applied
# in the kernel and why the patch is needed.
#
# Luiz Fernando N. Capitulino
# <lcapitulino@mandriva.com.br>
###
### Upstream git
###
###
### Stable Queue
###
stable-x86-ldt-make-modify_ldt-synchronous.patch
stable-x86-ldt-correct-ldt-access-in-single-stepping-logic.patch
stable-x86-ldt-correct-fpu-emulation-access-to-ldt.patch
stable-x86-ldt-further-fix-fpu-emulation.patch
stable-drm-radeon-don-t-link-train-displayport-on-hpd-until-we-get-the-dpcd.patch
stable-drm-i915-apply-the-pci_d0-d3-hibernation-workaround-everywhere-on-pre-gen6.patch
stable-drm-i915-check-dp-link-status-on-long-hpd-too.patch
stable-drm-radeon-atom-send-out-the-full-aux-address.patch
stable-drm-radeon-native-send-out-the-full-aux-address.patch
stable-drm-radeon-fix-hdmi-quantization_range-for-pre-dce5-asics.patch
stable-drm-i915-preserve-ssc-earlier.patch
stable-drm-qxl-validate-monitors-config-modes.patch
stable-drm-i915-allow-dsi-dual-link-to-be-configured-on-any-pipe.patch
stable-drm-i915-always-mark-the-object-as-dirty-when-used-by-the-gpu.patch
stable-drm-i915-limit-the-number-of-loops-for-reading-a-split-64bit-register.patch
stable-s390-sclp-fix-compile-error.patch
stable-s390-setup-fix-novx-parameter.patch
stable-iio-bmg160-iio_buffer-and-iio_triggered_buffer-are-required.patch
stable-iio-event-remove-negative-error-code-from-iio_event_poll.patch
stable-iio-industrialio-buffer-fix-iio_buffer_poll-return-value.patch
stable-iio-adis16400-fix-adis16448-gyroscope-scale.patch
stable-iio-add-inverse-unit-conversion-macros.patch
stable-iio-adis16480-fix-scale-factors.patch
stable-sched-fix-cpu_active_mask-cpu_online_mask-race.patch
stable-staging-comedi-adl_pci7x3x-fix-digital-output-on-pci-7230.patch
stable-staging-comedi-usbduxsigma-don-t-clobber-ai_timer-in-command-test.patch
stable-staging-comedi-usbduxsigma-don-t-clobber-ao_timer-in-command-test.patch
stable-pm-clk-don-t-return-int-on-__pm_clk_enable.patch
stable-clk-rockchip-rk3288-add-clk_set_rate_parent-to-sclk_mac.patch
stable-clk-exynos4-fix-wrong-clock-for-exynos4x12-adc.patch
stable-clk-s5pv210-add-missing-call-to.patch
stable-clk-pistachio-fix-override-of-clk-pll-settings-from-boot-loader.patch
stable-clk-pistachio-correct-critical-clock-list.patch
stable-clk-versatile-off-by-one-in-clk_sp810_timerclken_of_get.patch
stable-clk-pxa-fix-core-frequency-reporting-unit.patch
stable-clk-qcom-set-clk_set_rate_parent-on-ce1-clocks.patch
stable-clk-qcom-fix-msm8916-prng-clock-enable-bit.patch
stable-pci-fix-ti816x-class-code-quirk.patch
stable-pci-add-dev_flags-bit-to-access-vpd-through-function-0.patch
stable-pci-add-vpd-function-0-quirk-for-intel-ethernet-devices.patch
stable-pci-disable-async-suspend-resume-for-jmicron-multi-function-sata-ahci.patch
stable-spi-bcm2835-set-up-spi-mode-before-asserting-cs-gpio.patch
stable-spi-fix-regression-in-spi-bitbang-txrx.h.patch
stable-spi-sh-msiof-fix-fifo-size-to-64-word-from-256-word.patch
stable-spi-img-spfi-check-for-timeout-error-before-proceeding.patch
stable-spi-img-spfi-fix-multiple-calls-to-request-gpio.patch
stable-spi-img-spfi-fix-kbuild-test-robot-warning.patch
stable-spi-dw-allow-interface-drivers-to-limit-data-i-o-to-word-sizes.patch
stable-usb-symbolserial-use-usb_get_serial_port_data.patch
stable-usb-qcserial-add-hp-lt4111-lte-ev-do-hspa-gobi-4g-module.patch
stable-usb-ftdi_sio-added-custom-pid-for-customware-products.patch
stable-usb-pl2303-fix-baud-rate-divisor-calculations.patch
stable-libxfs-readahead-of-dir3-data-blocks-should-use-the-read-verifier.patch
stable-xfs-fix-xfs_attr_leafblock-definition.patch
stable-xfs-fix-file-type-directory-corruption-for-btree-directories.patch
stable-usb-gadget-m66592-udc-forever-loop-in-set_feature.patch
stable-doc-usb-gadget-testing-using-the-updated-testusb.c.patch
stable-usb-dwc3-ep0-fix-mem-corruption-on-out-transfers-of-more-than-512-bytes.patch
stable-usb-gadget-f_uac2-finalize-wmaxpacketsize-according-to-bandwidth.patch
stable-usb-host-ehci-sys-delete-useless-bus_to_hcd-conversion.patch
stable-tty-serial-men_z135_uart.c-fix-race-between-irq-and-set_termios.patch
stable-asoc-rt5640-fix-line-out-no-sound-issue.patch
stable-asoc-samsung-remove-redundant-arndale_audio_remove.patch
stable-asoc-adav80x-remove-.read_flag_mask-setting-from-adav80x_regmap_config.patch
stable-asoc-arizona-fix-gain-settings-of-fll-in-free-run-mode.patch
stable-asoc-arizona-poll-for-fll-clock-ok-rather-than-use-interrupts.patch
###
### Arch x86
###
# laptop needing pci=assign-busses (#18989, needs to be submitted upstream)
x86-pci-toshiba-equium-a60-assign-busses.patch
# If users choose a bad video mode, allow to jump to
# a working one (TTL: forever)
x86-boot-video-80x25-if-break.patch
# Allow poweroff on UP machines running SMP kernels
x86-default_poweroff_up_machines.patch
# Fix #38760, need to be revised and submitted upstream
# BROKEN: x86-cpufreq-speedstep-dothan-3.patch
# raise vmalloc to fix https://bugs.mageia.org/show_bug.cgi?id=904
x86-increase-default-minimum-vmalloc-area-by-64MB-to-192MB.patch
# slows down boot
Revert-cpufreq-pcc-Enable-autoload-of-pcc-cpufreq-fo.patch
###
### Core
###
###
### i2c
###
###
### PCI core
###
# BROKEN: pci-pciprobe-CardBusNo.patch
# http://lkml.org/lkml/2008/9/12/52
pci-add-ALI-M5229-ide-compatibility-mode-quirk.patch
pci-quirks-drop-devinit-exit.patch
# Intel ACS quirks
pci-acs-quirks-for-Intel-9-series-PCH-root-ports.patch
###
### PNP core
###
###
### ACPI
###
# CLEVO M360S acpi irq workaround
acpi-CLEVO-M360S-disable_acpi_irq.patch
# Clevo M720SR freezes with C3
acpi-processor-M720SR-limit-to-C2.patch
###
### Block
###
# epsa2 SCSI driver, don't know from where it came
scsi-ppscsi-2.6.2.patch
# epsa2 is far behind
scsi-ppscsi_fixes.patch
# Fix build of ppscsi on 2.6.24
scsi-ppscsi-sg-helper-update.patch
# Update/fix for ppscsi on 2.6.25
scsi-ppscsi-update-for-scsi_data_buffer.patch
# https://qa.mandriva.com/show_bug.cgi?id=45393
scsi-ppscsi-mdvbz45393.patch
# epsa2 3.0 buildfix
scsi-ppscsi-3.0-buildfix.patch
# Don't know know why this is needed
scsi-megaraid-new-sysfs-name.patch
# Looks like fixes from Arnaud, not sure why they're needed
ide-pci-sis5513-965.patch
mpt-vmware-fix.patch
# adds aliases to support upgrade from old dm-raid45 patch
dm-raid-aliases.patch
# disable floppy autoloading (mga #4696)
block-floppy-disable-pnp-modalias.patch
# prefer ata over ide drivers
ata-prefer-ata-drivers-over-ide-drivers-when-both-are-built.patch
# Nice SSD speedup
block-Make-CFQ-default-to-IOPS-mode-on-SSDs.patch
block-cfq-iosched-fix-the-setting-of-IOPS-mode-on-SSDs.patch
# properly fix null pointer deref introduced in 4.1.7
scsi-Revert-SCSI-Fix-NULL-pointer-dereference-in-runtime-PM.patch
scsi-Fix-NULL-pointer-dereference-in-RTPM-of-block-layer.patch
###
### File-system
###
# aufs from: http://aufs.sourceforge.net/ (mga#8314)
fs-aufs4.patch
fs-aufs4-modular.patch
# ext4
fs-Revert-ext4-remove-block_device_ejected.patch
###
### FireWire
###
# adding module aliases to ease upgrade from ieee1394
firewire-ieee1394-module-aliases.patch
###
### GPU/DRM
###
# new Q57 Host Bridge id
char-agp-intel-new-Q57-id.patch
# External mach64 drm support from git://anongit.freedesktop.org/git/mesa/drm
gpu-drm-mach64.patch
gpu-drm-mach64-fixes.patch
gpu-drm-mach64-2.6.31.patch
gpu-drm-mach64-fix-for-changed-drm_pci_alloc.patch
gpu-drm-mach64-fix-for-changed-drm_ioctl.patch
gpu-drm-mach64-2.6.36-buildfix.patch
gpu-drm-mach64-2.6.37-buildfix.patch
gpu-drm-mach64-3.0-buildfix.patch
gpu-drm-mach64-include-module.h.patch
gpu-drm-mach64-3.3-buildfix.patch
gpu-drm-mach64-3.6-buildfix.patch
gpu-drm-mach64-3.7-buildfix.patch
gpu-drm-mach64-3.12-buildfix.patch
gpu-drm-mach64-restore-mach64_PCI_IDS.patch
gpu-drm-mach64-linux-3.14-buildfix.patch
gpu-drm-mach64-3.17-buildfix.patch
gpu-drm-mach64-3.18-buildfix.patch
###
### Hardware Monitoring
###
###
### Input
###
input-i8042-quirks-for-Fujitsu-Lifebook-A544-and-Lif.patch
# fixes systemd-logind killing itself
Input-evdev-do-not-report-errors-form-flush.patch
###
### idle
###
###
### Kbuild
###
###
### Media
###
###
### Misc
###
###
### MM
###
###
### Network
###
# SiS 190 fixes
net-sis190-fix-list-usage.patch
# netfilter IFWLOG support
net-netfilter-IFWLOG.patch
net-netfilter-IFWLOG-mdv.patch
net-netfilter-IFWLOG-2.6.35-buildfix.patch
net-netfilter-IFWLOG-2.6.37-buildfix.patch
net-ipv4-netfilter-ipt_IFWLOG-3.6-buildfix.patch
net-netfilter-IFWLOG-3.7-buildfix.patch
# netfilter psd support
net-netfilter-psd.patch
net-netfilter-psd-mdv.patch
net-netfilter-psd-2.6.35-buildfix.patch
###
### Platform drivers
###
# Allow access to Shuttle WMI interface controls
# (Mainly allow turning on/off webcam and wireless on Shuttle DA18IE and DA18IM)
platform-x86-add-shuttle-wmi-driver.patch
platform-x86-shuttle-wmi-drop-devinit-exit.patch
###
### RTC
###
###
### Serial
###
# Export pci_ids.h to user space, needed by ldetect
include-kbuild-export-pci_ids.patch
###
### Sound
###
###
### Staging
###
###
### TTY
###
###
### USB
###
hid-usbhid-IBM-BladeCenterHS20-quirk.patch
usb-storage-unusual_devs-add-id.patch
usb-storage-unusual_devs-add-id-2.6.37-buildfix.patch
###
### V4L
###
# pwc driver name in /proc/bus/devices, /sys fix and "advertisement" removal
media-usb-pwc-lie-in-proc-usb-devices.patch
###
### Video
###
# Mageia framebuffer boot logo
video-mageia-logo.patch
###
### 3rdparty
###
3rd-3rdparty-1.0-tree.patch
# TODO: fix up patch below to include all archs?
3rd-3rdparty-merge.patch
# acerhk
3rd-acerhk-0.5.35.patch
3rd-acerhk-kbuild.patch
3rd-acerhk-extra-cflags.patch
3rd-acerhk-proc_dir_entry-owner.patch
3rd-acerhk-fix-build-with-function-tracer.patch
3rd-acerhk-2.6.36-buildfix.patch
3rd-acerhk-fix-include.patch
# aes2501
3rd-aes2501-r19.patch
3rd-aes2501-kbuild.patch
3rd-aes2501-rmmod-oops-fix.patch
# ndiswrapper
3rd-ndiswrapper-1.59.patch
3rd-ndiswrapper-Kconfig.patch
3rd-ndiswrapper-Makefile-build-fix.patch
3rd-ndiswrapper-linux-3.14-buildfix.patch
3rd-ndiswrapper-4.0-buildfix.patch
# rfswitch
3rd-rfswitch-1.3.patch
3rd-rfswitch-build-fix.patch
3rd-rfswitch-3.0-buildfix.patch
# viahss
3rd-viahss-0.92.patch
3rd-viahss-config.patch
3rd-viahss-module-license.patch
3rd-viahss-2.6.35-buildfix.patch
3rd-viahss-3.0-buildfix.patch
# add rtl8723bs support (mga#15874)
3rd-rtl8723bs.patch
3rd-rtl8723bs-buildfix.patch
3rd-rtl8723bs-updates.patch
###
### Security
###
###
### Smack fixes
###
###
### XEN
###
###
### ARM
###
###
### IA64
###
###
### Tools
###

Some files were not shown because too many files have changed in this diff Show More