summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--patches/boot/boot.scc1
-rw-r--r--patches/boot/nfsroot-set-tcp-as-the-defalut-transport-protocol.patch33
2 files changed, 34 insertions, 0 deletions
diff --git a/patches/boot/boot.scc b/patches/boot/boot.scc
index 258b2119..38e06159 100644
--- a/patches/boot/boot.scc
+++ b/patches/boot/boot.scc
@@ -5,3 +5,4 @@
patch mount_root-clarify-error-messages-for-when-no-rootfs.patch
patch check-console-device-file-on-fs-when-booting.patch
patch nfs-Allow-default-io-size-to-be-configured.patch
+patch nfsroot-set-tcp-as-the-defalut-transport-protocol.patch
diff --git a/patches/boot/nfsroot-set-tcp-as-the-defalut-transport-protocol.patch b/patches/boot/nfsroot-set-tcp-as-the-defalut-transport-protocol.patch
new file mode 100644
index 00000000..dc232386
--- /dev/null
+++ b/patches/boot/nfsroot-set-tcp-as-the-defalut-transport-protocol.patch
@@ -0,0 +1,33 @@
+From 1fe45926634bda80e7c80bd4277ba92390dbafe9 Mon Sep 17 00:00:00 2001
+From: Liwei Song <liwei.song@windriver.com>
+Date: Fri, 3 Apr 2020 15:23:19 +0800
+Subject: [PATCH] nfsroot: set tcp as the defalut transport protocol
+
+UDP is disabled by default in commit b24ee6c64ca7 ("NFS: allow
+deprecation of NFS UDP protocol"), but the default mount options
+is still udp, change it to tcp to avoid the "Unsupported transport
+protocol udp" error if no protocol is specified when mount nfs.
+
+Fixes: b24ee6c64ca7 ("NFS: allow deprecation of NFS UDP protocol")
+Signed-off-by: Liwei Song <liwei.song@windriver.com>
+Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
+---
+ fs/nfs/nfsroot.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/fs/nfs/nfsroot.c b/fs/nfs/nfsroot.c
+index effaa4247b91..8d3278805602 100644
+--- a/fs/nfs/nfsroot.c
++++ b/fs/nfs/nfsroot.c
+@@ -88,7 +88,7 @@
+ #define NFS_ROOT "/tftpboot/%s"
+
+ /* Default NFSROOT mount options. */
+-#define NFS_DEF_OPTIONS "vers=2,udp,rsize=4096,wsize=4096"
++#define NFS_DEF_OPTIONS "vers=2,tcp,rsize=4096,wsize=4096"
+
+ /* Parameters passed from the kernel command line */
+ static char nfs_root_parms[NFS_MAXPATHLEN + 1] __initdata = "";
+--
+2.19.1
+