*        a colon.
  *     9) PARTLABEL=<name> with name being the GPT partition label.
  *        MSDOS partitions do not support labels!
+ *     10) /dev/cifs represents Root_CIFS (0xfe)
  *
  *     If name doesn't have fall into the categories above, we return (0,0).
  *     block_class is used to check if something is a disk name. If the disk
        res = Root_NFS;
        if (strcmp(name, "nfs") == 0)
                goto done;
+       res = Root_CIFS;
+       if (strcmp(name, "cifs") == 0)
+               goto done;
        res = Root_RAM0;
        if (strcmp(name, "ram") == 0)
                goto done;
 }
 #endif
 
+#ifdef CONFIG_CIFS_ROOT
+
+extern int cifs_root_data(char **dev, char **opts);
+
+#define CIFSROOT_TIMEOUT_MIN   5
+#define CIFSROOT_TIMEOUT_MAX   30
+#define CIFSROOT_RETRY_MAX     5
+
+static int __init mount_cifs_root(void)
+{
+       char *root_dev, *root_data;
+       unsigned int timeout;
+       int try, err;
+
+       err = cifs_root_data(&root_dev, &root_data);
+       if (err != 0)
+               return 0;
+
+       timeout = CIFSROOT_TIMEOUT_MIN;
+       for (try = 1; ; try++) {
+               err = do_mount_root(root_dev, "cifs", root_mountflags,
+                                   root_data);
+               if (err == 0)
+                       return 1;
+               if (try > CIFSROOT_RETRY_MAX)
+                       break;
+
+               ssleep(timeout);
+               timeout <<= 1;
+               if (timeout > CIFSROOT_TIMEOUT_MAX)
+                       timeout = CIFSROOT_TIMEOUT_MAX;
+       }
+       return 0;
+}
+#endif
+
 #if defined(CONFIG_BLK_DEV_RAM) || defined(CONFIG_BLK_DEV_FD)
 void __init change_floppy(char *fmt, ...)
 {
                ROOT_DEV = Root_FD0;
        }
 #endif
+#ifdef CONFIG_CIFS_ROOT
+       if (ROOT_DEV == Root_CIFS) {
+               if (mount_cifs_root())
+                       return;
+
+               printk(KERN_ERR "VFS: Unable to mount root fs via SMB, trying floppy.\n");
+               ROOT_DEV = Root_FD0;
+       }
+#endif
 #ifdef CONFIG_BLK_DEV_FD
        if (MAJOR(ROOT_DEV) == FLOPPY_MAJOR) {
                /* rd_doload is 2 for a dual initrd/ramload setup */