36 #include <linux/module.h>
38 #include <linux/tty.h>
39 #include <linux/poll.h>
41 #include <linux/sched.h>
43 #include <asm/unaligned.h>
48 static int dgrp_dpa_open(
struct inode *,
struct file *);
49 static int dgrp_dpa_release(
struct inode *,
struct file *);
50 static ssize_t dgrp_dpa_read(
struct file *,
char __user *,
size_t, loff_t *);
51 static long dgrp_dpa_ioctl(
struct file *
file,
unsigned int cmd,
57 .read = dgrp_dpa_read,
58 .poll = dgrp_dpa_select,
59 .unlocked_ioctl = dgrp_dpa_ioctl,
60 .open = dgrp_dpa_open,
61 .release = dgrp_dpa_release,
78 #define DIGI_GETNODE (('d'<<8) | 249)
95 #define DIGI_GETCHAN (('d'<<8) | 248)
103 #define DIGI_GETVPD (('d'<<8) | 246)
111 #define DIGI_SETDEBUG (('d'<<8) | 247)
198 static int dgrp_dpa_release(
struct inode *inode,
struct file *file)
231 spin_unlock_irqrestore(&nd->
nd_dpa_lock, lock_flags);
247 static ssize_t dgrp_dpa_read(
struct file *file,
char __user *buf,
size_t count,
279 spin_unlock_irqrestore(&nd->
nd_dpa_lock, lock_flags);
306 spin_unlock_irqrestore(&nd->
nd_dpa_lock, lock_flags);
321 spin_unlock_irqrestore(&nd->
nd_dpa_lock, lock_flags);
350 spin_unlock_irqrestore(&nd->
nd_dpa_lock, lock_flags);
354 static unsigned int dgrp_dpa_select(
struct file *file,
368 static long dgrp_dpa_ioctl(
struct file *file,
unsigned int cmd,
388 port = getchan.ch_port;
460 static void dgrp_dpa(
struct nd_struct *nd,
u8 *buf,
int nbuf)
489 spin_unlock_irqrestore(&nd->
nd_dpa_lock, lock_flags);
536 spin_unlock_irqrestore(&nd->
nd_dpa_lock, lock_flags);
554 dgrp_dpa(nd, header,
sizeof(header));
555 dgrp_dpa(nd, buf, size);