diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-dialup/fcpci | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-dialup/fcpci')
-rw-r--r-- | net-dialup/fcpci/Manifest | 1 | ||||
-rw-r--r-- | net-dialup/fcpci/fcpci-0.1-r3.ebuild | 87 | ||||
-rw-r--r-- | net-dialup/fcpci/files/fcpci-kernel-2.6.34.patch | 126 | ||||
-rw-r--r-- | net-dialup/fcpci/files/fcpci-kernel-2.6.39-amd64.patch | 53 | ||||
-rw-r--r-- | net-dialup/fcpci/files/fcpci-kernel-2.6.39.patch | 24 | ||||
-rw-r--r-- | net-dialup/fcpci/files/fcpci-kernel-3.10.0.patch | 22 | ||||
-rw-r--r-- | net-dialup/fcpci/files/fcpci-kernel-3.2.0.patch | 10 | ||||
-rw-r--r-- | net-dialup/fcpci/files/fcpci-kernel-3.4.0.patch | 11 | ||||
-rw-r--r-- | net-dialup/fcpci/files/fcpci-kernel-3.8.0.patch | 65 | ||||
-rw-r--r-- | net-dialup/fcpci/files/kernel-2.6.34.patch | 129 | ||||
-rw-r--r-- | net-dialup/fcpci/files/kernel-2.6.39.patch | 24 | ||||
-rw-r--r-- | net-dialup/fcpci/metadata.xml | 5 |
12 files changed, 557 insertions, 0 deletions
diff --git a/net-dialup/fcpci/Manifest b/net-dialup/fcpci/Manifest new file mode 100644 index 000000000000..32ebbbed6893 --- /dev/null +++ b/net-dialup/fcpci/Manifest @@ -0,0 +1 @@ +DIST fcpci-0.1-0.src-11_2.rpm 1419782 SHA256 f39c7cb83b21fa9ba1de71f357c72552aa1c5327d7ad4ac55274e71e9da3f8e4 SHA512 fa6277e138d44fbf7865cbb035f11a6a1244827c3b1197a6d33a05c8de41366d3f1765a9d6a6c2b5281b8f11e74eabaec827825425b572e8bbf4982cb009e85a WHIRLPOOL f15ce2f094b5abb254b935b323576367c6069004db7cabb0d3615dd32ac31bdfa5140e3e80a67cb07bad6356eb53a389c0dca6823a3b82128ec867ecdba529f8 diff --git a/net-dialup/fcpci/fcpci-0.1-r3.ebuild b/net-dialup/fcpci/fcpci-0.1-r3.ebuild new file mode 100644 index 000000000000..5c9db8db60db --- /dev/null +++ b/net-dialup/fcpci/fcpci-0.1-r3.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils linux-mod rpm + +DESCRIPTION="AVM kernel modules for Fritz!Card PCI" +HOMEPAGE="http://opensuse.foehr-it.de/" +SRC_URI="http://opensuse.foehr-it.de/rpms/11_2/src/${P}-0.src.rpm -> ${P}-0.src-11_2.rpm" + +LICENSE="AVM-FC" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND="!net-dialup/fritzcapi" +RDEPEND="${DEPEND} + net-dialup/capi4k-utils" + +RESTRICT="mirror primaryuri" + +S="${WORKDIR}/fritz" + +pkg_setup() { + linux-mod_pkg_setup + + if kernel_is le 3 0 ; then + die "This package works only with 3.x kernels!" + fi + + BUILD_TARGETS="all" + BUILD_PARAMS="KDIR=${KV_DIR} LIBDIR=${S}/src V=1" + MODULE_NAMES="${PN}(net:${S}/src)" +} + +src_unpack() { + local BIT="" + use amd64 && BIT="64bit-" + rpm_unpack ${A} + DISTDIR="${WORKDIR}" unpack ${PN}-suse[0-9][0-9]-${BIT}[0-9].[0-9]*-[0-9]*.tar.gz +} + +src_prepare() { + local PAT="012345" + use amd64 && PAT="1234" + PAT="${PAT}67" + + epatch $(sed -n "s|^Patch[${PAT}]:\s*\(.*\)|../\1|p" "${WORKDIR}/${PN}.spec") + + epatch "${FILESDIR}"/fcpci-kernel-2.6.34.patch + + if use amd64; then + epatch "${FILESDIR}"/fcpci-kernel-2.6.39-amd64.patch + else + epatch "${FILESDIR}"/fcpci-kernel-2.6.39.patch + fi + + if kernel_is ge 3 2 0 ; then + epatch "${FILESDIR}"/fcpci-kernel-3.2.0.patch + fi + if kernel_is ge 3 4 0 ; then + epatch "${FILESDIR}"/fcpci-kernel-3.4.0.patch + fi + if kernel_is ge 3 8 0 ; then + epatch "${FILESDIR}"/fcpci-kernel-3.8.0.patch + fi + if kernel_is ge 3 10 0 ; then + epatch "${FILESDIR}"/fcpci-kernel-3.10.0.patch + fi + + epatch_user + + convert_to_m src/Makefile + + for i in lib/*-lib.o; do + einfo "Localize symbols in ${i##*/} ..." + objcopy -L memcmp -L memcpy -L memmove -L memset -L strcat \ + -L strcmp -L strcpy -L strlen -L strncmp -L strncpy "${i}" + done +} + +src_install() { + linux-mod_src_install + dodoc CAPI*.txt + dohtml *.html +} diff --git a/net-dialup/fcpci/files/fcpci-kernel-2.6.34.patch b/net-dialup/fcpci/files/fcpci-kernel-2.6.34.patch new file mode 100644 index 000000000000..ea20ac5176e6 --- /dev/null +++ b/net-dialup/fcpci/files/fcpci-kernel-2.6.34.patch @@ -0,0 +1,126 @@ +--- fritz/src/driver.c.orig 2010-12-09 16:47:24.552314553 +0100 ++++ fritz/src/driver.c 2010-12-09 16:53:16.040981703 +0100 +@@ -48,6 +48,8 @@ + #include "defs.h" + #include "lib.h" + #include "driver.h" ++#include <linux/proc_fs.h> ++#include <linux/seq_file.h> + + /*---------------------------------------------------------------------------*\ + \*---------------------------------------------------------------------------*/ +@@ -220,16 +220,6 @@ + } /* kill_version */ + + /*---------------------------------------------------------------------------*\ +-\*---------------------------------------------------------------------------*/ +-static void pprintf (char * page, int * len, const char * fmt, ...) { +- va_list args; +- +- va_start (args, fmt); +- *len += vsprintf (page + *len, fmt, args); +- va_end (args); +-} /* pprintf */ +- +-/*---------------------------------------------------------------------------*\ + \*-C-------------------------------------------------------------------------*/ + static inline int in_critical (void) { + +@@ -490,39 +480,33 @@ + + /*---------------------------------------------------------------------------*\ + \*---------------------------------------------------------------------------*/ +-static int __kcapi ctr_info ( +- char * page, +- char ** start, +- off_t ofs, +- int count, +- int * eof, +- struct capi_ctr * ctrl +-) { ++static int __kcapi ctr_info (struct seq_file *m, void *v) ++{ ++ struct capi_ctr *ctrl = m->private; + card_t * card; + char * temp; + unsigned char flag; +- int len = 0; + + assert (ctrl != NULL); + card = (card_t *) ctrl->driverdata; + assert (card != NULL); +- pprintf (page, &len, "%-16s %s\n", "name", SHORT_LOGO); +- pprintf (page, &len, "%-16s 0x%04x\n", "io", card->base); +- pprintf (page, &len, "%-16s %d\n", "irq", card->irq); ++ seq_printf(m, "%-16s %s\n", "name", SHORT_LOGO); ++ seq_printf(m, "%-16s 0x%04x\n", "io", card->base); ++ seq_printf(m, "%-16s %d\n", "irq", card->irq); + temp = card->version ? card->string[1] : "A1"; +- pprintf (page, &len, "%-16s %s\n", "type", temp); ++ seq_printf(m, "%-16s %s\n", "type", temp); + temp = card->version ? card->string[0] : "-"; + #if defined (__fcclassic__) || defined (__fcpcmcia__) +- pprintf (page, &len, "%-16s 0x%04x\n", "revision", card->info); ++ seq_printf(m, "%-16s 0x%04x\n", "revision", card->info); + #elif defined (__fcpci__) +- pprintf (page, &len, "%-16s %d\n", "class", card_id); ++ seq_printf(m, "%-16s %d\n", "class", card_id); + #endif +- pprintf (page, &len, "%-16s %s\n", "ver_driver", temp); +- pprintf (page, &len, "%-16s %s\n", "ver_cardtype", SHORT_LOGO); ++ seq_printf(m, "%-16s %s\n", "ver_driver", temp); ++ seq_printf(m, "%-16s %s\n", "ver_cardtype", SHORT_LOGO); + + flag = ((unsigned char *) (ctrl->profile.manu))[3]; + if (flag) { +- pprintf(page, &len, "%-16s%s%s%s%s%s%s%s\n", "protocol", ++ seq_printf(m, "%-16s%s%s%s%s%s%s%s\n", "protocol", + (flag & 0x01) ? " DSS1" : "", + (flag & 0x02) ? " CT1" : "", + (flag & 0x04) ? " VN3" : "", +@@ -534,21 +518,29 @@ + } + flag = ((unsigned char *) (ctrl->profile.manu))[5]; + if (flag) { +- pprintf(page, &len, "%-16s%s%s%s%s\n", "linetype", ++ seq_printf(m, "%-16s%s%s%s%s\n", "linetype", + (flag & 0x01) ? " point to point" : "", + (flag & 0x02) ? " point to multipoint" : "", + (flag & 0x08) ? " leased line without D-channel" : "", + (flag & 0x04) ? " leased line with D-channel" : "" + ); + } +- if (len < ofs) { +- return 0; +- } +- *eof = 1; +- *start = page - ofs; +- return ((count < len - ofs) ? count : len - ofs); ++ return 0; + } /* ctr_info */ + ++static int ctr_proc_open(struct inode *inode, struct file *file) ++{ ++ return single_open(file, ctr_info, PDE(inode)->data); ++} ++ ++const struct file_operations ctr_proc_fops = { ++ .owner = THIS_MODULE, ++ .open = ctr_proc_open, ++ .read = seq_read, ++ .llseek = seq_lseek, ++ .release = single_release, ++}; ++ + /*---------------------------------------------------------------------------*\ + \*---------------------------------------------------------------------------*/ + static void __kcapi reset_ctrl (struct capi_ctr * ctrl) { +@@ -626,7 +618,7 @@ + ctrl->release_appl = release_appl; + ctrl->send_message = send_msg; + ctrl->procinfo = proc_info; +- ctrl->ctr_read_proc = ctr_info; ++ ctrl->proc_fops = &ctr_proc_fops; + if (0 != (res = attach_capi_ctr (ctrl))) { + dec_use_count (); + stop (card); diff --git a/net-dialup/fcpci/files/fcpci-kernel-2.6.39-amd64.patch b/net-dialup/fcpci/files/fcpci-kernel-2.6.39-amd64.patch new file mode 100644 index 000000000000..10e36e2d01b9 --- /dev/null +++ b/net-dialup/fcpci/files/fcpci-kernel-2.6.39-amd64.patch @@ -0,0 +1,53 @@ +--- fritz/src/driver.c_orig 2011-09-04 16:54:30.000000000 +0200 ++++ fritz/src/driver.c 2011-09-04 16:55:02.000000000 +0200 +@@ -101,7 +101,8 @@ + static unsigned long crit_flags; + static atomic_t scheduler_enabled = ATOMIC_INIT (0); + static atomic_t scheduler_id = ATOMIC_INIT (-1); +-static spinlock_t stack_lock = SPIN_LOCK_UNLOCKED; ++//static spinlock_t stack_lock = SPIN_LOCK_UNLOCKED; ++static DEFINE_SPINLOCK(sched_lock); + #if !defined (__fcclassic__) + static int card_id = 0; + #endif +@@ -815,7 +816,7 @@ + + UNUSED_ARG (data); + atomic_set (&scheduler_id, smp_processor_id ()); +- if (spin_trylock (&stack_lock)) { ++ if (spin_trylock (&sched_lock)) { + while (!atomic_read (&dont_sched)) { + atomic_set (&dont_sched, 1); + os_timer_poll (); +@@ -823,7 +824,7 @@ + scheduler_control (TRUE); + } + } +- spin_unlock (&stack_lock); ++ spin_unlock (&sched_lock); + } + atomic_set (&scheduler_id, -1); + } /* scheduler */ +@@ -839,9 +840,9 @@ + if (atomic_read (&scheduler_id) == smp_processor_id ()) { + res = IRQ_RETVAL ((*capi_lib->cm_handle_events) ()); + } else { +- spin_lock (&stack_lock); ++ spin_lock (&sched_lock); + res = IRQ_RETVAL ((*capi_lib->cm_handle_events) ()); +- spin_unlock (&stack_lock); ++ spin_unlock (&sched_lock); + } + if (res == IRQ_HANDLED) { + atomic_set (&dont_sched, 0); +--- fritz/src/tools.c_orig 2011-09-04 16:54:36.000000000 +0200 ++++ fritz/src/tools.c 2011-09-04 16:55:06.000000000 +0200 +@@ -529,7 +529,7 @@ + ERROR("Could not allocate lock structure!!!\n"); + return 0; + } +- tmp->lock = SPIN_LOCK_UNLOCKED; ++ spin_lock_init(&tmp->lock); + *plock = tmp; + return 1; + } /* lock_init */ diff --git a/net-dialup/fcpci/files/fcpci-kernel-2.6.39.patch b/net-dialup/fcpci/files/fcpci-kernel-2.6.39.patch new file mode 100644 index 000000000000..ecc485218983 --- /dev/null +++ b/net-dialup/fcpci/files/fcpci-kernel-2.6.39.patch @@ -0,0 +1,24 @@ +--- fritz/src/driver.c~ 2011-06-15 21:18:25.792662667 +0200 ++++ fritz/src/driver.c 2011-06-15 21:22:15.307420952 +0200 +@@ -101,7 +101,8 @@ + static unsigned long crit_flags; + static atomic_t scheduler_enabled = ATOMIC_INIT (0); + static atomic_t scheduler_id = ATOMIC_INIT (-1); +-static spinlock_t sched_lock = SPIN_LOCK_UNLOCKED; ++//static spinlock_t sched_lock = SPIN_LOCK_UNLOCKED; ++static DEFINE_SPINLOCK(sched_lock); + #if !defined (__fcclassic__) + static int card_id = 0; + #endif +--- fritz/src/tools.c~ 2011-06-15 21:18:32.336741325 +0200 ++++ fritz/src/tools.c 2011-06-15 21:22:23.899524196 +0200 +@@ -529,7 +529,8 @@ + ERROR("Could not allocate lock structure!!!\n"); + return 0; + } +- tmp->lock = SPIN_LOCK_UNLOCKED; ++// tmp->lock = SPIN_LOCK_UNLOCKED; ++ spin_lock_init(&tmp->lock); + *plock = tmp; + return 1; + } /* lock_init */ diff --git a/net-dialup/fcpci/files/fcpci-kernel-3.10.0.patch b/net-dialup/fcpci/files/fcpci-kernel-3.10.0.patch new file mode 100644 index 000000000000..d7cbddaa0cd6 --- /dev/null +++ b/net-dialup/fcpci/files/fcpci-kernel-3.10.0.patch @@ -0,0 +1,22 @@ +--- fritz/src/driver.c.old 2013-07-15 18:29:24.311278403 +0200 ++++ fritz/src/driver.c 2013-07-15 18:34:30.139297718 +0200 +@@ -37,6 +37,7 @@ + #include <linux/ctype.h> + #include <linux/string.h> + #include <linux/list.h> ++#include <linux/proc_fs.h> + #include <linux/capi.h> + #include <linux/isdn/capilli.h> + #include <linux/isdn/capiutil.h> +@@ -534,7 +535,10 @@ static int __kcapi ctr_info (struct seq_ + + static int ctr_proc_open(struct inode *inode, struct file *file) + { +- return single_open(file, ctr_info, PDE(inode)->data); ++ return single_open(file, ctr_info, PDE_DATA(inode)); ++ ++/* > = kernel 3.10.0 rename PDE to PDE_DATE without pointer to data in linux/proc_fs.h ++ Arnd Feldmueller <arnd.feldmueller@web.de> */ + } + + const struct file_operations ctr_proc_fops = { diff --git a/net-dialup/fcpci/files/fcpci-kernel-3.2.0.patch b/net-dialup/fcpci/files/fcpci-kernel-3.2.0.patch new file mode 100644 index 000000000000..45b9b094daf3 --- /dev/null +++ b/net-dialup/fcpci/files/fcpci-kernel-3.2.0.patch @@ -0,0 +1,10 @@ +--- fritz/src/driver.c_old 2012-01-10 17:10:26.000000000 +0100 ++++ fritz/src/driver.c 2012-01-10 17:10:35.000000000 +0100 +@@ -28,6 +28,7 @@ + #include <linux/ioport.h> + #include <linux/sched.h> + #include <linux/interrupt.h> ++#include <linux/export.h> + #include <linux/spinlock.h> + #include <linux/netdevice.h> + #include <linux/skbuff.h> diff --git a/net-dialup/fcpci/files/fcpci-kernel-3.4.0.patch b/net-dialup/fcpci/files/fcpci-kernel-3.4.0.patch new file mode 100644 index 000000000000..dacae28a407c --- /dev/null +++ b/net-dialup/fcpci/files/fcpci-kernel-3.4.0.patch @@ -0,0 +1,11 @@ +--- fritz/src/driver.c_old 2012-05-21 20:58:44.000000000 +0200 ++++ fritz/src/driver.c 2012-05-21 20:58:59.000000000 +0200 +@@ -23,7 +23,7 @@ + #include <asm/io.h> + #include <asm/irq.h> + #include <asm/atomic.h> +-#include <asm/system.h> ++#include <asm/switch_to.h> + #include <linux/version.h> + #include <linux/ioport.h> + #include <linux/sched.h> diff --git a/net-dialup/fcpci/files/fcpci-kernel-3.8.0.patch b/net-dialup/fcpci/files/fcpci-kernel-3.8.0.patch new file mode 100644 index 000000000000..9fec4ecc3593 --- /dev/null +++ b/net-dialup/fcpci/files/fcpci-kernel-3.8.0.patch @@ -0,0 +1,65 @@ +--- src/main.c.old 2013-02-28 18:00:31.303958236 +0100 ++++ src/main.c 2013-02-28 18:01:22.563203394 +0100 +@@ -154,7 +154,7 @@ + \*---------------------------------------------------------------------------*/ + #if defined (__fcclassic__) + +-static int __devinit isa_start ( ++static int isa_start ( + unsigned short io_arg, + unsigned short irq_arg + ) { +@@ -191,7 +191,7 @@ + \*---------------------------------------------------------------------------*/ + #if defined (__fcpnp__) + +-static int __devinit fritz_probe ( ++static int fritz_probe ( + struct pnp_dev * dev, + const struct pnp_device_id * id + ) { +@@ -229,7 +229,7 @@ + \*---------------------------------------------------------------------------*/ + #if defined (__fcpnp__) + +-static void __devexit fritz_remove (struct pnp_dev * dev) { ++static void fritz_remove (struct pnp_dev * dev) { + card_t * card; + + card = (card_t *) pnp_get_drvdata (dev); +@@ -253,7 +253,7 @@ + \*---------------------------------------------------------------------------*/ + #if defined (__fcpci__) + +-static int __devinit fritz_probe ( ++static int fritz_probe ( + struct pci_dev * dev, + const struct pci_device_id * id + ) { +@@ -294,7 +294,7 @@ + \*---------------------------------------------------------------------------*/ + #if defined (__fcpci__) + +-static void __devexit fritz_remove (struct pci_dev * dev) { ++static void fritz_remove (struct pci_dev * dev) { + card_t * card; + + card = (card_t *) pci_get_drvdata (dev); +@@ -322,7 +322,7 @@ + .name = TARGET, + .id_table = fcpci_id_table, + .probe = fritz_probe, +- .remove = __devexit_p(fritz_remove), ++ .remove = fritz_remove, + } ; + + #elif defined (__fcpnp__) +@@ -332,7 +332,7 @@ + .name = TARGET, + .id_table = fcpnp_id_table, + .probe = fritz_probe, +- .remove = __devexit_p(fritz_remove), ++ .remove = fritz_remove, + } ; + + #endif diff --git a/net-dialup/fcpci/files/kernel-2.6.34.patch b/net-dialup/fcpci/files/kernel-2.6.34.patch new file mode 100644 index 000000000000..26b638147aa7 --- /dev/null +++ b/net-dialup/fcpci/files/kernel-2.6.34.patch @@ -0,0 +1,129 @@ +--- driver.c~ 2010-05-17 11:51:30.315940940 +0200 ++++ driver.c 2010-05-17 11:51:30.362264370 +0200 +@@ -48,6 +48,8 @@ + #include "defs.h" + #include "lib.h" + #include "driver.h" ++#include <linux/proc_fs.h> ++#include <linux/seq_file.h> + + /*---------------------------------------------------------------------------*\ + \*---------------------------------------------------------------------------*/ +@@ -490,39 +492,34 @@ + + /*---------------------------------------------------------------------------*\ + \*---------------------------------------------------------------------------*/ +-static int __kcapi ctr_info ( +- char * page, +- char ** start, +- off_t ofs, +- int count, +- int * eof, +- struct capi_ctr * ctrl ++ ++static int __kcapi ctr_info (struct seq_file *m, void *v + ) { ++ struct capi_ctr *ctrl = m->private; + card_t * card; + char * temp; + unsigned char flag; +- int len = 0; + + assert (ctrl != NULL); + card = (card_t *) ctrl->driverdata; + assert (card != NULL); +- pprintf (page, &len, "%-16s %s\n", "name", SHORT_LOGO); +- pprintf (page, &len, "%-16s 0x%04x\n", "io", card->base); +- pprintf (page, &len, "%-16s %d\n", "irq", card->irq); ++ seq_printf(m, "%-16s %s\n", "name", SHORT_LOGO); ++ seq_printf(m, "%-16s 0x%04x\n", "io", card->base); ++ seq_printf(m, "%-16s %d\n", "irq", card->irq); + temp = card->version ? card->string[1] : "A1"; +- pprintf (page, &len, "%-16s %s\n", "type", temp); ++ seq_printf(m, "%-16s %s\n", "type", temp); + temp = card->version ? card->string[0] : "-"; + #if defined (__fcclassic__) || defined (__fcpcmcia__) +- pprintf (page, &len, "%-16s 0x%04x\n", "revision", card->info); ++ seq_printf(m, "%-16s 0x%04x\n", "revision", card->info); + #elif defined (__fcpci__) +- pprintf (page, &len, "%-16s %d\n", "class", card_id); ++ seq_printf(m, "%-16s %d\n", "class", card_id); + #endif +- pprintf (page, &len, "%-16s %s\n", "ver_driver", temp); +- pprintf (page, &len, "%-16s %s\n", "ver_cardtype", SHORT_LOGO); ++ seq_printf(m, "%-16s %s\n", "ver_driver", temp); ++ seq_printf(m, "%-16s %s\n", "ver_cardtype", SHORT_LOGO); + + flag = ((unsigned char *) (ctrl->profile.manu))[3]; + if (flag) { +- pprintf(page, &len, "%-16s%s%s%s%s%s%s%s\n", "protocol", ++ seq_printf(m, "%-16s%s%s%s%s%s%s%s\n", "protocol", + (flag & 0x01) ? " DSS1" : "", + (flag & 0x02) ? " CT1" : "", + (flag & 0x04) ? " VN3" : "", +@@ -534,21 +531,30 @@ + } + flag = ((unsigned char *) (ctrl->profile.manu))[5]; + if (flag) { +- pprintf(page, &len, "%-16s%s%s%s%s\n", "linetype", ++ seq_printf(m, "%-16s%s%s%s%s\n", "linetype", + (flag & 0x01) ? " point to point" : "", + (flag & 0x02) ? " point to multipoint" : "", + (flag & 0x08) ? " leased line without D-channel" : "", + (flag & 0x04) ? " leased line with D-channel" : "" + ); + } +- if (len < ofs) { +- return 0; +- } +- *eof = 1; +- *start = page - ofs; +- return ((count < len - ofs) ? count : len - ofs); ++ ++ return 0; + } /* ctr_info */ + ++static int ctr_proc_open(struct inode *inode, struct file *file) ++{ ++ return single_open(file, ctr_info, PDE(inode)->data); ++} ++ ++const struct file_operations ctr_proc_fops = { ++ .owner = THIS_MODULE, ++ .open = ctr_proc_open, ++ .read = seq_read, ++ .llseek = seq_lseek, ++ .release = single_release, ++}; ++ + /*---------------------------------------------------------------------------*\ + \*---------------------------------------------------------------------------*/ + static void __kcapi reset_ctrl (struct capi_ctr * ctrl) { +--- driver.c~ 2010-05-17 19:55:09.158499792 +0200 ++++ driver.c 2010-05-17 19:55:09.190784099 +0200 +@@ -222,16 +222,6 @@ + } /* kill_version */ + + /*---------------------------------------------------------------------------*\ +-\*---------------------------------------------------------------------------*/ +-static void pprintf (char * page, int * len, const char * fmt, ...) { +- va_list args; +- +- va_start (args, fmt); +- *len += vsprintf (page + *len, fmt, args); +- va_end (args); +-} /* pprintf */ +- +-/*---------------------------------------------------------------------------*\ + \*-C-------------------------------------------------------------------------*/ + static inline int in_critical (void) { + +@@ -632,7 +622,7 @@ + ctrl->release_appl = release_appl; + ctrl->send_message = send_msg; + ctrl->procinfo = proc_info; +- ctrl->ctr_read_proc = ctr_info; ++ ctrl->proc_fops = &ctr_proc_fops; + if (0 != (res = attach_capi_ctr (ctrl))) { + dec_use_count (); + stop (card); diff --git a/net-dialup/fcpci/files/kernel-2.6.39.patch b/net-dialup/fcpci/files/kernel-2.6.39.patch new file mode 100644 index 000000000000..a77a1121da42 --- /dev/null +++ b/net-dialup/fcpci/files/kernel-2.6.39.patch @@ -0,0 +1,24 @@ +--- driver.c~ 2011-06-15 21:18:25.792662667 +0200 ++++ driver.c 2011-06-15 21:22:15.307420952 +0200 +@@ -101,7 +101,8 @@ + static unsigned long crit_flags; + static atomic_t scheduler_enabled = ATOMIC_INIT (0); + static atomic_t scheduler_id = ATOMIC_INIT (-1); +-static spinlock_t sched_lock = SPIN_LOCK_UNLOCKED; ++//static spinlock_t sched_lock = SPIN_LOCK_UNLOCKED; ++static DEFINE_SPINLOCK(sched_lock); + #if !defined (__fcclassic__) + static int card_id = 0; + #endif +--- tools.c~ 2011-06-15 21:18:32.336741325 +0200 ++++ tools.c 2011-06-15 21:22:23.899524196 +0200 +@@ -529,7 +529,8 @@ + ERROR("Could not allocate lock structure!!!\n"); + return 0; + } +- tmp->lock = SPIN_LOCK_UNLOCKED; ++// tmp->lock = SPIN_LOCK_UNLOCKED; ++ spin_lock_init(&tmp->lock); + *plock = tmp; + return 1; + } /* lock_init */ diff --git a/net-dialup/fcpci/metadata.xml b/net-dialup/fcpci/metadata.xml new file mode 100644 index 000000000000..756ddd4a6227 --- /dev/null +++ b/net-dialup/fcpci/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>net-dialup</herd> +</pkgmetadata> |