Messages in this thread Patch in this message | | | Date | Fri, 6 Nov 1998 22:42:57 +0100 (CET) | From | Andrea Arcangeli <> | Subject | aic7xxx timer fix |
| |
I don' t think that this patch should make runtime differences but make more sense than the previous code to me:
Patch against pre-2.1.127-7:
Index: linux/drivers/scsi/aic7xxx.c diff -u linux/drivers/scsi/aic7xxx.c:1.1.1.4 linux/drivers/scsi/aic7xxx.c:1.1.1.2.4.5 --- linux/drivers/scsi/aic7xxx.c:1.1.1.4 Wed Nov 4 13:07:24 1998 +++ linux/drivers/scsi/aic7xxx.c Wed Nov 4 01:19:34 1998 @@ -3429,10 +3429,7 @@ * here so that we can delay all re-sent commands for this device for the * 4 seconds and then have our timer routine pick them back up. */ - if( timer_pending(&p->dev_timer[i]) ) - { - del_timer(&p->dev_timer[i]); - } + del_timer(&p->dev_timer[i]); p->dev_timer[i].expires = jiffies + (4 * HZ); add_timer(&p->dev_timer[i]); } @@ -3481,8 +3478,7 @@ "delayed_scbs queue!\n", p->host_no, channel, i, lun); scbq_init(&p->delayed_scbs[i]); } - if ( (p->delayed_scbs[i].head == NULL) && - timer_pending(&p->dev_timer[i]) ) + if ( p->delayed_scbs[i].head == NULL ) del_timer(&p->dev_timer[i]); } } @@ -4151,10 +4147,8 @@ #endif for(i=0; i<MAX_TARGETS; i++) { - if ( timer_pending(&p->dev_timer[i]) && - time_before_eq(p->dev_timer[i].expires, jiffies) ) + if ( del_timer(&p->dev_timer[i]) ) { - del_timer(&p->dev_timer[i]); p->dev_temp_queue_depth[i] = p->dev_max_queue_depth[i]; j = 0; while ( ((scb = scbq_remove_head(&p->delayed_scbs[i])) != NULL) &&
Andrea Arcangeli
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |