SOURCES: eplip-2.6.x.patch (NEW), kernel-eplip-WIRING.patch (NEW) ...
witekfl
witekfl at pld-linux.org
Sat Sep 2 09:59:36 CEST 2006
Author: witekfl Date: Sat Sep 2 07:59:36 2006 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- Do not remove these files, please.
---- Files affected:
SOURCES:
eplip-2.6.x.patch (1.3 -> 1.4) (NEW), kernel-eplip-WIRING.patch (1.2 -> 1.3) (NEW)
---- Diffs:
================================================================
Index: SOURCES/eplip-2.6.x.patch
diff -u /dev/null SOURCES/eplip-2.6.x.patch:1.4
--- /dev/null Sat Sep 2 09:59:36 2006
+++ SOURCES/eplip-2.6.x.patch Sat Sep 2 09:59:30 2006
@@ -0,0 +1,369 @@
+diff -Nru eplip-0.5.6.orig/ecp.c eplip-0.5.6/ecp.c
+--- eplip-0.5.6.orig/ecp.c 2002-05-15 12:55:55.000000000 +0200
++++ eplip-0.5.6/ecp.c 2004-02-10 12:59:37.000000000 +0100
+@@ -940,7 +940,7 @@
+ int irq=0;
+ unsigned long irq_flags;
+
+- sti();
++ local_irq_enable();
+
+ irq_flags = probe_irq_on();
+
+@@ -978,7 +978,7 @@
+
+ short dma_status, new_dma_status ,i , dma;
+
+- sti();
++ local_irq_enable();
+
+ /** Reset just in case the FIFO is not empty
+ */
+Pliki eplip-0.5.6.orig/ecp.o i eplip-0.5.6/ecp.o różnią się
+diff -Nru eplip-0.5.6.orig/eplip-drv.c eplip-0.5.6/eplip-drv.c
+--- eplip-0.5.6.orig/eplip-drv.c 2002-05-17 14:55:33.000000000 +0200
++++ eplip-0.5.6/eplip-drv.c 2004-02-11 11:00:12.145571720 +0100
+@@ -5,10 +5,6 @@
+ #include <linux/module.h>
+ #include <linux/kernel.h>
+
+-#if LINUX_VERSION_CODE < 0x20200
+-# error "This module requires at least linux-2.2"
+-#endif
+-
+ /*
+ * Then include whatever header you need.
+ * Most likely you need the following:
+@@ -341,8 +337,8 @@
+
+ struct net_device_stats enet_stats;
+
+- struct tq_struct immediate; /** for immediate Bottom Half handler */
+- struct tq_struct deferred; /** for deffered Bottom Half handler */
++ struct work_struct immediate; /** for immediate Bottom Half handler */
++ struct work_struct deferred; /** for deffered Bottom Half handler */
+
+ struct eplip_local snd_data;
+ struct eplip_local rcv_data;
+@@ -405,7 +401,7 @@
+ struct hh_cache *hh);
+ #endif
+ static int eplip_open(struct net_device *dev);
+-static void eplip_interrupt(int irq, void *dev_id, struct pt_regs *regs);
++static int eplip_interrupt(int irq, void *dev_id, struct pt_regs *regs);
+ static int eplip_close(struct net_device *dev);
+ static struct net_device_stats *eplip_get_stats(struct net_device *dev);
+ static int eplip_change_mtu(struct net_device *dev, int new_mtu);
+@@ -414,6 +410,8 @@
+ static int eplip_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
+ #endif
+
++
++
+ /** Low Level Transmit routines */
+ __inline __u32
+ mk_chk( __u8 *buff , __u16 nbytes ) ;
+@@ -548,6 +546,7 @@
+ #endif
+ nl->dev = ecpdev;
+
++
+ #ifdef EPLIP_16bit_FIFO_SUPPORT
+ switch( ecpdev->pword ){
+ case 8: nl->send_hard_header = eplip_send_hard_header;
+@@ -574,19 +573,13 @@
+
+ /* Initialize task queue structures */
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+- INIT_LIST_HEAD(&nl->immediate.list);
+- INIT_LIST_HEAD(&nl->deferred.list);
++ INIT_WORK(&nl->immediate, (void (*)(void *))eplip_bh, dev);
++ INIT_WORK(&nl->deferred, (void (*)(void *))eplip_kick_bh, dev);
++
+ #else
+ nl->immediate.next = NULL;
+ nl->deferred.next = NULL;
+ #endif
+- nl->immediate.sync = 0;
+- nl->immediate.routine = (void (*)(void *))eplip_bh;
+- nl->immediate.data = dev;
+-
+- nl->deferred.sync = 0;
+- nl->deferred.routine = (void (*)(void *))eplip_kick_bh;
+- nl->deferred.data = dev;
+
+ spin_lock_init(&nl->lock);
+
+@@ -635,8 +628,7 @@
+ printk(KERN_DEBUG"%s: Scheduling this task to the IMMEDIATE_BH queue\n",dev->name);
+ #endif
+ //nl->is_deferred = 0 ;
+- queue_task(&nl->immediate, &tq_immediate);
+- mark_bh(IMMEDIATE_BH);
++ schedule_work(&nl->immediate);
+
+ }
+
+@@ -664,7 +656,7 @@
+ if ((r = (*f)(dev, nl, snd, rcv)) != OK
+ && (r = eplip_bh_timeout_error(dev, nl, snd, rcv, r)) != OK) {
+ nl->is_deferred = 1;
+- queue_task(&nl->deferred, &tq_timer);
++ schedule_delayed_work(&nl->deferred, 1);
+ }
+
+ }
+@@ -836,8 +828,9 @@
+
+ //printk(KERN_DEBUG"%s: inside eplip_bh_timeout_error()\n",dev->name);
+ //nl->is_deferred = 0 ;
+- queue_task( &nl->immediate , &tq_immediate );
+- mark_bh( IMMEDIATE_BH );
++ //queue_task( &nl->immediate , &tq_immediate );
++ //mark_bh( IMMEDIATE_BH );
++ schedule_work(&nl->immediate);
+ spin_unlock_irq(&nl->lock);
+ return OK;
+ }
+@@ -966,8 +959,7 @@
+ if (nl->connection == EPLIP_CN_NONE) {
+
+ nl->connection = EPLIP_CN_SEND;
+- queue_task(&nl->immediate, &tq_immediate);
+- mark_bh(IMMEDIATE_BH);
++ schedule_work(&nl->immediate);
+ }
+
+ else
+@@ -976,7 +968,7 @@
+ printk(KERN_DEBUG"%s:RCV DMA in progress.Deferring this SND request immediately\n",dev->name);
+ #endif
+ nl->is_deferred = 1;
+- queue_task(&nl->deferred, &tq_timer);
++ schedule_delayed_work(&nl->deferred, 1);
+ }
+ spin_unlock_irq(&nl->lock);
+
+@@ -1017,8 +1009,7 @@
+ //printk(KERN_ERR"inside dma_timeout_routine() \n");
+ if(nl->dma_state != EPLIP_DMA_TERM ) {
+ nl->dma_state = EPLIP_DMA_ERROR ;
+- queue_task(&nl->immediate, &tq_immediate);
+- mark_bh(IMMEDIATE_BH);
++ schedule_work(&nl->immediate);
+
+ }
+ spin_unlock_irq(&nl->lock);
+@@ -1145,8 +1136,8 @@
+ if ( nl->connection == EPLIP_CN_RECEIVE) {
+ /* Interrupted. */
+ nl->enet_stats.collisions++;
+- queue_task( &nl->immediate , &tq_immediate );
+- mark_bh( IMMEDIATE_BH );
++ schedule_work(&nl->immediate);
++
+ spin_unlock_irq(&nl->lock);
+ return OK;
+ }
+@@ -1353,8 +1344,7 @@
+ if( snd->state != EPLIP_PK_DONE ) {
+
+ nl->connection = EPLIP_CN_SEND;
+- queue_task(&nl->immediate, &tq_immediate);
+- mark_bh(IMMEDIATE_BH);
++ schedule_work(&nl->immediate);
+ }
+ else {
+
+@@ -1553,8 +1543,7 @@
+ printk(KERN_DEBUG"%s: Fetching Deferred SND Request\n",dev->name);
+ #endif
+ nl->connection = EPLIP_CN_SEND;
+- queue_task(&nl->immediate, &tq_immediate);
+- mark_bh(IMMEDIATE_BH);
++ schedule_work(&nl->immediate);
+ spin_unlock_irq(&nl->lock);
+ return OK;
+ } else {
+@@ -2084,7 +2073,7 @@
+ /** Start acception queued packets */
+ netif_start_queue (dev);
+
+- MOD_INC_USE_COUNT;
++// MOD_INC_USE_COUNT;
+
+ return 0;
+ }
+@@ -2109,7 +2098,7 @@
+ * called only if our HWD does not share the IRQ line(FIX it)
+ */
+ disable_irq(dev->irq);
+- synchronize_irq();
++ synchronize_irq(dev->irq);
+
+ nl->is_deferred = 0;
+ nl->connection = EPLIP_CN_NONE;
+@@ -2134,7 +2123,7 @@
+
+ ecp_close(nl->dev);
+
+- MOD_DEC_USE_COUNT;
++ //MOD_DEC_USE_COUNT;
+
+ return 0;
+
+@@ -2203,7 +2192,7 @@
+ * The typical workload of the driver:
+ * Handle the network interface interrupts.
+ */
+-static void
++static int
+ eplip_interrupt(int irq, void *dev_id, struct pt_regs * regs)
+ {
+ struct net_device *dev = dev_id;
+@@ -2229,8 +2218,7 @@
+ __u8 ecr = read_econtrol(nl->dev);
+ if( ecr & SRVC_INTR ){
+ nl->dma_state = EPLIP_DMA_TERM ;
+- queue_task(&nl->immediate, &tq_immediate);
+- mark_bh(IMMEDIATE_BH);
++ schedule_work(&nl->immediate);
+
+ #if NET_DEBUG > 3
+ printk(KERN_DEBUG "%s: DMA Terminatinal Count Interrupt\n",dev->name);
+@@ -2271,8 +2259,7 @@
+ #endif
+ rcv->state = EPLIP_PK_TRIGGER;
+ nl->connection = EPLIP_CN_RECEIVE;
+- queue_task(&nl->immediate, &tq_immediate);
+- mark_bh(IMMEDIATE_BH);
++ schedule_work(&nl->immediate);
+
+ break;
+
+@@ -2288,8 +2275,7 @@
+ __u8 ecr = read_econtrol(nl->dev);
+ if( ecr & SRVC_INTR ){
+ nl->dma_state = EPLIP_DMA_TERM ;
+- queue_task(&nl->immediate, &tq_immediate);
+- mark_bh(IMMEDIATE_BH);
++ schedule_work(&nl->immediate);
+ #if NET_DEBUG > 3
+ printk(KERN_DEBUG "%s: DMA Terminatinal Count Interrupt\n",dev->name);
+ #endif
+@@ -2309,6 +2295,7 @@
+ break;
+ }
+ spin_unlock_irq(&nl->lock);
++ return IRQ_HANDLED;
+ }
+
+ /*****************************************************************************/
+@@ -2400,11 +2387,10 @@
+
+ }
+
+- if( check_region( dev->iobase , IO_EXTENT_BASE ) ) {
++ if( !request_region( dev->iobase , IO_EXTENT_BASE, driver ) ) {
+ printk(KERN_ERR "%s: BASEIO:%x Already Claimed by another device\n",driver,dev->iobase);
+ return -EAGAIN ;
+ }
+- request_region( dev->iobase, IO_EXTENT_BASE , driver ) ;
+ dev->flags |= ECPDEV_IOBASE_CLAIMED;
+
+
+@@ -2412,12 +2398,11 @@
+ * So set the dev->ioextent according to the ISA ECP spec.
+ */
+ dev->ioextent = dev->iobase + 0x400 ;
+- if( check_region( dev->ioextent,IO_EXTENT_ECP ) ) {
++ if( !request_region( dev->ioextent,IO_EXTENT_ECP, driver ) ) {
+ printk(KERN_ERR "%s: ECPIO:%x Already Claimed by another device\n",driver,dev->iobase+0x400);
+ return -EAGAIN ;
+ }
+
+- request_region( dev->ioextent,IO_EXTENT_ECP , driver );
+ dev->flags |=ECPDEV_IOEXT_CLAIMED;
+
+ getPCAPS( dev );
+@@ -2490,7 +2475,6 @@
+ int ndevs = 0 ;
+ int error = 0 ;
+
+- EXPORT_NO_SYMBOLS;
+
+ printk(KERN_INFO "%s-%s(%s) by %s(%s)\n",driver,version,date,author,email);
+
+@@ -2620,6 +2604,7 @@
+ cleanup( dev_eplip ) ;
+ }
+
++
+ #ifdef MODULE
+
+ module_init( eplip_init ) ;
+diff -Nru eplip-0.5.6.orig/Makefile eplip-0.5.6/Makefile
+--- eplip-0.5.6.orig/Makefile 2002-05-16 17:19:22.000000000 +0200
++++ eplip-0.5.6/Makefile 2004-02-11 10:43:28.524145368 +0100
+@@ -11,38 +11,12 @@
+ # generic material, independent of this specific directory, into
+ # ./Rules.make. Read that file for details
+
+-TOPDIR := $(shell pwd)
+-include $(TOPDIR)/Rules.make
+
+-# Add your debugging flag (or not) to CFLAGS
+-ifeq ($(DEBUG),y)
+- DEBFLAGS = -O -g -DSIMPLE_DEBUG # "-O" is needed to expand inlines
+-else
+- DEBFLAGS = -O2 -fomit-frame-pointer
++ifeq ($(CONFIG_X86), y)
++ifeq ($(CONFIG_ISA), y)
++ifeq ($(CONFIG_EPLIP), m)
++obj-m += eplip.o
++eplip-objs := ecp.o eplip-drv.o
++endif
+ endif
+-
+-CFLAGS += $(DEBFLAGS)
+-CFLAGS += $(MACRODEFS)
+-
+-MODINSTDIR = $(INSTALLDIR)/net
+-
+-TARGET = eplip
+-
+-all: eplip.o
+-
+-install:
+-
+- install -d $(MODINSTDIR)
+- install -c $(TARGET).o $(MODINSTDIR)
+-
+-clean:
+- rm -f *.o *~ core
+-
+-$(TARGET).o:
+-ifdef KCONFIG_ERROR
+- $(error $(KCONFIG_ERROR) )
+ endif
+- $(CC) $(CFLAGS) -pipe -c ecp.c
+- $(CC) $(CFLAGS) -pipe -c eplip-drv.c
+- $(LD) -r -o $@ ecp.o eplip-drv.o
+-# $(LD) -r -o $(TARGET).o ecp.o eplip-drv.o
+diff -Nru eplip-0.5.6.orig/sysdep.h eplip-0.5.6/sysdep.h
+--- eplip-0.5.6.orig/sysdep.h 2002-03-10 16:15:09.000000000 +0100
++++ eplip-0.5.6/sysdep.h 2004-02-10 09:57:32.609153040 +0100
+@@ -14,9 +14,10 @@
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,2,0) /* not < 2.2 */
+ # error "This kernel is too old: not supported by this file"
+ #endif
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) /* not > 2.4, by now */
+-# error "This kernel is too recent: not supported by this file"
+-#endif
++
++//#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) /* not > 2.4, by now */
++//# error "This kernel is too recent: not supported by this file"
++//#endif
+ #if (LINUX_VERSION_CODE & 0xff00) == 3 /* not 2.3 */
+ # error "Please don't use linux-2.3, use 2.4 instead"
+ #endif
================================================================
Index: SOURCES/kernel-eplip-WIRING.patch
diff -u /dev/null SOURCES/kernel-eplip-WIRING.patch:1.3
--- /dev/null Sat Sep 2 09:59:36 2006
+++ SOURCES/kernel-eplip-WIRING.patch Sat Sep 2 09:59:30 2006
@@ -0,0 +1,18 @@
+--- eplip-0.5.6/WIRING.old Tue Mar 4 15:09:24 2003
++++ eplip-0.5.6/WIRING Tue Mar 4 15:11:11 2003
+@@ -4,12 +4,13 @@
+ HostCLK 1 ------------------- 10 PeriphCLK 10
+ PeriphCLK10 ------------------- 1 HostCLK 1
+ PeriphACK11 ------------------- 14 HostACK 14
+-nACKRev 12 -------------------- 16 nPeriphRequest 31
++nACKRev 12 -------------------- 16 nReverseRequest 31
+ X-flag 13 -------------------- 17 IEEE1284 mode 36
+ 14 -------------------- 11 11
+ 16 -------------------- 12 12
+ 17 -------------------- 13 13
+-GND 18-25 ----------------- 18-25 GND
++ 18 -------------------- 15 nPeriphRequest
++GND 19-25 ----------------- 19-25 GND
+ D0 2 --------------------- 2 D0 2
+ D1 3 --------------------- 3 D1 3
+ D2 4 --------------------- 4 D2 4
================================================================
More information about the pld-cvs-commit
mailing list