Source
x
raw3270_columns_show(struct device *dev, struct device_attribute *attr, char *buf)
// SPDX-License-Identifier: GPL-2.0
/*
* IBM/3270 Driver - core functions.
*
* Author(s):
* Original 3270 Code for 2.4 written by Richard Hitt (UTS Global)
* Rewritten for 2.5 by Martin Schwidefsky <schwidefsky@de.ibm.com>
* Copyright IBM Corp. 2003, 2009
*/
struct class *class3270;
/* The main 3270 data structure. */
struct raw3270 {
struct list_head list;
struct ccw_device *cdev;
int minor;
short model, rows, cols;
unsigned int state;
unsigned long flags;
struct list_head req_queue; /* Request queue. */
struct list_head view_list; /* List of available views. */
struct raw3270_view *view; /* Active view. */
struct timer_list timer; /* Device timer. */
unsigned char *ascebc; /* ascii -> ebcdic table */
struct raw3270_view init_view;
struct raw3270_request init_reset;
struct raw3270_request init_readpart;
struct raw3270_request init_readmod;
unsigned char init_data[256];
};
/* raw3270->state */
/* Initial state */
/* Reset command is pending */
/* Wait for attention interrupt */
/* Read partition is pending */
/* Device is usable by views */
/* raw3270->flags */
/* 14-bit buffer addresses */
/* Device busy, leave it alone */
/* Device is the console. */
/* set if 3270 is frozen for suspend */
/* Semaphore to protect global data of raw3270 (devices, views, etc). */
static DEFINE_MUTEX(raw3270_mutex);
/* List of 3270 devices. */
static LIST_HEAD(raw3270_devices);
/*
* Flag to indicate if the driver has been registered. Some operations
* like waiting for the end of i/o need to be done differently as long
* as the kernel is still starting up (console support).
*/
static int raw3270_registered;
/* Module parameters */
static bool tubxcorrect;
module_param(tubxcorrect, bool, 0);
/*
* Wait queue for device init/delete, view delete.
*/
DECLARE_WAIT_QUEUE_HEAD(raw3270_wait_queue);