patch-2.0.5 linux/drivers/scsi/sd.c

Next file: linux/drivers/scsi/u14-34f.c
Previous file: linux/drivers/scsi/scsi.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.4/linux/drivers/scsi/sd.c linux/drivers/scsi/sd.c
@@ -1054,7 +1054,7 @@
 	     * Issue command to spin up drive for these cases. */
 	    if(the_result && !rscsi_disks[i].device->removable && 
 	       SCpnt->sense_buffer[2] == NOT_READY) {
-		int time1;
+		unsigned long time1;
 		if(!spintime){
 		    printk( "sd%c: Spinning up disk...", 'a' + i );
 		    cmd[0] = START_STOP;
@@ -1081,8 +1081,8 @@
 		    spintime = jiffies;
 		}
 		
-		time1 = jiffies;
-		while(jiffies < time1 + HZ); /* Wait 1 second for next try */
+		time1 = jiffies + HZ;
+		while(jiffies < time1); /* Wait 1 second for next try */
 		printk( "." );
 	    }
 	} while(the_result && spintime && spintime+100*HZ > jiffies);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov