On 04/08/15 18:58, H Hartley Sweeten wrote:
There is no real reason to reset the board when detaching. But the PLX
interrupts should be disabled. Currently the PLX interrupt is left
enabled when the driver is detached.
Signed-off-by: H Hartley Sweeten <[email protected]>
---
drivers/staging/comedi/drivers/me4000.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/comedi/drivers/me4000.c
b/drivers/staging/comedi/drivers/me4000.c
index 09234d4..b917e46 100644
--- a/drivers/staging/comedi/drivers/me4000.c
+++ b/drivers/staging/comedi/drivers/me4000.c
@@ -1263,8 +1263,12 @@ static int me4000_auto_attach(struct comedi_device *dev,
static void me4000_detach(struct comedi_device *dev)
{
- if (dev->iobase)
- me4000_reset(dev);
+ if (dev->irq) {
+ struct me4000_private *devpriv = dev->private;
+
+ /* Disable interrupts on the PLX */
+ outl(0, devpriv->plx_regbase + PLX9052_INTCSR);
+ }
comedi_pci_detach(dev);
}
Perhaps me4000_reset() should disable the PLX interrupts too so they are
in a clean state before enabled within me4000_auto_attach().
--
-=( Ian Abbott @ MEV Ltd. E-mail: <[email protected]> )=-
-=( Web: http://www.mev.co.uk/ )=-
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel