RE: [PATCH 1/2] misc: add CARMA DATA-FPGA Access Driver

2011-02-10 Thread David Laight
> > I was completely unaware of that "feature". I hunch that many drivers > > are incapable of dealing with an unbind while they are still open. > > Hmm, maybe older drivers... Anythig hotpluggable (USB, PCI, etc) should > be in a better shape because they expect to be yanked at any time. Whim

Re: [PATCH 1/2] misc: add CARMA DATA-FPGA Access Driver

2011-02-09 Thread Dmitry Torokhov
On Wed, Feb 09, 2011 at 04:10:55PM -0800, Ira W. Snyder wrote: > On Wed, Feb 09, 2011 at 03:42:31PM -0800, Dmitry Torokhov wrote: > > On Wed, Feb 09, 2011 at 03:35:45PM -0800, Ira W. Snyder wrote: > > > On Wed, Feb 09, 2011 at 10:27:40AM -0800, Dmitry Torokhov wrote: > > > > > > [ snip stuff I've

Re: [PATCH 1/2] misc: add CARMA DATA-FPGA Access Driver

2011-02-09 Thread Ira W. Snyder
On Wed, Feb 09, 2011 at 03:42:31PM -0800, Dmitry Torokhov wrote: > On Wed, Feb 09, 2011 at 03:35:45PM -0800, Ira W. Snyder wrote: > > On Wed, Feb 09, 2011 at 10:27:40AM -0800, Dmitry Torokhov wrote: > > > > [ snip stuff I've already fixed in the next version ] > > > > > > > > > > The requirement

Re: [PATCH 1/2] misc: add CARMA DATA-FPGA Access Driver

2011-02-09 Thread Dmitry Torokhov
On Wed, Feb 09, 2011 at 03:35:45PM -0800, Ira W. Snyder wrote: > On Wed, Feb 09, 2011 at 10:27:40AM -0800, Dmitry Torokhov wrote: > > [ snip stuff I've already fixed in the next version ] > > > > > > > The requirement is that the device stay open during reconfiguration. > > > This provides for t

Re: [PATCH 1/2] misc: add CARMA DATA-FPGA Access Driver

2011-02-09 Thread Ira W. Snyder
On Wed, Feb 09, 2011 at 10:27:40AM -0800, Dmitry Torokhov wrote: [ snip stuff I've already fixed in the next version ] > > > > The requirement is that the device stay open during reconfiguration. > > This provides for that. Readers just block for as long as the device is > > not producing data.

Re: [PATCH 1/2] misc: add CARMA DATA-FPGA Access Driver

2011-02-09 Thread Dmitry Torokhov
On Wed, Feb 09, 2011 at 09:35:32AM -0800, Ira W. Snyder wrote: > On Wed, Feb 09, 2011 at 12:33:25AM -0800, Dmitry Torokhov wrote: > > > + > > > + /* Warn if we are running in a degraded state, but do not fail */ > > > + if (priv->num_buffers < MAX_DATA_BUFS) { > > > + dev_warn(priv->dev, "U

Re: [PATCH 1/2] misc: add CARMA DATA-FPGA Access Driver

2011-02-09 Thread Ira W. Snyder
On Wed, Feb 09, 2011 at 12:33:25AM -0800, Dmitry Torokhov wrote: > Hi Ira, > > On Tue, Feb 08, 2011 at 03:37:46PM -0800, Ira W. Snyder wrote: > > This driver allows userspace to access the data processing FPGAs on the > > OVRO CARMA board. It has two modes of operation: > > > > Thank you for mak

Re: [PATCH 1/2] misc: add CARMA DATA-FPGA Access Driver

2011-02-09 Thread Ira W. Snyder
On Wed, Feb 09, 2011 at 04:30:23PM -, David Laight wrote: > > > This driver allows userspace to access the data processing > > FPGAs on the OVRO CARMA board. It has two modes of operation: > > > > 1) random access > > > > This allows users to poke any DATA-FPGA registers by using mmap to m

RE: [PATCH 1/2] misc: add CARMA DATA-FPGA Access Driver

2011-02-09 Thread David Laight
> This driver allows userspace to access the data processing > FPGAs on the OVRO CARMA board. It has two modes of operation: > > 1) random access > > This allows users to poke any DATA-FPGA registers by using mmap to map > the address region directly into their memory map. I needed something

Re: [PATCH 1/2] misc: add CARMA DATA-FPGA Access Driver

2011-02-09 Thread Dmitry Torokhov
Hi Ira, On Tue, Feb 08, 2011 at 03:37:46PM -0800, Ira W. Snyder wrote: > This driver allows userspace to access the data processing FPGAs on the > OVRO CARMA board. It has two modes of operation: > Thank you for making the changes, some more comments below. > + > +#define inode_to_dev(inode) co

[PATCH 1/2] misc: add CARMA DATA-FPGA Access Driver

2011-02-08 Thread Ira W. Snyder
This driver allows userspace to access the data processing FPGAs on the OVRO CARMA board. It has two modes of operation: 1) random access This allows users to poke any DATA-FPGA registers by using mmap to map the address region directly into their memory map. 2) correlation dumping When correla

Re: [PATCH 1/2] misc: add CARMA DATA-FPGA Access Driver

2011-02-08 Thread Dmitry Torokhov
On Tue, Feb 08, 2011 at 11:11:44AM -0800, Ira W. Snyder wrote: > On Tue, Feb 08, 2011 at 09:50:29AM -0800, Dmitry Torokhov wrote: > > On Tue, Feb 08, 2011 at 09:20:46AM -0800, Ira W. Snyder wrote: > > > > > Go back and re-think my loop. This is a > > > common idiom straight of out LDD3 pages 153-1

Re: [PATCH 1/2] misc: add CARMA DATA-FPGA Access Driver

2011-02-08 Thread Ira W. Snyder
On Tue, Feb 08, 2011 at 09:50:29AM -0800, Dmitry Torokhov wrote: > On Tue, Feb 08, 2011 at 09:20:46AM -0800, Ira W. Snyder wrote: > > On Mon, Feb 07, 2011 at 11:33:10PM -0800, Dmitry Torokhov wrote: > > > > +static void data_free_buffer(struct device *dev, struct data_buf *buf) > > > > +{ > > > > +

Re: [PATCH 1/2] misc: add CARMA DATA-FPGA Access Driver

2011-02-08 Thread Dmitry Torokhov
On Tue, Feb 08, 2011 at 09:20:46AM -0800, Ira W. Snyder wrote: > On Mon, Feb 07, 2011 at 11:33:10PM -0800, Dmitry Torokhov wrote: > > > +static void data_free_buffer(struct device *dev, struct data_buf *buf) > > > +{ > > > + /* It is ok to free a NULL buffer */ > > > + if (!buf) > > > + ret

Re: [PATCH 1/2] misc: add CARMA DATA-FPGA Access Driver

2011-02-08 Thread Dave Jones
On Tue, Feb 08, 2011 at 09:20:46AM -0800, Ira W. Snyder wrote: > > > +static DEVICE_ATTR(enable, S_IWUGO | S_IRUGO, data_en_show, > > > data_en_set); > > > > Are all of these really needed or most of them are for debug? > > > > Most are for debugging. They have proved useful a few times

Re: [PATCH 1/2] misc: add CARMA DATA-FPGA Access Driver

2011-02-08 Thread Ira W. Snyder
On Mon, Feb 07, 2011 at 11:33:10PM -0800, Dmitry Torokhov wrote: > Hi Ira, > > On Mon, Feb 07, 2011 at 03:23:40PM -0800, Ira W. Snyder wrote: > > This driver allows userspace to access the data processing FPGAs on the > > OVRO CARMA board. It has two modes of operation: > > > > 1) random access >

Re: [PATCH 1/2] misc: add CARMA DATA-FPGA Access Driver

2011-02-07 Thread Dmitry Torokhov
Hi Ira, On Mon, Feb 07, 2011 at 03:23:40PM -0800, Ira W. Snyder wrote: > This driver allows userspace to access the data processing FPGAs on the > OVRO CARMA board. It has two modes of operation: > > 1) random access > > This allows users to poke any DATA-FPGA registers by using mmap to map > th

[PATCH 1/2] misc: add CARMA DATA-FPGA Access Driver

2011-02-07 Thread Ira W. Snyder
This driver allows userspace to access the data processing FPGAs on the OVRO CARMA board. It has two modes of operation: 1) random access This allows users to poke any DATA-FPGA registers by using mmap to map the address region directly into their memory map. 2) correlation dumping When correla