From: Frank Mori Hess Date: Wed, 21 Apr 2004 19:16:36 +0000 (+0000) Subject: added a memory barrier to try and fix mysterious 6402/16 crash X-Git-Tag: r0_7_69~58 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7ab9e6e71ebae0a308adebc4f4a7a6f88312771e;p=comedi.git added a memory barrier to try and fix mysterious 6402/16 crash on attach --- diff --git a/comedi/drivers/cb_pcidas64.c b/comedi/drivers/cb_pcidas64.c index 5077bd4d..c1c752d6 100644 --- a/comedi/drivers/cb_pcidas64.c +++ b/comedi/drivers/cb_pcidas64.c @@ -86,6 +86,7 @@ TODO: #include #include #include +#include #include "8253.h" #include "8255.h" @@ -1700,15 +1701,16 @@ static int attach(comedi_device *dev, comedi_devconfig *it) if(retval < 0) return retval; priv(dev)->hw_revision = hw_revision( dev, readw(priv(dev)->main_iobase + HW_STATUS_REG ) ); - printk(" stc hardware revision %i\n", priv(dev)->hw_revision); - retval = setup_subdevices(dev); if(retval < 0) { return retval; } - + /* make sure everything is written out to memory before there is a possibility + * of the interrupt handler executing (trying to fix mysterious pci-das6402/16 + * crash during attach) */ + mb(); // get irq if(comedi_request_irq(pcidev->irq, handle_interrupt, SA_SHIRQ, "cb_pcidas64", dev )) {