diff options
author | Nicholas Mc Guire <hofrat@osadl.org> | 2015-02-04 13:30:20 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2015-03-09 10:45:26 -0400 |
commit | 4e5a800c82ec21335349a97cf58d97fbb0d3c98e (patch) | |
tree | 429a22fce93302762923e312d79aa6d6daa670c8 | |
parent | b026e8ed55e05a81018ba4ce73ca0cf2c9300950 (diff) |
ncr5380: Harmonize jiffies conversion with msecs_to_jiffies
Instances of var * HZ / 1000 are replaced by msecs_to_jiffies(var).
In addition some timing constants that assumed HZ 100 were adjusted
to HZ independent settings based on review comments from Michael Schmitz
<schmitzmic@gmail.com> and review of the original drivers in 1.0.31 and
2.2.16.
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Acked-by: Michael Schmitz <schmitzmic@gmail.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r-- | drivers/scsi/NCR5380.c | 10 | ||||
-rw-r--r-- | drivers/scsi/atari_NCR5380.c | 2 | ||||
-rw-r--r-- | drivers/scsi/g_NCR5380.c | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c index 8981701802ca..a777e5c412df 100644 --- a/drivers/scsi/NCR5380.c +++ b/drivers/scsi/NCR5380.c | |||
@@ -474,11 +474,11 @@ static void NCR5380_print_phase(struct Scsi_Host *instance) | |||
474 | */ | 474 | */ |
475 | #ifndef USLEEP_SLEEP | 475 | #ifndef USLEEP_SLEEP |
476 | /* 20 ms (reasonable hard disk speed) */ | 476 | /* 20 ms (reasonable hard disk speed) */ |
477 | #define USLEEP_SLEEP (20*HZ/1000) | 477 | #define USLEEP_SLEEP msecs_to_jiffies(20) |
478 | #endif | 478 | #endif |
479 | /* 300 RPM (floppy speed) */ | 479 | /* 300 RPM (floppy speed) */ |
480 | #ifndef USLEEP_POLL | 480 | #ifndef USLEEP_POLL |
481 | #define USLEEP_POLL (200*HZ/1000) | 481 | #define USLEEP_POLL msecs_to_jiffies(200) |
482 | #endif | 482 | #endif |
483 | #ifndef USLEEP_WAITLONG | 483 | #ifndef USLEEP_WAITLONG |
484 | /* RvC: (reasonable time to wait on select error) */ | 484 | /* RvC: (reasonable time to wait on select error) */ |
@@ -576,7 +576,7 @@ static int __init __maybe_unused NCR5380_probe_irq(struct Scsi_Host *instance, | |||
576 | if ((mask & possible) && (request_irq(i, &probe_intr, 0, "NCR-probe", NULL) == 0)) | 576 | if ((mask & possible) && (request_irq(i, &probe_intr, 0, "NCR-probe", NULL) == 0)) |
577 | trying_irqs |= mask; | 577 | trying_irqs |= mask; |
578 | 578 | ||
579 | timeout = jiffies + (250 * HZ / 1000); | 579 | timeout = jiffies + msecs_to_jiffies(250); |
580 | probe_irq = NO_IRQ; | 580 | probe_irq = NO_IRQ; |
581 | 581 | ||
582 | /* | 582 | /* |
@@ -634,7 +634,7 @@ static void prepare_info(struct Scsi_Host *instance) | |||
634 | "sg_tablesize %d, this_id %d, " | 634 | "sg_tablesize %d, this_id %d, " |
635 | "flags { %s%s%s}, " | 635 | "flags { %s%s%s}, " |
636 | #if defined(USLEEP_POLL) && defined(USLEEP_WAITLONG) | 636 | #if defined(USLEEP_POLL) && defined(USLEEP_WAITLONG) |
637 | "USLEEP_POLL %d, USLEEP_WAITLONG %d, " | 637 | "USLEEP_POLL %lu, USLEEP_WAITLONG %lu, " |
638 | #endif | 638 | #endif |
639 | "options { %s} ", | 639 | "options { %s} ", |
640 | instance->hostt->name, instance->io_port, instance->n_io_port, | 640 | instance->hostt->name, instance->io_port, instance->n_io_port, |
@@ -1346,7 +1346,7 @@ static int NCR5380_select(struct Scsi_Host *instance, struct scsi_cmnd *cmd) | |||
1346 | * selection. | 1346 | * selection. |
1347 | */ | 1347 | */ |
1348 | 1348 | ||
1349 | timeout = jiffies + (250 * HZ / 1000); | 1349 | timeout = jiffies + msecs_to_jiffies(250); |
1350 | 1350 | ||
1351 | /* | 1351 | /* |
1352 | * XXX very interesting - we're seeing a bounce where the BSY we | 1352 | * XXX very interesting - we're seeing a bounce where the BSY we |
diff --git a/drivers/scsi/atari_NCR5380.c b/drivers/scsi/atari_NCR5380.c index a70255413e7f..db87ece6edb2 100644 --- a/drivers/scsi/atari_NCR5380.c +++ b/drivers/scsi/atari_NCR5380.c | |||
@@ -1486,7 +1486,7 @@ static int NCR5380_select(struct Scsi_Host *instance, struct scsi_cmnd *cmd) | |||
1486 | * selection. | 1486 | * selection. |
1487 | */ | 1487 | */ |
1488 | 1488 | ||
1489 | timeout = jiffies + (250 * HZ / 1000); | 1489 | timeout = jiffies + msecs_to_jiffies(250); |
1490 | 1490 | ||
1491 | /* | 1491 | /* |
1492 | * XXX very interesting - we're seeing a bounce where the BSY we | 1492 | * XXX very interesting - we're seeing a bounce where the BSY we |
diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c index 74ec2f5669ab..f8d2478b11cc 100644 --- a/drivers/scsi/g_NCR5380.c +++ b/drivers/scsi/g_NCR5380.c | |||
@@ -57,9 +57,9 @@ | |||
57 | */ | 57 | */ |
58 | 58 | ||
59 | /* settings for DTC3181E card with only Mustek scanner attached */ | 59 | /* settings for DTC3181E card with only Mustek scanner attached */ |
60 | #define USLEEP_POLL 1 | 60 | #define USLEEP_POLL msecs_to_jiffies(10) |
61 | #define USLEEP_SLEEP 20 | 61 | #define USLEEP_SLEEP msecs_to_jiffies(200) |
62 | #define USLEEP_WAITLONG 500 | 62 | #define USLEEP_WAITLONG msecs_to_jiffies(5000) |
63 | 63 | ||
64 | #define AUTOPROBE_IRQ | 64 | #define AUTOPROBE_IRQ |
65 | 65 | ||