Commit fb57db5f authored by Alessandro Rubini's avatar Alessandro Rubini

kernel: output succeeds immediately, no timer needed

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent f815e96a
......@@ -170,7 +170,6 @@ static void fd_tlet(unsigned long arg)
struct zio_channel *chan = NULL;
struct zio_device *zdev = fd->zdev;
struct fmc_device *fmc = fd->fmc;
int i;
/* Always read the hardware fifo until empty */
while (!fd_read_hw_fifo(fd))
......@@ -194,14 +193,6 @@ static void fd_tlet(unsigned long arg)
}
out:
/* Check all output channels with a pending block (FIXME: bad) */
for (i = 1; i < 5; i++)
if (test_and_clear_bit(FD_FLAG_DO_OUTPUT + i, &fd->flags)) {
struct zio_cset *cset = fd->zdev->cset + i;
cset->ti->t_op->data_done(cset);
pr_debug("called data_done\n");
}
if (fd_timer_period_ms)
mod_timer(&fd->fifo_timer, jiffies + fd_timer_period_jiffies);
else {
......
......@@ -505,12 +505,7 @@ static int fd_zio_output(struct zio_cset *cset)
i == FD_ATTR_OUT__LAST -1 ? '\n' : ' ');
}
__fd_zio_output(fd, cset->index, ctrl->attr_channel.ext_val);
/*
* There's a buglet in this version of zio: we can't
* just return 0 to say "done". We need to do it later.
*/
set_bit(FD_FLAG_DO_OUTPUT + cset->index, &fd->flags);
return -EAGAIN;
return 0; /* already done */
}
/*
......
......@@ -210,11 +210,6 @@ enum fd_flags {
FD_FLAG_INITED = 0,
FD_FLAG_DO_INPUT,
FD_FLAG_INPUT_READY,
FD_FLAG_DO_OUTPUT,
_FD_FLAG_DO_OUTPUT1, /* use: FD_FLAG_DO_OUTPUT + cset->index */
_FD_FLAG_DO_OUTPUT2,
_FD_FLAG_DO_OUTPUT3,
_FD_FLAG_DO_OUTPUT4,
FD_FLAG_WR_MODE,
};
......
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