summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlin Năstac <mrness@gentoo.org>2005-09-17 09:11:11 +0000
committerAlin Năstac <mrness@gentoo.org>2005-09-17 09:11:11 +0000
commitf05a5e410549a6e8e01269ff2ea08210ff707132 (patch)
tree1b4bf1b86157db623a06d020c17effd60d0b7fbd /net-dialup/hcfpcimodem/files
parentremove unused fixheadtails inherit (diff)
downloadhistorical-f05a5e410549a6e8e01269ff2ea08210ff707132.tar.gz
historical-f05a5e410549a6e8e01269ff2ea08210ff707132.tar.bz2
historical-f05a5e410549a6e8e01269ff2ea08210ff707132.zip
add upstream fix for kernel >= 2.6.3 (#106103); remove obsolete ver
Package-Manager: portage-2.0.51.22-r2
Diffstat (limited to 'net-dialup/hcfpcimodem/files')
-rw-r--r--net-dialup/hcfpcimodem/files/digest-hcfpcimodem-1.05-r11
-rw-r--r--net-dialup/hcfpcimodem/files/digest-hcfpcimodem-1.06-r12
-rw-r--r--net-dialup/hcfpcimodem/files/hcfpcimodem-1.05-nvminstall.patch12
-rw-r--r--net-dialup/hcfpcimodem/files/hcfpcimodem-1.06-simple_class.patch118
4 files changed, 120 insertions, 13 deletions
diff --git a/net-dialup/hcfpcimodem/files/digest-hcfpcimodem-1.05-r1 b/net-dialup/hcfpcimodem/files/digest-hcfpcimodem-1.05-r1
deleted file mode 100644
index b0a25e559c79..000000000000
--- a/net-dialup/hcfpcimodem/files/digest-hcfpcimodem-1.05-r1
+++ /dev/null
@@ -1 +0,0 @@
-MD5 6f3974885a1b2c2cabab7be36d9eb5c1 hcfpcimodem-1.05full.tar.gz 660713
diff --git a/net-dialup/hcfpcimodem/files/digest-hcfpcimodem-1.06-r1 b/net-dialup/hcfpcimodem/files/digest-hcfpcimodem-1.06-r1
new file mode 100644
index 000000000000..c8934c19a751
--- /dev/null
+++ b/net-dialup/hcfpcimodem/files/digest-hcfpcimodem-1.06-r1
@@ -0,0 +1,2 @@
+MD5 e8e9be8e324937a30856d38566d812da hcfpcimodem-1.06full.tar.gz 663962
+MD5 e6d8fea8f5f641d7bb4dfb33c6f478e7 100498D_RM_HxF_Released.pdf 718949
diff --git a/net-dialup/hcfpcimodem/files/hcfpcimodem-1.05-nvminstall.patch b/net-dialup/hcfpcimodem/files/hcfpcimodem-1.05-nvminstall.patch
deleted file mode 100644
index ae0d4c86b2c6..000000000000
--- a/net-dialup/hcfpcimodem/files/hcfpcimodem-1.05-nvminstall.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Nru hcfpcimodem-1.05full.orig/nvm/makefile hcfpcimodem-1.05full/nvm/makefile
---- hcfpcimodem-1.05full.orig/nvm/makefile 2004-12-14 09:51:07.000000000 +0200
-+++ hcfpcimodem-1.05full/nvm/makefile 2005-03-17 13:40:01.689242088 +0200
-@@ -68,7 +68,7 @@
- touch $(NVMCVTDIR)/.linksame
-
- install: all $(CNXTNVMDIR)
-- cd $(NVMCVTDIR) && (find $(patsubst %, $(CNXTTARGET)%, $(NVMDIRS)) | cpio -pdmu $(CNXTNVMDIR))
-+ cp -a $(NVMCVTDIR)/* $(CNXTNVMDIR)
-
- $(NVMCVTDIR) $(CNXTNVMDIR):
- $(MKDIR) -p $@
diff --git a/net-dialup/hcfpcimodem/files/hcfpcimodem-1.06-simple_class.patch b/net-dialup/hcfpcimodem/files/hcfpcimodem-1.06-simple_class.patch
new file mode 100644
index 000000000000..0a5d518e2bc3
--- /dev/null
+++ b/net-dialup/hcfpcimodem/files/hcfpcimodem-1.06-simple_class.patch
@@ -0,0 +1,118 @@
+diff -urN hcfpcimodem-1.06full/modules/GPL/oscompat.h hcfpcimodem-1.06full-simple_class/modules/GPL/oscompat.h
+--- hcfpcimodem-1.06full/modules/GPL/oscompat.h 2005-06-20 15:18:46.000000000 -0400
++++ hcfpcimodem-1.06full-simple_class/modules/GPL/oscompat.h 2005-09-07 18:16:54.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 hcfpcimodem-1.06full/modules/Makefile hcfpcimodem-1.06full-simple_class/modules/Makefile
+--- hcfpcimodem-1.06full/modules/Makefile 2005-06-20 15:25:00.000000000 -0400
++++ hcfpcimodem-1.06full-simple_class/modules/Makefile 2005-09-07 18:16:54.000000000 -0400
+@@ -48,6 +48,16 @@
+ KMODS_DIR := /lib/modules/$(KERNELVER)
+ CNXT_MODS_DIR := $(KMODS_DIR)/extra
+
++# On SuSE 9.0 and up, CNXT_KERNELSRC points to an incomplete kernel source
++# directory and some include files are not available in this tree
++SUSE_OBJ_TREE := $(shell if grep -q '^KERNELSRC ' "${CNXT_KERNELSRC}/Makefile" && [ -d "${CNXT_KERNELSRC}" ]; then echo "yes"; else echo "no"; fi)
++
++ifeq ($(SUSE_OBJ_TREE),yes)
++REAL_KERNELSRC := $(shell grep '^KERNELSRC ' "${CNXT_KERNELSRC}/Makefile" | awk '{print $3}')
++else
++REAL_KERNELSRC := $(CNXT_KERNELSRC)
++endif
++
+ FOUND_PCI_DEV_SLOT_NAME := $(shell grep -q 'slot_name' ${CNXT_KERNELSRC}/include/linux/pci.h 2> /dev/null && echo -DFOUND_PCI_DEV_SLOT_NAME)
+ CFLAGS+= $(FOUND_PCI_DEV_SLOT_NAME)
+
+@@ -57,6 +67,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' ${REAL_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 hcfpcimodem-1.06full/modules/osdiag.c hcfpcimodem-1.06full-simple_class/modules/osdiag.c
+--- hcfpcimodem-1.06full/modules/osdiag.c 2004-12-14 02:50:07.000000000 -0500
++++ hcfpcimodem-1.06full-simple_class/modules/osdiag.c 2005-09-07 18:17:35.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");