diff options
author | Stefan Schweizer <genstef@gentoo.org> | 2005-02-26 22:20:37 +0000 |
---|---|---|
committer | Stefan Schweizer <genstef@gentoo.org> | 2005-02-26 22:20:37 +0000 |
commit | 94bb8126c569abe4c93bee63cd7a4b27153b4056 (patch) | |
tree | 1885aeb68d2642aa9f7bde77ff53a0131b2b723a /net-dialup | |
parent | Update SRC_URI (diff) | |
download | historical-94bb8126c569abe4c93bee63cd7a4b27153b4056.tar.gz historical-94bb8126c569abe4c93bee63cd7a4b27153b4056.tar.bz2 historical-94bb8126c569abe4c93bee63cd7a4b27153b4056.zip |
New ebuild, removing specific capi.conf in favour of capi4k-utils, adding patches for bug 76832 thanks to MonkeyIsland <parkmann@gmx.net>
Package-Manager: portage-2.0.51-r15
Diffstat (limited to 'net-dialup')
-rw-r--r-- | net-dialup/capi4k-utils/Manifest | 15 | ||||
-rw-r--r-- | net-dialup/fcdsl/ChangeLog | 10 | ||||
-rw-r--r-- | net-dialup/fcdsl/Manifest | 19 | ||||
-rw-r--r-- | net-dialup/fcdsl/fcdsl-2.6.20.7-r4.ebuild | 281 | ||||
-rw-r--r-- | net-dialup/fcdsl/files/digest-fcdsl-2.6.20.7-r4 | 5 | ||||
-rw-r--r-- | net-dialup/fcdsl/files/fcdsl.diff | 157 | ||||
-rw-r--r-- | net-dialup/fcdsl/files/fcdsl2.diff | 62 | ||||
-rw-r--r-- | net-dialup/fcdsl/files/fcdslsl.diff | 63 | ||||
-rw-r--r-- | net-dialup/fcdsl/files/fcdslslusb.diff | 135 | ||||
-rw-r--r-- | net-dialup/fcdsl/files/fcdslusb.diff | 86 | ||||
-rw-r--r-- | net-dialup/fritzcapi/Manifest | 14 |
11 files changed, 811 insertions, 36 deletions
diff --git a/net-dialup/capi4k-utils/Manifest b/net-dialup/capi4k-utils/Manifest index 2184392025ee..5469779e2653 100644 --- a/net-dialup/capi4k-utils/Manifest +++ b/net-dialup/capi4k-utils/Manifest @@ -1,11 +1,9 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - MD5 1498f8b6c0b399a069b41c1a963a6226 capi4k-utils-20041006-r3.ebuild 3238 -MD5 9828ad1bf70322c228f7c56e6b9daab1 capi4k-utils-20041006-r5.ebuild 3738 +MD5 bb40291f1bb1ee5bce01f7c5a733a3d9 capi4k-utils-20041006-r5.ebuild 3742 MD5 016c6cb21ab68060b9dffe7c55f8545d capi4k-utils-20041006-r4.ebuild 3738 -MD5 99100c326b27095f6e7907d18720cbc3 ChangeLog 4773 +MD5 f7c3ade0b5cc6799bf7c5e518edb026e ChangeLog 4947 MD5 ec2f84816306825d125d0c01bd86758d metadata.xml 163 +MD5 4607b3504bc1d4aa7a97c4913b85d8f3 files/capi.conf 592 MD5 5567e0f076f3d1faafcd0d4fa39a1c4e files/digest-capi4k-utils-20041006-r3 156 MD5 5567e0f076f3d1faafcd0d4fa39a1c4e files/digest-capi4k-utils-20041006-r4 156 MD5 5567e0f076f3d1faafcd0d4fa39a1c4e files/digest-capi4k-utils-20041006-r5 156 @@ -18,10 +16,3 @@ MD5 fa4cf0be46c4a16a2ef6fd178ed54c01 files/20041006/capi.usermap 1504 MD5 2fe94d2623c5b129780b72bacaf4a7bc files/20041006/rcapid.xinetd 236 MD5 650c413593fe44524150e1365965cdb3 files/20041006/capi.blacklist 455 MD5 2ddf9c04a03949cb2301888586096bfe files/20041006/capi.hotplug 2435 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.2.6 (GNU/Linux) - -iD8DBQFB3YDejiC39V7gKu0RAsuSAJ470fKy/Om12zRWQYxkUvy7J8sUnQCeOBX4 -tP4tcbyQ272FISN6I+O1ZoQ= -=gqy+ ------END PGP SIGNATURE----- diff --git a/net-dialup/fcdsl/ChangeLog b/net-dialup/fcdsl/ChangeLog index de06b57892e1..2b4fbb3d2972 100644 --- a/net-dialup/fcdsl/ChangeLog +++ b/net-dialup/fcdsl/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-dialup/fcdsl # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-dialup/fcdsl/ChangeLog,v 1.9 2005/02/17 23:02:19 mrness Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dialup/fcdsl/ChangeLog,v 1.10 2005/02/26 22:20:37 genstef Exp $ + +*fcdsl-2.6.20.7-r4 (26 Feb 2005) + + 26 Feb 2005; Stefan Schweizer <genstef@gentoo.org> +files/fcdsl.diff, + +files/fcdsl2.diff, +files/fcdslsl.diff, +files/fcdslslusb.diff, + +files/fcdslusb.diff, +fcdsl-2.6.20.7-r4.ebuild: + New ebuild, removing specific capi.conf in favour of capi4k-utils, adding + patches for bug 76832 thanks to MonkeyIsland <parkmann@gmx.net> 18 Feb 2005; Alin Nastac <mrness@gentoo.org> fcdsl-2.6.20.7-r2.ebuild, fcdsl-2.6.20.7-r3.ebuild: diff --git a/net-dialup/fcdsl/Manifest b/net-dialup/fcdsl/Manifest index 3266dac5a234..36735c8f3b36 100644 --- a/net-dialup/fcdsl/Manifest +++ b/net-dialup/fcdsl/Manifest @@ -1,16 +1,13 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - MD5 dd45a2d2b1c049503c3444b4ce0c9e0d fcdsl-2.6.20.7-r3.ebuild 7673 MD5 04cbd0d05d96a8067a967e10ea4baf85 fcdsl-2.6.20.7-r2.ebuild 7723 -MD5 0ab7da8628b8b013af6520667d855d99 ChangeLog 1969 +MD5 75231f3e50042f0b5d9de2423f031a28 ChangeLog 2338 MD5 ec2f84816306825d125d0c01bd86758d metadata.xml 163 +MD5 01d36e1a5f096d202a4fe32bb75ae296 fcdsl-2.6.20.7-r4.ebuild 7350 +MD5 35e156955da1166d6de5e56bb66857db files/fcdslslusb.diff 4002 +MD5 776e0c65eda5432a30f9beae8896ca97 files/fcdslsl.diff 1896 +MD5 22a65f3dcb8b67dc53a23ef35886bf18 files/fcdsl.diff 4636 +MD5 294902b3dadf7b52b7093305a97c8ff7 files/fcdslusb.diff 2440 MD5 364100988c059984dab986c49888df6f files/digest-fcdsl-2.6.20.7-r2 72 MD5 05ac6fb7b43f51ef47b85e53bc08de2d files/digest-fcdsl-2.6.20.7-r3 381 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.2.6 (GNU/Linux) - -iD8DBQFCFSKFjiC39V7gKu0RAiqjAJ9pSxlk8nj8YroYGyaxqU+qz4TRnACgsdjt -C5dMagFBWPi2yFzZlCmaupU= -=4cyj ------END PGP SIGNATURE----- +MD5 7d0d40b4547c891577925915b046cffc files/digest-fcdsl-2.6.20.7-r4 381 +MD5 4d073842f89f61ce68ae5ee7ac100d70 files/fcdsl2.diff 1867 diff --git a/net-dialup/fcdsl/fcdsl-2.6.20.7-r4.ebuild b/net-dialup/fcdsl/fcdsl-2.6.20.7-r4.ebuild new file mode 100644 index 000000000000..1cc6e59e15b2 --- /dev/null +++ b/net-dialup/fcdsl/fcdsl-2.6.20.7-r4.ebuild @@ -0,0 +1,281 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-dialup/fcdsl/fcdsl-2.6.20.7-r4.ebuild,v 1.1 2005/02/26 22:20:37 genstef Exp $ + +inherit linux-mod eutils + +FCDSL_SRC=("fritzcrd.dsl" "fritzcrd.dsl_v20" "fritzcrd.dsl_sl" + "fritzcrd.dsl_usb" "fritzcrd.dsl_sl_usb") +FCDSL_FILES=("fcdsl-suse9.1-3.11-02" "fcdsl2-suse9.1-3.11-04" + "fcdslsl-suse9.1-3.11-04" "fcdslusb-suse9.1-3.11-02" + "fcdslslusb-suse9.1-3.11-04") + +DESCRIPTION="AVM FRITZ!Card DSL drivers for 2.6 kernel" +HOMEPAGE="http://www.avm.de/" +SRC_URI="" +for ((CARD=0; CARD < ${#FCDSL_SRC[*]}; CARD++)); do + SRC_URI="${SRC_URI} + ftp://ftp.avm.de/cardware/${FCDSL_SRC[CARD]}/linux/suse.91/${FCDSL_FILES[CARD]}.tar.gz" +done + +LICENSE="LGPL-2" +KEYWORDS="~x86" +IUSE="" +SLOT="0" +S=${WORKDIR}/fritz + +RDEPEND=">=net-dialup/capi4k-utils-20040810" + +FCDSL_NAMES=("AVM FRITZ!Card DSL" "AVM FRITZ!Card DSL v2.0" "AVM FRITZ!Card DSL SL" "AVM FRITZ!Card DSL USB" "AVM FRITZ!Card DSL SL USB") +FCDSL_BUSTYPES=("pci" "pci" "pci" "usb" "usb") +FCDSL_IDS=("1131:5402" "1244:2900" "1244:2700" "057c:2300" "057c:3500") +FCDSL_FIRMWARES=("fdslbase.bin" "fds2base.bin" "fdssbase.bin" "fdsubase.frm" "fdlubase.frm") +FCDSL_MODULES=("fcdsl" "fcdsl2" "fcdslsl" "fcdslusb" "fcdslslusb") + +pkg_setup() { + CONFIG_CHECK="ISDN_CAPI_CAPI20" + linux-mod_pkg_setup + + MODULE_NAMES="" + #Check existence of user selected cards + if [ -n "${FCDSL_CARDS}" ] ; then + for USERCARD in ${FCDSL_CARDS} ; do + for ((CARD=0; CARD < ${#FCDSL_MODULES[*]}; CARD++)); do + if [ "${USERCARD}" = "${FCDSL_MODULES[CARD]}" ]; then + MODULE_NAMES="${MODULE_NAMES} ${FCDSL_MODULES[CARD]}(net:${WORKDIR}/${FCDSL_MODULES[CARD]/fc/fritz.}/src)" + continue 2 + fi + done + die "Driver for ${USERCARD} not present in ${P}" + done + else + einfo + einfo "You can control the modules which are built with the variable" + einfo "FCDSL_CARDS which should contain a blank separated list" + einfo "of a selection from the following cards:" + einfo " ${FCDSL_MODULES[*]}" + for ((CARD=0; CARD < ${#FCDSL_MODULES[*]}; CARD++)); do + MODULE_NAMES="${MODULE_NAMES} ${FCDSL_MODULES[CARD]}(net:${WORKDIR}/${FCDSL_MODULES[CARD]/fc/fritz.}/src)" + done + fi + BUILD_TARGETS="all" + BUILD_PARAMS="KDIR=${KV_DIR} LIBDIR=${S}" + NO_MODULESD="1" +} + +src_unpack() { + for ((CARD=0; CARD < ${#FCDSL_MODULES[*]}; CARD++)); do + tar xzf ${DISTDIR}/${FCDSL_FILES[CARD]}.tar.gz + mv fritz ${FCDSL_MODULES[CARD]/fc/fritz.} + cd ${FCDSL_MODULES[CARD]/fc/fritz.}/src + patch -p0 < ${FILESDIR}/${FCDSL_MODULES[CARD]}.diff + cd ../.. + done + + ln -s ${FCDSL_MODULES[0]/fc/fritz.} fritz +} + +src_install() { + linux-mod_src_install + + dodir /etc/drdsl /etc/modules.d /lib/firmware /usr/sbin + + echo "# modules.d config file for AVM FRITZ!Card DSL" >${D}/etc/modules.d/fcdsl + echo "# Correct these settings with the output from drdsl -n" >>${D}/etc/modules.d/fcdsl + + for ((CARD=0; CARD < ${#FCDSL_MODULES[*]}; CARD++)); do + if [ -n "${FCDSL_CARDS}" ] ; then + INS="" + for USERCARD in ${FCDSL_CARDS} ; do + if [ "${USERCARD}" = "${FCDSL_MODULES[CARD]}" ]; then INS="1"; fi + done + if [ -z "${INS}" ]; then continue; fi + fi + + echo "#options ${FCDSL_MODULES[CARD]} VPI=1 VCI=32 VCC=1" >>${D}/etc/modules.d/fcdsl + + insinto /lib/firmware + doins ${WORKDIR}/${FCDSL_MODULES[CARD]/fc/fritz.}/${FCDSL_FIRMWARES[CARD]} + done + + insinto /etc/drdsl + doins ${S}/drdsl.ini + + exeinto /usr/sbin + doexe ${S}/drdsl + + dodoc ${S}/CAPI* ${S}/compile* ${S}/license.txt +} + +pkg_postinst() { + linux-mod_pkg_postinst + + echo + einfo "If you want to setup your DSL card driver and create a peer file, please run:" + einfo " etc-update" + einfo " ebuild /var/db/pkg/net-dialup/${PF}/${PF}.ebuild config" + einfo " /etc/init.d/capi start" + einfo " drdsl -n" + einfo " nano /etc/modules.d/fcdsl" + einfo " update-modules" + einfo " /etc/init.d/capi restart" + epause 10 +} + +#pkg-config functions + +detect_fcdsl_card() { + PCI_IDS="" + USB_IDS="" + if [ -d /sys/bus ]; then + if [ -d /sys/bus/pci/devices ]; then + cd /sys/bus/pci/devices + for PCI_DEVICE in *; do + vendor="$(< ${PCI_DEVICE}/vendor)" + device="$(< ${PCI_DEVICE}/device)" + PCI_IDS="${PCI_IDS}${vendor:2}:${device:2} " + done + fi + if [ -d /sys/bus/usb/devices ]; then + cd /sys/bus/usb/devices + for USB_DEVICE in [0-9]*; do + if [ -f ${USB_DEVICE}/idVendor ]; then + USB_IDS="${USB_IDS}$(< ${USB_DEVICE}/idVendor):$(< ${USB_DEVICE}/idProduct) " + fi + done + fi + fi + + FCDSL_MODULE="" + for ((CARD=0; CARD < ${#FCDSL_IDS[*]}; CARD++)); do + BUS_IDS="" + if [ "${FCDSL_BUSTYPES[CARD]}" == "pci" ]; then + BUS_IDS="${PCI_IDS}" + else + BUS_IDS="${USB_IDS}" + fi + for BUS_ID in ${BUS_IDS}; do + if [ "${BUS_ID}" == "${FCDSL_IDS[CARD]}" ]; then + einfo "Found: ${FCDSL_NAMES[CARD]}" + FCDSL_FIRMWARE=${FCDSL_FIRMWARES[CARD]} + FCDSL_MODULE=${FCDSL_MODULES[CARD]} + fi + done + done + if [ "${FCDSL_MODULE}" == "" ]; then + ewarn "No AVM FRITZ!Card DSL found!" + fi +} + +readpassword() { + VALUE_1="" + VALUE_2="" + while true; do + einfo "Enter your password:" + read -r -s VALUE_1 + einfo "Retype your password:" + read -r -s VALUE_2 + if [ "${VALUE_1}" == "" ]; then + echo + eerror "You entered a blank password. Please try again." + echo + else + if [ "${VALUE_1}" == "${VALUE_2}" ] ; then + break + else + echo + eerror "Your password entries do not match. Please try again." + echo + fi + fi + done + eval ${1}=${VALUE_1} + + VALUE_1="" + VALUE_2="" + unset VALUE_1 + unset VALUE_2 +} + +readvalue() { + VALUE="" + while true; do + einfo "${2}:" + read VALUE + if [ "${VALUE}" == "" ]; then + eerror "You entered a blank value. Please try again." + echo + else + break + fi + done + eval ${1}=${VALUE} + + VALUE="" + unset VALUE +} + +pkg_config() { + detect_fcdsl_card + + if [ "${FCDSL_MODULE}" != "" ]; then + readvalue FCDSL_PROVIDER "Enter the name of your ISP" + if [ ! -e "/etc/ppp/peers/${FCDSL_PROVIDER}" ]; then + readvalue FCDSL_USER "Enter your user name" + if [ "$(grep "${FCDSL_USER}" /etc/ppp/pap-secrets)" == "" ]; then + readpassword FCDSL_PASSWORD + echo '"'${FCDSL_USER}'" * "'${FCDSL_PASSWORD}'"' >>/etc/ppp/pap-secrets + unset FCDSL_PASSWORD + cat <<EOF >>/etc/ppp/peers/${FCDSL_PROVIDER} +connect "" +ipcp-accept-remote +ipcp-accept-local +usepeerdns +defaultroute +user "${FCDSL_USER}" +hide-password +sync +noauth +lcp-echo-interval 5 +lcp-echo-failure 3 +lcp-max-configure 50 +lcp-max-terminate 2 +noccp +noipx +noproxyarp +mru 1492 +mtu 1492 +linkname "${FCDSL_PROVIDER}" +ipparam internet +plugin capiplugin.so +avmadsl +: +/dev/null +EOF + echo + echo + echo + einfo "Now, you can start an ADSL connection with either" + einfo " pon \"${FCDSL_PROVIDER}\"" + einfo "or" + einfo " pppd call \"${FCDSL_PROVIDER}\"" + else + ewarn "User \"${FCDSL_USER}\" always exists in \"/etc/ppp/pap-secrets\"!" + fi + else + ewarn "Peer file \"/etc/ppp/peers/${FCDSL_PROVIDER}\" always exists!" + fi + + #Uncomment correspondent lines in /etc/capi.conf & /etc/modules.d/fcdsl + if [ -f /etc/capi.conf ]; then + sed -i -e "s:^#${FCDSL_MODULE}:${FCDSL_MODULE}" /etc/capi.conf + fi + if [ -f /etc/modules.d/fcdsl ]; then + sed -i -e "s:^#options +${FCDSL_MODULE}:options ${FCDSL_MODULE}" /etc/modules.d/fcdsl + fi + else + ewarn "No AVM FRITZ!Card DSL found!" + fi + unset FCDSL_PROVIDER + unset FCDSL_USER +} diff --git a/net-dialup/fcdsl/files/digest-fcdsl-2.6.20.7-r4 b/net-dialup/fcdsl/files/digest-fcdsl-2.6.20.7-r4 new file mode 100644 index 000000000000..31e652664807 --- /dev/null +++ b/net-dialup/fcdsl/files/digest-fcdsl-2.6.20.7-r4 @@ -0,0 +1,5 @@ +MD5 4355167c8ca87ef796eb55cdaabf1b36 fcdsl-suse9.1-3.11-02.tar.gz 1931601 +MD5 b33f95f659d50a611dc1b63255a0b5fc fcdsl2-suse9.1-3.11-04.tar.gz 1446440 +MD5 ceadcdddc662fbcfa8fa9e2980748666 fcdslsl-suse9.1-3.11-04.tar.gz 1441516 +MD5 5fde466f6c66d37353355fa6d07721fb fcdslusb-suse9.1-3.11-02.tar.gz 1154136 +MD5 1c35c16e699ed70e70ab2351bd83d109 fcdslslusb-suse9.1-3.11-04.tar.gz 1430073 diff --git a/net-dialup/fcdsl/files/fcdsl.diff b/net-dialup/fcdsl/files/fcdsl.diff new file mode 100644 index 000000000000..590ad5ef379a --- /dev/null +++ b/net-dialup/fcdsl/files/fcdsl.diff @@ -0,0 +1,157 @@ +--- driver.c.orig 2004-05-14 02:00:00.000000000 +0200 ++++ driver.c 2005-01-21 15:40:33.000000000 +0100 +@@ -18,6 +18,10 @@ + * http://www.opensource.org/licenses/lgpl-license.html + * + * Contact: AVM GmbH, Alt-Moabit 95, 10559 Berlin, Germany, email: info@avm.de ++ * ++ * Mon Oct 20 22:43:31 2003 ++ * Modified by Joerg Lehrke to improve locking ++ * Fixed for rev 0.4.1 by Stefan Schweizer + */ + + #include <asm/io.h> +@@ -57,6 +61,8 @@ + #include "dbgif.h" + #endif + ++#undef SINGLE_LOCK ++ + #define KILOBYTE 1024 + #define MEGABYTE (1024*KILOBYTE) + #define DMA_BUFFER_SIZE (9*KILOBYTE) +@@ -101,7 +107,11 @@ + static struct capi_ctr capi_ctrl[2]; + static int capi_ctrl_ix = 0; + static per_ctrl_t ctrl_params[2]; ++#if defined (SINGLE_LOCK) ++# define stack_lock qt_lock ++#else + static spinlock_t stack_lock = SPIN_LOCK_UNLOCKED; ++#endif + static atomic_t rx_flag = ATOMIC_INIT (0); + static atomic_t tx_flag = ATOMIC_INIT (0); + static atomic_t thread_flag = ATOMIC_INIT (0); +@@ -1142,7 +1152,7 @@ + } /* remove_ctrl */ + + /*---------------------------------------------------------------------------*\ +-\*-C-------------------------------------------------------------------------*/ ++\*---------------------------------------------------------------------------*/ + static inline int in_critical (void) { + + return (0 < atomic_read (&crit_count)); +@@ -1301,7 +1311,7 @@ + capi_ctr_handle_message (ctrl, appl, skb); + } /* msg2capi */ + +-/*-S-------------------------------------------------------------------------*\ ++/*---------------------------------------------------------------------------*\ + \*---------------------------------------------------------------------------*/ + static __attr void __stack scheduler_control (unsigned ena) { + int enabled = (int) ena; +@@ -1323,6 +1333,7 @@ + /*---------------------------------------------------------------------------*\ + \*---------------------------------------------------------------------------*/ + static int sched_thread (void * arg) { ++ unsigned long flags; + + UNUSED_ARG (arg); + daemonize (TARGET); +@@ -1356,6 +1367,7 @@ + } + + /* Body of thread, invoke scheduler */ ++ local_irq_save(flags); + if (spin_trylock (&stack_lock)) { + os_timer_poll (); + assert (capi_lib->cm_schedule); +@@ -1364,6 +1376,7 @@ + } + spin_unlock (&stack_lock); + } ++ local_irq_restore(flags); + } + LOG("Scheduler thread stopped.\n"); + up (&hotplug); +@@ -1470,17 +1483,22 @@ + /*---------------------------------------------------------------------------*\ + \*---------------------------------------------------------------------------*/ + static void tx_task (unsigned long data) { +- ++ unsigned long flags; ++ + UNUSED_ARG (data); + if (in_critical ()) { + atomic_set (&tx_flag, 1); + kick_scheduler (); +- } else if (spin_trylock (&stack_lock)) { +- tx_handler (capi_card); +- spin_unlock (&stack_lock); + } else { +- atomic_set (&tx_flag, 1); +- kick_scheduler (); ++ local_irq_save(flags); ++ if (spin_trylock (&stack_lock)) { ++ tx_handler (capi_card); ++ spin_unlock (&stack_lock); ++ } else { ++ atomic_set (&tx_flag, 1); ++ kick_scheduler (); ++ } ++ local_irq_restore(flags); + } + } /* tx_task */ + +@@ -1533,17 +1551,22 @@ + /*---------------------------------------------------------------------------*\ + \*---------------------------------------------------------------------------*/ + static void rx_task (unsigned long data) { ++ unsigned long flags; + + UNUSED_ARG (data); + if (in_critical ()) { + atomic_set (&rx_flag, 1); + kick_scheduler (); +- } else if (spin_trylock (&stack_lock)) { +- rx_handler (capi_card); +- spin_unlock (&stack_lock); + } else { +- atomic_set (&rx_flag, 1); +- kick_scheduler (); ++ local_irq_save(flags); ++ if (spin_trylock (&stack_lock)) { ++ rx_handler (capi_card); ++ spin_unlock (&stack_lock); ++ } else { ++ atomic_set (&rx_flag, 1); ++ kick_scheduler (); ++ } ++ local_irq_restore(flags); + } + } /* rx_task */ + +@@ -1562,6 +1585,7 @@ + return IRQ_NONE; + } + cp = (card_p) args; ++ spin_lock (&stack_lock); + while (0 != ((flags = PEEK (cp->io_base + INT_CTL)) & CARD_PCI_INT_ASSERT)) { + ++count; + assert (count < 3); +@@ -1572,6 +1596,7 @@ + assert ((PEEK (cp->io_base + INT_CTL) + & ~(CARD_PCI_INT_ASSERT | CARD_PCI_INT_ISASSERTED)) != 0); + if (!atomic_read (&link_open)) { ++ spin_unlock (&stack_lock); + return IRQ_HANDLED; + } + tx_flag = PEEK (cp->io_base + XFER_TOTM_STATUS) == TM_READY; +@@ -1586,6 +1611,7 @@ + } + } + info (0 == (PEEK (cp->io_base + INT_CTL) & CARD_PCI_INT_ASSERT)); ++ spin_unlock (&stack_lock); + return IRQ_RETVAL(count > 0); + } /* irq_handler */ + diff --git a/net-dialup/fcdsl/files/fcdsl2.diff b/net-dialup/fcdsl/files/fcdsl2.diff new file mode 100644 index 000000000000..c8df5fa0f57b --- /dev/null +++ b/net-dialup/fcdsl/files/fcdsl2.diff @@ -0,0 +1,62 @@ +--- driver.c.orig 2004-07-01 00:00:00.000000000 +0200 ++++ driver.c 2005-02-26 11:15:41.000000000 +0100 +@@ -18,6 +18,10 @@ + * http://www.opensource.org/licenses/lgpl-license.html + * + * Contact: AVM GmbH, Alt-Moabit 95, 10559 Berlin, Germany, email: info@avm.de ++ * ++ * Mon Oct 20 22:43:31 2003 ++ * Modified by Joerg Lehrke to improve locking ++ * Fixed for rev 0.4.1 by Stefan Schweizer + */ + + #include <asm/io.h> +@@ -54,6 +58,8 @@ + #include "devif.h" + #include "driver.h" + ++#undef SINGLE_LOCK ++ + #define KILOBYTE 1024 + #define MEGABYTE (1024*KILOBYTE) + #define _2_MEGS_ (2*MEGABYTE) +@@ -92,7 +98,11 @@ typedef struct __db { + card_p capi_card = NULL; + lib_callback_t * capi_lib = NULL; + atomic_t crit_count = ATOMIC_INIT(0); ++#if defined (SINGLE_LOCK) ++# define stack_lock qt_lock ++#else + spinlock_t stack_lock = SPIN_LOCK_UNLOCKED; ++#endif + + static int nvers = 0; + static atomic_t scheduler_enabled = ATOMIC_INIT (1); +@@ -1322,9 +1332,10 @@ void msg2capi (unsigned char * msg) { + capi_ctr_handle_message (ctrl, appl, skb); + } /* msg2capi */ + +-/*-S-------------------------------------------------------------------------*\ ++/*---------------------------------------------------------------------------*\ + \*---------------------------------------------------------------------------*/ + static int sched_thread (void * arg) { ++ unsigned long flags; + + UNUSED_ARG (arg); + daemonize (TARGET); +@@ -1356,6 +1367,7 @@ static int sched_thread (void * arg) { + continue; + } + /* Body of thread, invoke scheduler */ ++ local_irq_save(flags); + if (spin_trylock (&stack_lock)) { + os_timer_poll (); + assert (capi_lib->cm_schedule); +@@ -1364,6 +1376,7 @@ static int sched_thread (void * arg) { + } + spin_unlock (&stack_lock); + } ++ local_irq_restore(flags); + } + LOG("Scheduler thread stopped.\n"); + up (&thread_sync); diff --git a/net-dialup/fcdsl/files/fcdslsl.diff b/net-dialup/fcdsl/files/fcdslsl.diff new file mode 100644 index 000000000000..ff06da9df07b --- /dev/null +++ b/net-dialup/fcdsl/files/fcdslsl.diff @@ -0,0 +1,63 @@ +--- driver.c.orig 2004-06-17 02:00:00.000000000 +0200 ++++ driver.c 2005-02-26 11:02:38.000000000 +0100 +@@ -18,6 +18,11 @@ + * http://www.opensource.org/licenses/lgpl-license.html + * + * Contact: AVM GmbH, Alt-Moabit 95, 10559 Berlin, Germany, email: info@avm.de ++ * ++ * Sunday Dec 07 18:10 2003 ++ * Modified by Christian 'greeny' Heckhoff to improve locking ++ * based on modifications by Joerg Lehrke for Fritz!Card DSL ++ * + */ + + #include <asm/io.h> +@@ -54,6 +59,8 @@ + #include "devif.h" + #include "driver.h" + ++#undef SINGLE_LOCK ++ + #define KILOBYTE 1024 + #define MEGABYTE (1024*KILOBYTE) + #define _2_MEGS_ (2*MEGABYTE) +@@ -92,7 +99,11 @@ typedef struct __db { + card_p capi_card = NULL; + lib_callback_t * capi_lib = NULL; + atomic_t crit_count = ATOMIC_INIT(0); ++#if defined (SINGLE_LOCK) ++# define stack_lock qt_lock ++#else + spinlock_t stack_lock = SPIN_LOCK_UNLOCKED; ++#endif + + static int nvers = 0; + static atomic_t scheduler_enabled = ATOMIC_INIT (1); +@@ -1322,9 +1333,10 @@ void msg2capi (unsigned char * msg) { + capi_ctr_handle_message (ctrl, appl, skb); + } /* msg2capi */ + +-/*-S-------------------------------------------------------------------------*\ ++/*---------------------------------------------------------------------------*\ + \*---------------------------------------------------------------------------*/ + static int sched_thread (void * arg) { ++ unsigned long flags; + + UNUSED_ARG (arg); + daemonize (TARGET); +@@ -1356,6 +1368,7 @@ static int sched_thread (void * arg) { + continue; + } + /* Body of thread, invoke scheduler */ ++ local_irq_save(flags); + if (spin_trylock (&stack_lock)) { + os_timer_poll (); + assert (capi_lib->cm_schedule); +@@ -1364,6 +1377,7 @@ static int sched_thread (void * arg) { + } + spin_unlock (&stack_lock); + } ++ local_irq_restore(flags); + } + LOG("Scheduler thread stopped.\n"); + up (&thread_sync); diff --git a/net-dialup/fcdsl/files/fcdslslusb.diff b/net-dialup/fcdsl/files/fcdslslusb.diff new file mode 100644 index 000000000000..e8dfe40e6c8f --- /dev/null +++ b/net-dialup/fcdsl/files/fcdslslusb.diff @@ -0,0 +1,135 @@ +--- driver.c.orig 2004-06-17 02:00:00.000000000 +0200 ++++ driver.c 2005-02-26 10:40:39.000000000 +0100 +@@ -18,6 +18,16 @@ + * http://www.opensource.org/licenses/lgpl-license.html + * + * Contact: AVM GmbH, Alt-Moabit 95, 10559 Berlin, Germany, email: info@avm.de ++ * ++ * Sunday Dec 07 18:10 2003 ++ * Modified by Christian 'greeny' Heckhoff to improve locking ++ * based on modifications by Joerg Lehrke for Fritz!Card DSL ++ * ++ * Saturday Jul 24 2004, Oswin Horvath ++ * small modifications to make the patch work for the Fritz!Card SL USB (03.11.94) ++ * ++ * Saturday Feb 26 2005, Stefan Schweizer ++ * Fixed patch for rev 0.2.2 + */ + + #include <asm/io.h> +@@ -54,6 +64,8 @@ + #include "devif.h" + #include "driver.h" + ++#undef SINGLE_LOCK ++ + #ifndef HZ + # error HZ is not defined... + #endif +@@ -84,7 +96,11 @@ + \*---------------------------------------------------------------------------*/ + card_p capi_card = NULL; + lib_callback_t * capi_lib = NULL; ++#if defined (SINGLE_LOCK) ++# define stack_lock qt_lock ++#else + spinlock_t stack_lock = SPIN_LOCK_UNLOCKED; ++#endif + struct capi_ctr * capi_controller[2] = { NULL, NULL } ; + int card_config; + +@@ -919,12 +935,17 @@ static inline int in_critical (void) { + /*---------------------------------------------------------------------------*\ + \*---------------------------------------------------------------------------*/ + static inline void check (void) { ++ unsigned long flags; + + if (atomic_read (&rx_flag) > 0) { ++ spin_lock_irqsave (&stack_lock, flags); + rx_handler (capi_card); ++ spin_unlock_irqrestore (&stack_lock, flags); + } + if (atomic_read (&tx_flag) > 0) { ++ spin_lock_irqsave (&stack_lock, flags); + tx_handler (capi_card); ++ spin_unlock_irqrestore (&stack_lock, flags); + } + } /* check */ + +@@ -1101,6 +1122,7 @@ static __attr void __stack scheduler_con + /*-S-------------------------------------------------------------------------*\ + \*---------------------------------------------------------------------------*/ + static int scheduler (void * arg) { ++ unsigned long flags; + + UNUSED_ARG (arg); + daemonize (TARGET); +@@ -1134,6 +1156,7 @@ static int scheduler (void * arg) { + } + + /* Body of thread, invoke scheduler */ ++ local_irq_save(flags); + if (spin_trylock (&stack_lock)) { + info (!atomic_xchg (&in_scheduler, 1)); + os_timer_poll (); +@@ -1146,6 +1169,7 @@ static int scheduler (void * arg) { + #endif + spin_unlock (&stack_lock); + } ++ local_irq_restore(flags); + } + LOG("Scheduler thread stopped.\n"); + up (&thread_sync); +@@ -1324,22 +1348,44 @@ static void rx_handler (card_p pdc) { + /*---------------------------------------------------------------------------*\ + \*---------------------------------------------------------------------------*/ + static void tx_task (unsigned long data) { +- ++ unsigned long flags; + UNUSED_ARG (data); +- if (!in_critical () && spin_trylock (&stack_lock)) { +- tx_handler (capi_card); +- spin_unlock (&stack_lock); ++ ++ if (in_critical ()){ ++ atomic_set (&tx_flag, 1); ++ kick_scheduler (); ++ } else { ++ local_irq_save(flags); ++ if (spin_trylock (&stack_lock)) { ++ tx_handler (capi_card); ++ spin_unlock (&stack_lock); ++ } else { ++ atomic_set (&tx_flag, 1); ++ kick_scheduler (); ++ } ++ local_irq_restore(flags); + } + } /* tx_task */ + + /*---------------------------------------------------------------------------*\ + \*---------------------------------------------------------------------------*/ + static void rx_task (unsigned long data) { +- ++ unsigned long flags; + UNUSED_ARG (data); +- if (!in_critical () && spin_trylock (&stack_lock)) { +- rx_handler (capi_card); +- spin_unlock (&stack_lock); ++ ++ if (in_critical ()){ ++ atomic_set (&tx_flag, 1); ++ kick_scheduler (); ++ } else { ++ local_irq_save(flags); ++ if (spin_trylock (&stack_lock)) { ++ tx_handler (capi_card); ++ spin_unlock (&stack_lock); ++ } else { ++ atomic_set (&tx_flag, 1); ++ kick_scheduler (); ++ } ++ local_irq_restore(flags); + } + } /* rx_task */ + diff --git a/net-dialup/fcdsl/files/fcdslusb.diff b/net-dialup/fcdsl/files/fcdslusb.diff new file mode 100644 index 000000000000..922cad2629d0 --- /dev/null +++ b/net-dialup/fcdsl/files/fcdslusb.diff @@ -0,0 +1,86 @@ +--- driver.c.orig 2004-05-14 02:00:00.000000000 +0200 ++++ driver.c 2005-02-26 11:26:41.000000000 +0100 +@@ -18,6 +18,10 @@ + * http://www.opensource.org/licenses/lgpl-license.html + * + * Contact: AVM GmbH, Alt-Moabit 95, 10559 Berlin, Germany, email: info@avm.de ++ * ++ * Mon Oct 20 22:43:31 2003 ++ * Modified by Joerg Lehrke to improve locking ++ * Fixed for rev 0.4.1 by Stefan Schweizer + */ + + #include <asm/atomic.h> +@@ -46,6 +50,8 @@ + #include "main.h" + #include "driver.h" + ++#undef SINGLE_LOCK ++ + #ifndef HZ + # error HZ is not defined... + #endif +@@ -76,7 +82,11 @@ static atomic_t crit_count = ATOMIC_I + static volatile int hard_error_issued; + static atomic_t tx_flag = ATOMIC_INIT (0); + static atomic_t rx_flag = ATOMIC_INIT (0); ++#if defined (SINGLE_LOCK) ++# define stack_lock qt_lock ++#else + static spinlock_t stack_lock = SPIN_LOCK_UNLOCKED; ++#endif + static int thread_pid = -1; + static atomic_t thread_flag; + static atomic_t thread_capi_flag; +@@ -1367,15 +1377,20 @@ static void tx_handler (card_p pdc) { + /*---------------------------------------------------------------------------*\ + \*---------------------------------------------------------------------------*/ + static void tx_task (unsigned long data) { +- ++ unsigned long flags; + UNUSED_ARG (data); ++ + if (in_critical ()) { + atomic_set (&tx_flag, 1); +- } else if (spin_trylock (&stack_lock)) { +- tx_handler (capi_card); +- spin_unlock (&stack_lock); + } else { +- atomic_set (&tx_flag, 1); ++ local_irq_save(flags); ++ if (spin_trylock (&stack_lock)) { ++ tx_handler (capi_card); ++ spin_unlock (&stack_lock); ++ } else { ++ atomic_set (&tx_flag, 1); ++ } ++ local_irq_restore(flags); + } + } /* tx_task */ + +@@ -1412,15 +1427,20 @@ static void rx_handler (card_p pdc) { + /*---------------------------------------------------------------------------*\ + \*---------------------------------------------------------------------------*/ + static void rx_task (unsigned long data) { +- ++ unsigned long flags; + UNUSED_ARG (data); ++ + if (in_critical ()) { + atomic_set (&rx_flag, 1); +- } else if (spin_trylock (&stack_lock)) { +- rx_handler (capi_card); +- spin_unlock (&stack_lock); + } else { +- atomic_set (&rx_flag, 1); ++ local_irq_save(flags); ++ if (spin_trylock (&stack_lock)) { ++ tx_handler (capi_card); ++ spin_unlock (&stack_lock); ++ } else { ++ atomic_set (&tx_flag, 1); ++ } ++ local_irq_restore(flags); + } + } /* rxi_task */ + diff --git a/net-dialup/fritzcapi/Manifest b/net-dialup/fritzcapi/Manifest index 1659c61bc848..11d023767e0c 100644 --- a/net-dialup/fritzcapi/Manifest +++ b/net-dialup/fritzcapi/Manifest @@ -1,15 +1,5 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -MD5 46ea23fb1c77029c7edc5dfdfa24c18d fritzcapi-2.6.32.ebuild 5079 -MD5 e4101ffd6078ce3241af48b3c07a0f75 ChangeLog 2313 +MD5 d3b356384eec73d5aec9f8b7327da1a4 fritzcapi-2.6.32.ebuild 4899 +MD5 992a32de688150a003c4cfdcd41278b2 ChangeLog 2474 MD5 0498b76c69caf75c82ab7115df4cd4f8 metadata.xml 319 MD5 94a169a4f214862fa95e35813e857c54 files/digest-fritzcapi-2.6.32 518 MD5 9944aebce0f4b12843c5312ac4ba90b5 files/fritzcapi-fix-for-2.6.10.patch 473 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.2.6 (GNU/Linux) - -iD8DBQFCFSC0jiC39V7gKu0RAi96AJ9mEaRHpqwBj92sPlh1xBbdZkGGqACcDax/ -GVIMnOl74og1H/+YzNrZZZ4= -=zkdr ------END PGP SIGNATURE----- |