diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1998-04-05 11:23:36 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1998-04-05 11:23:36 +0000 |
commit | 4318fbda2a7ee51caafdc4eb1f8028a3f0605142 (patch) | |
tree | cddb50a81d7d1a628cc400519162080c6d87868e /drivers/misc/parport_pc.c | |
parent | 36ea5120664550fae6d31f1c6f695e4f8975cb06 (diff) |
o Merge with Linux 2.1.91.
o First round of bugfixes for the SC/MC CPUs.
o FPU context switch fixes.
o Lazy context switches.
o Faster syscalls.
o Removed dead code.
o Shitloads of other things I forgot ...
Diffstat (limited to 'drivers/misc/parport_pc.c')
-rw-r--r-- | drivers/misc/parport_pc.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/drivers/misc/parport_pc.c b/drivers/misc/parport_pc.c index e5ba92c9e..bd542b4fd 100644 --- a/drivers/misc/parport_pc.c +++ b/drivers/misc/parport_pc.c @@ -134,12 +134,12 @@ void parport_pc_change_mode(struct parport *p, int m) void parport_pc_write_fifo(struct parport *p, unsigned char v) { - /* FIXME */ + outb (v, p->base+CONFIGA); } unsigned char parport_pc_read_fifo(struct parport *p) { - return 0; /* FIXME */ + return inb (p->base+CONFIGA); } void parport_pc_disable_irq(struct parport *p) @@ -186,22 +186,34 @@ void parport_pc_restore_state(struct parport *p, struct parport_state *s) size_t parport_pc_epp_read_block(struct parport *p, void *buf, size_t length) { - return 0; /* FIXME */ + size_t got = 0; + for (; got < length; got++) { + *((char*)buf)++ = inb (p->base+EPPREG); + if (inb (p->base+STATUS) & 0x01) + break; + } + return got; } size_t parport_pc_epp_write_block(struct parport *p, void *buf, size_t length) { - return 0; /* FIXME */ + size_t written = 0; + for (; written < length; written++) { + outb (*((char*)buf)++, p->base+EPPREG); + if (inb (p->base+STATUS) & 0x01) + break; + } + return written; } int parport_pc_ecp_read_block(struct parport *p, void *buf, size_t length, void (*fn)(struct parport *, void *, size_t), void *handle) { - return 0; /* FIXME */ + return -ENOSYS; /* FIXME */ } int parport_pc_ecp_write_block(struct parport *p, void *buf, size_t length, void (*fn)(struct parport *, void *, size_t), void *handle) { - return 0; /* FIXME */ + return -ENOSYS; /* FIXME */ } int parport_pc_examine_irq(struct parport *p) |