patch-1.3.28 linux/drivers/scsi/eata_dma_proc.c

Next file: linux/drivers/scsi/eata_pio.c
Previous file: linux/drivers/scsi/eata_dma.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.27/linux/drivers/scsi/eata_dma_proc.c linux/drivers/scsi/eata_dma_proc.c
@@ -181,7 +181,7 @@
 
 	/* Used for mutex if loading devices after boot */
 	scmd.request.sem = NULL;
-	scmd.request.dev = 0xffff; /* Mark busy */
+	scmd.request.rq_status = RQ_SCSI_BUSY;
 	
 	scsi_do_cmd (&scmd, cmnd, buff + 0x144, 0x66,  
 		     eata_scsi_done, 1 * HZ, 1);
@@ -190,16 +190,17 @@
 	 * booting, else do it right and use a mutex
 	 */	
 	if (current->pid == 0) {
-	    while (scmd.request.dev != 0xfffe)
+	    while (scmd.request.rq_status != RQ_SCSI_DONE)
 		barrier();
-	} else if (scmd.request.dev != 0xfffe) {
+	} else if (scmd.request.rq_status != RQ_SCSI_DONE) {
 	    struct semaphore sem = MUTEX_LOCKED;
 	    
 	    scmd.request.sem = &sem;
 	    down(&sem);
 	    
 	    /* Hmm.. Have to ask about this one */
-	    while (scmd.request.dev != 0xfffe) schedule();
+	    while (scmd.request.rq_status != RQ_SCSI_DONE)
+	      schedule();
 	}
 
 	size = sprintf(buffer + len, "IRQ: %2d, %s triggered\n", cc->interrupt,
@@ -320,7 +321,7 @@
 
 	/* Used for mutex if loading devices after boot */
 	scmd.request.sem = NULL;
-	scmd.request.dev = 0xffff; /* Mark busy */
+	scmd.request.rq_status = RQ_SCSI_BUSY; /* Mark busy */
 	
 	scsi_do_cmd (&scmd, cmnd, buff2, 0x144,  
 		     eata_scsi_done, 1 * HZ, 1);
@@ -329,16 +330,17 @@
 	 * booting, else do it right and use a mutex
 	 */	
 	if (current->pid == 0)
-	    while (scmd.request.dev != 0xfffe)
+	    while (scmd.request.rq_status != RQ_SCSI_DONE)
 		barrier();
-	else if (scmd.request.dev != 0xfffe) {
+	else if (scmd.request.rq_status != RQ_SCSI_DONE) {
 	    struct semaphore sem = MUTEX_LOCKED;
 	    
 	    scmd.request.sem = &sem;
 	    down(&sem);
 	    
 	    /* Hmm.. Have to ask about this one */
-	    while (scmd.request.dev != 0xfffe) schedule();
+	    while (scmd.request.rq_status != RQ_SCSI_DONE)
+	      schedule();
 	}
 	
 	swap_statistics(buff2);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this