2.2.18pre13: Small patches

From: Chip Salzenberg (chip@valinux.com)
Date: Mon Oct 02 2000 - 16:10:32 EST


Here's a brace of small patches that ought to be OK for 2.2.18.
adTHANKSvance for consideration

1. Fix fencepost error in ioremap's page reservation logic.
   (I think the broken logic was added to support AGP.)

Index: linux/arch/i386/mm/ioremap.c
--- linux/arch/i386/mm/ioremap.c:1.2 Fri Sep 1 19:03:09 2000
+++ linux/arch/i386/mm/ioremap.c Thu Sep 28 00:34:40 2000
@@ -117,7 +117,7 @@
                 temp_addr = __va(phys_addr);
                 temp_end = temp_addr + (size - 1);
               
- for(i = MAP_NR(temp_addr); i < MAP_NR(temp_end); i++) {
+ for(i = MAP_NR(temp_addr); i <= MAP_NR(temp_end); i++) {
                         if(!PageReserved(mem_map + i))
                                 return NULL;
                 }

2. Fix linear RAID to work even with blocks smaller than 1K.
   (From Anton Altparmakov <antona@bigfoot.com>)

   In linux/drivers/block/linear.c:linear_map(), change:
          *rsector=(block-(tmp_dev->offset)) << 1;
   to:
          *rsector=((block - tmp_dev->offset) << 1) + (*rsector & 1);

3. Trivial patch to fs/vfat/namei.c to avoid a compile-time warning.

Index: linux/fs/vfat/namei.c
--- linux/fs/vfat/namei.c:1.2 Fri Sep 1 19:03:16 2000
+++ linux/fs/vfat/namei.c Thu Sep 28 00:53:55 2000
@@ -676,7 +676,8 @@
                                         i += 4;
                                 } else {
                                          int llen;
- nls->char2uni(ip, &llen, op, op+1);
+ nls->char2uni((unsigned char *)ip,
+ &llen, op, op+1);
                                          op += 2;
                                          ip += llen;
                                         i += llen;

4. Config option controlling default behavior of kernels that enable
   boot-time IP-Config.

   * If CONFIG_IP_PNP_AUTO is set, the default is to do IP-Config at
     boot time. Disable it with "ip=off".
   * If CONFIG_IP_PNP_AUTO is not set, the default is *not* to do
     IP-Config at boot time. Override with "ip=on", "ip=dhcp", etc.

Index: linux/net/ipv4/Config.in
diff -u linux/net/ipv4/Config.in:1.2 linux/net/ipv4/Config.in:1.2.8.1
--- linux/net/ipv4/Config.in:1.2 Wed Sep 6 12:54:43 2000
+++ linux/net/ipv4/Config.in Thu Sep 28 00:42:00 2000
@@ -22,6 +22,9 @@
   bool ' RARP support' CONFIG_IP_PNP_RARP
 # not yet ready..
 # bool ' ARP support' CONFIG_IP_PNP_ARP
+ if [ "$CONFIG_IP_PNP_DHCP" = "y" -o "$CONFIG_IP_PNP_BOOTP" = "y" -o "$CONFIG_IP_PNP_RARP" = "y" ]; then
+ bool ' Auto DHCP/BOOTP/RARP at boot' CONFIG_IP_PNP_AUTO
+ fi
 fi
 if [ "$CONFIG_FIREWALL" = "y" ]; then
   bool 'IP: firewalling' CONFIG_IP_FIREWALL

Index: linux/net/ipv4/ipconfig.c
diff -u linux/net/ipv4/ipconfig.c:1.2 linux/net/ipv4/ipconfig.c:1.2.8.1
--- linux/net/ipv4/ipconfig.c:1.2 Wed Sep 6 12:54:43 2000
+++ linux/net/ipv4/ipconfig.c Thu Sep 28 00:42:00 2000
@@ -87,7 +87,13 @@
  * Public IP configuration
  */
 
-int ic_enable __initdata = 0; /* IP config enabled? */
+int ic_enable __initdata = /* IP config enabled? */
+#ifdef CONFIG_IP_PNP_AUTO
+ 1
+#else
+ 0
+#endif
+ ;
 
 /* Protocol choice */
 static int ic_proto_enabled __initdata = 0

-- 
Chip Salzenberg              - a.k.a. -              <chip@valinux.com>
"I wanted to play hopscotch with the impenetrable mystery of existence,
    but he stepped in a wormhole and had to go in early."  // MST3K
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Oct 07 2000 - 21:00:10 EST