public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* patch for PLIP and slow, interrupt-less computers
@ 2001-04-12 20:46 W. Michael Petullo
  2001-04-14 17:44 ` Andreas Schwab
  0 siblings, 1 reply; 2+ messages in thread
From: W. Michael Petullo @ 2001-04-12 20:46 UTC (permalink / raw)
  To: gniibe, linux-kernel

I have written a quick patch for the PLIP driver contained in the 2.4.3
version of the Linux kernel.  This patch allows one to use PLIP with
computers which have an interrupt-less parallel port and a slow processor.
The stock PLIP driver constantly times out on my 80486-based laptop.
This patch adds the ability to specify two key values, trigger_wait and
nibble_wait, when loading the PLIP driver.

Using this patch and adding the following entry to the modules.conf file
on the computers on either side of my PLIP link makes the connection
work nicely:

# Because my laptop is so slow.
options plip                    trigger_wait=50000 nibble_wait=300000

Here is the patch:

================================================================================

--- plip.c	Tue Feb 13 16:15:05 2001
+++ /tmp/linux/drivers/net/plip.c	Thu Apr 12 16:07:07 2001
@@ -137,10 +137,10 @@
 #define PLIP_DELAY_UNIT		   1
 
 /* Connection time out = PLIP_TRIGGER_WAIT * PLIP_DELAY_UNIT usec */
-#define PLIP_TRIGGER_WAIT	 500
+static unsigned long trigger_wait = 500;
 
 /* Nibble time out = PLIP_NIBBLE_WAIT * PLIP_DELAY_UNIT usec */
-#define PLIP_NIBBLE_WAIT        3000
+static unsigned long nibble_wait = 3000;
 
 /* Bottom halves */
 static void plip_kick_bh(struct net_device *dev);
@@ -345,8 +345,8 @@
 	nl->port_owner = 0;
 
 	/* Initialize constants */
-	nl->trigger	= PLIP_TRIGGER_WAIT;
-	nl->nibble	= PLIP_NIBBLE_WAIT;
+	nl->trigger	= trigger_wait;
+	nl->nibble	= nibble_wait;
 
 	/* Initialize task queue structures */
 	INIT_LIST_HEAD(&nl->immediate.list);
@@ -1297,6 +1297,8 @@
 
 MODULE_PARM(parport, "1-" __MODULE_STRING(PLIP_MAX) "i");
 MODULE_PARM(timid, "1i");
+MODULE_PARM(trigger_wait, "i");
+MODULE_PARM(nibble_wait, "i");
 
 static struct net_device *dev_plip[PLIP_MAX] = { NULL, };

================================================================================
 
-- 
W. Michael Petullo

:wq

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: patch for PLIP and slow, interrupt-less computers
  2001-04-12 20:46 patch for PLIP and slow, interrupt-less computers W. Michael Petullo
@ 2001-04-14 17:44 ` Andreas Schwab
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Schwab @ 2001-04-14 17:44 UTC (permalink / raw)
  To: W. Michael Petullo; +Cc: gniibe, linux-kernel

"W. Michael Petullo" <mike@flyn.org> writes:

|> Here is the patch:
|> 
|> ================================================================================
|> 
|> --- plip.c	Tue Feb 13 16:15:05 2001
|> +++ /tmp/linux/drivers/net/plip.c	Thu Apr 12 16:07:07 2001
|> @@ -137,10 +137,10 @@
|>  #define PLIP_DELAY_UNIT		   1
|>  
|>  /* Connection time out = PLIP_TRIGGER_WAIT * PLIP_DELAY_UNIT usec */
|> -#define PLIP_TRIGGER_WAIT	 500
|> +static unsigned long trigger_wait = 500;
           ^^^^^^^^^^^^^
|>  
|>  /* Nibble time out = PLIP_NIBBLE_WAIT * PLIP_DELAY_UNIT usec */
|> -#define PLIP_NIBBLE_WAIT        3000
|> +static unsigned long nibble_wait = 3000;
           ^^^^^^^^^^^^^
|> @@ -1297,6 +1297,8 @@
|>  
|>  MODULE_PARM(parport, "1-" __MODULE_STRING(PLIP_MAX) "i");
|>  MODULE_PARM(timid, "1i");
|> +MODULE_PARM(trigger_wait, "i");
|> +MODULE_PARM(nibble_wait, "i");
                             ^^^
The types don't match.

Andreas.

-- 
Andreas Schwab                                  "And now for something
SuSE Labs                                        completely different."
Andreas.Schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-04-14 17:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-12 20:46 patch for PLIP and slow, interrupt-less computers W. Michael Petullo
2001-04-14 17:44 ` Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox