patch-1.3.35 linux/drivers/scsi/sr.c
Next file: linux/drivers/scsi/sr_ioctl.c
Previous file: linux/drivers/scsi/sd.h
Back to the patch index
Back to the overall index
- Lines: 36
- Date:
Mon Oct 16 08:36:58 1995
- Orig file:
v1.3.34/linux/drivers/scsi/sr.c
- Orig date:
Wed Sep 27 15:59:59 1995
diff -u --recursive --new-file v1.3.34/linux/drivers/scsi/sr.c linux/drivers/scsi/sr.c
@@ -989,24 +989,17 @@
SCpnt->cmd_len = 0;
memset(buffer, 0, 8);
-
- scsi_do_cmd (SCpnt,
- (void *) cmd, (void *) buffer,
- 512, sr_init_done, SR_TIMEOUT,
- MAX_RETRIES);
-
- if (current->pid == 0)
- while(SCpnt->request.rq_status != RQ_SCSI_DONE)
- barrier();
- else
- if (SCpnt->request.rq_status != RQ_SCSI_DONE){
- struct semaphore sem = MUTEX_LOCKED;
- SCpnt->request.sem = &sem;
- down(&sem);
- /* Hmm.. Have to ask about this */
- while (SCpnt->request.rq_status != RQ_SCSI_DONE)
- schedule();
- };
+
+ /* Do the command and wait.. */
+ {
+ struct semaphore sem = MUTEX_LOCKED;
+ SCpnt->request.sem = &sem;
+ scsi_do_cmd (SCpnt,
+ (void *) cmd, (void *) buffer,
+ 512, sr_init_done, SR_TIMEOUT,
+ MAX_RETRIES);
+ down(&sem);
+ }
the_result = SCpnt->result;
retries--;
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