]> git.pld-linux.org Git - packages/kernel.git/blame - nwd-1.4-2.4.7-PLD.patch
- obsolete
[packages/kernel.git] / nwd-1.4-2.4.7-PLD.patch
CommitLineData
dd19de18 1diff -Nur linux.orig/Documentation/Configure.help linux/Documentation/Configure.help
2--- linux.orig/Documentation/Configure.help Mon Oct 22 14:57:05 2001
3+++ linux/Documentation/Configure.help Mon Oct 22 15:08:52 2001
4@@ -737,6 +737,35 @@
5 called nbd.o.
6
7 If unsure, say N.
8+
9+Network disk device support
10+CONFIG_BLK_DEV_NWD
11+ If you say Y here, your kernel will be able to act as network disk
12+ client and provide you with network disk block devices. This is
13+ similar to NBD in that the driver forwards block device requests
14+ over network to server, which performs the operations on files on
15+ its local filesystem and returns results back to the client. The
16+ driver will enlarge your kernel by about 8 KiB.
17+
18+ Unlike NBD though, NWD it uses RPC to transfer block device requests
19+ to the server. The network disk devices can be also used for root
20+ filesystems, making it easy to setup diskless environment -- all you
21+ need is kernel image with network drivers. The RPC transport protocol
22+ can be either TCP/IP or UDP/IP, the latter being the default one and
23+ probably the one more suitable for reliable, local area networks. The
24+ driver utilizes built-in kernel SunRPC infrastructure, thus saying Y
25+ here will force SunRPC into your kernel, which will enlarge it by
26+ about 65 KiB.
27+
28+ Consult <file:Documentation/nwd.txt> for more information concerning
29+ the kernel client driver and user space server.
30+
31+ If you want to compile this driver as a module (i.e. code which can be
32+ inserted in and removed from the running kernel whenever you want),
33+ say M here and read <file:Documentation/modules.txt>. The module will be
34+ called nwd.o.
35+
36+ If unsure, say N.
37
38 ATA/IDE/MFM/RLL support
39 CONFIG_IDE
40diff -Nur linux.orig/Makefile linux/Makefile
41--- linux.orig/Makefile Mon Oct 22 14:57:05 2001
42+++ linux/Makefile Mon Oct 22 15:08:52 2001
43@@ -185,6 +185,7 @@
44 DRIVERS-$(CONFIG_SGI_IP22) += drivers/sgi/sgi.a
45 DRIVERS-$(CONFIG_VT) += drivers/video/video.o
46 DRIVERS-$(CONFIG_PARIDE) += drivers/block/paride/paride.a
47+DRIVERS-$(CONFIG_BLK_DEV_NWD) += drivers/block/nwd/nwd.o
48 DRIVERS-$(CONFIG_HAMRADIO) += drivers/net/hamradio/hamradio.o
49 DRIVERS-$(CONFIG_TC) += drivers/tc/tc.a
50 DRIVERS-$(CONFIG_USB) += drivers/usb/usbdrv.o
51diff -Nur linux.orig/drivers/block/Config.in linux/drivers/block/Config.in
52--- linux.orig/drivers/block/Config.in Mon Oct 22 14:54:31 2001
53+++ linux/drivers/block/Config.in Mon Oct 22 15:08:52 2001
54@@ -48,6 +48,7 @@
55
56 dep_mbool ' Encryption support (see Crypto section) (EXPERIMENTAL)' CONFIG_BLK_DEV_LOOP_GEN $CONFIG_BLK_DEV_LOOP
57 dep_tristate 'Network block device support' CONFIG_BLK_DEV_NBD $CONFIG_NET
58+dep_tristate 'Network disk device support' CONFIG_BLK_DEV_NWD $CONFIG_NET
59
60 tristate 'RAM disk support' CONFIG_BLK_DEV_RAM
61 if [ "$CONFIG_BLK_DEV_RAM" = "y" -o "$CONFIG_BLK_DEV_RAM" = "m" ]; then
62diff -Nur linux.orig/drivers/block/Makefile linux/drivers/block/Makefile
63--- linux.orig/drivers/block/Makefile Fri Dec 29 23:07:21 2000
64+++ linux/drivers/block/Makefile Mon Oct 22 15:08:52 2001
65@@ -33,5 +33,6 @@
66 obj-$(CONFIG_BLK_DEV_NBD) += nbd.o
67
68 subdir-$(CONFIG_PARIDE) += paride
69+subdir-$(CONFIG_BLK_DEV_NWD) += nwd
70
71 include $(TOPDIR)/Rules.make
72diff -Nur linux.orig/include/linux/blk.h linux/include/linux/blk.h
73--- linux.orig/include/linux/blk.h Fri Jul 20 21:53:47 2001
74+++ linux/include/linux/blk.h Mon Oct 22 15:08:52 2001
75@@ -296,6 +296,12 @@
76 #define DEVICE_REQUEST do_nbd_request
77 #define DEVICE_NR(device) (MINOR(device))
78
79+#elif (MAJOR_NR == NWD_MAJOR)
80+
81+#define DEVICE_NAME "nwd"
82+#define DEVICE_REQUEST nwd_request
83+#define DEVICE_NR(device) (MINOR(device))
84+
85 #elif (MAJOR_NR == MDISK_MAJOR)
86
87 #define DEVICE_NAME "mdisk"
88diff -Nur linux.orig/include/linux/major.h linux/include/linux/major.h
89--- linux.orig/include/linux/major.h Mon Oct 22 14:54:51 2001
90+++ linux/include/linux/major.h Mon Oct 22 15:08:52 2001
91@@ -88,6 +88,8 @@
92
93 #define LVM_BLK_MAJOR 58 /* Logical Volume Manager */
94
95+#define NWD_MAJOR 62 /* Network disk driver */
96+
97 #define SCSI_DISK1_MAJOR 65
98 #define SCSI_DISK2_MAJOR 66
99 #define SCSI_DISK3_MAJOR 67
100diff -Nur linux.orig/init/main.c linux/init/main.c
101--- linux.orig/init/main.c Mon Oct 22 14:54:48 2001
102+++ linux/init/main.c Mon Oct 22 15:10:44 2001
103@@ -114,6 +114,7 @@
104 #endif
105
106 extern void ecard_init(void);
107+extern int nwd_boot_init(void);
108
109 #if defined(CONFIG_SYSVIPC)
110 extern void ipc_init(void);
111@@ -229,6 +230,10 @@
112 { "apblock", APBLOCK_MAJOR << 8},
113 { "ddv", DDV_MAJOR << 8},
114 { "jsfd", JSFD_MAJOR << 8},
115+#ifdef CONFIG_BLK_DEV_NWD
116+ { "nwd", 0x3E00 },
117+#endif
118+
119 #if defined(CONFIG_ARCH_S390)
120 { "dasda", (DASD_MAJOR << MINORBITS) },
121 { "dasdb", (DASD_MAJOR << MINORBITS) + (1 << 2) },
122@@ -774,6 +779,12 @@
123 start_context_thread();
124 do_initcalls();
125
126+#ifdef CONFIG_BLK_DEV_NWD
127+ /* Must be done after NET/RPC initialization */
128+ if (nwd_boot_init())
129+ panic ("Unable to setup network disk root device.");
130+#endif
131+
132 #ifdef CONFIG_IRDA
133 irda_proto_init();
134 irda_device_init(); /* Must be done after protocol initialization */
This page took 1.437389 seconds and 4 git commands to generate.