summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlin Năstac <mrness@gentoo.org>2005-07-21 18:09:02 +0000
committerAlin Năstac <mrness@gentoo.org>2005-07-21 18:09:02 +0000
commit03a913927a215ec731f702a0f3288144c84f5360 (patch)
tree79829f362906aba3b5be0c5bbf488ddae75dd152 /net-dialup/hsfmodem
parentStable on ppc. (diff)
downloadhistorical-03a913927a215ec731f702a0f3288144c84f5360.tar.gz
historical-03a913927a215ec731f702a0f3288144c84f5360.tar.bz2
historical-03a913927a215ec731f702a0f3288144c84f5360.zip
add upstream patches for fixing problems with kernels 2.6.12 (#99607)
Package-Manager: portage-2.0.51.22-r1
Diffstat (limited to 'net-dialup/hsfmodem')
-rw-r--r--net-dialup/hsfmodem/ChangeLog9
-rw-r--r--net-dialup/hsfmodem/Manifest13
-rw-r--r--net-dialup/hsfmodem/files/digest-hsfmodem-7.18.00.05-r13
-rw-r--r--net-dialup/hsfmodem/files/hsf-7.18.00.05-errno.patch148
-rw-r--r--net-dialup/hsfmodem/files/hsf-7.18.00.05-kernconfig.patch36
-rw-r--r--net-dialup/hsfmodem/files/hsf-7.18.00.05-simple_class.patch152
-rw-r--r--net-dialup/hsfmodem/hsfmodem-7.18.00.05-r1.ebuild68
7 files changed, 424 insertions, 5 deletions
diff --git a/net-dialup/hsfmodem/ChangeLog b/net-dialup/hsfmodem/ChangeLog
index 75c419e4ddb7..a7aacb563b31 100644
--- a/net-dialup/hsfmodem/ChangeLog
+++ b/net-dialup/hsfmodem/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-dialup/hsfmodem
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/hsfmodem/ChangeLog,v 1.13 2005/06/24 05:06:25 mrness Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/hsfmodem/ChangeLog,v 1.14 2005/07/21 18:09:02 mrness Exp $
+
+*hsfmodem-7.18.00.05-r1 (21 Jul 2005)
+
+ 21 Jul 2005; Alin Nastac <mrness@gentoo.org>
+ +files/hsf-7.18.00.05-errno.patch, +files/hsf-7.18.00.05-kernconfig.patch,
+ +files/hsf-7.18.00.05-simple_class.patch, +hsfmodem-7.18.00.05-r1.ebuild:
+ Fix problems with kernel 2.6.12 by adding upstream patches (#99607).
*hsfmodem-7.18.00.05 (24 Jun 2005)
diff --git a/net-dialup/hsfmodem/Manifest b/net-dialup/hsfmodem/Manifest
index 391872145b82..ac29cc027268 100644
--- a/net-dialup/hsfmodem/Manifest
+++ b/net-dialup/hsfmodem/Manifest
@@ -3,15 +3,20 @@ Hash: SHA1
MD5 6667c3b22c529af6c6cea3c606ce6127 hsfmodem-7.18.00.03-r2.ebuild 1351
MD5 3526d44dd8e3bc8eabd61447ac93bc6d hsfmodem-7.18.00.05.ebuild 1497
-MD5 7a35538e86c7834e9d75552d0e8ecba9 ChangeLog 4007
+MD5 90c83886688d25304af60c935dee9a6f ChangeLog 4318
+MD5 2543303318b9a759549906c97bab5116 hsfmodem-7.18.00.05-r1.ebuild 1687
MD5 ec2f84816306825d125d0c01bd86758d metadata.xml 163
MD5 430361a98f210c5a4b0eadcc4d45266c files/hsfmodem-7.18.00.03-nvminstall.patch 521
MD5 4523eaa6fcb480127dcf1881e1d2bbad files/digest-hsfmodem-7.18.00.03-r2 158
+MD5 68e22b294c2c7b7c8dec938af2bc588f files/digest-hsfmodem-7.18.00.05-r1 230
MD5 68e22b294c2c7b7c8dec938af2bc588f files/digest-hsfmodem-7.18.00.05 230
+MD5 5a383798aeada1598dbc3361e8dea454 files/hsf-7.18.00.05-errno.patch 4847
+MD5 956770b4af8c34b21660d33f5466b0f1 files/hsf-7.18.00.05-simple_class.patch 6349
+MD5 0fc2b3af69192d8b18e3e8a38c01e6e7 files/hsf-7.18.00.05-kernconfig.patch 1317
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
-iD8DBQFCu5mXjiC39V7gKu0RAmxZAKCOyQ6+V67cgUQdzIZ6DamC8liXxACfRHnv
-VtQoY3xStERUsFQIs9HOonA=
-=x2dO
+iD8DBQFC3+TdNSP4Vda7IdsRAuApAJ48b3og58ZFFw3vVOL59tL53H/FCACfaDzx
+MEhwl8y+sYfYCSo5JbtClyw=
+=5aOA
-----END PGP SIGNATURE-----
diff --git a/net-dialup/hsfmodem/files/digest-hsfmodem-7.18.00.05-r1 b/net-dialup/hsfmodem/files/digest-hsfmodem-7.18.00.05-r1
new file mode 100644
index 000000000000..3e4d1dce7bcc
--- /dev/null
+++ b/net-dialup/hsfmodem/files/digest-hsfmodem-7.18.00.05-r1
@@ -0,0 +1,3 @@
+MD5 8415cd780c422c8971c75d1d661bf110 hsfmodem-7.18.00.05full.tar.gz 1123019
+MD5 ca30d1a13608134e614d2ee4640d7f3a hsfmodem-7.18.00.05x86_64full.tar.gz 1236282
+MD5 e6d8fea8f5f641d7bb4dfb33c6f478e7 100498D_RM_HxF_Released.pdf 718949
diff --git a/net-dialup/hsfmodem/files/hsf-7.18.00.05-errno.patch b/net-dialup/hsfmodem/files/hsf-7.18.00.05-errno.patch
new file mode 100644
index 000000000000..be3c25bb732d
--- /dev/null
+++ b/net-dialup/hsfmodem/files/hsf-7.18.00.05-errno.patch
@@ -0,0 +1,148 @@
+diff -urN hsfmodem-7.18.00.05x86_64full/modules/GPL/oscompat.h hsfmodem-7.18.00.05x86_64full-errno/modules/GPL/oscompat.h
+--- hsfmodem-7.18.00.05x86_64full/modules/GPL/oscompat.h 2005-06-20 19:18:46.000000000 +0000
++++ hsfmodem-7.18.00.05x86_64full-errno/modules/GPL/oscompat.h 2005-06-29 16:20:54.000000000 +0000
+@@ -72,7 +72,7 @@
+ #include <linux/config.h>
+ #include <linux/types.h>
+
+-#if defined(STATIC_ERRNO) && !defined(__x86_64__)
++#if defined(STATIC_ERRNO)
+ #ifndef _LINUX_UNISTD_H_
+ #define _LINUX_UNISTD_H_
+ #endif
+diff -urN hsfmodem-7.18.00.05x86_64full/modules/include/osstdio.h hsfmodem-7.18.00.05x86_64full-errno/modules/include/osstdio.h
+--- hsfmodem-7.18.00.05x86_64full/modules/include/osstdio.h 2004-12-14 07:45:53.000000000 +0000
++++ hsfmodem-7.18.00.05x86_64full-errno/modules/include/osstdio.h 2005-06-29 16:20:54.000000000 +0000
+@@ -40,9 +40,9 @@
+ __shimcall__
+ FILE * OsFOpen(const char *, const char *, int *);
+ __shimcall__
+-size_t OsFRead(void *, size_t, size_t, FILE *);
++size_t OsFRead(void *, size_t, size_t, FILE *, int *);
+ __shimcall__
+-size_t OsFWrite(const void *, size_t, size_t, FILE *);
++size_t OsFWrite(const void *, size_t, size_t, FILE *, int *);
+ __shimcall__
+ int OsFClose(FILE *);
+ __shimcall__
+diff -urN hsfmodem-7.18.00.05x86_64full/modules/osnvm.c hsfmodem-7.18.00.05x86_64full-errno/modules/osnvm.c
+--- hsfmodem-7.18.00.05x86_64full/modules/osnvm.c 2005-06-20 17:53:21.000000000 +0000
++++ hsfmodem-7.18.00.05x86_64full-errno/modules/osnvm.c 2005-06-29 16:20:54.000000000 +0000
+@@ -7,8 +7,6 @@
+ *
+ */
+
+-#define STATIC_ERRNO
+-
+ #include "oscompat.h"
+ #include "osservices.h"
+ #include "osmemory.h"
+@@ -418,6 +416,7 @@
+ char buf[MAX_OEM_STR_LEN + 4], *dp;
+ unsigned char *p;
+ UINT32 size;
++ int errno;
+
+ p = pBuf;
+ dp = buf;
+@@ -428,7 +427,7 @@
+ dp += 3;
+ if(((size) % 16) == 0) {
+ *dp++ = '\n';
+- if (OsFWrite(buf, 1, dp - buf, file) != (dp - buf)) {
++ if (OsFWrite(buf, 1, dp - buf, file, &errno) != (dp - buf)) {
+ printk(KERN_ERR "%s: write error to %s errno=%d\n", __FUNCTION__, pathname, errno);
+ goto err;
+ }
+@@ -445,7 +444,7 @@
+ dp += 5;
+ if(((size) % 16) == 0) {
+ *dp++ = '\n';
+- if (OsFWrite(buf, 1, dp - buf, file) != (dp - buf)) {
++ if (OsFWrite(buf, 1, dp - buf, file, &errno) != (dp - buf)) {
+ printk(KERN_ERR "%s: write error to %s errno=%d\n", __FUNCTION__, pathname, errno);
+ goto err;
+ }
+@@ -463,7 +462,7 @@
+ dp += 9;
+ if(((size) % 16) == 0) {
+ *dp++ = '\n';
+- if (OsFWrite(buf, 1, dp - buf, file) != (dp - buf)) {
++ if (OsFWrite(buf, 1, dp - buf, file, &errno) != (dp - buf)) {
+ printk(KERN_ERR "%s: write error to %s errno=%d\n", __FUNCTION__, pathname, errno);
+ goto err;
+ }
+@@ -491,7 +490,7 @@
+ }
+
+ if(dp - buf) {
+- if (OsFWrite(buf, 1, dp - buf, file) != (dp - buf)) {
++ if (OsFWrite(buf, 1, dp - buf, file, &errno) != (dp - buf)) {
+ printk(KERN_ERR "%s: write error to %s errno=%d\n", __FUNCTION__, pathname, errno);
+ goto err;
+ }
+@@ -601,6 +600,7 @@
+ UINT32 l;
+ int n;
+ struct list_head *lh;
++ int errno;
+
+ down(&nvmelem_writelist_sem);
+ for(lh = nvmelem_writelist.prev; lh != &nvmelem_writelist; lh = lh->prev) {
+@@ -634,7 +634,7 @@
+ printk(KERN_DEBUG"%s: opened %s\n", __FUNCTION__, pathname);
+
+ while(l > 0) {
+- n = OsFRead(buf, 1, sizeof(buf)-1, file);
++ n = OsFRead(buf, 1, sizeof(buf)-1, file, &errno);
+ if(n <= 0)
+ break;
+
+@@ -682,7 +682,7 @@
+ /* value split accross buffer boundary, read next chunk */
+ buf[0] = *p;
+ p = buf;
+- n = OsFRead(buf+1, 1, sizeof(buf)-1-1, file);
++ n = OsFRead(buf+1, 1, sizeof(buf)-1-1, file, &errno);
+ if(n < 0) {
+ break;
+ }
+diff -urN hsfmodem-7.18.00.05x86_64full/modules/osstdio.c hsfmodem-7.18.00.05x86_64full-errno/modules/osstdio.c
+--- hsfmodem-7.18.00.05x86_64full/modules/osstdio.c 2004-12-14 07:44:26.000000000 +0000
++++ hsfmodem-7.18.00.05x86_64full-errno/modules/osstdio.c 2005-06-29 16:22:33.000000000 +0000
+@@ -137,7 +137,7 @@
+
+ __shimcall__
+ size_t
+-OsFRead(void *ptr, size_t size, size_t nmemb, FILE *filp)
++OsFRead(void *ptr, size_t size, size_t nmemb, FILE *filp, int *errno_p)
+ {
+ int bytes;
+
+@@ -154,6 +154,8 @@
+ set_fs(oldfs);
+ }
+
++ if (errno_p && bytes < 0) *errno_p = -(bytes);
++
+ if(bytes < 0) {
+ printk(KERN_ERR "%s(filp %p): error %d\n", __FUNCTION__, filp, bytes);
+ return 0;
+@@ -163,7 +165,7 @@
+
+ __shimcall__
+ size_t
+-OsFWrite(const void *ptr, size_t size, size_t nmemb, FILE *filp)
++OsFWrite(const void *ptr, size_t size, size_t nmemb, FILE *filp, int *errno_p)
+ {
+ int bytes;
+
+@@ -180,6 +182,8 @@
+ set_fs(oldfs);
+ }
+
++ if (errno_p && bytes < 0) *errno_p = -(bytes);
++
+ if(bytes < 0) {
+ printk(KERN_ERR "%s(filp %p): error %d\n", __FUNCTION__, filp, bytes);
+ return 0;
diff --git a/net-dialup/hsfmodem/files/hsf-7.18.00.05-kernconfig.patch b/net-dialup/hsfmodem/files/hsf-7.18.00.05-kernconfig.patch
new file mode 100644
index 000000000000..15230dc3b0e2
--- /dev/null
+++ b/net-dialup/hsfmodem/files/hsf-7.18.00.05-kernconfig.patch
@@ -0,0 +1,36 @@
+diff -urN hsfmodem-7.18.00.05full/scripts/cnxtconfig.in hsfmodem-7.18.00.05full-kernconfig/scripts/cnxtconfig.in
+--- hsfmodem-7.18.00.05full/scripts/cnxtconfig.in 2005-06-20 16:04:02.000000000 -0400
++++ hsfmodem-7.18.00.05full-kernconfig/scripts/cnxtconfig.in 2005-07-05 21:29:21.177824944 -0400
+@@ -649,7 +649,7 @@
+ missing=
+ nb=0
+ for opt in ${KERN_CONFIG_REQUIRED}; do
+- if ! kernel_option_set "${opt}"; then
++ if kernel_option_exists "${opt}" && ! kernel_option_set "${opt}"; then
+ if [ ${nb} -eq 0 ]; then
+ missing="CONFIG_${opt}"
+ nb=1
+@@ -676,8 +676,8 @@
+ echo 1>&2
+ echo 1>&2 "ERROR: The kernel at '${KERNELSRC}' was compiled without the following"
+ echo 1>&2 "option${plurial} enabled: ${missing}"
+- echo 1>&2 "${This} option${plurial} ${is} needed for DriverLoader. Please enable ${this} kernel"
+- echo 1>&2 "option${plurial}, re-compile the kernel and try again."
++ echo 1>&2 "${This} option${plurial} ${is} needed for the @CNXTTARGET@ modem driver. Please enable"
++ echo 1>&2 "${this} kernel option${plurial}, re-compile the kernel and try again."
+ return 1
+ fi
+
+@@ -720,6 +720,12 @@
+ return 0
+ }
+
++kernel_option_exists()
++{
++ grep -q "CONFIG_${1}[= ]" "${KERNELSRC}/.config"
++ return $?
++}
++
+ kernel_option_set()
+ {
+ grep -q "^CONFIG_${1}=[yYmM]" "${KERNELSRC}/.config"
diff --git a/net-dialup/hsfmodem/files/hsf-7.18.00.05-simple_class.patch b/net-dialup/hsfmodem/files/hsf-7.18.00.05-simple_class.patch
new file mode 100644
index 000000000000..945de187ffd5
--- /dev/null
+++ b/net-dialup/hsfmodem/files/hsf-7.18.00.05-simple_class.patch
@@ -0,0 +1,152 @@
+diff -urN hsfmodem-7.18.00.05full/modules/GPL/oscompat.h hsfmodem-7.18.00.05full-simple_class/modules/GPL/oscompat.h
+--- hsfmodem-7.18.00.05full/modules/GPL/oscompat.h 2005-06-20 15:18:46.000000000 -0400
++++ hsfmodem-7.18.00.05full-simple_class/modules/GPL/oscompat.h 2005-07-06 18:01:34.000000000 -0400
+@@ -543,4 +543,16 @@
+ #define PCI_SLOT_NAME(x) (x)->dev.bus_id
+ #endif
+
++#ifdef FOUND_CLASS_SIMPLE
++#define CLASS_DEVICE_CREATE(class, dev, device, fmt, rest) class_simple_device_add(class, dev, device, fmt, rest)
++#define CLASS_DESTROY(class) class_simple_destroy(class)
++#define CLASS_DEVICE_DESTROY(class, dev) class_simple_device_remove(dev)
++#define CLASS_CREATE(owner, name) class_simple_create(owner, name)
++#else
++#define CLASS_DEVICE_CREATE(class, dev, device, fmt, rest) class_device_create(class, dev, device, fmt, rest)
++#define CLASS_DESTROY(class) class_destroy(class)
++#define CLASS_DEVICE_DESTROY(class, dev) class_device_destroy(class, dev)
++#define CLASS_CREATE(owner, name) class_create(owner, name)
++#endif
++
+ #endif /* __OSCOMPAT_H */
+diff -urN hsfmodem-7.18.00.05full/modules/Makefile hsfmodem-7.18.00.05full-simple_class/modules/Makefile
+--- hsfmodem-7.18.00.05full/modules/Makefile 2005-06-20 15:25:00.000000000 -0400
++++ hsfmodem-7.18.00.05full-simple_class/modules/Makefile 2005-07-06 18:01:34.000000000 -0400
+@@ -57,6 +57,9 @@
+ KO= ko
+ KBUILD_EXTMOD_SUPPORTED := $(shell egrep -q 'KBUILD_EXTMOD|KERNEL_SOURCE|KERNELSRC' ${CNXT_KERNELSRC}/Makefile 2>/dev/null && echo yes || echo no)
+
++FOUND_CLASS_SIMPLE := $(shell grep -q 'class_simple_device_add' ${CNXT_KERNELSRC}/include/linux/device.h 2> /dev/null && echo -DFOUND_CLASS_SIMPLE)
++CFLAGS+= $(FOUND_CLASS_SIMPLE)
++
+ else
+ KO= o
+ # Configure compiler (on some systems, kgcc must be used to compile kernel code)
+diff -urN hsfmodem-7.18.00.05full/modules/osdcp.c hsfmodem-7.18.00.05full-simple_class/modules/osdcp.c
+--- hsfmodem-7.18.00.05full/modules/osdcp.c 2004-12-14 02:43:59.000000000 -0500
++++ hsfmodem-7.18.00.05full-simple_class/modules/osdcp.c 2005-07-06 18:01:34.000000000 -0400
+@@ -29,7 +29,11 @@
+ static struct list_head dcp_instance_list = LIST_HEAD_INIT(dcp_instance_list);
+ static spinlock_t dcp_lock = SPIN_LOCK_UNLOCKED;
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2)
++#ifdef FOUND_CLASS_SIMPLE
+ static struct class_simple *dcp_class;
++#else
++static struct class *dcp_class;
++#endif
+ #endif
+
+ typedef struct {
+@@ -350,7 +354,7 @@
+ }
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2)
+ if (!IS_ERR(dcp_class))
+- class_simple_device_remove(MKDEV(dcpmajor, pDcp->pDevNode->hwInstNum));
++ CLASS_DEVICE_DESTROY(dcp_class, MKDEV(dcpmajor, pDcp->pDevNode->hwInstNum));
+ #endif
+ #endif
+
+@@ -400,7 +404,7 @@
+ #else
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2)
+ if (!IS_ERR(dcp_class)) {
+- class_simple_device_add(dcp_class, MKDEV(dcpmajor, pDcp->pDevNode->hwInstNum), pDcp->pDevNode->hwDevLink, CNXTTARGET"dcp%d", pDcp->pDevNode->hwInstNum);
++ CLASS_DEVICE_CREATE(dcp_class, MKDEV(dcpmajor, pDcp->pDevNode->hwInstNum), pDcp->pDevNode->hwDevLink, CNXTTARGET"dcp%d", pDcp->pDevNode->hwInstNum);
+ }
+ #endif
+
+@@ -492,7 +496,7 @@
+ {
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2)
+ if (!IS_ERR(dcp_class))
+- class_simple_destroy(dcp_class);
++ CLASS_DESTROY(dcp_class);
+ #endif
+ if(dcpmajor > 0)
+ unregister_chrdev(dcpmajor, CNXTTARGET"dcp");
+@@ -516,7 +520,7 @@
+ }
+
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2)
+- dcp_class = class_simple_create(THIS_MODULE, CNXTTARGET"dcp");
++ dcp_class = CLASS_CREATE(THIS_MODULE, CNXTTARGET"dcp");
+ if (IS_ERR(dcp_class)) {
+ printk(KERN_ERR "%s: cannot create simple class (%ld)\n", __FUNCTION__, PTR_ERR(dcp_class));
+ if(dcpmajor > 0)
+diff -urN hsfmodem-7.18.00.05full/modules/osdiag.c hsfmodem-7.18.00.05full-simple_class/modules/osdiag.c
+--- hsfmodem-7.18.00.05full/modules/osdiag.c 2004-12-14 02:44:02.000000000 -0500
++++ hsfmodem-7.18.00.05full-simple_class/modules/osdiag.c 2005-07-06 18:01:34.000000000 -0400
+@@ -30,7 +30,11 @@
+ static struct list_head diag_instance_list = LIST_HEAD_INIT(diag_instance_list);
+ static spinlock_t diag_lock = SPIN_LOCK_UNLOCKED;
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2)
++#ifdef FOUND_CLASS_SIMPLE
+ static struct class_simple *diag_class;
++#else
++static struct class *diag_class;
++#endif
+ #endif
+
+ #define common_instance_header \
+@@ -659,7 +663,7 @@
+ #else
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2)
+ if (!IS_ERR(diag_class)) {
+- class_simple_device_add(diag_class, MKDEV(diagmajor, pDiag->hwInstNum), hwDevLink, CNXTTARGET"diag%d", pDiag->hwInstNum);
++ CLASS_DEVICE_CREATE(diag_class, MKDEV(diagmajor, pDiag->hwInstNum), hwDevLink, CNXTTARGET"diag%d", pDiag->hwInstNum);
+ }
+ #endif
+
+@@ -764,7 +768,7 @@
+ }
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2)
+ if (!IS_ERR(diag_class))
+- class_simple_device_remove(MKDEV(diagmajor, pDiag->hwInstNum));
++ CLASS_DEVICE_DESTROY(diag_class, MKDEV(diagmajor, pDiag->hwInstNum));
+ #endif
+ #endif
+
+@@ -834,14 +838,14 @@
+ devfs_remove(CNXTTARGET"diagdmp");
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2)
+ if (!IS_ERR(diag_class))
+- class_simple_device_remove(MKDEV(diagmajor, CNXTDIAGDMPMINOR));
++ CLASS_DEVICE_DESTROY(diag_class, MKDEV(diagmajor, CNXTDIAGDMPMINOR));
+ #endif
+ #endif
+ #endif /* DMP || DMP_RETAIL */
+
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2)
+ if (!IS_ERR(diag_class))
+- class_simple_destroy(diag_class);
++ CLASS_DESTROY(diag_class);
+ #endif
+ if(diagmajor > 0)
+ unregister_chrdev(diagmajor, CNXTTARGET"diag");
+@@ -865,7 +869,7 @@
+ }
+
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2)
+- diag_class = class_simple_create(THIS_MODULE, CNXTTARGET"diag");
++ diag_class = CLASS_CREATE(THIS_MODULE, CNXTTARGET"diag");
+ if (IS_ERR(diag_class)) {
+ printk(KERN_ERR "%s: cannot create simple class (%ld)\n", __FUNCTION__, PTR_ERR(diag_class));
+ if(diagmajor > 0)
+@@ -884,7 +888,7 @@
+ #else
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2)
+ if (!IS_ERR(diag_class)) {
+- class_simple_device_add(diag_class, MKDEV(diagmajor, CNXTDIAGDMPMINOR), NULL, CNXTTARGET"diagdmp");
++ CLASS_DEVICE_CREATE(diag_class, MKDEV(diagmajor, CNXTDIAGDMPMINOR), NULL, CNXTTARGET"diagdmp");
+ }
+ #endif
+ devfs_mk_cdev(MKDEV(diagmajor, CNXTDIAGDMPMINOR), S_IFCHR | S_IRUSR | S_IWUSR, CNXTTARGET"diagdmp");
diff --git a/net-dialup/hsfmodem/hsfmodem-7.18.00.05-r1.ebuild b/net-dialup/hsfmodem/hsfmodem-7.18.00.05-r1.ebuild
new file mode 100644
index 000000000000..5f9d6ba1fdf4
--- /dev/null
+++ b/net-dialup/hsfmodem/hsfmodem-7.18.00.05-r1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/hsfmodem/hsfmodem-7.18.00.05-r1.ebuild,v 1.1 2005/07/21 18:09:02 mrness Exp $
+
+inherit eutils
+
+#The document is the same as in hcfpcimodem, even if it has a different URL
+MY_DOC="100498D_RM_HxF_Released.pdf"
+
+DESCRIPTION="Linuxant's modem driver for Conexant HSF chipset"
+HOMEPAGE="http://www.linuxant.com/drivers/hsf/index.php"
+SRC_URI="x86? ( http://www.linuxant.com/drivers/hsf/full/archive/${P}full/${P}full.tar.gz )
+ amd64? ( http://www.linuxant.com/drivers/hsf/full/archive/${P}x86_64full/${P}x86_64full.tar.gz )
+ doc? ( http://www.linuxant.com/drivers/hsf/full/archive/${P}full/${MY_DOC} )"
+
+LICENSE="Conexant"
+KEYWORDS="-* ~x86 ~amd64"
+IUSE="doc"
+SLOT="0"
+
+DEPEND="virtual/libc
+ dev-lang/perl
+ app-arch/cpio"
+
+S="${WORKDIR}"
+
+pkg_setup() {
+ if useq x86; then
+ MY_ARCH_S=${S}/${P}full
+ elif useq amd64; then
+ MY_ARCH_S=${S}/${P}x86_64full
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+
+ cd ${MY_ARCH_S}
+ epatch ${FILESDIR}/hsf-${PV}-errno.patch
+ epatch ${FILESDIR}/hsf-${PV}-kernconfig.patch
+ epatch ${FILESDIR}/hsf-${PV}-simple_class.patch
+}
+
+src_compile() {
+ cd ${MY_ARCH_S}
+ emake all || die "make failed"
+}
+
+src_install () {
+ cd ${MY_ARCH_S}
+ make PREFIX=${D}/usr/ ROOT=${D} install || die "make install failed"
+
+ use doc && dodoc "${DISTDIR}/${MY_DOC}"
+}
+
+pkg_preinst() {
+ local NVMDIR="${ROOT}/etc/${PN}/nvm"
+ if [ -d "${NVMDIR}" ]; then
+ einfo "Cleaning ${NVMDIR}..."
+ rm -rf "${NVMDIR}"
+ eend
+ fi
+}
+
+pkg_postinst() {
+ einfo "To complete the installation and configuration of your HSF modem,"
+ einfo "please run hsfconfig."
+}