lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 22 Jun 2015 15:25:29 +0800 (SGT)
From:	Jeff Chua <jeff.chua.linux@...il.com>
To:	Linux Kernel <linux-kernel@...r.kernel.org>
cc:	Christoph Hellwig <hch@....de>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Stop 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/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