lkml.org 
[lkml]   [2015]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectStop SSD from waiting for "Spinning up disk..."

There's no need to wait for disk spin-up for USB SSD devices. This
patch allow the SSD to skip waiting disk spin-up by passing sd_mod.ssd=1
during boot-up.

If there's a better way to handle this, please share.


Thanks,
Jeff

--- linux/drivers/scsi/sd.c 2015-05-25 07:29:44.000000000 +0800
+++ linux/drivers/scsi/sd.c 2015-06-19 22:17:35.000000000 +0800
@@ -92,6 +92,9 @@
MODULE_ALIAS_SCSI_DEVICE(TYPE_MOD);
MODULE_ALIAS_SCSI_DEVICE(TYPE_RBC);

+static int ssd = 0;
+module_param(ssd, int, 0);
+
#if !defined(CONFIG_DEBUG_BLOCK_EXT_DEVT)
#define SD_MINORS 16
#else
@@ -2738,7 +2741,9 @@
goto out;
}

- sd_spinup_disk(sdkp);
+ sd_printk(KERN_NOTICE, sdkp, "ssd %s\n", ssd == 0 ? "off" : "on");
+ if(!ssd)
+ sd_spinup_disk(sdkp);

/*
* Without media there is no reason to ask; moreover, some devices
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2015-06-22 09:41    [W:0.614 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site