diff options
Diffstat (limited to 'drivers/scsi/ncr53c8xx.c')
-rw-r--r-- | drivers/scsi/ncr53c8xx.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c index 519486d24b28..243470936fab 100644 --- a/drivers/scsi/ncr53c8xx.c +++ b/drivers/scsi/ncr53c8xx.c | |||
@@ -3481,8 +3481,8 @@ static int ncr_queue_command (struct ncb *np, struct scsi_cmnd *cmd) | |||
3481 | **---------------------------------------------------- | 3481 | **---------------------------------------------------- |
3482 | */ | 3482 | */ |
3483 | if (np->settle_time && cmd->timeout_per_command >= HZ) { | 3483 | if (np->settle_time && cmd->timeout_per_command >= HZ) { |
3484 | u_long tlimit = ktime_get(cmd->timeout_per_command - HZ); | 3484 | u_long tlimit = jiffies + cmd->timeout_per_command - HZ; |
3485 | if (ktime_dif(np->settle_time, tlimit) > 0) | 3485 | if (time_after(np->settle_time, tlimit)) |
3486 | np->settle_time = tlimit; | 3486 | np->settle_time = tlimit; |
3487 | } | 3487 | } |
3488 | 3488 | ||
@@ -3516,7 +3516,7 @@ static int ncr_queue_command (struct ncb *np, struct scsi_cmnd *cmd) | |||
3516 | ** Force ordered tag if necessary to avoid timeouts | 3516 | ** Force ordered tag if necessary to avoid timeouts |
3517 | ** and to preserve interactivity. | 3517 | ** and to preserve interactivity. |
3518 | */ | 3518 | */ |
3519 | if (lp && ktime_exp(lp->tags_stime)) { | 3519 | if (lp && time_after(jiffies, lp->tags_stime)) { |
3520 | if (lp->tags_smap) { | 3520 | if (lp->tags_smap) { |
3521 | order = M_ORDERED_TAG; | 3521 | order = M_ORDERED_TAG; |
3522 | if ((DEBUG_FLAGS & DEBUG_TAGS)||bootverbose>2){ | 3522 | if ((DEBUG_FLAGS & DEBUG_TAGS)||bootverbose>2){ |
@@ -3524,7 +3524,7 @@ static int ncr_queue_command (struct ncb *np, struct scsi_cmnd *cmd) | |||
3524 | "ordered tag forced.\n"); | 3524 | "ordered tag forced.\n"); |
3525 | } | 3525 | } |
3526 | } | 3526 | } |
3527 | lp->tags_stime = ktime_get(3*HZ); | 3527 | lp->tags_stime = jiffies + 3*HZ; |
3528 | lp->tags_smap = lp->tags_umap; | 3528 | lp->tags_smap = lp->tags_umap; |
3529 | } | 3529 | } |
3530 | 3530 | ||
@@ -3669,7 +3669,7 @@ static int ncr_queue_command (struct ncb *np, struct scsi_cmnd *cmd) | |||
3669 | /* | 3669 | /* |
3670 | ** select | 3670 | ** select |
3671 | */ | 3671 | */ |
3672 | cp->phys.select.sel_id = sdev->id; | 3672 | cp->phys.select.sel_id = sdev_id(sdev); |
3673 | cp->phys.select.sel_scntl3 = tp->wval; | 3673 | cp->phys.select.sel_scntl3 = tp->wval; |
3674 | cp->phys.select.sel_sxfer = tp->sval; | 3674 | cp->phys.select.sel_sxfer = tp->sval; |
3675 | /* | 3675 | /* |
@@ -3792,7 +3792,7 @@ static int ncr_reset_scsi_bus(struct ncb *np, int enab_int, int settle_delay) | |||
3792 | u32 term; | 3792 | u32 term; |
3793 | int retv = 0; | 3793 | int retv = 0; |
3794 | 3794 | ||
3795 | np->settle_time = ktime_get(settle_delay * HZ); | 3795 | np->settle_time = jiffies + settle_delay * HZ; |
3796 | 3796 | ||
3797 | if (bootverbose > 1) | 3797 | if (bootverbose > 1) |
3798 | printk("%s: resetting, " | 3798 | printk("%s: resetting, " |
@@ -4820,7 +4820,7 @@ static void ncr_set_sync_wide_status (struct ncb *np, u_char target) | |||
4820 | */ | 4820 | */ |
4821 | for (cp = np->ccb; cp; cp = cp->link_ccb) { | 4821 | for (cp = np->ccb; cp; cp = cp->link_ccb) { |
4822 | if (!cp->cmd) continue; | 4822 | if (!cp->cmd) continue; |
4823 | if (cp->cmd->device->id != target) continue; | 4823 | if (scmd_id(cp->cmd) != target) continue; |
4824 | #if 0 | 4824 | #if 0 |
4825 | cp->sync_status = tp->sval; | 4825 | cp->sync_status = tp->sval; |
4826 | cp->wide_status = tp->wval; | 4826 | cp->wide_status = tp->wval; |
@@ -4844,7 +4844,7 @@ static void ncr_setsync (struct ncb *np, struct ccb *cp, u_char scntl3, u_char s | |||
4844 | u_char target = INB (nc_sdid) & 0x0f; | 4844 | u_char target = INB (nc_sdid) & 0x0f; |
4845 | u_char idiv; | 4845 | u_char idiv; |
4846 | 4846 | ||
4847 | BUG_ON(target != (cmd->device->id & 0xf)); | 4847 | BUG_ON(target != (scmd_id(cmd) & 0xf)); |
4848 | 4848 | ||
4849 | tp = &np->target[target]; | 4849 | tp = &np->target[target]; |
4850 | 4850 | ||
@@ -4902,7 +4902,7 @@ static void ncr_setwide (struct ncb *np, struct ccb *cp, u_char wide, u_char ack | |||
4902 | u_char scntl3; | 4902 | u_char scntl3; |
4903 | u_char sxfer; | 4903 | u_char sxfer; |
4904 | 4904 | ||
4905 | BUG_ON(target != (cmd->device->id & 0xf)); | 4905 | BUG_ON(target != (scmd_id(cmd) & 0xf)); |
4906 | 4906 | ||
4907 | tp = &np->target[target]; | 4907 | tp = &np->target[target]; |
4908 | tp->widedone = wide+1; | 4908 | tp->widedone = wide+1; |
@@ -5044,7 +5044,7 @@ static void ncr_setup_tags (struct ncb *np, struct scsi_device *sdev) | |||
5044 | 5044 | ||
5045 | static void ncr_timeout (struct ncb *np) | 5045 | static void ncr_timeout (struct ncb *np) |
5046 | { | 5046 | { |
5047 | u_long thistime = ktime_get(0); | 5047 | u_long thistime = jiffies; |
5048 | 5048 | ||
5049 | /* | 5049 | /* |
5050 | ** If release process in progress, let's go | 5050 | ** If release process in progress, let's go |
@@ -5057,7 +5057,7 @@ static void ncr_timeout (struct ncb *np) | |||
5057 | return; | 5057 | return; |
5058 | } | 5058 | } |
5059 | 5059 | ||
5060 | np->timer.expires = ktime_get(SCSI_NCR_TIMER_INTERVAL); | 5060 | np->timer.expires = jiffies + SCSI_NCR_TIMER_INTERVAL; |
5061 | add_timer(&np->timer); | 5061 | add_timer(&np->timer); |
5062 | 5062 | ||
5063 | /* | 5063 | /* |
@@ -5336,8 +5336,8 @@ void ncr_exception (struct ncb *np) | |||
5336 | **========================================================= | 5336 | **========================================================= |
5337 | */ | 5337 | */ |
5338 | 5338 | ||
5339 | if (ktime_exp(np->regtime)) { | 5339 | if (time_after(jiffies, np->regtime)) { |
5340 | np->regtime = ktime_get(10*HZ); | 5340 | np->regtime = jiffies + 10*HZ; |
5341 | for (i = 0; i<sizeof(np->regdump); i++) | 5341 | for (i = 0; i<sizeof(np->regdump); i++) |
5342 | ((char*)&np->regdump)[i] = INB_OFF(i); | 5342 | ((char*)&np->regdump)[i] = INB_OFF(i); |
5343 | np->regdump.nc_dstat = dstat; | 5343 | np->regdump.nc_dstat = dstat; |
@@ -5453,7 +5453,7 @@ static int ncr_int_sbmc (struct ncb *np) | |||
5453 | ** Suspend command processing for 1 second and | 5453 | ** Suspend command processing for 1 second and |
5454 | ** reinitialize all except the chip. | 5454 | ** reinitialize all except the chip. |
5455 | */ | 5455 | */ |
5456 | np->settle_time = ktime_get(1*HZ); | 5456 | np->settle_time = jiffies + HZ; |
5457 | ncr_init (np, 0, bootverbose ? "scsi mode change" : NULL, HS_RESET); | 5457 | ncr_init (np, 0, bootverbose ? "scsi mode change" : NULL, HS_RESET); |
5458 | return 1; | 5458 | return 1; |
5459 | } | 5459 | } |
@@ -6923,7 +6923,7 @@ static struct lcb *ncr_setup_lcb (struct ncb *np, struct scsi_device *sdev) | |||
6923 | for (i = 0 ; i < MAX_TAGS ; i++) | 6923 | for (i = 0 ; i < MAX_TAGS ; i++) |
6924 | lp->cb_tags[i] = i; | 6924 | lp->cb_tags[i] = i; |
6925 | lp->maxnxs = MAX_TAGS; | 6925 | lp->maxnxs = MAX_TAGS; |
6926 | lp->tags_stime = ktime_get(3*HZ); | 6926 | lp->tags_stime = jiffies + 3*HZ; |
6927 | ncr_setup_tags (np, sdev); | 6927 | ncr_setup_tags (np, sdev); |
6928 | } | 6928 | } |
6929 | 6929 | ||