staging: comedi: jr3_pci: Reset all DSPs
authorIan Abbott <abbotti@mev.co.uk>
Fri, 17 Feb 2017 11:09:10 +0000 (11:09 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Mar 2017 08:16:58 +0000 (09:16 +0100)
The various JR3 PCI models have from 1 to 4 DSPs, one per subdevice.
Prior to loading the firmware to all the DSPs, the initialization code
in `jr3_pci_auto_attach()` resets the first DSP.  As far as I can tell,
it should reset all of them.  Change it to do so.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/jr3_pci.c

index eb0a095efe9cd6c0860bd027915112d3cb7ae417..c5bff9a85727aab9aca17223d670df1739d9f3d7 100644 (file)
@@ -736,7 +736,8 @@ static int jr3_pci_auto_attach(struct comedi_device *dev,
        }
 
        /* Reset DSP card */
-       writel(0, &devpriv->iobase->channel[0].reset);
+       for (i = 0; i < dev->n_subdevices; i++)
+               writel(0, &devpriv->iobase->channel[i].reset);
 
        ret = comedi_load_firmware(dev, &comedi_to_pci_dev(dev)->dev,
                                   "comedi/jr3pci.idm",