Commit b0844388 authored by Carlo Landmeter's avatar Carlo Landmeter

testing/linux-scst: move scst modules in-tree and upgrade to 2.6.35.9

parent a96c1176
--- ./kernel/conn.c.orig
+++ ./kernel/conn.c
@@ -86,7 +86,7 @@
switch (sk->sk_family) {
case AF_INET:
snprintf(buf, sizeof(buf),
- "%u.%u.%u.%u", NIPQUAD(inet_sk(sk)->daddr));
+ "%u.%u.%u.%u", NIPQUAD(inet_sk(sk)->inet_daddr));
break;
case AF_INET6:
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
# Contributor: Carlo Landmeter
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_flavor=${FLAVOR:-grsec}
_realname=iscsi-scst
# source the kernel version
if [ -f ../../main/linux-$_flavor/APKBUILD ]; then
. ../../main/linux-$_flavor/APKBUILD
fi
_kver=$pkgver
_kernelver=$pkgver-r$pkgrel
_abi_release=$pkgver-${_flavor}
_kpkgrel=$pkgrel
_realver=1.0.1.1
pkgname=${_realname}-${_flavor}
pkgver=$_kver
_mypkgrel=0
pkgrel=$(($_kpkgrel + $_mypkgrel))
pkgdesc="$_flavor ISCSI for SCST $_realver"
url="http://scst.sourceforge.net/"
arch="x86 x86_64"
license="GPL-2"
depends="linux-${_flavor}=${_kernelver}"
install=
makedepends="linux-${_flavor}-dev=${_kernelver} scst-grsec-dev"
subpackages=
source="http://downloads.sourceforge.net/scst/$_realname-$_realver.tar.gz
config.c.patch
2.6.35.patch
"
_ksrc=/usr/src/linux-headers-${_abi_release}
_builddir="$srcdir"/$_realname-$_realver
prepare() {
cd "$_builddir"
for i in "$srcdir"/*.patch; do
[ -f "$i" ] || continue
msg "Applying $i"
patch -p1 -i $i || return 1
done
# to build mods we need the headre file. fix dependency in makefile
sed -i -e 's/^\(mods: .*\)/\1 include\/iscsi_scst_itf_ver.h/' Makefile
}
build() {
cd "$_builddir"
unset ARCH
make mods \
KDIR="$_ksrc" \
SCST_INC_DIR=/usr/include/scst \
|| return 1
}
package() {
cd "$_builddir"
install -D -m 644 kernel/iscsi-scst.ko \
"$pkgdir"/lib/modules/$_abi_release/extra/iscsi-scst.ko
}
md5sums="56109c01e3d4421a36d6f47efa1fb0d5 iscsi-scst-1.0.1.1.tar.gz
48e21e3466fd819418f29e3b2487f052 config.c.patch
d2490c86d9138226ec674997817a163b 2.6.35.patch"
--- iscsi-scst/kernel/config.c 2009/05/11 17:24:51 841
+++ iscsi-scst/kernel/config.c 2009/07/08 17:27:30 938
@@ -203,7 +203,9 @@
goto out;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30)
proc_iscsi_dir->owner = THIS_MODULE;
+#endif
err = iscsi_proc_log_entry_build(&iscsi_template);
if (err < 0)
# Contributor: Carlo Landmeter
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=iscsi-scst-svn
pkgver=1713
pkgrel=0
pkgdesc="ISCSI target for SCST - userspace tools"
url="http://iscsi-scst.sourceforge.net/"
arch="x86 x86_64"
license="GPL-2"
depends=
install=
makedepends="openssl-dev scst-svn-scst-dev bash"
subpackages=
source="http://alpine.nethq.org/clandmeter/src/$pkgname-$pkgver.tar.gz
iscsi-scst.initd
"
_builddir="$srcdir"/iscsi-scst
prepare() {
cd "$_builddir"
# we need the headre file. fix dependency in makefile
sed -i -e 's/^\(progs:.*\)/\1 include\/iscsi_scst_itf_ver.h/' Makefile
}
build() {
cd "$_builddir"
make progs \
SCST_INC_DIR=/usr/include/scst
}
package() {
cd "$_builddir"
# make install is broken
install -D usr/iscsi-scstd "$pkgdir"/usr/sbin/iscsi-scstd
install -D usr/iscsi-scst-adm "$pkgdir"/usr/sbin/iscsi-scst-adm
install -D -m 755 "$srcdir"/iscsi-scst.initd "$pkgdir"/etc/init.d/iscsi-scst
}
md5sums="cf046db4f7cd9cf969b054dc055922d6 iscsi-scst-svn-1713.tar.gz
3132fae1ec2f9bcc72476d9e9f36d326 iscsi-scst.initd"
#!/sbin/runscript
#
# Start the iSCSI-SCST Target.
#
depend() {
need net
afer firewall
}
start() {
modprobe -q crc32c
modprobe -q iscsi-scst
ebegin "Starting iscsi-scstd"
start-stop-daemon --start --exec /usr/sbin/iscsi-scstd
eend 0
}
stop() {
ebegin "Stopping iscsi-scstd"
start-stop-daemon --stop --exec /usr/sbin/iscsi-scstd
eend 0
}
From 8a0e3ea4924059a7268446177d6869e3399adbb2 Mon Sep 17 00:00:00 2001
From: Timo Teras <timo.teras@iki.fi>
Date: Mon, 12 Apr 2010 13:46:45 +0000
Subject: [PATCH 04/18] arp: flush arp cache on device change
If IFF_NOARP is changed, we must flush the arp cache.
Signed-off-by: Timo Teras <timo.teras@iki.fi>
---
net/ipv4/arp.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index c95cd93..71ab56f 100644
index 4e80f33..580bfc3 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -1200,6 +1200,9 @@ static int arp_netdev_event(struct notifier_block *this, unsigned long event, vo
......@@ -12,3 +24,6 @@ index c95cd93..71ab56f 100644
default:
break;
}
--
1.7.0.2
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_flavor=scst
pkgname=linux-${_flavor}
pkgver=2.6.34
_kernver=$pkgver
pkgver=2.6.35.9
_kernver=2.6.35
pkgrel=0
pkgdesc="Linux kernel with scst"
url="http://www.kernel.org"
pkgdesc="Linux kernel optimised for scst"
url="http://scst.sourceforge.net"
depends="mkinitfs linux-firmware"
makedepends="perl installkernel"
makedepends="perl installkernel bash"
options="!strip"
_config=${config:-kernelconfig.${CARCH:-x86}}
_config=${config:-kernelconfig.${CARCH}}
install=
source="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$pkgver.tar.bz2
arp.patch
kernelconfig.x86
put_page_callback-2.6.34.patch
scst_exec_req_fifo-2.6.34.patch
"
# no need to patch now
#ftp://ftp.kernel.org/pub/linux/kernel/v2.6/patch-$pkgver.bz2
subpackages="$pkgname-dev"
arch="x86"
_scst_svn="3161"
source="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_kernver.tar.bz2
ftp://ftp.kernel.org/pub/linux/kernel/v2.6/patch-$pkgver.bz2
0004-arp-flush-arp-cache-on-device-change.patch
r8169-fix-rx-checksum-offload.patch
r8169-add-gro-support.patch
setlocalversion.patch
kernelconfig.x86_64
unionfs-2.5.7_for_2.6.35.8.patch
scst-2.6.35-svn-3161.patch
"
subpackages="$pkgname-dev linux-firmware:firmware"
arch="x86_64"
license="GPL-2"
_abi_release=${pkgver}-${_flavor}
prepare() {
cd "$srcdir"/linux-$_kernver
if [ "$_kernver" != "$pkgver" ]; then
bunzip2 -c < ../patch-$pkgver.bz2 | patch -p1 -N || return 1
fi
for i in ../*.diff ../*.patch; do
[ -f $i ] || continue
msg "Applying $i..."
patch -s -p1 -N < $i || return 1
done
mkdir -p "$srcdir"/build
cp "$srcdir"/$_config "$srcdir"/build/.config
echo "-${_flavor}" > "$srcdir"/linux-$_kernver/localversion-${_flavor}
make -C "$srcdir"/linux-$_kernver O="$srcdir"/build HOSTCC="$CC" \
silentoldconfig
local _patch_failed=
cd "$srcdir"/linux-$_kernver
if [ "$_kernver" != "$pkgver" ]; then
bunzip2 -c < ../patch-$pkgver.bz2 | patch -p1 -N || return 1
fi
# first apply patches in specified order
for i in $source; do
case $i in
*.patch)
msg "Applying $i..."
if ! patch -s -p1 -N -i "$srcdir"/$i; then
echo $i >>failed
_patch_failed=1
fi
;;
esac
done
if ! [ -z "$_patch_failed" ]; then
error "The following patches failed:"
cat failed
return 1
fi
mkdir -p "$srcdir"/build
cp "$srcdir"/$_config "$srcdir"/build/.config || return 1
make -C "$srcdir"/linux-$_kernver O="$srcdir"/build HOSTCC="${CC:-gcc}" \
silentoldconfig
}
# this is so we can do: 'abuild menuconfig' to reconfigure kernel
menuconfig() {
cd "$srcdir"/build || return 1
make menuconfig
cp .config "$startdir"/$_config
make menuconfig
cp .config "$startdir"/$_config
}
build() {
cd "$srcdir"/build
make CC="$CC" || return 1
cd "$srcdir"/build
make CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-Alpine" \
|| return 1
}
package() {
cd "$srcdir"/build
mkdir -p "$pkgdir"/boot "$pkgdir"/lib/modules
make modules_install install \
INSTALL_MOD_PATH="$pkgdir" \
INSTALL_PATH="$pkgdir"/boot
rm -f "$pkgdir"/lib/modules/${_abi_release}/build \
"$pkgdir"/lib/modules/${_abi_release}/source
rm -rf "$pkgdir"/lib/firmware
install -D include/config/kernel.release \
"$pkgdir"/usr/share/kernel/$_flavor/kernel.release
cd "$srcdir"/build
mkdir -p "$pkgdir"/boot "$pkgdir"/lib/modules
make -j1 modules_install firmware_install install \
INSTALL_MOD_PATH="$pkgdir" \
INSTALL_PATH="$pkgdir"/boot \
|| return 1
rm -f "$pkgdir"/lib/modules/${_abi_release}/build \
"$pkgdir"/lib/modules/${_abi_release}/source
install -D include/config/kernel.release \
"$pkgdir"/usr/share/kernel/$_flavor/kernel.release
}
dev() {
# copy the only the parts that we really need for build 3rd party
# kernel modules and install those as /usr/src/linux-headers,
# simlar to what ubuntu does
#
# this way you dont need to install the 300-400 kernel sources to
# build a tiny kernel module
#
pkgdesc="Headers and script for third party modules for $pkgname kernel"
local dir="$subpkgdir"/usr/src/linux-headers-${_abi_release}
# first we import config, run prepare to set up for building
# external modules, and create the scripts
mkdir -p "$dir"
cp "$srcdir"/$_config "$dir"/.config
make -j1 -C "$srcdir"/linux-$_kernver O="$dir" HOSTCC="$CC" \
silentoldconfig prepare scripts
# remove the stuff that poits to real sources. we want 3rd party
# modules to believe this is the soruces
rm "$dir"/Makefile "$dir"/source
# copy the needed stuff from real sources
#
# this is taken from ubuntu kernel build script
# http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-jaunty.git;a=blob;f=debian/rules.d/3-binary-indep.mk;hb=HEAD
cd "$srcdir"/linux-$_kernver
find . -path './include/*' -prune -o -path './scripts/*' -prune \
-o -type f \( -name 'Makefile*' -o -name 'Kconfig*' \
-o -name 'Kbuild*' -o -name '*.sh' -o -name '*.pl' \
-o -name '*.lds' \) | cpio -pdm "$dir"
cp -a drivers/media/dvb/dvb-core/*.h "$dir"/drivers/media/dvb/dvb-core
cp -a drivers/media/video/*.h "$dir"/drivers/media/video
cp -a drivers/media/dvb/frontends/*.h "$dir"/drivers/media/dvb/frontends
cp -a scripts include "$dir"
find $(find arch -name include -type d -print) -type f \
| cpio -pdm "$dir"
install -Dm644 "$srcdir"/build/Module.symvers \
"$dir"/Module.symvers
mkdir -p "$subpkgdir"/lib/modules/${_abi_release}
ln -sf /usr/src/linux-headers-${_abi_release} \
"$subpkgdir"/lib/modules/${_abi_release}/build
# copy the only the parts that we really need for build 3rd party
# kernel modules and install those as /usr/src/linux-headers,
# simlar to what ubuntu does
#
# this way you dont need to install the 300-400 kernel sources to
# build a tiny kernel module
#
pkgdesc="Headers and script for third party modules for grsec kernel"
local dir="$subpkgdir"/usr/src/linux-headers-${_abi_release}
# first we import config, run prepare to set up for building
# external modules, and create the scripts
mkdir -p "$dir"
cp "$srcdir"/$_config "$dir"/.config
make -j1 -C "$srcdir"/linux-$_kernver O="$dir" HOSTCC="${CC:-gcc}" \
silentoldconfig prepare scripts
# remove the stuff that poits to real sources. we want 3rd party
# modules to believe this is the soruces
rm "$dir"/Makefile "$dir"/source
# copy the needed stuff from real sources
#
# this is taken from ubuntu kernel build script
# http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-jaunty.git;a=blob;f=debian/rules.d/3-binary-indep.mk;hb=HEAD
cd "$srcdir"/linux-$_kernver
find . -path './include/*' -prune -o -path './scripts/*' -prune \
-o -type f \( -name 'Makefile*' -o -name 'Kconfig*' \
-o -name 'Kbuild*' -o -name '*.sh' -o -name '*.pl' \
-o -name '*.lds' \) | cpio -pdm "$dir"
cp -a drivers/media/dvb/dvb-core/*.h "$dir"/drivers/media/dvb/dvb-core
cp -a drivers/media/video/*.h "$dir"/drivers/media/video
cp -a drivers/media/dvb/frontends/*.h "$dir"/drivers/media/dvb/frontends
cp -a scripts include "$dir"
find $(find arch -name include -type d -print) -type f \
| cpio -pdm "$dir"
install -Dm644 "$srcdir"/build/Module.symvers \
"$dir"/Module.symvers
mkdir -p "$subpkgdir"/lib/modules/${_abi_release}
ln -sf /usr/src/linux-headers-${_abi_release} \
"$subpkgdir"/lib/modules/${_abi_release}/build
}
firmware() {
pkgdesc="Firmware for linux kernel"
replaces="linux-grsec linux-vserver"
mkdir -p "$subpkgdir"/lib
mv "$pkgdir"/lib/firmware "$subpkgdir"/lib/
}
md5sums="10eebcb0178fb4540e2165bfd7efc7ad linux-2.6.34.tar.bz2
4c39a161d918e7f274292ecfd168b891 arp.patch
2a08789db4977397f529a2933bc7b787 kernelconfig.x86
06e9b200ec4fe252dc1478b5f8137e9e put_page_callback-2.6.34.patch
f9ea26d08807c41407a7758ce53fc633 scst_exec_req_fifo-2.6.34.patch"
md5sums="091abeb4684ce03d1d936851618687b6 linux-2.6.35.tar.bz2
eca407cf4872ad77ae23adc8242389c4 patch-2.6.35.9.bz2
776adeeb5272093574f8836c5037dd7d 0004-arp-flush-arp-cache-on-device-change.patch
0ccecafd4123dcad0b0cd7787553d734 r8169-fix-rx-checksum-offload.patch
139b39da44ecb577275be53d7d365949 r8169-add-gro-support.patch
8c224ba0cdf0aa572c7eb50379435be4 setlocalversion.patch
8b50f527b834f693e9cfbcabf29b04f3 kernelconfig.x86_64
e4185c1bb1d88594c67eb154d0c06692 unionfs-2.5.7_for_2.6.35.8.patch
f8aa57373ab14ece95ecdaa15840fa25 scst-2.6.35-svn-3161.patch"
This diff is collapsed.
- Use napi_gro_receive() and vlan_gro_receive()
- Enable GRO by default
Tested on a RTL8111/8168 adapter
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Francois Romieu <romieu@fr.zoreil.com>
---
drivers/net/r8169.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 56a11e2..ddff42b 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -1076,7 +1076,12 @@ static int rtl8169_rx_vlan_skb(struct rtl8169_private *tp, struct RxDesc *desc,
int ret;
if (vlgrp && (opts2 & RxVlanTag)) {
- __vlan_hwaccel_rx(skb, vlgrp, swab16(opts2 & 0xffff), polling);
+ u16 vtag = swab16(opts2 & 0xffff);
+
+ if (polling)
+ vlan_gro_receive(&tp->napi, vlgrp, vtag, skb);
+ else
+ __vlan_hwaccel_rx(skb, vlgrp, vtag, polling);
ret = 0;
} else
ret = -1;
@@ -3186,6 +3191,7 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
#ifdef CONFIG_R8169_VLAN
dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
#endif
+ dev->features |= NETIF_F_GRO;
tp->intr_mask = 0xffff;
tp->align = cfg->align;
@@ -4561,7 +4567,7 @@ static int rtl8169_rx_interrupt(struct net_device *dev,
if (rtl8169_rx_vlan_skb(tp, desc, skb, polling) < 0) {
if (likely(polling))
- netif_receive_skb(skb);
+ napi_gro_receive(&tp->napi, skb);
else
netif_rx(skb);
}
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
\ No newline at end of file
From adea1ac7effbddbe60a9de6d63462bfe79289e59 Mon Sep 17 00:00:00 2001
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sun, 5 Sep 2010 20:04:05 -0700
Subject: [PATCH] r8169: fix rx checksum offload
While porting GRO to r8169, I found this driver has a bug in its rx
path.
All skbs given to network stack had their ip_summed set to
CHECKSUM_NONE, while hardware said they had correct TCP/UDP checksums.
The reason is driver sets skb->ip_summed on the original skb before the
copy eventually done by copybreak. The fresh skb gets the ip_summed =
CHECKSUM_NONE value, forcing network stack to recompute checksum, and
preventing my GRO patch to work.
Fix is to make the ip_summed setting after skb copy.
Note : rx_copybreak current value is 16383, so all frames are copied...
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
drivers/net/r8169.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 07b3fb5..56a11e2 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -4450,9 +4450,8 @@ static inline int rtl8169_fragmented_frame(u32 status)
return (status & (FirstFrag | LastFrag)) != (FirstFrag | LastFrag);
}
-static inline void rtl8169_rx_csum(struct sk_buff *skb, struct RxDesc *desc)
+static inline void rtl8169_rx_csum(struct sk_buff *skb, u32 opts1)
{
- u32 opts1 = le32_to_cpu(desc->opts1);
u32 status = opts1 & RxProtoMask;
if (((status == RxProtoTCP) && !(opts1 & TCPFail)) ||
@@ -4546,8 +4545,6 @@ static int rtl8169_rx_interrupt(struct net_device *dev,
continue;
}
- rtl8169_rx_csum(skb, desc);
-
if (rtl8169_try_rx_copy(&skb, tp, pkt_size, addr)) {
pci_dma_sync_single_for_device(pdev, addr,
pkt_size, PCI_DMA_FROMDEVICE);
@@ -4558,6 +4555,7 @@ static int rtl8169_rx_interrupt(struct net_device *dev,
tp->Rx_skbuff[entry] = NULL;
}
+ rtl8169_rx_csum(skb, status);
skb_put(skb, pkt_size);
skb->protocol = eth_type_trans(skb, dev);
--
1.7.2.3
This diff is collapsed.
This diff is collapsed.
--- ./scripts/setlocalversion.orig
+++ ./scripts/setlocalversion
@@ -43,7 +43,7 @@
fi
# Check for git and a git repo.
- if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then
+ if [ -d "$srctree"/.git ] && head=`git rev-parse --verify --short HEAD 2>/dev/null`; then
# If we are at a tagged commit (like "v2.6.30-rc6"), we ignore
# it, because this version is defined in the top level Makefile.
This diff is collapsed.
# Contributor: Carlo Landmeter
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_flavor=${FLAVOR:-grsec}
_realname=scst
# source the kernel version
if [ -f ../../main/linux-$_flavor/APKBUILD ]; then
. ../../main/linux-$_flavor/APKBUILD
fi
_kver=$pkgver
_kernelver=$pkgver-r$pkgrel
_abi_release=$pkgver-${_flavor}
_kpkgrel=$pkgrel
_realver=1.0.1.1
pkgname=${_realname}-${_flavor}
pkgver=$_kver
_mypkgrel=0
pkgrel=$(($_kpkgrel + $_mypkgrel))
pkgdesc="$_flavor kernel modules for SCST $_realver"
url="http://scst.sourceforge.net/"
arch="x86 x86_64"
license="GPL-2"
depends="linux-${_flavor}=${_kernelver}"
install=
makedepends="linux-${_flavor}-dev=${_kernelver}"
subpackages="$pkgname-dev"
source="http://downloads.sourceforge.net/$_realname/$_realname-$_realver.tar.gz
scst-kernel-2.6.32.patch
"
_ksrc=/usr/src/linux-headers-${_abi_release}
_builddir="$srcdir"/$_realname-$_realver
prepare() {
cd "$_builddir"
for i in "$srcdir"/*.patch; do
[ -f "$i" ] || continue
msg "Applying $i"
patch -p1 -i $i || return 1
done
sed -e 's:linux/autoconf.h:generated/autoconf.h:' \
-i include/scst_debug.h
}
build() {
cd "$_builddir"
unset ARCH
make KDIR="$_ksrc" || return 1
}
package() {
cd "$_builddir"
make KDIR="$_ksrc" \
INSTALL_MOD_PATH="$pkgdir" \
INSTALL_DIR_H="$pkgdir"/usr/include/scst \
install || return 1
}
# we sourced kernel apkbuild above so we need to override the dev() func
dev() {
default_dev
}
md5sums="38abb5f10325911ff1374535a30a02ad scst-1.0.1.1.tar.gz
a87b844b57f997c15c8e0099a313a98e scst-kernel-2.6.32.patch"
--- scst-1.0.1.1/src/dev_handlers/scst_vdisk.c.orig
+++ scst-1.0.1.1/src/dev_handlers/scst_vdisk.c
@@ -2071,9 +2071,13 @@
inode = file->f_dentry->d_inode;
mapping = file->f_mapping;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32)
res = sync_page_range(inode, mapping, loff, len);
+#else
+ res = filemap_write_and_wait_range(file->f_mapping, loff, len);
+#endif
if (unlikely(res != 0)) {
- PRINT_ERROR("sync_page_range() failed (%d)", res);
+ PRINT_ERROR("sync range failed (%d)", res);
if (cmd != NULL) {
scst_set_cmd_error(cmd,
SCST_LOAD_SENSE(scst_sense_write_error));
# Contributor: Carlo Landmeter
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_flavor=${FLAVOR:-scst}
_realname=scst-svn
# source the kernel version
if [ -f ../../testing/linux-$_flavor/APKBUILD ]; then
. ../../testing/linux-$_flavor/APKBUILD
fi
_kver=$pkgver
_kernelver=$pkgver-r$pkgrel
_abi_release=$pkgver-${_flavor}
_kpkgrel=$pkgrel
# We need to build iscsi together with scst because it needs some files from its builddir
_iscsiname=iscsi-scst-svn
_iscsidir="$srcdir"/iscsi-scst
_realver=1713
pkgname=${_realname}-${_flavor}
pkgver=$_kver
_mypkgrel=0
pkgrel=$(($_kpkgrel + $_mypkgrel))
pkgdesc="$_flavor kernel modules for SCST $_realver"
url="http://scst.sourceforge.net/"
arch="x86 x86_64"
license="GPL-2"
depends="linux-${_flavor}=${_kernelver}"
install=
makedepends="linux-${_flavor}-dev=${_kernelver} sed bash"
subpackages="$pkgname-dev $_iscsiname-scst:iscsi"
source="http://alpine.nethq.org/clandmeter/src/$_realname-$_realver.tar.gz
http://alpine.nethq.org/clandmeter/src/$_iscsiname-$_realver.tar.gz"
_ksrc=/usr/src/linux-headers-${_abi_release}
_builddir="$srcdir"/scst
prepare() {
# we are disabling proc and enabling sysfs control and disabling debug.
cd "$_builddir"
make disable_proc
make debug2release
cd "$_iscsidir"
make disable_proc
make debug2release
sed -i -e 's/^\(mods: .*\)/\1 include\/iscsi_scst_itf_ver.h/' Makefile
}
build() {
unset ARCH
cd "$_builddir"
make KDIR="$_ksrc" || return 1
cd "$_iscsidir"
make mods KDIR="$_ksrc" || return 1
}
package() {
cd "$_builddir"
make KDIR="$_ksrc" \
INSTALL_MOD_PATH="$pkgdir" \
INSTALL_DIR_H="$pkgdir"/usr/include/scst \
install || return 1
}
# we sourced kernel apkbuild above so we need to override the dev() func
dev()