lkml.org 
[lkml]   [1996]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: 'Mega patch 2.1.14#5'
Date

Hi Alan,

Some comments & additional minor fixes for the 2.1.14-megapatch5.gz:

1) Don't know if the MCA mob are aware of this, but the 3c529 card *does*
work with the 3c509 driver, as documented in the E'net-HowTo. Adding
the probe code to it (given the new MCA probe functions) should be
fairly easy.

2) It appears that the smc-mca.c source could be easily merged
into smc-ultra.c since the only difference is the probing. This
would reduce the code maintenance required for bug fixes, etc. For
example, smc-mca was cloned from smc-ultra.c before the PIO support
was added to the ISA driver, and so now that code should be grafted
onto the MCA driver as well. (No real rush for this merge - can be
done at anytime, but the sooner the better. I will have a look at
it if/when I get a spare tick.)

3) Re ANK's 8390 multicast changes to use hardware filtering: The NS docos
don't specify that you have to kill the NIC while uploading a new filter
table. As ANK has it coded at present, calling set_multicast_list()
will implicitly restart the NIC even if it was stopped when called.
Fortunately dev_mc_upload() checks dev->flags&IFF_UP so this case should
be okay. The only other case is during an overrun -- there the interface
is marked as up, but the NIC is stopped until the interrupt (and overrun
condition) are serviced, leaving a small window.

I'd expect it to invite more troubles from clones by flicking the NIC
off and on again rather than just leaving it alone. It would make more
sense to just clear the accept multicast bit in the NIC, load the hash
table, and then re-set the accept multicast bit. I've done that below.

4) Shaper is meant to be a module only, but config offers it as [N/y/m/?].
We can play games with dep_tristate and just add an "m" instead of
a $CONFIG_SOMETHING to the end of the line, which gives a nice [N/m/?]
as a choice (see drivers/net/Config.in patch below).

5) Fix the following as reported by mkdep:

tunnel.c doesn't need config
dev_mcast.c needs config but has not included config file
dst.c doesn't need config
scm.c doesn't need config
ipip.c needs config but has not included config file

6) Fix "unused variable" gcc warnings when using my updated ne.c as a
module. Purely cosmetic.

7) Various other misc bits, comments, etc. that I've since found or forgot
to include in my earlier patch.


PS: Alan, minor nit: your "--exclude-from" file is missing the following:

linux/drivers/char/uni_hash.tbl
linux/include/linux/compile.h
linux/drivers/char/conmakehash
linux/scripts/mkdep
linux/vmlinux

Patch against (2.1.14 + 2.1.14-megapatch5.gz) follows.

Paul.
--
main(){long i,f,m=19248;f=open("/dev/tty",0);if(!fork())for(;;i++,ioctl(f,m,
(1<<23)+(rand()&2047)),ioctl(f,m+2,rand()%8),sleep(1));} /* Linux Console */


diff -ur /tmp/linux-2114+alan/Documentation/00-INDEX linux/Documentation/00-INDEX
--- /tmp/linux-2114+alan/Documentation/00-INDEX Sun Dec 8 17:19:46 1996
+++ linux/Documentation/00-INDEX Sun Dec 8 18:35:09 1996
@@ -50,6 +50,8 @@
- list of magic numbers used to mark/protect kernel data structures.
mandatory.txt
- info on the linux implementation of Sys V mandatory file locking.
+mca.txt
+ - info on supporting Micro Channel Architecture (e.g. PS/2) systems.
modules.txt
- short guide on how to make kernel parts into loadable modules
networking/
diff -ur /tmp/linux-2114+alan/Documentation/mca.txt linux/Documentation/mca.txt
--- /tmp/linux-2114+alan/Documentation/mca.txt Sun Dec 8 17:19:47 1996
+++ linux/Documentation/mca.txt Sun Dec 8 20:22:14 1996
@@ -170,7 +170,7 @@
#ifdef CONFIG_MCA'ed, for your convenience, although PCI users might be
able to use it...)

