kernels/linux-2.4.0/drivers/s390/char/con3215.c
/*
 * Start a read or a write request
 */
Start a read or a write request
Start a read or a write request
static void raw3215_start_io(raw3215_info *raw)
{
	raw3215_req *req;
	int res;
	req = raw->queued_read;
	if (req != NULL &&
	    !(raw->flags & (RAW3215_WORKING | RAW3215_THROTTLED))) {
		raw->queued_read = NULL;
		res = do_IO(raw->irq, req->ccws, (__u32) req, 0, 0);
		if (res != 0) {
			raw->queued_read = req;
		} else {
			raw->flags |= RAW3215_WORKING;
		} 
	}
	req = raw->queued_write;
	if (req != NULL &&
	    !(raw->flags & (RAW3215_WORKING | RAW3215_STOPPED))) {
		raw->queued_write = NULL;
		res = do_IO(raw->irq, req->ccws, (__u32) req, 0, 0);
		if (res != 0) {
			raw->queued_write = req;
		} else {
			raw->flags |= RAW3215_WORKING;
		}
	}
}
static void raw3215_start_io ( raw3215_info * raw ) { raw3215_req * req ; int res ; req = raw -> queued_read ; if ( req != NULL && ! ( raw -> flags & ( RAW3215_WORKING | RAW3215_THROTTLED ) ) ) { raw -> queued_read = NULL ; res = do_IO ( raw -> irq , req -> ccws , ( __u32 ) req , 0 , 0 ) ; if ( res != 0 ) { raw -> queued_read = req ; } else { raw -> flags |= RAW3215_WORKING ; } } req = raw -> queued_write ; if ( req != NULL && ! ( raw -> flags & ( RAW3215_WORKING | RAW3215_STOPPED ) ) ) { raw -> queued_write = NULL ; res = do_IO ( raw -> irq , req -> ccws , ( __u32 ) req , 0 , 0 ) ; if ( res != 0 ) { raw -> queued_write = req ; } else { raw -> flags |= RAW3215_WORKING ; } } }
Start a read or a write request
Start a read or a write request
/* dequeue request */ /* do_IO failed, put request back to queue */ /* dequeue request */ /* do_IO failed, put request back to queue */