Commit d08ea7f2 authored by Matthew Wilcox's avatar Matthew Wilcox Committed by Linus Torvalds

[PATCH] Convert cm206 to a tasklet

Removes CM206_BH (patch approved by maintainer).
Deletes the no-longer-used BH entries from the enum.  Explicit numbers
added so as not to destroy binary compatibility needlessly.
parent 0334a4e2
...@@ -345,6 +345,8 @@ inline void clear_ur(void) ...@@ -345,6 +345,8 @@ inline void clear_ur(void)
} }
} }
static struct tasklet_struct cm206_tasklet;
/* The interrupt handler. When the cm260 generates an interrupt, very /* The interrupt handler. When the cm260 generates an interrupt, very
much care has to be taken in reading out the registers in the right much care has to be taken in reading out the registers in the right
order; in case of a receive_buffer_full interrupt, first the order; in case of a receive_buffer_full interrupt, first the
...@@ -432,7 +434,7 @@ static void cm206_interrupt(int sig, void *dev_id, struct pt_regs *regs) ...@@ -432,7 +434,7 @@ static void cm206_interrupt(int sig, void *dev_id, struct pt_regs *regs)
if (cd->background if (cd->background
&& (cd->adapter_last - cd->adapter_first == cd->max_sectors && (cd->adapter_last - cd->adapter_first == cd->max_sectors
|| cd->fifo_overflowed)) || cd->fifo_overflowed))
mark_bh(CM206_BH); /* issue a stop read command */ tasklet_schedule(&cm206_tasklet); /* issue a stop read command */
stats(interrupt); stats(interrupt);
} }
...@@ -701,7 +703,7 @@ int read_sector(int start) ...@@ -701,7 +703,7 @@ int read_sector(int start)
4 c_stop waits for receive_buffer_full: 0xff 4 c_stop waits for receive_buffer_full: 0xff
*/ */
void cm206_bh(void) static void cm206_tasklet_func(unsigned long ignore)
{ {
debug(("bh: %d\n", cd->background)); debug(("bh: %d\n", cd->background));
switch (cd->background) { switch (cd->background) {
...@@ -745,6 +747,8 @@ void cm206_bh(void) ...@@ -745,6 +747,8 @@ void cm206_bh(void)
} }
} }
static DECLARE_TASKLET(cm206_tasklet, cm206_tasklet_func, 0);
/* This command clears the dsb_possible_media_change flag, so we must /* This command clears the dsb_possible_media_change flag, so we must
* retain it. * retain it.
*/ */
...@@ -1503,7 +1507,6 @@ int __init cm206_init(void) ...@@ -1503,7 +1507,6 @@ int __init cm206_init(void)
blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), do_cm206_request, blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), do_cm206_request,
&cm206_lock); &cm206_lock);
blk_queue_hardsect_size(BLK_DEFAULT_QUEUE(MAJOR_NR), 2048); blk_queue_hardsect_size(BLK_DEFAULT_QUEUE(MAJOR_NR), 2048);
init_bh(CM206_BH, cm206_bh);
memset(cd, 0, sizeof(*cd)); /* give'm some reasonable value */ memset(cd, 0, sizeof(*cd)); /* give'm some reasonable value */
cd->sector_last = -1; /* flag no data buffered */ cd->sector_last = -1; /* flag no data buffered */
......
...@@ -28,20 +28,17 @@ struct irqaction { ...@@ -28,20 +28,17 @@ struct irqaction {
enum { enum {
TIMER_BH = 0, TIMER_BH = 0,
TQUEUE_BH, TQUEUE_BH = 1,
DIGI_BH, DIGI_BH = 2,
SERIAL_BH, SERIAL_BH = 3,
RISCOM8_BH, RISCOM8_BH = 4,
SPECIALIX_BH, SPECIALIX_BH = 5,
AURORA_BH, AURORA_BH = 6,
ESP_BH, ESP_BH = 7,
SCSI_BH, IMMEDIATE_BH = 9,
IMMEDIATE_BH, CYCLADES_BH = 10,
CYCLADES_BH, MACSERIAL_BH = 13,
CM206_BH, ISICOM_BH = 14
JS_BH,
MACSERIAL_BH,
ISICOM_BH
}; };
#include <asm/hardirq.h> #include <asm/hardirq.h>
......
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