-The serial drivers were modified to support the extended IO port rangee
+The serial drivers were modified to support the extended IO port range
of the typical MCA system (also #ifdef CONFIG_MCA).

The following devices work with existing drivers:
diff -ur /tmp/linux-2114+alan/Documentation/networking/00-INDEX linux/Documentation/networking/00-INDEX
--- /tmp/linux-2114+alan/Documentation/networking/00-INDEX Thu Jun 6 21:57:43 1996
+++ linux/Documentation/networking/00-INDEX Sun Dec 8 17:25:56 1996
@@ -20,6 +20,8 @@
- info and "insmod" parameters for all network driver modules.
ppp.txt
- info on what software you should use to run PPP.
+shaper.txt
+ - info on the module that can shape/limit transmitted traffic.
tcp.txt
- short blurb on how TCP output takes place.
tulip.txt
diff -ur /tmp/linux-2114+alan/drivers/net/3c509.c linux/drivers/net/3c509.c
--- /tmp/linux-2114+alan/drivers/net/3c509.c Sun Dec 8 17:19:49 1996
+++ linux/drivers/net/3c509.c Sun Dec 8 18:34:46 1996
@@ -167,7 +167,11 @@
}
}

-#ifdef CONFIG_509_MCA /* this doesn't work with CONFIG_MCA */
+/*
+ * This has to be coded according to Documentation/mca.txt before
+ * this driver can be used with the 3c529 MCA cards.
+ */
+#if 0 /* #ifdef CONFIG_MCA */
if (MCA_bus) {
mca_adaptor_select_mode(1);
for (i = 0; i < 8; i++)
diff -ur /tmp/linux-2114+alan/drivers/net/8390.c linux/drivers/net/8390.c
--- /tmp/linux-2114+alan/drivers/net/8390.c Sun Dec 8 17:19:49 1996
+++ linux/drivers/net/8390.c Sun Dec 8 21:06:14 1996
@@ -30,7 +30,7 @@
Paul Gortmaker : exchange static int ei_pingpong for a #define,
also add better Tx error handling.
Paul Gortmaker : rewrite Rx overrun handling as per NS specs.
- Alexey Kuznetsov : use the software multicast filter.
+ Alexey Kuznetsov : use the Autodin II six bit hash multicast filter.


Sources:
@@ -732,18 +732,19 @@
make_mc_bits(mc_bits, dev);
}

- /* I am not great expert in 8390 cards, but I am afraid
- * that loading MC filter to running card can be dangerous.
- * (More modern cards serialize loading via special frame.)
- * So that I try to avoid too frequent loading. --ANK
+ /*
+ * DP8390 manuals don't specify any magic sequence for altering
+ * the multicast regs on an already running card. To be safe, we
+ * ensure multicast mode is off prior to loading up the new hash
+ * table. If this proves to be not enough, we can always resort
+ * to stopping the NIC, loading the table and then restarting.
*/
if (memcmp(mc_bits, ei->mcfilter, 8) != 0) {
+ outb_p(E8390_RXCONFIG, ioaddr + EN0_RXCR);
save_flags(flags);
cli();
- outb_p(E8390_NODMA + E8390_PAGE1 + E8390_STOP, ioaddr);
for(i = 0; i < 8; i++)
outb_p(mc_bits[i], ioaddr + EN1_MULT + i);
- outb_p(E8390_NODMA + E8390_PAGE0 + E8390_START, ioaddr);
restore_flags(flags);

memcpy(ei->mcfilter, mc_bits, 8);
diff -ur /tmp/linux-2114+alan/drivers/net/Config.in linux/drivers/net/Config.in
--- /tmp/linux-2114+alan/drivers/net/Config.in Sun Dec 8 17:19:49 1996
+++ linux/drivers/net/Config.in Sun Dec 8 19:16:16 1996
@@ -141,7 +141,9 @@
tristate 'IBM Tropic chipset based adaptor support' CONFIG_IBMTR
fi

-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
- tristate 'Traffic Shaper (EXPERIMENTAL)' CONFIG_SHAPER
+if [ "$CONFIG_MODULES" = "y" ]; then
+ if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
+ dep_tristate 'Traffic Shaper (EXPERIMENTAL)' CONFIG_SHAPER m
+ fi
fi

diff -ur /tmp/linux-2114+alan/drivers/net/Space.c linux/drivers/net/Space.c
--- /tmp/linux-2114+alan/drivers/net/Space.c Sun Dec 8 17:19:49 1996
+++ linux/drivers/net/Space.c Sun Dec 8 19:42:36 1996
@@ -67,6 +67,7 @@
extern int elmc_probe(struct device *);
extern int elplus_probe(struct device *);
extern int ac3200_probe(struct device *);
+extern int es_probe(struct device *);
extern int e2100_probe(struct device *);
extern int ni52_probe(struct device *);
extern int ni65_probe(struct device *);
@@ -133,6 +134,9 @@
#endif
#ifdef CONFIG_AC3200 /* Ansel Communications EISA 3200. */
&& ac3200_probe(dev)
+#endif
+#ifdef CONFIG_ES3210
+ && es_probe(dev)
#endif
#ifdef CONFIG_E2100 /* Cabletron E21xx series. */
&& e2100_probe(dev)
diff -ur /tmp/linux-2114+alan/drivers/net/es3210.c linux/drivers/net/es3210.c
--- /tmp/linux-2114+alan/drivers/net/es3210.c Sun Dec 8 17:19:50 1996
+++ linux/drivers/net/es3210.c Sun Dec 8 20:18:05 1996
@@ -64,7 +64,7 @@
int es_probe1(struct device *dev, int ioaddr);

static int es_open(struct device *dev);
-static int es_close_card(struct device *dev);
+static int es_close(struct device *dev);

static void es_reset_8390(struct device *dev);

@@ -270,7 +270,7 @@
ei_status.get_8390_hdr = &es_get_8390_hdr;

dev->open = &es_open;
- dev->stop = &es_close_card;
+ dev->stop = &es_close;
NS8390_init(dev, 0);
return 0;
}
@@ -362,7 +362,7 @@
return 0;
}

