+static char *
+dasd_parse_keyword( char *parsestring ) {
+
+ char *nextcomma, *residual_str;
+ int length;
+
+ nextcomma = strchr(parsestring,',');
+ if (nextcomma) {
+ length = nextcomma - parsestring;
+ residual_str = nextcomma + 1;
+ } else {
+ length = strlen(parsestring);
+ residual_str = parsestring + length;
+ }
+ if (strncmp ("autodetect", parsestring, length) == 0) {
+ dasd_autodetect = 1;
+ MESSAGE (KERN_INFO, "%s",
+ "turning to autodetection mode");
+ return residual_str;
+ }
+ if (strncmp ("probeonly", parsestring, length) == 0) {
+ dasd_probeonly = 1;
+ MESSAGE(KERN_INFO, "%s",
+ "turning to probeonly mode");
+ return residual_str;
+ }
+ if (strncmp ("fixedbuffers", parsestring, length) == 0) {
+ if (dasd_page_cache)
+ return residual_str;
+ dasd_page_cache =
+ kmem_cache_create("dasd_page_cache", PAGE_SIZE, 0,
+ SLAB_CACHE_DMA, NULL, NULL );
+ if (!dasd_page_cache)
+ MESSAGE(KERN_WARNING, "%s", "Failed to create slab, "
+ "fixed buffer mode disabled.");
+ else
+ MESSAGE (KERN_INFO, "%s",
+ "turning on fixed buffer mode");
+ return residual_str;
+ }
+ return ERR_PTR(-EINVAL);
+}
+
+/*
+ * Try to interprete the first element on the comma separated parse string
+ * as a device number or a range of devices. If the interpretation is
+ * successfull, create the matching dasd_devmap entries and return a pointer
+ * to the residual string.
+ * If interpretation fails or in case of an error, return an error code.
+ */
+static char *
+dasd_parse_range( char *parsestring ) {
+