lkml.org 
[lkml]   [1999]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
Date
From
Subject2.2.10 patches
Hi Alan.

I gather you were away when I first posted these patches, so can I
resubmit them for your comments? They are:

1. Fix a buglet in the top level makefile which hits when one
specifies a relative directory for INSTALL_MOD_PATH rather
than an absolute one. Currently, the modules get put in the
wrong directory when this happens.

2. Increase the precision of the BogoMIPS counter to 12 bits,
this being the safe maximum to which it can be tuned on
all systems. The resulting values fit the description for
this counter far better than the current values on most of
the systems I have here, as all but one of them add four
1's to the binary value.

3. This patch allows the ISA NE2K driver to only claim the
ports it actually uses when other devices have already
claimed some of the ports that it does not use which fall
in the range it would otherwise claim, but restricts this
facility to when a new configuration option is defined. It
also includes documentation for the new option.

I would like to see the first two patches included in the next 2.2
series kernel, and the first one may also be relevant for the 2.3
series kernel - I haven't tried that out as I need the VFAT file
system which is currently not supported there.

As for the third patch, I can only comment that this patch was in
use successfully on one of my systems with an ISA NE2K card set for
0x360 when ide1 was using 0x376, and I never had any problems with
it. If the printer port that occupies 0x378-0x37F is defined, then
the interface is still not auto-probed as the fact that port 0x37F
is in use is enough to say that it can't work there.

Best wishes from Riley GM7GOD / KB8PPG

********************************************************************
===8<=== CUT ===>8===
--- linux-2.2.10/Makefile~ Sat May 29 02:10:19 1999
+++ linux-2.2.10/Makefile Sun Jul 18 11:02:02 1999
@@ -301,6 +301,9 @@
modules_install:
@( \
MODLIB=$(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE); \
+ if [ "`echo $MODLIB | cut -b 1`" != "/" ]; then \
+ MODLIB=$$TOPDIR/$$MODLIB ; \
+ fi; \
cd modules; \
MODULES=""; \
inst_mod() { These="`cat $$1`"; MODULES="$$MODULES $$These"; \
===8<=== CUT ===>8===


===8<=== CUT ===>8===
--- linux-2.2.10/init/main.c~ Tue May 11 17:57:14 1999
+++ linux-2.2.10/init/main.c Sun Jul 18 18:16:58 1999
@@ -956,9 +956,9 @@
unsigned long loops_per_sec = (1<<12);

/* This is the number of bits of precision for the loops_per_second. Each
- bit takes on average 1.5/HZ seconds. This (like the original) is a little
+ bit takes on average 1.5/HZ seconds. This gives better than 0.05% and
- better than 1% */
+ is about the limit of stable resolution on most processors. */
-#define LPS_PREC 8
+#define LPS_PREC 12

void __init calibrate_delay(void)
{
===8<=== CUT ===>8===


===8<=== CUT ===>8===
--- linux-2.2.10/Documentation/Configure.help~ Mon Jun 14 03:54:06 1999
+++ linux-2.2.10/Documentation/Configure.help Wed Jul 21 18:13:07 1999
@@ -6156,6 +6156,26 @@
The module will be called ne.o. If you want to compile it as a
module, say M here and read Documentation/modules.txt as well as
Documentation/networking/net-modules.txt.
+
+Allow overlapping non-intersecting I/O ports
+CONFIG_NE2000_PARTIAL
+ The NE2000/1000 driver actually needs just the address offsets from
+ 0x00 to 0x11, plus the address offset 0x1F, within the 32 I/O ports
+ that it claims, but some clone cards incorrectly fail to decode all
+ of the address lines, thus resulting in every port being effectively
+ used by the card.
+
+ The case where this is commonly relevant is when the card has been
+ configured for port 0x360, the secondary IDE interface is using port
+ 0x376, and the printer interface based at port 0x378 is ABSENT. In
+ this case, with suitable cards, this option can be enabled to allow
+ the network adapter and the secondary IDE channel to co-exist.
+
+ Note that this ONLY affects the ISA driver, as the drivers for the
+ other bus systems do not need this option.
+
+ If this means nothing to you, or you are not having problems with an
+ ISA NE2000/NE1000 ethernet interface, say N here and rest in peace.

SK_G16 support
CONFIG_SK_G16
--- linux-2.2.10/drivers/net/Config.in~ Mon Jun 7 22:35:22 1999
+++ linux-2.2.10/drivers/net/Config.in Wed Jul 21 18:13:07 1999
@@ -102,6 +102,9 @@
tristate 'ICL EtherTeam 16i/32 support' CONFIG_ETH16I
fi
tristate 'NE2000/NE1000 support' CONFIG_NE2000
+ if [ "$CONFIG_NE2000" = "y" ]; then
+ bool ' Allow overlapping non-intersecting I/O ports' CONFIG_NE2000_PARTIAL
+ fi
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
bool 'SEEQ8005 support (EXPERIMENTAL)' CONFIG_SEEQ8005
fi
--- linux-2.2.10/drivers/net/ne.c~ Sun Mar 7 23:47:46 1999
+++ linux-2.2.10/drivers/net/ne.c Wed Jul 21 18:13:07 1999
@@ -18,16 +18,22 @@

Changelog:

- Paul Gortmaker : use ENISR_RDC to monitor Tx PIO uploads, made
+ Paul Gortmaker : use ENISR_RDC to monitor Tx PIO uploads, made
- sanity checks and bad clone support optional.
+ sanity checks and bad clone support optional.
- Paul Gortmaker : new reset code, reset card after probe at boot.
+ Paul Gortmaker : new reset code, reset card after probe at boot.
- Paul Gortmaker : multiple card support for module users.
+ Paul Gortmaker : multiple card support for module users.
- Paul Gortmaker : Support for PCI ne2k clones, similar to lance.c
+ Paul Gortmaker : Support for PCI ne2k clones, similar to lance.c
- Paul Gortmaker : Allow users with bad cards to avoid full probe.
+ Paul Gortmaker : Allow users with bad cards to avoid full probe.
- Paul Gortmaker : PCI probe changes, more PCI cards supported.
+ Paul Gortmaker : PCI probe changes, more PCI cards supported.
rjohnson@analogic.com : Changed init order so an interrupt will only
- occur after memory is allocated for dev->priv. Deallocated memory
+ occur after memory is allocated for dev->priv.
- last in cleanup_modue()
+ Deallocated memory last in cleanup_modue()
+ rhw@memalpha.cx : Modified ISA probe to correctly deal with cards
+ that fully decode offsets 0x10 and 0x1f. These
+ do not need to allocate the full 32 addresses,
+ but only the 18 addresses actually used, but
+ the full 32 addresses are still claimed if they
+ are still available.

*/

@@ -116,7 +122,9 @@
#define NE_CMD 0x00
#define NE_DATAPORT 0x10 /* NatSemi-defined port window offset. */
#define NE_RESET 0x1f /* Issue a read to reset, a write to clear. */
-#define NE_IO_EXTENT 0x20
+
+#define NE_IO_EXTENT 0x12 /* Actual registers used, less port 0x1f */
+#define NE_IO_EXTENT_X 0x20 /* Full window area size */

#define NE1SM_START_PG 0x20 /* First page of TX buffer */
#define NE1SM_STOP_PG 0x40 /* Last page +1 of RX ring */
@@ -167,7 +175,7 @@

#ifdef HAVE_DEVLIST
struct netdev_entry netcard_drv =
-{"ne", ne_probe1, NE_IO_EXTENT, netcard_portlist};
+ {"ne", ne_probe1, NE_IO_EXTENT_X, netcard_portlist};
#else

/*
@@ -197,7 +205,12 @@
/* Last resort. The semi-risky ISA auto-probe. */
for (base_addr = 0; netcard_portlist[base_addr] != 0; base_addr++) {
int ioaddr = netcard_portlist[base_addr];
+#ifndef CONFIG_NE2000_PARTIAL
- if (check_region(ioaddr, NE_IO_EXTENT))
+ if (check_region(ioaddr, NE_IO_EXTENT_X))
+#else
+ if (check_region(ioaddr, NE_IO_EXTENT) ||
+ check_region(ioaddr+NE_RESET, 1))
+#endif
continue;
if (ne_probe1(dev, ioaddr) == 0)
return 0;
@@ -220,7 +233,7 @@
while ((pdev = pci_find_device(pci_clone_list[i].vendor, pci_clone_list[i].dev_id, pdev))) {
pci_ioaddr = pdev->base_address[0] & PCI_BASE_ADDRESS_IO_MASK;
/* Avoid already found cards from previous calls */
- if (check_region(pci_ioaddr, NE_IO_EXTENT))
+ if (check_region(pci_ioaddr, NE_IO_EXTENT_X))
continue;
pci_irq_line = pdev->irq;
if (pci_irq_line) break; /* Found it */
@@ -466,7 +479,29 @@
}
}
dev->base_addr = ioaddr;
- request_region(ioaddr, NE_IO_EXTENT, name);
+#ifndef MODULE
+ if (check_region(ioaddr, NE_IO_EXTENT_X))
+ {
+ /* Insert code here to verify that all address lines
+ are fully decoded. Suggested algorithm: Set NIC to
+ send a packet to 0.0.0.0 then read from the port at
+ offset 0x17 and see if that resets the transmitter.
+ If it does, return the code for 'probe failed'.
+
+ When this code has been inserted, the following
+ configuration option will go away.
+ */
+
+#ifndef CONFIG_NE2000_PARTIAL
+ return 0;
+#else
+ request_region(ioaddr, NE_IO_EXTENT, name);
+ request_region(ioaddr+NE_RESET, 1, name);
+#endif
+ }
+ else
+#endif
+ request_region(ioaddr, NE_IO_EXTENT_X, name);

for(i = 0; i < ETHER_ADDR_LEN; i++) {
printk(" %2.2x", SA_prom[i]);
@@ -820,7 +855,7 @@
if (dev->priv != NULL) {
void *priv = dev->priv;
free_irq(dev->irq, dev);
- release_region(dev->base_addr, NE_IO_EXTENT);
+ release_region(dev->base_addr, NE_IO_EXTENT_X);
unregister_netdev(dev);
kfree(priv);
}
===8<=== CUT ===>8===
Best wishes from Riley.

+----------------------------------------------------------------------+
| There is something frustrating about the quality and speed of Linux |
| development, ie., the quality is too high and the speed is too high, |
| in other words, I can implement this XXXX feature, but I bet someone |
| else has already done so and is just about to release their patch. |
+----------------------------------------------------------------------+
* ftp://ftp.MemAlpha.cx/pub/rhw/Linux
* http://www.MemAlpha.cx/kernel.versions.html

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:53    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site