-static int es_close_card(struct device *dev)
+static int es_close(struct device *dev)
{

if (ei_debug > 1)
@@ -379,7 +379,7 @@
#define MAX_ES_CARDS 4 /* Max number of ES3210 cards per module */
#define NAMELEN 8 /* # of chars for storing dev->name */
static char namelist[NAMELEN * MAX_ES_CARDS] = { 0, };
-static struct device dev_ac32[MAX_ES_CARDS] = {
+static struct device dev_es3210[MAX_ES_CARDS] = {
{
NULL, /* assign a chunk of namelist[] below */
0, 0, 0, 0,
@@ -398,7 +398,7 @@
int this_dev, found = 0;

for (this_dev = 0; this_dev < MAX_ES_CARDS; this_dev++) {
- struct device *dev = &dev_ac32[this_dev];
+ struct device *dev = &dev_es3210[this_dev];
dev->name = namelist+(NAMELEN*this_dev);
dev->irq = irq[this_dev];
dev->base_addr = io[this_dev];
@@ -423,7 +423,7 @@
int this_dev;

for (this_dev = 0; this_dev < MAX_ES_CARDS; this_dev++) {
- struct device *dev = &dev_ac32[this_dev];
+ struct device *dev = &dev_es3210[this_dev];
if (dev->priv != NULL) {
kfree(dev->priv);
dev->priv = NULL;
diff -ur /tmp/linux-2114+alan/drivers/net/ne.c linux/drivers/net/ne.c
--- /tmp/linux-2114+alan/drivers/net/ne.c Sun Dec 8 17:19:50 1996
+++ linux/drivers/net/ne.c Sun Dec 8 22:47:55 1996
@@ -62,9 +62,11 @@
/* Do we have a non std. amount of memory? (in units of 256 byte pages) */
/* #define PACKETBUF_MEMSIZE 0x40 */

-/* A zero-terminated list of I/O addresses to be probed. */
+/* A zero-terminated list of I/O addresses to be probed at boot. */
+#ifndef MODULE
static unsigned int netcard_portlist[] =
{ 0x300, 0x280, 0x320, 0x340, 0x360, 0};
+#endif

#ifdef CONFIG_PCI
/* Ack! People are making PCI ne2000 clones! Oh the horror, the horror... */
@@ -165,7 +167,6 @@

int ne_probe(struct device *dev)
{
- int i;
int base_addr = dev ? dev->base_addr : 0;

/* First check any supplied i/o locations. User knows best. <cough> */
@@ -182,8 +183,8 @@

#ifndef MODULE
/* Last resort. The semi-risky ISA auto-probe. */
- for (i = 0; netcard_portlist[i]; i++) {
- int ioaddr = netcard_portlist[i];
+ for (base_addr = 0; netcard_portlist[base_addr] != 0; base_addr++) {
+ int ioaddr = netcard_portlist[base_addr];
if (check_region(ioaddr, NE_IO_EXTENT))
continue;
if (ne_probe1(dev, ioaddr) == 0)
diff -ur /tmp/linux-2114+alan/drivers/net/tunnel.c linux/drivers/net/tunnel.c
--- /tmp/linux-2114+alan/drivers/net/tunnel.c Sun Dec 8 17:19:51 1996
+++ linux/drivers/net/tunnel.c Sun Dec 8 19:28:38 1996
@@ -62,7 +62,6 @@
*/

#include <linux/module.h>
-#include <linux/config.h>
#include <linux/types.h>
#include <linux/socket.h>
#include <linux/in.h>
diff -ur /tmp/linux-2114+alan/net/core/dev_mcast.c linux/net/core/dev_mcast.c
--- /tmp/linux-2114+alan/net/core/dev_mcast.c Sun Dec 8 17:20:01 1996
+++ linux/net/core/dev_mcast.c Sun Dec 8 19:35:09 1996
@@ -23,6 +23,7 @@
#include <asm/uaccess.h>
#include <asm/system.h>
#include <asm/bitops.h>
+#include <linux/config.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/sched.h>
diff -ur /tmp/linux-2114+alan/net/core/dst.c linux/net/core/dst.c
--- /tmp/linux-2114+alan/net/core/dst.c Sun Dec 8 17:20:01 1996
+++ linux/net/core/dst.c Sun Dec 8 19:35:46 1996
@@ -5,7 +5,6 @@
*
*/

-#include <linux/config.h>
#include <asm/segment.h>
#include <asm/system.h>
#include <asm/bitops.h>
diff -ur /tmp/linux-2114+alan/net/core/scm.c linux/net/core/scm.c
--- /tmp/linux-2114+alan/net/core/scm.c Sun Dec 8 17:20:01 1996
+++ linux/net/core/scm.c Sun Dec 8 19:35:57 1996
@@ -8,7 +8,6 @@
* 2 of the License, or (at your option) any later version.
*/

-#include <linux/config.h>
#include <linux/signal.h>
#include <linux/errno.h>
#include <linux/sched.h>
diff -ur /tmp/linux-2114+alan/net/core/skbuff.c linux/net/core/skbuff.c
--- /tmp/linux-2114+alan/net/core/skbuff.c Sun Dec 8 17:20:01 1996
+++ linux/net/core/skbuff.c Sun Dec 8 23:24:44 1996
@@ -17,11 +17,11 @@
* Ray VanTassle : Fixed --skb->lock in free
* Alan Cox : skb_copy copy arp field
*
- * TO FIX:
- * The __skb_ routines ought to check interrupts are disabled
- * when called, and bitch like crazy if not. Unfortunately I don't think
- * we currently have a portable way to check if interrupts are off -
- * Linus ???
+ * NOTE:
+ * The __skb_ routines should be called with interrupts
+ * disabled, or you better be *real* sure that the operation is atomic
+ * with respect to whatever list is being frobbed (e.g. via lock_sock()
+ * or via disabling bottom half handlers, etc).
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
diff -ur /tmp/linux-2114+alan/net/ipv4/ipip.c linux/net/ipv4/ipip.c
--- /tmp/linux-2114+alan/net/ipv4/ipip.c Sun Dec 8 17:20:03 1996
+++ linux/net/ipv4/ipip.c Sun Dec 8 19:36:23 1996
@@ -20,7 +20,7 @@
*/

#include <linux/module.h>
-
+#include <linux/config.h>
#include <linux/types.h>
#include <linux/sched.h>
#include <linux/kernel.h>
\
 
 \ /
  Last update: 2005-03-22 13:38    [from the cache]
©2003-2011 Jasper Spaans