summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sr.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-08-25 09:12:35 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-08-25 09:12:35 +0000
commitc7fc24dc4420057f103afe8fc64524ebc25c5d37 (patch)
tree3682407a599b8f9f03fc096298134cafba1c9b2f /drivers/scsi/sr.c
parent1d793fade8b063fde3cf275bf1a5c2d381292cd9 (diff)
o Merge with Linux 2.1.116.
o New Newport console code. o New G364 console code.
Diffstat (limited to 'drivers/scsi/sr.c')
-rw-r--r--drivers/scsi/sr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c
index bbbffbd84..2c8419358 100644
--- a/drivers/scsi/sr.c
+++ b/drivers/scsi/sr.c
@@ -880,6 +880,7 @@ void get_sectorsize(int i){
unsigned char *buffer;
int the_result, retries;
Scsi_Cmnd * SCpnt;
+ unsigned long flags;
buffer = (unsigned char *) scsi_malloc(512);
SCpnt = scsi_allocate_device(NULL, scsi_CDs[i].device, 1);
@@ -898,10 +899,12 @@ void get_sectorsize(int i){
{
struct semaphore sem = MUTEX_LOCKED;
SCpnt->request.sem = &sem;
+ spin_lock_irqsave(&io_request_lock, flags);
scsi_do_cmd (SCpnt,
(void *) cmd, (void *) buffer,
512, sr_init_done, SR_TIMEOUT,
MAX_RETRIES);
+ spin_unlock_irqrestore(&io_request_lock, flags);
down(&sem);
}