• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/drivers/s390/char/

Lines Matching refs:fp

48 fs3270_working(struct fs3270 *fp)
54 return fp->active && raw3270_request_final(fp->init);
60 struct fs3270 *fp;
63 fp = (struct fs3270 *) view;
65 rq->callback_data = &fp->wait;
68 if (!fs3270_working(fp)) {
70 rc = wait_event_interruptible(fp->wait,
71 fs3270_working(fp));
78 wait_event(fp->wait, raw3270_request_final(rq));
90 struct fs3270 *fp;
92 fp = (struct fs3270 *) rq->view;
94 wake_up(&fp->wait);
100 struct fs3270 *fp;
102 fp = (struct fs3270 *) rq->view;
104 if (fp->fs_pid)
105 kill_pid(fp->fs_pid, SIGHUP, 1);
107 fp->rdbuf_size = 0;
109 wake_up(&fp->wait);
115 struct fs3270 *fp;
119 fp = (struct fs3270 *) view;
122 if (!raw3270_request_final(fp->init))
125 if (fp->rdbuf_size == 0) {
127 raw3270_request_set_cmd(fp->init, TC_EWRITEA);
128 fp->init->callback = fs3270_reset_callback;
131 raw3270_request_set_cmd(fp->init, TC_EWRITEA);
132 raw3270_request_set_idal(fp->init, fp->rdbuf);
133 fp->init->ccw.count = fp->rdbuf_size;
134 cp = fp->rdbuf->data[0];
143 fp->init->rescnt = 0;
144 fp->init->callback = fs3270_restore_callback;
146 rc = fp->init->rc = raw3270_start_locked(view, fp->init);
148 fp->init->callback(fp->init, NULL);
150 fp->active = 1;
160 struct fs3270 *fp;
162 fp = (struct fs3270 *) rq->view;
165 fp->rdbuf->data[0] -= 5;
166 fp->rdbuf->size += 5;
175 if (fp->fs_pid)
176 kill_pid(fp->fs_pid, SIGHUP, 1);
177 fp->rdbuf_size = 0;
179 fp->rdbuf_size = fp->rdbuf->size - rq->rescnt;
181 wake_up(&fp->wait);
187 struct fs3270 *fp;
189 fp = (struct fs3270 *) view;
190 fp->active = 0;
193 if (!raw3270_request_final(fp->init))
197 raw3270_request_set_cmd(fp->init, TC_RDBUF);
203 fp->rdbuf->data[0] += 5;
204 fp->rdbuf->size -= 5;
205 raw3270_request_set_idal(fp->init, fp->rdbuf);
206 fp->init->rescnt = 0;
207 fp->init->callback = fs3270_save_callback;
210 fp->init->rc = raw3270_start_locked(view, fp->init);
211 if (fp->init->rc)
212 fp->init->callback(fp->init, NULL);
216 fs3270_irq(struct fs3270 *fp, struct raw3270_request *rq, struct irb *irb)
220 fp->attention = 1;
221 wake_up(&fp->wait);
240 struct fs3270 *fp;
247 fp = filp->private_data;
248 if (!fp)
255 if (fp->read_command == 0 && fp->write_command != 0)
256 fp->read_command = 6;
257 raw3270_request_set_cmd(rq, fp->read_command ? : 2);
259 rc = wait_event_interruptible(fp->wait, fp->attention);
260 fp->attention = 0;
262 rc = fs3270_do_io(&fp->view, rq);
285 struct fs3270 *fp;
291 fp = filp->private_data;
292 if (!fp)
300 write_command = fp->write_command ? : 1;
305 rc = fs3270_do_io(&fp->view, rq);
323 struct fs3270 *fp;
327 fp = filp->private_data;
328 if (!fp)
334 fp->read_command = arg;
337 fp->write_command = arg;
340 rc = put_user(fp->read_command, (char __user *) arg);
343 rc = put_user(fp->write_command,(char __user *) arg);
346 iocb.model = fp->view.model;
347 iocb.line_cnt = fp->view.rows;
348 iocb.col_cnt = fp->view.cols;
367 struct fs3270 *fp;
369 fp = kzalloc(sizeof(struct fs3270),GFP_KERNEL);
370 if (!fp)
372 fp->init = raw3270_request_alloc(0);
373 if (IS_ERR(fp->init)) {
374 kfree(fp);
377 return fp;
386 struct fs3270 *fp;
388 fp = (struct fs3270 *) view;
389 if (fp->rdbuf)
390 idal_buffer_free(fp->rdbuf);
418 struct fs3270 *fp;
438 fp = (struct fs3270 *) raw3270_find_view(&fs3270_fn, minor);
439 if (!IS_ERR(fp)) {
440 raw3270_put_view(&fp->view);
444 fp = fs3270_alloc_view();
445 if (IS_ERR(fp))
446 return PTR_ERR(fp);
448 init_waitqueue_head(&fp->wait);
449 fp->fs_pid = get_pid(task_pid(current));
450 rc = raw3270_add_view(&fp->view, &fs3270_fn, minor);
452 fs3270_free_view(&fp->view);
457 ib = idal_buffer_alloc(2*fp->view.rows*fp->view.cols + 5, 0);
459 raw3270_put_view(&fp->view);
460 raw3270_del_view(&fp->view);
461 return PTR_ERR(fp);
463 fp->rdbuf = ib;
465 rc = raw3270_activate_view(&fp->view);
467 raw3270_put_view(&fp->view);
468 raw3270_del_view(&fp->view);
471 filp->private_data = fp;
482 struct fs3270 *fp;
484 fp = filp->private_data;
486 if (fp) {
487 put_pid(fp->fs_pid);
488 fp->fs_pid = NULL;
489 raw3270_reset(&fp->view);
490 raw3270_put_view(&fp->view);
491 raw3270_del_view(&fp->view);