From: Hannes Reinecke <hare@suse.de>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: [PATCH] Convert jiffies to msecs in scsi_ioctl()
Date: Thu, 09 Nov 2006 11:55:41 +0100 [thread overview]
Message-ID: <4553092D.70102@suse.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 372 bytes --]
Hi all,
The attached patch fixes the conversion from jiffies to msecs in
scsi_ioctl(). The current code works if HZ=1000, but will lead to
incorrect timeout settings for other values.
Please apply.
Cheers,
Hannes
--
Dr. Hannes Reinecke hare@suse.de
SuSE Linux Products GmbH S390 & zSeries
Maxfeldstraße 5 +49 911 74053 688
90409 Nürnberg http://www.suse.de
[-- Attachment #2: scsi-ioctl-convert-jiffies-to-msecs --]
[-- Type: text/plain, Size: 668 bytes --]
Fix conversion from jiffies to msecs for sg_io()
Use the proper conversion function for convert jiffies to msecs in
sg_io().
Signed-off-by: Hannes Reinecke <hare@suse.de>
diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c
index 2dc3264..ac63964 100644
--- a/block/scsi_ioctl.c
+++ b/block/scsi_ioctl.c
@@ -304,7 +304,7 @@ static int sg_io(struct file *file, requ
if (rq->bio)
blk_queue_bounce(q, &rq->bio);
- rq->timeout = (hdr->timeout * HZ) / 1000;
+ rq->timeout = jiffies_to_msecs(hdr->timeout);
if (!rq->timeout)
rq->timeout = q->sg_timeout;
if (!rq->timeout)
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c
reply other threads:[~2006-11-09 10:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4553092D.70102@suse.de \
--to=hare@suse.de \
--cc=James.Bottomley@SteelEye.com \
--cc=linux-scsi@vger.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.