summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorKevin McCarthy <signals@gentoo.org>2011-03-02 23:29:51 +0000
committerKevin McCarthy <signals@gentoo.org>2011-03-02 23:29:51 +0000
commit6ada3a81a4217834921c49e44ebebe245baa3982 (patch)
tree01da574de8bd89256ee70325e166c80be6e85cbc /sys-fs
parentEAPI=2; slot gtk+ dep (diff)
downloadhistorical-6ada3a81a4217834921c49e44ebebe245baa3982.tar.gz
historical-6ada3a81a4217834921c49e44ebebe245baa3982.tar.bz2
historical-6ada3a81a4217834921c49e44ebebe245baa3982.zip
Patch to fix oops on kernel >=2.6.37. Bug #350753
Package-Manager: portage-2.2.0_alpha25/cvs/Linux x86_64
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/vhba/ChangeLog10
-rw-r--r--sys-fs/vhba/Manifest4
-rw-r--r--sys-fs/vhba/files/vhba-20101015-scsi-host-lock-push-down.patch56
-rw-r--r--sys-fs/vhba/vhba-20101015-r1.ebuild60
4 files changed, 127 insertions, 3 deletions
diff --git a/sys-fs/vhba/ChangeLog b/sys-fs/vhba/ChangeLog
index 4f0b4b629040..8626c7e4cf8c 100644
--- a/sys-fs/vhba/ChangeLog
+++ b/sys-fs/vhba/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-fs/vhba
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/vhba/ChangeLog,v 1.20 2010/10/27 16:55:46 pva Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/vhba/ChangeLog,v 1.21 2011/03/02 23:29:51 signals Exp $
+
+*vhba-20101015-r1 (02 Mar 2011)
+
+ 02 Mar 2011; Kevin McCarthy <signals@gentoo.org> +vhba-20101015-r1.ebuild,
+ +files/vhba-20101015-scsi-host-lock-push-down.patch:
+ Patch to fix oops on kernel >=2.6.37. Bug #350753
27 Oct 2010; Peter Volkov <pva@gentoo.org> -vhba-1.2.1_p682.ebuild:
Drop broken version, #332961, thank nE0sIghT for tests.
diff --git a/sys-fs/vhba/Manifest b/sys-fs/vhba/Manifest
index 88c7cac99b45..447b70a5df46 100644
--- a/sys-fs/vhba/Manifest
+++ b/sys-fs/vhba/Manifest
@@ -5,9 +5,11 @@ AUX vhba-1.0.0-scatterlist.patch 583 RMD160 7d1af6d447705df0644056258f67a0cb74a4
AUX vhba-1.0.0-scsicmnd.patch 2736 RMD160 503eb663d33fa082eceab87d2521b9d2dab469b9 SHA1 4ded720928b7483fe89da43712bf8952acb854e3 SHA256 da335b69398cf92dbd72db4c320939d6fa2530c60c0482eb2d629ce3724100ca
AUX vhba-1.2.1-kernel-2.6.33.patch 549 RMD160 bf721cc0713a8b3dc3d53663e6dcfc29c8b8282e SHA1 f3db205d4b653229681c53d48162e9572ff1ca5e SHA256 370f0c77775d5646537aba809f5adfd0d11c7ddb8fdd4f6572dd541aad4b675e
AUX vhba-1.2.1-kernel-2.6.34.patch 517 RMD160 43906e3240da7f85eb6f27fe0672ae7a8a2a3647 SHA1 c89de77d3c6dc86bf8b149968d5865c08d49235a SHA256 379e968a94e8b4736c01ccbe2635dec22371b0885a37cea1a685dc403c5c4989
+AUX vhba-20101015-scsi-host-lock-push-down.patch 1972 RMD160 0f4c1900b46d98c8a50f6600a49274cb942ee800 SHA1 a329c5b80ded0f9af2f3bbc24d7939c16e5efa56 SHA256 7d428d5d6f8be7088f98a1edacc8900ebfb2072d28e79cb613012b40552c1235
DIST vhba-module-1.2.1.tar.bz2 6585 RMD160 ecdbbd40f34b68816b0eefe43a64a4c664b31580 SHA1 5226b3dd16d793cd58a712e8ca44f3b45194e248 SHA256 1ab729d029c49e5e6231cdec3b9f88f17c44a292fe77f2bfbab506b62999a3ae
DIST vhba-module-20101015.tar.bz2 16309 RMD160 6994cbffd44037d42b8c74b3786c1bea06e664c6 SHA1 e0bc1a9e5b99bf13e5dea1474254c51484ec217c SHA256 3b115054803cdbc1497591dc7a3a57ebeb2bd39086fb8909016ed418d3667d1a
EBUILD vhba-1.2.1.ebuild 1587 RMD160 859fb63c322df9c9b6b20f00dcb1a7a5c65eda55 SHA1 d89c1db99a407a39d0a47898dfdfcd2794b3d05d SHA256 71535d710b33be182d09365aa3e9231c24c454a37231a6628786052cd9e0e0b6
+EBUILD vhba-20101015-r1.ebuild 1584 RMD160 e0302efc13b79b0a9acb160fb82ab63370d7a8b2 SHA1 08c1518dccb6cbfc3c8429ee37997cb64c902475 SHA256 00508f06d32421702361976735bb7b61a7d5ccc765bde12bba03f76db5b94d45
EBUILD vhba-20101015.ebuild 1500 RMD160 3f5e586ec6f7148276368d8067f2c4ef01f4d308 SHA1 89ec545e60e00a492424d9dd91d1267875be5e88 SHA256 a0642219b63a935c1503b9bab09c0386b45114c3f8570260caffb90fd5613478
-MISC ChangeLog 4300 RMD160 5ae72caa7f6fb9cd8ca7b5d64fdebe2adcbfd916 SHA1 bd39e473bab2b81131aa06c5fd8811bde770f46a SHA256 cbbf79c4ee4361b26f7ab260a0c0fd70a99275a2fcbdde664bfe4868ec327669
+MISC ChangeLog 4522 RMD160 30bdcd0f75739cb7393e1074c5ec2f88409bf32f SHA1 b102cf9b4f059a5e8ca6e62dcab2a98040db1fd7 SHA256 9f2472b93c5b402273216991b3e585e77ad785960738c465904cce1937e480c3
MISC metadata.xml 225 RMD160 461e7786d6f2b4ad0796cdbd8da127d2aa1d9c88 SHA1 7e14b4551dd441a467b812e3b4c4f3fd795e5a58 SHA256 1c4c96d3ac062761d9e938c233751ff32b23e2c21aff1e38df6a37ffa0e97cb1
diff --git a/sys-fs/vhba/files/vhba-20101015-scsi-host-lock-push-down.patch b/sys-fs/vhba/files/vhba-20101015-scsi-host-lock-push-down.patch
new file mode 100644
index 000000000000..e2b619c74ba8
--- /dev/null
+++ b/sys-fs/vhba/files/vhba-20101015-scsi-host-lock-push-down.patch
@@ -0,0 +1,56 @@
+From 9ad7ec7fae387f05249b9f4e6accb3bc3b0b8b0f Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gmail.com>
+Date: Thu, 6 Jan 2011 03:39:26 -0500
+Subject: [PATCH] Make vhba compatible with kernel 2.6.37 SCSI host API
+
+Due to the SCSI host lock push-down changes introduced in 2.6.37 (see
+http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=f281233d3eba15fb225d21ae2e228fd4553d824a
+for more details), trying to use current vhba on 2.6.37 leads to oopses
+and kernel panics - e.g. see http://bugs.gentoo.org/show_bug.cgi?id=350753
+
+Add some #ifdefs to enable compatibility both with 2.6.37 and older API.
+Note that if future kernel versions remove the DEF_SCSI_QCMD macro, this
+issue will need to be revisited.
+
+Signed-off-by: Alexandre Rostovtsev <tetromino@gmail.com>
+---
+ vhba-module/vhba.c | 9 ++++++++-
+ 1 files changed, 8 insertions(+), 1 deletions(-)
+
+diff --git a/vhba-module/vhba.c b/vhba-module/vhba.c
+index 059f6ce..9d13016 100644
+--- a/vhba-module/vhba.c
++++ b/vhba-module/vhba.c
+@@ -27,6 +27,7 @@
+ #include <linux/miscdevice.h>
+ #include <linux/poll.h>
+ #include <linux/slab.h>
++#include <linux/version.h>
+ #ifdef CONFIG_COMPAT
+ #include <linux/compat.h>
+ #endif
+@@ -363,7 +364,7 @@ static void vhba_free_command(struct vhba_command *vcmd)
+ spin_unlock_irqrestore(&vhost->cmd_lock, flags);
+ }
+
+-static int vhba_queuecommand(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *))
++static int vhba_queuecommand_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *))
+ {
+ struct vhba_device *vdev;
+ int retval;
+@@ -388,6 +389,12 @@ static int vhba_queuecommand(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmn
+ return retval;
+ }
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
++DEF_SCSI_QCMD(vhba_queuecommand)
++#else
++#define vhba_queuecommand vhba_queuecommand_lck
++#endif
++
+ static int vhba_abort(struct scsi_cmnd *cmd)
+ {
+ struct vhba_device *vdev;
+--
+1.7.3.4
+
diff --git a/sys-fs/vhba/vhba-20101015-r1.ebuild b/sys-fs/vhba/vhba-20101015-r1.ebuild
new file mode 100644
index 000000000000..e56c3d349d4e
--- /dev/null
+++ b/sys-fs/vhba/vhba-20101015-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/vhba/vhba-20101015-r1.ebuild,v 1.1 2011/03/02 23:29:51 signals Exp $
+
+# Use svn snapshots:
+# https://sourceforge.net/tracker/?func=detail&atid=603423&aid=3041832&group_id=93175
+# "As for the release, could you package the SVN version instead? I'd prefer
+# if people used latest SVN at any time anyway..." -- Upstream
+
+EAPI="2"
+
+inherit linux-mod eutils
+
+MY_P=vhba-module-${PV}
+DESCRIPTION="VHBA module provides Virtual (SCSI) Host Bus Adapter for the cdemu suite"
+HOMEPAGE="http://cdemu.org"
+SRC_URI="mirror://gentoo/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=">=virtual/linux-sources-2.6.19"
+RDEPEND=""
+
+S=${WORKDIR}/${MY_P}
+MODULE_NAMES="vhba(block:${S})"
+BUILD_TARGETS=all
+
+pkg_setup() {
+ CONFIG_CHECK="~BLK_DEV_SR ~CHR_DEV_SG"
+ check_extra_config
+ BUILD_PARAMS="KDIR=${KV_DIR}"
+ linux-mod_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-scsi-host-lock-push-down.patch
+}
+
+src_install() {
+ linux-mod_src_install || die "Error: installing module failed!"
+
+ einfo "Generating udev rules ..."
+ dodir /etc/udev/rules.d/
+ cat > "${D}"/etc/udev/rules.d/70-vhba.rules <<-EOF || die
+ # do not edit this file, it will be overwritten on update
+ #
+ KERNEL=="vhba_ctl", MODE="0660", OWNER="root", GROUP="cdemu"
+ EOF
+}
+
+pkg_postinst() {
+ enewgroup cdemu
+
+ elog "Don't forget to add your user to the cdemu group"
+ elog "if you want to be able to use virtual cdemu devices."
+ linux-mod_pkg_postinst
+}