patch-2.1.102 linux/drivers/scsi/ibmmca.c
Next file: linux/drivers/scsi/ide-scsi.c
Previous file: linux/drivers/scsi/gdth.c
Back to the patch index
Back to the overall index
- Lines: 84
- Date:
Mon May 11 11:22:53 1998
- Orig file:
v2.1.101/linux/drivers/scsi/ibmmca.c
- Orig date:
Tue Apr 14 14:29:22 1998
diff -u --recursive --new-file v2.1.101/linux/drivers/scsi/ibmmca.c linux/drivers/scsi/ibmmca.c
@@ -877,6 +877,7 @@
unsigned int intr_reg;
unsigned int cmd_result;
unsigned int ldn;
+ unsigned long flags;
/* search for one adapter-response on shared interrupt */
do
@@ -892,14 +893,15 @@
ldn = intr_reg & 0x0f;
/*must wait for attention reg not busy, then send EOI to subsystem */
+ save_flags(flags);
while (1) {
cli ();
if (!(inb (IM_STAT_REG) & IM_BUSY))
break;
- sti ();
+ restore_flags(flags);
}
outb (IM_EOI | ldn, IM_ATTN_REG);
- sti ();
+ restore_flags (flags);
/*these should never happen (hw fails, or a local programming bug) */
if (cmd_result == IM_ADAPTER_HW_FAILURE)
@@ -1007,19 +1009,21 @@
issue_cmd (struct Scsi_Host *shpnt, unsigned long cmd_reg,
unsigned char attn_reg)
{
+ unsigned long flags;
/*must wait for attention reg not busy */
+ save_flags(flags);
while (1)
{
cli ();
if (!(inb (IM_STAT_REG) & IM_BUSY))
break;
- sti ();
+ restore_flags (flags);
}
/*write registers and enable system interrupts */
outl (cmd_reg, IM_CMD_REG);
outb (attn_reg, IM_ATTN_REG);
- sti ();
+ restore_flags (flags);
}
/*--------------------------------------------------------------------*/
@@ -2021,7 +2025,7 @@
/*if cmd for this ldn has already finished, no need to abort */
if (!ld[ldn].cmd)
{
- sti ();
+ /* sti (); */
return SCSI_ABORT_NOT_RUNNING;
}
@@ -2174,6 +2178,7 @@
int len=0;
int i,id,lun;
struct Scsi_Host *shpnt;
+ unsigned long flags;
for (i = 0; hosts[i] && hosts[i]->host_no != hostno; i++);
shpnt = hosts[i];
@@ -2182,6 +2187,7 @@
return len;
}
+ save_flags(flags);
cli();
len += sprintf(buffer+len, "\n IBM-SCSI-Subsystem-Linux-Driver, Version %s\n\n\n",
@@ -2263,7 +2269,7 @@
if (len > length)
len = length;
- sti();
+ restore_flags(flags);
return len;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov