Commit 9380dde2 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Linus Torvalds

[PATCH] M68k scsi local_irq*() updates

Convert m68k scsi drivers to new local_irq*() framework:
  - 53c7xx SCSI core
  - NCR53C9x ESP SCSI core
  - Atari NCR5380
  - Mac NCR5380
  - Sun-3 OBIO and VME NCR5380
parent 92c91294
This diff is collapsed.
...@@ -1853,8 +1853,7 @@ static int esp_do_data(struct NCR_ESP *esp, struct ESP_regs *eregs) ...@@ -1853,8 +1853,7 @@ static int esp_do_data(struct NCR_ESP *esp, struct ESP_regs *eregs)
ESPDATA(( /*"\n"*/ "\r")); ESPDATA(( /*"\n"*/ "\r"));
#endif #endif
#if 0 #if 0
save_flags(flags); local_irq_save(flags);
cli();
#endif #endif
if(thisphase == in_datain) { if(thisphase == in_datain) {
/* 'go' ... */ /* 'go' ... */
...@@ -1945,7 +1944,7 @@ static int esp_do_data(struct NCR_ESP *esp, struct ESP_regs *eregs) ...@@ -1945,7 +1944,7 @@ static int esp_do_data(struct NCR_ESP *esp, struct ESP_regs *eregs)
ESPDATA(("done! \n")); ESPDATA(("done! \n"));
#if 0 #if 0
restore_flags(flags); local_irq_restore(flags);
#endif #endif
/* check new bus phase */ /* check new bus phase */
......
This diff is collapsed.
...@@ -508,12 +508,11 @@ static int falcon_dont_release = 0; ...@@ -508,12 +508,11 @@ static int falcon_dont_release = 0;
static void static void
falcon_release_lock_if_possible( struct NCR5380_hostdata * hostdata ) falcon_release_lock_if_possible( struct NCR5380_hostdata * hostdata )
{ {
unsigned long oldflags; unsigned long flags;
if (IS_A_TT()) return; if (IS_A_TT()) return;
save_flags(oldflags); local_irq_save(flags);
cli();
if (falcon_got_lock && if (falcon_got_lock &&
!hostdata->disconnected_queue && !hostdata->disconnected_queue &&
...@@ -524,7 +523,7 @@ falcon_release_lock_if_possible( struct NCR5380_hostdata * hostdata ) ...@@ -524,7 +523,7 @@ falcon_release_lock_if_possible( struct NCR5380_hostdata * hostdata )
#if 0 #if 0
printk("WARNING: Lock release not allowed. Ignored\n"); printk("WARNING: Lock release not allowed. Ignored\n");
#endif #endif
restore_flags(oldflags); local_irq_restore(flags);
return; return;
} }
falcon_got_lock = 0; falcon_got_lock = 0;
...@@ -532,7 +531,7 @@ falcon_release_lock_if_possible( struct NCR5380_hostdata * hostdata ) ...@@ -532,7 +531,7 @@ falcon_release_lock_if_possible( struct NCR5380_hostdata * hostdata )
wake_up( &falcon_fairness_wait ); wake_up( &falcon_fairness_wait );
} }
restore_flags(oldflags); local_irq_restore(flags);
} }
/* This function manages the locking of the ST-DMA. /* This function manages the locking of the ST-DMA.
...@@ -552,12 +551,11 @@ falcon_release_lock_if_possible( struct NCR5380_hostdata * hostdata ) ...@@ -552,12 +551,11 @@ falcon_release_lock_if_possible( struct NCR5380_hostdata * hostdata )
static void falcon_get_lock( void ) static void falcon_get_lock( void )
{ {
unsigned long oldflags; unsigned long flags;
if (IS_A_TT()) return; if (IS_A_TT()) return;
save_flags(oldflags); local_irq_save(flags);
cli();
while( !in_interrupt() && falcon_got_lock && stdma_others_waiting() ) while( !in_interrupt() && falcon_got_lock && stdma_others_waiting() )
sleep_on( &falcon_fairness_wait ); sleep_on( &falcon_fairness_wait );
...@@ -577,7 +575,7 @@ static void falcon_get_lock( void ) ...@@ -577,7 +575,7 @@ static void falcon_get_lock( void )
} }
} }
restore_flags(oldflags); local_irq_restore(flags);
if (!falcon_got_lock) if (!falcon_got_lock)
panic("Falcon SCSI: someone stole the lock :-(\n"); panic("Falcon SCSI: someone stole the lock :-(\n");
} }
......
This diff is collapsed.
...@@ -370,9 +370,9 @@ void restore_irq(struct pt_regs *regs) ...@@ -370,9 +370,9 @@ void restore_irq(struct pt_regs *regs)
{ {
unsigned long flags; unsigned long flags;
save_flags(flags); local_save_flags(flags);
flags = (flags & ~0x0700) | (regs->sr & 0x0700); flags = (flags & ~0x0700) | (regs->sr & 0x0700);
restore_flags(flags); local_irq_restore(flags);
} }
/* /*
...@@ -621,10 +621,9 @@ void scsi_mac_debug (void) ...@@ -621,10 +621,9 @@ void scsi_mac_debug (void)
NCR5380_setup(default_instance); NCR5380_setup(default_instance);
if(NCR5380_read(BUS_AND_STATUS_REG)&BASR_IRQ) if(NCR5380_read(BUS_AND_STATUS_REG)&BASR_IRQ)
#endif #endif
save_flags(flags); local_irq_save(flags);
cli();
NCR5380_print_status(default_instance); NCR5380_print_status(default_instance);
restore_flags(flags); local_irq_restore(flags);
} }
#if 0 #if 0
polled_scsi_on = 1; polled_scsi_on = 1;
...@@ -651,10 +650,9 @@ void scsi_mac_polled (void) ...@@ -651,10 +650,9 @@ void scsi_mac_polled (void)
if(NCR5380_read(BUS_AND_STATUS_REG)&BASR_IRQ) if(NCR5380_read(BUS_AND_STATUS_REG)&BASR_IRQ)
{ {
printk("SCSI poll\n"); printk("SCSI poll\n");
save_flags(flags); local_irq_save(flags);
cli();
NCR5380_intr(IRQ_MAC_SCSI, instance, NULL); NCR5380_intr(IRQ_MAC_SCSI, instance, NULL);
restore_flags(flags); local_irq_restore(flags);
} }
#if 0 #if 0
} }
......
This diff is collapsed.
...@@ -402,10 +402,9 @@ void sun3_sun3_debug (void) ...@@ -402,10 +402,9 @@ void sun3_sun3_debug (void)
NCR5380_local_declare(); NCR5380_local_declare();
if (default_instance) { if (default_instance) {
save_flags(flags); local_irq_save(flags);
cli();
NCR5380_print_status(default_instance); NCR5380_print_status(default_instance);
restore_flags(flags); local_irq_restore(flags);
} }
} }
#endif #endif
......
...@@ -387,10 +387,9 @@ void sun3_sun3_debug (void) ...@@ -387,10 +387,9 @@ void sun3_sun3_debug (void)
NCR5380_local_declare(); NCR5380_local_declare();
if (default_instance) { if (default_instance) {
save_flags(flags); local_irq_save(flags);
cli();
NCR5380_print_status(default_instance); NCR5380_print_status(default_instance);
restore_flags(flags); local_irq_restore(flags);
} }
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment