From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Tejun Heo <tj@kernel.org>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>,
linux-ide@vger.kernel.org
Subject: [PATCH 2/2] ahci: Use usleep_range() in ahci_start_port()
Date: Thu, 11 Jan 2018 15:55:51 +0300 [thread overview]
Message-ID: <20180111125551.61877-2-mika.westerberg@linux.intel.com> (raw)
In-Reply-To: <20180111125551.61877-1-mika.westerberg@linux.intel.com>
Using msleep(1) may actually sleep much longer than 1 msecs (~20 msecs)
which unnecessarily slows down system startup. Avoid that and use
usleep_range() instead.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
drivers/ata/libahci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index a0de7a38430c..27e7daa01ccb 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -871,7 +871,7 @@ static void ahci_start_port(struct ata_port *ap)
* ports to fail the same way.
*/
if (rc == -EBUSY)
- msleep(1);
+ usleep_range(1000, 1050);
else
break;
}
--
2.15.1
next prev parent reply other threads:[~2018-01-11 12:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-11 12:55 [PATCH 1/2] ahci: Add Intel Cannon Lake PCH-H PCI ID Mika Westerberg
2018-01-11 12:55 ` Mika Westerberg [this message]
2018-01-11 18:11 ` [PATCH 2/2] ahci: Use usleep_range() in ahci_start_port() Tejun Heo
2018-01-11 18:22 ` Mika Westerberg
2018-01-11 18:10 ` [PATCH 1/2] ahci: Add Intel Cannon Lake PCH-H PCI ID Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180111125551.61877-2-mika.westerberg@linux.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=linux-ide@vger.kernel.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.