Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/con3270: optionally disable auto update

This patch adds a parameter 'auto_update' to the con3270
driver, causing the 'auto_update' feature to be disabled
if unset.
The 'auto_update' feature will cause the con3270 driver
to switch to the console view whenever new system messages
are displayed, which makes working on the 3270 terminal
awkward.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

+17
+7
drivers/s390/char/con3270.c
··· 7 7 * Copyright IBM Corp. 2003, 2009 8 8 */ 9 9 10 + #include <linux/module.h> 10 11 #include <linux/console.h> 11 12 #include <linux/init.h> 12 13 #include <linux/interrupt.h> ··· 30 29 #define CON3270_STRING_PAGES 4 31 30 32 31 static struct raw3270_fn con3270_fn; 32 + 33 + static bool auto_update = 1; 34 + module_param(auto_update, bool, 0); 33 35 34 36 /* 35 37 * Main 3270 console view data structure. ··· 208 204 struct string *s, *n; 209 205 int rc; 210 206 207 + if (!auto_update && !raw3270_view_active(&cp->view)) 208 + return; 211 209 if (cp->view.dev) 212 210 raw3270_activate_view(&cp->view); 213 211 ··· 535 529 if (!cp->view.dev) 536 530 return; 537 531 raw3270_pm_unfreeze(&cp->view); 532 + raw3270_activate_view(&cp->view); 538 533 spin_lock_irqsave(&cp->view.lock, flags); 539 534 con3270_wait_write(cp); 540 535 cp->nr_up = 0;
+9
drivers/s390/char/raw3270.c
··· 276 276 } 277 277 278 278 int 279 + raw3270_view_active(struct raw3270_view *view) 280 + { 281 + struct raw3270 *rp = view->dev; 282 + 283 + return rp && rp->view == view && 284 + !test_bit(RAW3270_FLAGS_FROZEN, &rp->flags); 285 + } 286 + 287 + int 279 288 raw3270_start(struct raw3270_view *view, struct raw3270_request *rq) 280 289 { 281 290 unsigned long flags;
+1
drivers/s390/char/raw3270.h
··· 173 173 int raw3270_start_irq(struct raw3270_view *, struct raw3270_request *); 174 174 int raw3270_reset(struct raw3270_view *); 175 175 struct raw3270_view *raw3270_view(struct raw3270_view *); 176 + int raw3270_view_active(struct raw3270_view *); 176 177 177 178 /* Reference count inliner for view structures. */ 178 179 static inline void