summaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-06-30 00:21:34 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-06-30 00:21:34 +0000
commit3917ac5846dd0f9ad1238166f90caab9912052e6 (patch)
tree1c298935def4f29edb39192365a65d73de999155 /drivers/misc
parentaf2f803c8b2d469fe38e4a7ce952658dfcb6681a (diff)
o Merge with Linux 2.1.100.
o Cleanup the machine dependencies of floppy and rtc. The driver for the Dallas thingy in the Indy is still missing. o Handle allocation of zero'd pages correct for R4000SC / R4400SC. o Page colouring shit to match the virtual and physical colour of all mapped pages. This tends to produce extreme fragmentation problems, so it's deactivated for now. Users of R4000SC / R4400SC may re-enable the code in arch/mips/mm/init.c by removing the definition of CONF_GIVE_A_SHIT_ABOUT_COLOURS. Should get them somewhat further - but don't shake to hard ... o Fixed ptrace(2)-ing of syscalls, strace is now working again. o Fix the interrupt forwarding from the keyboard driver to the psaux driver, PS/2 mice are now working on the Indy. The fix is somewhat broken as it prevents generic kernels for Indy and machines which handle things different. o Things I can't remember.
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/TODO-parport11
-rw-r--r--drivers/misc/parport_procfs.c33
-rw-r--r--drivers/misc/parport_share.c10
3 files changed, 22 insertions, 32 deletions
diff --git a/drivers/misc/TODO-parport b/drivers/misc/TODO-parport
index 08860cc27..523a1ca94 100644
--- a/drivers/misc/TODO-parport
+++ b/drivers/misc/TODO-parport
@@ -6,20 +6,13 @@ Things to be done.
2. A better lp.c:
- a) It's a _mess_
-
- b) ECP support would be nice. This can only work if both the port and
+ a) ECP support would be nice. This can only work if both the port and
the printer support it.
- c) Errors could do with being handled better. There's no point logging a
- message every 10 seconds when the printer is out of paper.
-
- d) Handle status readback automatically. IEEE1284 printers can post status
+ b) Handle status readback automatically. IEEE1284 printers can post status
bits when they have something to say. We should read out and deal
with (maybe just log) whatever the printer wants to tell the world.
3. Support more hardware (eg m68k, Sun bpp).
4. A better PLIP (make use of bidirectional/ECP/EPP ports).
-
-
diff --git a/drivers/misc/parport_procfs.c b/drivers/misc/parport_procfs.c
index 97717448c..a3f40e9f4 100644
--- a/drivers/misc/parport_procfs.c
+++ b/drivers/misc/parport_procfs.c
@@ -37,8 +37,8 @@ static int irq_write_proc(struct file *file, const char *buffer,
int retval = -EINVAL;
int newirq = PARPORT_IRQ_NONE;
struct parport *pp = (struct parport *)data;
- struct pardevice *cad = pp->cad;
int oldirq = pp->irq;
+ unsigned long flags;
/*
* We can have these valid cases:
@@ -70,36 +70,31 @@ static int irq_write_proc(struct file *file, const char *buffer,
if (oldirq == newirq)
goto out;
+ spin_lock_irqsave(&pp->lock, flags);
if (pp->flags & PARPORT_FLAG_COMA)
goto out_ok;
- if (newirq != PARPORT_IRQ_NONE) {
- void (*handler)(int, void *, struct pt_regs *);
-
- if (cad && cad->irq_func)
- handler = cad->irq_func;
- else
- handler = parport_null_intr_func;
+ retval = -EBUSY;
+ if (pp->cad)
+ goto out_unlock;
- retval = request_irq(newirq, handler,
- SA_INTERRUPT,
- cad ? cad->name : pp->name,
- cad ? cad->private : NULL);
+ if (newirq != PARPORT_IRQ_NONE) {
+ retval = request_irq(newirq, parport_null_intr_func,
+ SA_INTERRUPT, pp->name, NULL);
if (retval)
- goto out;
+ goto out_unlock;
else retval = count;
}
- if (oldirq != PARPORT_IRQ_NONE) {
- if (cad && cad->irq_func)
- free_irq(oldirq, cad->private);
- else
- free_irq(oldirq, NULL);
- }
+ if (oldirq != PARPORT_IRQ_NONE)
+ free_irq(oldirq, NULL);
out_ok:
pp->irq = newirq;
+out_unlock:
+ spin_unlock_irqrestore (&pp->lock, flags);
+
out:
return retval;
}
diff --git a/drivers/misc/parport_share.c b/drivers/misc/parport_share.c
index 7da49fae4..be53e2ba6 100644
--- a/drivers/misc/parport_share.c
+++ b/drivers/misc/parport_share.c
@@ -1,4 +1,5 @@
-/* $Id: parport_share.c,v 1.14 1998/05/04 19:05:05 ralf Exp $
+/* $Id: parport_share.c,v 1.9 1998/05/07 02:59:59 ralf Exp $
+ *
* Parallel-port resource manager code.
*
* Authors: David Campbell <campbell@tirian.che.curtin.edu.au>
@@ -308,7 +309,9 @@ try_again:
}
/* Now we do the change of devices */
+ spin_lock_irqsave(&port->lock, flags);
port->cad = dev;
+ spin_unlock_irqrestore(&port->lock, flags);
/* Swap the IRQ handlers. */
if (port->irq != PARPORT_IRQ_NONE) {
@@ -346,9 +349,8 @@ blocked:
dev->waitprev = port->waittail;
if (port->waittail)
port->waittail->waitnext = dev;
- else {
- port->waithead = dev->port->waittail = dev;
- }
+ else
+ port->waithead = port->waittail = dev;
}
spin_unlock_irqrestore (&port->lock, flags);
}