kernels/linux-2.4.0/drivers/s390/char/con3215.c
/*
 * Put character routine for 3215 devices
 */
Put character routine for 3215 devices
Put character routine for 3215 devices
static void raw3215_putchar(raw3215_info *raw, unsigned char ch)
{
	raw3215_req *req;
	unsigned long flags;
	s390irq_spin_lock_irqsave(raw->irq, flags);
	while (RAW3215_BUFFER_SIZE - raw->count < 1) {
		raw3215_try_io(raw);
		if (wait_cons_dev(raw->irq) != 0) {
			raw->count = 0;
		}
	}
	req = raw3215_mk_write_req(raw);
	raw->buffer[raw->head] = (char) _ascebc[(int) ch];
	raw->head = (raw->head + 1) & (RAW3215_BUFFER_SIZE - 1);
	raw->count++;
	raw3215_mk_write_ccw(raw, req);
	raw->queued_write = req;
	raw3215_try_io(raw);
	s390irq_spin_unlock_irqrestore(raw->irq, flags);
}
static void raw3215_putchar ( raw3215_info * raw , unsigned char ch ) { raw3215_req * req ; unsigned long flags ; s390irq_spin_lock_irqsave ( raw -> irq , flags ) ; while ( RAW3215_BUFFER_SIZE - raw -> count < 1 ) { raw3215_try_io ( raw ) ; if ( wait_cons_dev ( raw -> irq ) != 0 ) { raw -> count = 0 ; } } req = raw3215_mk_write_req ( raw ) ; raw -> buffer [ raw -> head ] = ( char ) _ascebc [ ( int ) ch ] ; raw -> head = ( raw -> head + 1 ) & ( RAW3215_BUFFER_SIZE - 1 ) ; raw -> count ++ ; raw3215_mk_write_ccw ( raw , req ) ; raw -> queued_write = req ; raw3215_try_io ( raw ) ; s390irq_spin_unlock_irqrestore ( raw -> irq , flags ) ; }
Put character routine for 3215 devices
Put character routine for 3215 devices
/* there might be a request pending */ /* that shouldn't happen */ /* start or queue request */