Commit 718e92c5 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] (13/14) resync

ditto for DEVICE_INTR/CLEAR_INTR.  do_mfm/do_acsi/do_hd/... are
explicitly declared in the drivers that use DEVICE_INTR stuff;
DEVICE_INTR/CLEAR_INTR is gone from blk.h.
parent 9437b796
...@@ -983,10 +983,8 @@ static void do_stram_request(request_queue_t *q) ...@@ -983,10 +983,8 @@ static void do_stram_request(request_queue_t *q)
unsigned long len; unsigned long len;
while (1) { while (1) {
if (blk_queue_empty(QUEUE)) { if (blk_queue_empty(QUEUE))
CLEAR_INTR;
return; return;
}
start = swap_start + (CURRENT->sector << 9); start = swap_start + (CURRENT->sector << 9);
len = CURRENT->current_nr_sectors << 9; len = CURRENT->current_nr_sectors << 9;
......
...@@ -155,7 +155,6 @@ ...@@ -155,7 +155,6 @@
#define MAJOR_NR FLOPPY_MAJOR #define MAJOR_NR FLOPPY_MAJOR
#define FLOPPY_DMA 0 #define FLOPPY_DMA 0
#define DEVICE_NAME "floppy" #define DEVICE_NAME "floppy"
#define DEVICE_INTR do_floppy
#define DEVICE_NR(device) ( (minor(device) & 3) | ((minor(device) & 0x80 ) >> 5 )) #define DEVICE_NR(device) ( (minor(device) & 3) | ((minor(device) & 0x80 ) >> 5 ))
#include <linux/blk.h> #include <linux/blk.h>
......
...@@ -114,7 +114,6 @@ ...@@ -114,7 +114,6 @@
#include <linux/delay.h> #include <linux/delay.h>
#define MAJOR_NR MFM_ACORN_MAJOR #define MAJOR_NR MFM_ACORN_MAJOR
#define DEVICE_INTR do_mfm
#define DEVICE_NR(device) (minor(device) >> 6) #define DEVICE_NR(device) (minor(device) >> 6)
#include <linux/blk.h> #include <linux/blk.h>
#include <linux/blkpg.h> #include <linux/blkpg.h>
...@@ -128,6 +127,7 @@ ...@@ -128,6 +127,7 @@
#include <asm/ecard.h> #include <asm/ecard.h>
#include <asm/hardware/ioc.h> #include <asm/hardware/ioc.h>
static void (*do_mfm)(void) = NULL;
/* /*
* This sort of stuff should be in a header file shared with ide.c, hd.c, xd.c etc * This sort of stuff should be in a header file shared with ide.c, hd.c, xd.c etc
*/ */
...@@ -572,7 +572,7 @@ static void mfm_rw_intr(void) ...@@ -572,7 +572,7 @@ static void mfm_rw_intr(void)
DBG("mfm_rw_intr: returned from cont->done\n"); DBG("mfm_rw_intr: returned from cont->done\n");
} else { } else {
/* Its going to generate another interrupt */ /* Its going to generate another interrupt */
DEVICE_INTR = mfm_rw_intr; do_mfm = mfm_rw_intr;
}; };
} }
...@@ -580,7 +580,7 @@ static void mfm_setup_rw(void) ...@@ -580,7 +580,7 @@ static void mfm_setup_rw(void)
{ {
DBG("setting up for rw...\n"); DBG("setting up for rw...\n");
DEVICE_INTR = mfm_rw_intr; do_mfm = mfm_rw_intr;
issue_command(raw_cmd.cmdcode, raw_cmd.cmddata, raw_cmd.cmdlen); issue_command(raw_cmd.cmdcode, raw_cmd.cmddata, raw_cmd.cmdlen);
} }
...@@ -610,7 +610,7 @@ static void mfm_recal_intr(void) ...@@ -610,7 +610,7 @@ static void mfm_recal_intr(void)
/* Command end without seek end (see data sheet p.20) for parallel seek /* Command end without seek end (see data sheet p.20) for parallel seek
- we have to send a POL command to wait for the seek */ - we have to send a POL command to wait for the seek */
if (mfm_status & STAT_CED) { if (mfm_status & STAT_CED) {
DEVICE_INTR = mfm_recal_intr; do_mfm = mfm_recal_intr;
issue_command(CMD_POL, NULL, 0); issue_command(CMD_POL, NULL, 0);
return; return;
} }
...@@ -640,7 +640,7 @@ static void mfm_seek_intr(void) ...@@ -640,7 +640,7 @@ static void mfm_seek_intr(void)
return; return;
} }
if (mfm_status & STAT_CED) { if (mfm_status & STAT_CED) {
DEVICE_INTR = mfm_seek_intr; do_mfm = mfm_seek_intr;
issue_command(CMD_POL, NULL, 0); issue_command(CMD_POL, NULL, 0);
return; return;
} }
...@@ -698,7 +698,7 @@ static void mfm_seek(void) ...@@ -698,7 +698,7 @@ static void mfm_seek(void)
DBG("seeking...\n"); DBG("seeking...\n");
if (MFM_DRV_INFO.cylinder < 0) { if (MFM_DRV_INFO.cylinder < 0) {
DEVICE_INTR = mfm_recal_intr; do_mfm = mfm_recal_intr;
DBG("mfm_seek: about to call specify\n"); DBG("mfm_seek: about to call specify\n");
mfm_specify (); /* DAG added this */ mfm_specify (); /* DAG added this */
...@@ -714,7 +714,7 @@ static void mfm_seek(void) ...@@ -714,7 +714,7 @@ static void mfm_seek(void)
cmdb[2] = raw_cmd.cylinder >> 8; cmdb[2] = raw_cmd.cylinder >> 8;
cmdb[3] = raw_cmd.cylinder; cmdb[3] = raw_cmd.cylinder;
DEVICE_INTR = mfm_seek_intr; do_mfm = mfm_seek_intr;
issue_command(CMD_SEK, cmdb, 4); issue_command(CMD_SEK, cmdb, 4);
} else } else
mfm_setup_rw(); mfm_setup_rw();
...@@ -909,7 +909,7 @@ static void mfm_request(void) ...@@ -909,7 +909,7 @@ static void mfm_request(void)
if (blk_queue_empty(QUEUE)) { if (blk_queue_empty(QUEUE)) {
printk("mfm_request: Exiting due to empty queue (pre)\n"); printk("mfm_request: Exiting due to empty queue (pre)\n");
DEVICE_INTR = NULL; do_mfm = NULL;
Busy = 0; Busy = 0;
return; return;
} }
...@@ -971,9 +971,9 @@ static void do_mfm_request(request_queue_t *q) ...@@ -971,9 +971,9 @@ static void do_mfm_request(request_queue_t *q)
static void mfm_interrupt_handler(int unused, void *dev_id, struct pt_regs *regs) static void mfm_interrupt_handler(int unused, void *dev_id, struct pt_regs *regs)
{ {
void (*handler) (void) = DEVICE_INTR; void (*handler) (void) = do_mfm;
DEVICE_INTR = NULL; do_mfm = NULL;
DBG("mfm_interrupt_handler (handler=0x%p)\n", handler); DBG("mfm_interrupt_handler (handler=0x%p)\n", handler);
......
...@@ -45,7 +45,6 @@ ...@@ -45,7 +45,6 @@
#define MAJOR_NR ACSI_MAJOR #define MAJOR_NR ACSI_MAJOR
#define DEVICE_NAME "ACSI" #define DEVICE_NAME "ACSI"
#define DEVICE_INTR do_acsi
#define DEVICE_NR(device) (minor(device) >> 4) #define DEVICE_NR(device) (minor(device) >> 4)
#include <linux/config.h> #include <linux/config.h>
...@@ -80,6 +79,7 @@ typedef void Scsi_Device; /* hack to avoid including scsi.h */ ...@@ -80,6 +79,7 @@ typedef void Scsi_Device; /* hack to avoid including scsi.h */
#include <asm/atari_stdma.h> #include <asm/atari_stdma.h>
#include <asm/atari_stram.h> #include <asm/atari_stram.h>
static void (*do_acsi)(void) = NULL;
#define DEBUG #define DEBUG
#undef DEBUG_DETECT #undef DEBUG_DETECT
...@@ -738,9 +738,9 @@ static void acsi_print_error( const unsigned char *errblk, int dev ) ...@@ -738,9 +738,9 @@ static void acsi_print_error( const unsigned char *errblk, int dev )
static void acsi_interrupt(int irq, void *data, struct pt_regs *fp ) static void acsi_interrupt(int irq, void *data, struct pt_regs *fp )
{ void (*acsi_irq_handler)(void) = DEVICE_INTR; { void (*acsi_irq_handler)(void) = do_acsi;
DEVICE_INTR = NULL; do_acsi = NULL;
CLEAR_TIMER(); CLEAR_TIMER();
if (!acsi_irq_handler) if (!acsi_irq_handler)
...@@ -841,9 +841,9 @@ static void acsi_times_out( unsigned long dummy ) ...@@ -841,9 +841,9 @@ static void acsi_times_out( unsigned long dummy )
{ {
DISABLE_IRQ(); DISABLE_IRQ();
if (!DEVICE_INTR) return; if (!do_acsi) return;
DEVICE_INTR = NULL; do_acsi = NULL;
printk( KERN_ERR "ACSI timeout\n" ); printk( KERN_ERR "ACSI timeout\n" );
if (blk_queue_empty(QUEUE)) if (blk_queue_empty(QUEUE))
return; return;
...@@ -959,11 +959,11 @@ static void redo_acsi_request( void ) ...@@ -959,11 +959,11 @@ static void redo_acsi_request( void )
repeat: repeat:
CLEAR_TIMER(); CLEAR_TIMER();
if (DEVICE_INTR) if (do_acsi)
return; return;
if (blk_queue_empty(QUEUE)) { if (blk_queue_empty(QUEUE)) {
CLEAR_INTR; do_acsi = NULL;
ENABLE_IRQ(); ENABLE_IRQ();
stdma_release(); stdma_release();
return; return;
...@@ -1052,9 +1052,9 @@ static void redo_acsi_request( void ) ...@@ -1052,9 +1052,9 @@ static void redo_acsi_request( void )
if (buffer == acsi_buffer) if (buffer == acsi_buffer)
copy_to_acsibuffer(); copy_to_acsibuffer();
dma_cache_maintenance( pbuffer, nsect*512, 1 ); dma_cache_maintenance( pbuffer, nsect*512, 1 );
DEVICE_INTR = write_intr; do_acsi = write_intr;
if (!acsicmd_dma( write_cmd, buffer, nsect, 1, 1)) { if (!acsicmd_dma( write_cmd, buffer, nsect, 1, 1)) {
CLEAR_INTR; do_acsi = NULL;
printk( KERN_ERR "ACSI (write): Timeout in command block\n" ); printk( KERN_ERR "ACSI (write): Timeout in command block\n" );
bad_rw_intr(); bad_rw_intr();
goto repeat; goto repeat;
...@@ -1066,9 +1066,9 @@ static void redo_acsi_request( void ) ...@@ -1066,9 +1066,9 @@ static void redo_acsi_request( void )
CMDSET_TARG_LUN( read_cmd, target, lun ); CMDSET_TARG_LUN( read_cmd, target, lun );
CMDSET_BLOCK( read_cmd, block ); CMDSET_BLOCK( read_cmd, block );
CMDSET_LEN( read_cmd, nsect ); CMDSET_LEN( read_cmd, nsect );
DEVICE_INTR = read_intr; do_acsi = read_intr;
if (!acsicmd_dma( read_cmd, buffer, nsect, 0, 1)) { if (!acsicmd_dma( read_cmd, buffer, nsect, 0, 1)) {
CLEAR_INTR; do_acsi = NULL;
printk( KERN_ERR "ACSI (read): Timeout in command block\n" ); printk( KERN_ERR "ACSI (read): Timeout in command block\n" );
bad_rw_intr(); bad_rw_intr();
goto repeat; goto repeat;
......
...@@ -80,7 +80,6 @@ ...@@ -80,7 +80,6 @@
#define MAJOR_NR FLOPPY_MAJOR #define MAJOR_NR FLOPPY_MAJOR
#define DEVICE_NAME "floppy" #define DEVICE_NAME "floppy"
#define DEVICE_INTR do_floppy
#define DEVICE_NR(device) ( (minor(device) & 3) | ((minor(device) & 0x80 ) >> 5 )) #define DEVICE_NR(device) ( (minor(device) & 3) | ((minor(device) & 0x80 ) >> 5 ))
#include <linux/blk.h> #include <linux/blk.h>
......
...@@ -93,7 +93,6 @@ ...@@ -93,7 +93,6 @@
#define MAJOR_NR FLOPPY_MAJOR #define MAJOR_NR FLOPPY_MAJOR
#define DEVICE_NAME "floppy" #define DEVICE_NAME "floppy"
#define DEVICE_INTR do_floppy
#define DEVICE_NR(device) ( (minor(device) & 3) | ((minor(device) & 0x80 ) >> 5 )) #define DEVICE_NR(device) ( (minor(device) & 3) | ((minor(device) & 0x80 ) >> 5 ))
#include <linux/blk.h> #include <linux/blk.h>
#include <linux/blkpg.h> #include <linux/blkpg.h>
......
...@@ -759,10 +759,8 @@ static void do_pcd_request (request_queue_t * q) ...@@ -759,10 +759,8 @@ static void do_pcd_request (request_queue_t * q)
if (pcd_busy) return; if (pcd_busy) return;
while (1) { while (1) {
if (blk_queue_empty(QUEUE)) { if (blk_queue_empty(QUEUE))
CLEAR_INTR;
return; return;
}
if (rq_data_dir(CURRENT) == READ) { if (rq_data_dir(CURRENT) == READ) {
unit = minor(CURRENT->rq_dev); unit = minor(CURRENT->rq_dev);
......
...@@ -834,10 +834,8 @@ static void do_pd_request (request_queue_t * q) ...@@ -834,10 +834,8 @@ static void do_pd_request (request_queue_t * q)
if (pd_busy) return; if (pd_busy) return;
repeat: repeat:
if (blk_queue_empty(QUEUE)) { if (blk_queue_empty(QUEUE))
CLEAR_INTR;
return; return;
}
pd_dev = minor(CURRENT->rq_dev); pd_dev = minor(CURRENT->rq_dev);
pd_unit = unit = DEVICE_NR(CURRENT->rq_dev); pd_unit = unit = DEVICE_NR(CURRENT->rq_dev);
......
...@@ -840,10 +840,8 @@ static void do_pf_request (request_queue_t * q) ...@@ -840,10 +840,8 @@ static void do_pf_request (request_queue_t * q)
if (pf_busy) return; if (pf_busy) return;
repeat: repeat:
if (blk_queue_empty(QUEUE)) { if (blk_queue_empty(QUEUE))
CLEAR_INTR;
return; return;
}
pf_unit = unit = DEVICE_NR(CURRENT->rq_dev); pf_unit = unit = DEVICE_NR(CURRENT->rq_dev);
pf_block = CURRENT->sector; pf_block = CURRENT->sector;
......
...@@ -505,10 +505,8 @@ static void do_ps2esdi_request(request_queue_t * q) ...@@ -505,10 +505,8 @@ static void do_ps2esdi_request(request_queue_t * q)
/* standard procedure to ensure that requests are really on the /* standard procedure to ensure that requests are really on the
list + sanity checks. */ list + sanity checks. */
if (blk_queue_empty(QUEUE)) { if (blk_queue_empty(QUEUE))
CLEAR_INTR;
return; return;
}
if (isa_virt_to_bus(CURRENT->buffer + CURRENT->current_nr_sectors * 512) > 16 * MB) { if (isa_virt_to_bus(CURRENT->buffer + CURRENT->current_nr_sectors * 512) > 16 * MB) {
printk("%s: DMA above 16MB not supported\n", DEVICE_NAME); printk("%s: DMA above 16MB not supported\n", DEVICE_NAME);
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#define MAJOR_NR FLOPPY_MAJOR #define MAJOR_NR FLOPPY_MAJOR
#define DEVICE_NAME "floppy" #define DEVICE_NAME "floppy"
#define DEVICE_INTR do_floppy
#define DEVICE_NR(device) ( (minor(device) & 3) | ((minor(device) & 0x80 ) >> 5 )) #define DEVICE_NR(device) ( (minor(device) & 3) | ((minor(device) & 0x80 ) >> 5 ))
#include <linux/blk.h> #include <linux/blk.h>
#include <linux/devfs_fs_kernel.h> #include <linux/devfs_fs_kernel.h>
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#define MAJOR_NR FLOPPY_MAJOR #define MAJOR_NR FLOPPY_MAJOR
#define DEVICE_NAME "floppy" #define DEVICE_NAME "floppy"
#define DEVICE_INTR do_floppy
#define DEVICE_NR(device) ( (minor(device) & 3) | ((minor(device) & 0x80 ) >> 5 )) #define DEVICE_NR(device) ( (minor(device) & 3) | ((minor(device) & 0x80 ) >> 5 ))
#include <linux/stddef.h> #include <linux/stddef.h>
......
...@@ -284,10 +284,8 @@ static void do_xd_request (request_queue_t * q) ...@@ -284,10 +284,8 @@ static void do_xd_request (request_queue_t * q)
while (1) { while (1) {
code = 0; code = 0;
/* do some checking on the request structure */ /* do some checking on the request structure */
if (blk_queue_empty(QUEUE)) { if (blk_queue_empty(QUEUE))
CLEAR_INTR;
return; return;
}
if (DEVICE_NR(CURRENT->rq_dev) < xd_drives if (DEVICE_NR(CURRENT->rq_dev) < xd_drives
&& (CURRENT->flags & REQ_CMD) && (CURRENT->flags & REQ_CMD)
......
...@@ -78,10 +78,8 @@ do_z2_request( request_queue_t * q ) ...@@ -78,10 +78,8 @@ do_z2_request( request_queue_t * q )
while ( TRUE ) while ( TRUE )
{ {
if (blk_queue_empty(QUEUE)) { if (blk_queue_empty(QUEUE))
CLEAR_INTR;
return; return;
}
start = CURRENT->sector << 9; start = CURRENT->sector << 9;
len = CURRENT->current_nr_sectors << 9; len = CURRENT->current_nr_sectors << 9;
......
...@@ -1594,10 +1594,8 @@ static void do_cdu31a_request(request_queue_t * q) ...@@ -1594,10 +1594,8 @@ static void do_cdu31a_request(request_queue_t * q)
* The beginning here is stolen from the hard disk driver. I hope * The beginning here is stolen from the hard disk driver. I hope
* it's right. * it's right.
*/ */
if (blk_queue_empty(QUEUE)) { if (blk_queue_empty(QUEUE))
CLEAR_INTR;
goto end_do_cdu31a_request; goto end_do_cdu31a_request;
}
if (!sony_spun_up) { if (!sony_spun_up) {
scd_spinup(); scd_spinup();
......
...@@ -858,10 +858,8 @@ static void do_cm206_request(request_queue_t * q) ...@@ -858,10 +858,8 @@ static void do_cm206_request(request_queue_t * q)
uch *source, *dest; uch *source, *dest;
while (1) { /* repeat until all requests have been satisfied */ while (1) { /* repeat until all requests have been satisfied */
if (blk_queue_empty(QUEUE)) { if (blk_queue_empty(QUEUE))
CLEAR_INTR;
return; return;
}
if (CURRENT->cmd != READ) { if (CURRENT->cmd != READ) {
debug(("Non-read command %d on cdrom\n", debug(("Non-read command %d on cdrom\n",
......
...@@ -280,10 +280,8 @@ static void __do_gscd_request(unsigned long dummy) ...@@ -280,10 +280,8 @@ static void __do_gscd_request(unsigned long dummy)
unsigned int nsect; unsigned int nsect;
repeat: repeat:
if (blk_queue_empty(QUEUE)) { if (blk_queue_empty(QUEUE))
CLEAR_INTR;
return; return;
}
dev = minor(CURRENT->rq_dev); dev = minor(CURRENT->rq_dev);
block = CURRENT->sector; block = CURRENT->sector;
......
...@@ -563,10 +563,8 @@ void do_mcdx_request(request_queue_t * q) ...@@ -563,10 +563,8 @@ void do_mcdx_request(request_queue_t * q)
again: again:
if (blk_queue_empty(QUEUE)) { if (blk_queue_empty(QUEUE))
CLEAR_INTR;
return; return;
}
dev = minor(CURRENT->rq_dev); dev = minor(CURRENT->rq_dev);
stuffp = mcdx_stuffp[dev]; stuffp = mcdx_stuffp[dev];
......
...@@ -4850,7 +4850,6 @@ static void do_sbpcd_request(request_queue_t * q) ...@@ -4850,7 +4850,6 @@ static void do_sbpcd_request(request_queue_t * q)
xnr, current->pid, jiffies); xnr, current->pid, jiffies);
printk( "do_sbpcd_request[%do](NULL) end 0 (null), Time:%li\n", printk( "do_sbpcd_request[%do](NULL) end 0 (null), Time:%li\n",
xnr, jiffies); xnr, jiffies);
CLEAR_INTR;
return; return;
} }
...@@ -4858,10 +4857,8 @@ static void do_sbpcd_request(request_queue_t * q) ...@@ -4858,10 +4857,8 @@ static void do_sbpcd_request(request_queue_t * q)
xnr, CURRENT, CURRENT->sector, CURRENT->nr_sectors, current->pid, jiffies); xnr, CURRENT, CURRENT->sector, CURRENT->nr_sectors, current->pid, jiffies);
#endif #endif
if (blk_queue_empty(QUEUE)) { if (blk_queue_empty(QUEUE))
CLEAR_INTR;
return; return;
}
req = CURRENT; /* take out our request so no other */ req = CURRENT; /* take out our request so no other */
blkdev_dequeue_request(req); /* task can fuck it up GTL */ blkdev_dequeue_request(req); /* task can fuck it up GTL */
......
...@@ -135,7 +135,6 @@ ...@@ -135,7 +135,6 @@
#include <linux/cdrom.h> #include <linux/cdrom.h>
#define MAJOR_NR CDU535_CDROM_MAJOR #define MAJOR_NR CDU535_CDROM_MAJOR
#define DEVICE_INTR do_cdu535
#define DEVICE_NR(device) (minor(device)) #define DEVICE_NR(device) (minor(device))
#include <linux/blk.h> #include <linux/blk.h>
......
...@@ -52,7 +52,6 @@ ...@@ -52,7 +52,6 @@
#include <asm/uaccess.h> #include <asm/uaccess.h>
#define MAJOR_NR HD_MAJOR #define MAJOR_NR HD_MAJOR
#define DEVICE_INTR do_hd
#define DEVICE_NR(device) (minor(device)>>6) #define DEVICE_NR(device) (minor(device)>>6)
#include <linux/blk.h> #include <linux/blk.h>
...@@ -113,13 +112,16 @@ static int hd_sizes[MAX_HD<<6]; ...@@ -113,13 +112,16 @@ static int hd_sizes[MAX_HD<<6];
static struct timer_list device_timer; static struct timer_list device_timer;
#define TIMEOUT_VALUE (6*HZ)
#define SET_TIMER \ #define SET_TIMER \
do { \ do { \
mod_timer(&device_timer, jiffies + TIMEOUT_VALUE); \ mod_timer(&device_timer, jiffies + TIMEOUT_VALUE); \
} while (0) } while (0)
static void (*do_hd)(void) = NULL;
#define SET_HANDLER(x) \ #define SET_HANDLER(x) \
if ((DEVICE_INTR = (x)) != NULL) \ if ((do_hd = (x)) != NULL) \
SET_TIMER; \ SET_TIMER; \
else \ else \
del_timer(&device_timer); del_timer(&device_timer);
...@@ -495,7 +497,7 @@ static void hd_times_out(unsigned long dummy) ...@@ -495,7 +497,7 @@ static void hd_times_out(unsigned long dummy)
{ {
unsigned int dev; unsigned int dev;
DEVICE_INTR = NULL; do_hd = NULL;
if (blk_queue_empty(QUEUE)) if (blk_queue_empty(QUEUE))
return; return;
...@@ -545,14 +547,14 @@ static void hd_request(void) ...@@ -545,14 +547,14 @@ static void hd_request(void)
{ {
unsigned int dev, block, nsect, sec, track, head, cyl; unsigned int dev, block, nsect, sec, track, head, cyl;
if (DEVICE_INTR) if (do_hd)
return; return;
repeat: repeat:
del_timer(&device_timer); del_timer(&device_timer);
sti(); sti();
if (blk_queue_empty(QUEUE)) { if (blk_queue_empty(QUEUE)) {
CLEAR_INTR; do_hd = NULL;
return; return;
} }
...@@ -701,9 +703,9 @@ static struct gendisk hd_gendisk = { ...@@ -701,9 +703,9 @@ static struct gendisk hd_gendisk = {
static void hd_interrupt(int irq, void *dev_id, struct pt_regs *regs) static void hd_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{ {
void (*handler)(void) = DEVICE_INTR; void (*handler)(void) = do_hd;
DEVICE_INTR = NULL; do_hd = NULL;
del_timer(&device_timer); del_timer(&device_timer);
if (!handler) if (!handler)
handler = unexpected_hd_interrupt; handler = unexpected_hd_interrupt;
......
...@@ -1191,10 +1191,8 @@ static void do_ftl_request(request_arg_t) ...@@ -1191,10 +1191,8 @@ static void do_ftl_request(request_arg_t)
do { do {
// sti(); // sti();
if (blk_queue_empty(QUEUE)) { if (blk_queue_empty(QUEUE))
CLEAR_INTR;
return; return;
}
minor = minor(CURRENT->rq_dev); minor = minor(CURRENT->rq_dev);
......
...@@ -397,10 +397,8 @@ static void handle_mtdblock_request(void) ...@@ -397,10 +397,8 @@ static void handle_mtdblock_request(void)
unsigned int res; unsigned int res;
for (;;) { for (;;) {
if (blk_queue_empty(QUEUE)) { if (blk_queue_empty(QUEUE))
CLEAR_INTR;
return; return;
}
req = CURRENT; req = CURRENT;
spin_unlock_irq(QUEUE->queue_lock); spin_unlock_irq(QUEUE->queue_lock);
......
...@@ -114,10 +114,8 @@ static void mtdblock_request(RQFUNC_ARG) ...@@ -114,10 +114,8 @@ static void mtdblock_request(RQFUNC_ARG)
{ {
/* Grab the Request and unlink it from the request list, we /* Grab the Request and unlink it from the request list, we
will execute a return if we are done. */ will execute a return if we are done. */
if (blk_queue_empty(QUEUE)) { if (blk_queue_empty(QUEUE))
CLEAR_INTR;
return; return;
}
current_request = CURRENT; current_request = CURRENT;
......
...@@ -837,10 +837,8 @@ void nftl_request(RQFUNC_ARG) ...@@ -837,10 +837,8 @@ void nftl_request(RQFUNC_ARG)
int res; int res;
while (1) { while (1) {
if (blk_queue_empty(QUEUE)) { if (blk_queue_empty(QUEUE))
CLEAR_INTR;
return; return;
}
req = CURRENT; req = CURRENT;
......
...@@ -84,7 +84,6 @@ int xpram_major; /* must be declared before including blk.h */ ...@@ -84,7 +84,6 @@ int xpram_major; /* must be declared before including blk.h */
devfs_handle_t xpram_devfs_handle; devfs_handle_t xpram_devfs_handle;
#define DEVICE_NR(device) MINOR(device) /* xpram has no partition bits */ #define DEVICE_NR(device) MINOR(device) /* xpram has no partition bits */
#define DEVICE_INTR xpram_intrptr /* pointer to the bottom half */
#define DEVICE_NO_RANDOM /* no entropy to contribute */ #define DEVICE_NO_RANDOM /* no entropy to contribute */
#define DEVICE_OFF(d) /* do-nothing */ #define DEVICE_OFF(d) /* do-nothing */
...@@ -683,10 +682,8 @@ void xpram_request(request_queue_t * queue) ...@@ -683,10 +682,8 @@ void xpram_request(request_queue_t * queue)
struct request * current_req; /* working request */ struct request * current_req; /* working request */
while(1) { while(1) {
if (blk_queue_empty(QUEUE)) { if (blk_queue_empty(QUEUE))
CLEAR_INTR;
return; return;
}
fault=0; fault=0;
current_req = CURRENT; current_req = CURRENT;
......
...@@ -206,10 +206,8 @@ static void jsfd_do_request(request_queue_t *q) ...@@ -206,10 +206,8 @@ static void jsfd_do_request(request_queue_t *q)
size_t len; size_t len;
for (;;) { for (;;) {
if (blk_queue_empty(QUEUE)) { if (blk_queue_empty(QUEUE))
CLEAR_INTR;
return; return;
}
req = CURRENT; req = CURRENT;
......
...@@ -60,7 +60,6 @@ const char * osst_version = "0.9.10"; ...@@ -60,7 +60,6 @@ const char * osst_version = "0.9.10";
#define OSST_DEB_MSG KERN_NOTICE #define OSST_DEB_MSG KERN_NOTICE
#define MAJOR_NR OSST_MAJOR #define MAJOR_NR OSST_MAJOR
#define DEVICE_INTR do_osst
#define DEVICE_NR(device) (minor(device) & 0x7f) #define DEVICE_NR(device) (minor(device) & 0x7f)
#include <linux/blk.h> #include <linux/blk.h>
......
...@@ -55,7 +55,6 @@ static char *verstr = "20020205"; ...@@ -55,7 +55,6 @@ static char *verstr = "20020205";
#endif #endif
#define MAJOR_NR SCSI_TAPE_MAJOR #define MAJOR_NR SCSI_TAPE_MAJOR
#define DEVICE_INTR do_st
#define DEVICE_NR(device) (minor(device) & 0x7f) #define DEVICE_NR(device) (minor(device) & 0x7f)
#include <linux/blk.h> #include <linux/blk.h>
......
...@@ -108,13 +108,6 @@ extern inline struct request *elv_next_request(request_queue_t *q) ...@@ -108,13 +108,6 @@ extern inline struct request *elv_next_request(request_queue_t *q)
# define CURRENT elv_next_request(QUEUE) # define CURRENT elv_next_request(QUEUE)
#endif #endif
#ifdef DEVICE_INTR
static void (*DEVICE_INTR)(void) = NULL;
# define CLEAR_INTR DEVICE_INTR = NULL
# else
# define CLEAR_INTR
# endif
#endif /* !defined(IDE_DRIVER) */ #endif /* !defined(IDE_DRIVER) */
/* /*
......
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