[PATCH] some 2.2.15 fixes

Andrzej Krzysztofowicz (ankry@green.mif.pg.gda.pl)
Thu, 26 Aug 1999 18:35:59 +0200 (CEST)


Hi,
Enclosed patches fix some problems in 2.3.15 kernel:

PATCH 1
__init and command line option parsing fixes for XT disk driver.

PATCH 2
Suggested patch that fixes some problems related to new
linux/fs/partitions/Config.in :
1. Unixware slices support was lost for some reason. I think it should be
also unmarked "Experimental" as it has already been tested with several
versions of UnixWare.
2. Duplicate "bool" commands concerning the same config variable break
xconfig; even if they are dependent on contradictory conditions.
3. "define_bool" located *before* "bool"/"tristate" concerning the same
config variable also break xconfig.
4. CONFIG_SMD_DISKLABEL and CONFIG_SGI_DISKLABEL are obsolete. They are
nowhere used.
5. CONFIG_BSD_DISKLABEL, CONFIG_SOLARIS_X86_PARTITION,
CONFIG_UNIXWARE_DISKLABEL concern structures inside a DOS partition so
they all should depend on CONFIG_MSDOS_PARTITION.
6. CONFIG_ATARI_PARTITION was not available when CONFIG_PARTITION_ADVANCED is
set to "y" (even for proper architecture).

PATCH 3
Fixes unresolved symbols for ipv6, ipx and on oops for non-TCP/IP networked
configuration.

which appears for
non-TCP/IP networked configuration (IPX, Appletalk) when attempting to
configure interface (it is non-initialized:
1. inet_sock_release, udp_disconnect, tcp_disconnect, tcp_timewait_cachep,
tcp_timewait_kill, tcp_tw_deschedule, rtnetlink_put_metrics - are needed
by ipv6.o module
2. init_etherdev is needed by most of network device driver modules, so it
should be exported not only for TCP/IP configuration. It belongs to the
network device driver layer rather than to a protocol layer.
3. sysctl_wmem_max, sysctl_rmem_max should be exported not only for TCP/IP
configuration - they are needed by other notwork protocol modules using
the socket layer (IPX).
4. some data initialized by net_dev_init() is used also for non-TCP/IP
networked configuration, resulting an oops.

Regards
Andrzej

================= PATCH 1 ================================================
--- drivers/block/xd.c.old Thu Aug 26 11:28:59 1999
+++ drivers/block/xd.c Thu Aug 26 12:31:02 1999
@@ -194,7 +194,7 @@
}

/* xd_detect: scan the possible BIOS ROM locations for the signature strings */
-static __init u_char xd_detect (u_char *controller, unsigned int *address)
+static u_char __init xd_detect (u_char *controller, unsigned int *address)
{
u_char i,j,found = 0;

@@ -1204,5 +1204,10 @@
xd_dma_mem_free((unsigned long)xd_dma_buffer, xd_maxsectors * 0x200);
}
}
+#else
+
+__setup ("xd=", xd_setup);
+__setup ("xd_geo=", xd_manual_geo_init);
+
#endif /* MODULE */

================= PATCH 2 ================================================
--- fs/partitions/Config.in.old Sun Aug 15 20:44:29 1999
+++ fs/partitions/Config.in Thu Aug 26 10:25:31 1999
@@ -2,46 +2,35 @@
# Partition configuration
#
bool 'Advanced partition selection' CONFIG_PARTITION_ADVANCED
-if [ "$CONFIG_PARTITION_ADVANCED" = "n" ]; then
- define_bool CONFIG_MSDOS_PARTITION y
+if [ "$CONFIG_PARTITION_ADVANCED" = "y" ]; then
+ bool 'Alpha OSF partition support' CONFIG_OSF_PARTITION
+ bool 'Macintosh partition map support' CONFIG_MAC_PARTITION
+ bool 'PC BIOS (MSDOS partition tables) support' CONFIG_MSDOS_PARTITION
+else
if [ "$ARCH" = "alpha" ]; then
define_bool CONFIG_OSF_PARTITION y
fi
- if [ "$CONFIG_AMIGA" = "y" ]; then
- define_bool CONFIG_AMIGA_PARTITION y
- fi
- if [ "$CONFIG_ARM" = "y" ]; then
- if [ "$CONFIG_ARCH_ACORN" = "y" ]; then
- define_bool CONFIG_ACORN_PARTITION y
- define_bool CONFIG_ACORN_PARTITION_ADFS y
-# define_bool CONFIG_ACORN_PARTITION_CUMANA y
- define_bool CONFIG_ACORN_PARTITION_ICS y
- define_bool CONFIG_ACORN_PARTITION_POWERTEC y
- define_bool CONFIG_ACORN_PARTITION_RISCIX y
- fi
- fi
- if [ "$CONFIG_ATARI" = "y" ]; then
- define_bool CONFIG_ATARI_PARTITION y
- fi
- bool 'SMD disklabel (Sun partition tables) support' CONFIG_SMD_DISKLABEL
- if [ "$ARCH" = "sparc" -o "$CONFIG_SMD_DISKLABEL" = "y" ]; then
- define_bool CONFIG_SUN_PARTITION y
- fi
- bool 'SGI disklabel support' CONFIG_SGI_DISKLABEL
- if [ "$CONFIG_SGI" = "y" -o "$CONFIG_SGI_DISKLABEL" = "y" ]; then
- define_bool CONFIG_SGI_PARTITION y
+ if [ "$ARCH" = "ppc" -o "$CONFIG_MAC" = "y" ]; then
+ define_bool CONFIG_MAC_PARTITION y
fi
-else
- bool 'Alpha OSF partition support' CONFIG_OSF_PARTITION
- bool 'Macintosh partition map support' CONFIG_MAC_PARTITION
- bool 'PC BIOS (MSDOS partition tables) support' CONFIG_MSDOS_PARTITION
+ define_bool CONFIG_MSDOS_PARTITION y
+fi
+if [ "$CONFIG_MSDOS_PARTITION" = "y" ]; then
+ bool ' BSD disklabel (FreeBSD partition tables) support' CONFIG_BSD_DISKLABEL
+ bool ' Solaris (x86) partition table support' CONFIG_SOLARIS_X86_PARTITION
+ bool ' Unixware slices support' CONFIG_UNIXWARE_DISKLABEL
+fi
+if [ "$CONFIG_SGI" != "y" ]; then
bool 'SGI partition support' CONFIG_SGI_PARTITION
- bool 'BSD disklabel (FreeBSD partition tables) support' CONFIG_BSD_DISKLABEL
- bool 'SMD disklabel (Sun partition tables) support' CONFIG_SMD_DISKLABEL
- bool 'Solaris (x86) partition table support' CONFIG_SOLARIS_X86_PARTITION
- bool 'SGI disklabel support' CONFIG_SGI_DISKLABEL
-
- bool 'SPARC partition support' CONFIG_SUN_PARTITION
+else
+ define_bool CONFIG_SGI_PARTITION y
+fi
+if [ "$ARCH" != "sparc" -a "$ARCH" != "sparc64" ]; then
+ bool 'Sun partition tables support' CONFIG_SUN_PARTITION
+else
+ define_bool CONFIG_SUN_PARTITION y
+fi
+if [ "$CONFIG_PARTITION_ADVANCED" = "y" ]; then
bool 'Amiga partition table support' CONFIG_AMIGA_PARTITION
bool 'Acorn partition support' CONFIG_ACORN_PARTITION
if [ "$CONFIG_ACORN_PARTITION" != "n" ]; then
@@ -51,4 +40,19 @@
bool ' PowerTec partition support' CONFIG_ACORN_PARTITION_POWERTEC
bool ' RISCiX partition support' CONFIG_ACORN_PARTITION_RISCIX
fi
+else
+ if [ "$CONFIG_AMIGA" = "y" ]; then
+ define_bool CONFIG_AMIGA_PARTITION y
+ fi
+ if [ "$CONFIG_ARCH_ACORN" = "y" ]; then
+ define_bool CONFIG_ACORN_PARTITION y
+ define_bool CONFIG_ACORN_PARTITION_ADFS y
+# define_bool CONFIG_ACORN_PARTITION_CUMANA y
+ define_bool CONFIG_ACORN_PARTITION_ICS y
+ define_bool CONFIG_ACORN_PARTITION_POWERTEC y
+ define_bool CONFIG_ACORN_PARTITION_RISCIX y
+ fi
+fi
+if [ "$CONFIG_ATARI" = "y" ]; then
+ define_bool CONFIG_ATARI_PARTITION y
fi
================ PATCH 3 ==============================================
--- net/netsyms.c.old Thu Aug 26 11:51:19 1999
+++ net/netsyms.c Thu Aug 26 13:23:37 1999
@@ -32,6 +32,11 @@
#include <net/br.h>
#endif

