Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 110828
b: refs/heads/master
c: 408aec3
h: refs/heads/master
v: v3
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Oct 10, 2008
1 parent 6a01f53 commit d3fc4df
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2332ce1a97963b7769e0c2d40492a10a124efba5
refs/heads/master: 408aec3c6c3cb5b4774f96ea7a35cd15ee91a56f
26 changes: 6 additions & 20 deletions trunk/drivers/s390/char/con3215.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ struct raw3215_info {
int count; /* number of bytes in output buffer */
int written; /* number of bytes in write requests */
struct tty_struct *tty; /* pointer to tty structure if present */
struct tasklet_struct tasklet;
struct raw3215_req *queued_read; /* pointer to queued read requests */
struct raw3215_req *queued_write;/* pointer to queued write requests */
wait_queue_head_t empty_wait; /* wait queue for flushing */
Expand Down Expand Up @@ -342,21 +341,14 @@ raw3215_try_io(struct raw3215_info *raw)
}

/*
* The bottom half handler routine for 3215 devices. It tries to start
* the next IO and wakes up processes waiting on the tty.
* Try to start the next IO and wake up processes waiting on the tty.
*/
static void
raw3215_tasklet(void *data)
static void raw3215_next_io(struct raw3215_info *raw)
{
struct raw3215_info *raw;
struct tty_struct *tty;
unsigned long flags;

raw = (struct raw3215_info *) data;
spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags);
raw3215_mk_write_req(raw);
raw3215_try_io(raw);
spin_unlock_irqrestore(get_ccwdev_lock(raw->cdev), flags);
tty = raw->tty;
if (tty != NULL &&
RAW3215_BUFFER_SIZE - raw->count >= RAW3215_MIN_SPACE) {
Expand All @@ -381,7 +373,7 @@ raw3215_irq(struct ccw_device *cdev, unsigned long intparm, struct irb *irb)
cstat = irb->scsw.cmd.cstat;
dstat = irb->scsw.cmd.dstat;
if (cstat != 0)
tasklet_schedule(&raw->tasklet);
raw3215_next_io(raw);
if (dstat & 0x01) { /* we got a unit exception */
dstat &= ~0x01; /* we can ignore it */
}
Expand All @@ -391,7 +383,7 @@ raw3215_irq(struct ccw_device *cdev, unsigned long intparm, struct irb *irb)
break;
/* Attention interrupt, someone hit the enter key */
raw3215_mk_read_req(raw);
tasklet_schedule(&raw->tasklet);
raw3215_next_io(raw);
break;
case 0x08:
case 0x0C:
Expand Down Expand Up @@ -449,7 +441,7 @@ raw3215_irq(struct ccw_device *cdev, unsigned long intparm, struct irb *irb)
raw->queued_read == NULL) {
wake_up_interruptible(&raw->empty_wait);
}
tasklet_schedule(&raw->tasklet);
raw3215_next_io(raw);
break;
default:
/* Strange interrupt, I'll do my best to clean up */
Expand All @@ -461,7 +453,7 @@ raw3215_irq(struct ccw_device *cdev, unsigned long intparm, struct irb *irb)
raw->flags &= ~RAW3215_WORKING;
raw3215_free_req(req);
}
tasklet_schedule(&raw->tasklet);
raw3215_next_io(raw);
}
return;
}
Expand Down Expand Up @@ -675,9 +667,6 @@ raw3215_probe (struct ccw_device *cdev)
kfree(raw);
return -ENOMEM;
}
tasklet_init(&raw->tasklet,
(void (*)(unsigned long)) raw3215_tasklet,
(unsigned long) raw);
init_waitqueue_head(&raw->empty_wait);

cdev->dev.driver_data = raw;
Expand Down Expand Up @@ -863,9 +852,6 @@ con3215_init(void)
cdev->handler = raw3215_irq;

raw->flags |= RAW3215_FIXED;
tasklet_init(&raw->tasklet,
(void (*)(unsigned long)) raw3215_tasklet,
(unsigned long) raw);
init_waitqueue_head(&raw->empty_wait);

/* Request the console irq */
Expand Down

0 comments on commit d3fc4df

Please sign in to comment.