aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/esp_scsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/esp_scsi.c')
-rw-r--r--drivers/scsi/esp_scsi.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c
index 62a4618530d0..a680e18b5f3b 100644
--- a/drivers/scsi/esp_scsi.c
+++ b/drivers/scsi/esp_scsi.c
@@ -1453,7 +1453,7 @@ static void esp_msgin_sdtr(struct esp *esp, struct esp_target_data *tp)
1453 offset = 0; 1453 offset = 0;
1454 1454
1455 if (offset) { 1455 if (offset) {
1456 int rounded_up, one_clock; 1456 int one_clock;
1457 1457
1458 if (period > esp->max_period) { 1458 if (period > esp->max_period) {
1459 period = offset = 0; 1459 period = offset = 0;
@@ -1463,9 +1463,7 @@ static void esp_msgin_sdtr(struct esp *esp, struct esp_target_data *tp)
1463 goto do_reject; 1463 goto do_reject;
1464 1464
1465 one_clock = esp->ccycle / 1000; 1465 one_clock = esp->ccycle / 1000;
1466 rounded_up = (period << 2); 1466 stp = DIV_ROUND_UP(period << 2, one_clock);
1467 rounded_up = (rounded_up + one_clock - 1) / one_clock;
1468 stp = rounded_up;
1469 if (stp && esp->rev >= FAS236) { 1467 if (stp && esp->rev >= FAS236) {
1470 if (stp >= 50) 1468 if (stp >= 50)
1471 stp--; 1469 stp--;