+#ifdef CONFIG_NET
+extern __u32 sysctl_wmem_max;
+extern __u32 sysctl_rmem_max;
+#endif
+
#ifdef CONFIG_INET
#include <linux/ip.h>
#include <net/protocol.h>
@@ -48,8 +53,6 @@
#include <linux/inetdevice.h>

extern struct net_proto_family inet_family_ops;
-extern __u32 sysctl_wmem_max;
-extern __u32 sysctl_rmem_max;

#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) || defined (CONFIG_KHTTPD) || defined (CONFIG_KHTTPD_MODULE)
#include <linux/in6.h>
@@ -223,7 +226,6 @@
/* Internet layer registration */
EXPORT_SYMBOL(inet_add_protocol);
EXPORT_SYMBOL(inet_del_protocol);
-EXPORT_SYMBOL(init_etherdev);
EXPORT_SYMBOL(ip_route_output);
EXPORT_SYMBOL(ip_route_input);
EXPORT_SYMBOL(icmp_send);
@@ -281,6 +283,7 @@
EXPORT_SYMBOL(inet_recvmsg);
EXPORT_SYMBOL(inet_sock_nr);
EXPORT_SYMBOL(inet_sock_destruct);
+EXPORT_SYMBOL(inet_sock_release);

/* Socket demultiplexing. */
EXPORT_SYMBOL(tcp_ehash);
@@ -305,8 +308,10 @@
/* UDP/TCP exported functions for TCPv6 */
EXPORT_SYMBOL(udp_ioctl);
EXPORT_SYMBOL(udp_connect);
+EXPORT_SYMBOL(udp_disconnect);
EXPORT_SYMBOL(udp_sendmsg);
EXPORT_SYMBOL(tcp_close);
+EXPORT_SYMBOL(tcp_disconnect);
EXPORT_SYMBOL(tcp_accept);
EXPORT_SYMBOL(tcp_write_wakeup);
EXPORT_SYMBOL(tcp_read_wakeup);
@@ -329,6 +334,8 @@
EXPORT_SYMBOL(tcp_statistics);
EXPORT_SYMBOL(tcp_rcv_state_process);
EXPORT_SYMBOL(tcp_timewait_state_process);
+EXPORT_SYMBOL(tcp_timewait_cachep);
+EXPORT_SYMBOL(tcp_timewait_kill);
EXPORT_SYMBOL(tcp_do_sendmsg);
EXPORT_SYMBOL(tcp_v4_rebuild_header);
EXPORT_SYMBOL(tcp_v4_send_check);
@@ -352,6 +359,7 @@
EXPORT_SYMBOL(tcp_connect);
EXPORT_SYMBOL(tcp_make_synack);
EXPORT_SYMBOL(tcp_tw_death_row_slot);
+EXPORT_SYMBOL(tcp_tw_deschedule);
EXPORT_SYMBOL(sysctl_local_port_range);
EXPORT_SYMBOL(tcp_port_rover);
EXPORT_SYMBOL(udp_port_rover);
@@ -387,6 +395,7 @@
EXPORT_SYMBOL(rtnetlink_links);
EXPORT_SYMBOL(__rta_fill);
EXPORT_SYMBOL(rtnetlink_dump_ifinfo);
+EXPORT_SYMBOL(rtnetlink_put_metrics);
EXPORT_SYMBOL(rtnl);
EXPORT_SYMBOL(neigh_delete);
EXPORT_SYMBOL(neigh_add);
@@ -446,6 +455,7 @@

/* support for loadable net drivers */
#ifdef CONFIG_NET
+EXPORT_SYMBOL(init_etherdev);
EXPORT_SYMBOL(loopback_dev);
EXPORT_SYMBOL(register_netdevice);
EXPORT_SYMBOL(unregister_netdevice);
--- drivers/block/genhd.c.old Thu Aug 26 13:53:57 1999
+++ drivers/block/genhd.c Thu Aug 26 13:54:00 1999
@@ -49,7 +49,7 @@
#ifdef CONFIG_BLK_CPQ_DA
cpqarray_init();
#endif
-#ifdef CONFIG_INET
+#ifdef CONFIG_NET
net_dev_init();
#endif
#ifdef CONFIG_ATM
=======================================================================

-- 
=======================================================================
  Andrzej M. Krzysztofowicz               ankry@mif.pg.gda.pl
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk

- 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/