Re: [PATCH 46/55] staging: comedi: drivers: handle SDF_PACKED in comedi_inc_scan_progress()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 24/10/14 17:34, Hartley Sweeten wrote:
On Friday, October 24, 2014 1:49 AM, Ian Abbott wrote:
On 23/10/14 17:35, Hartley Sweeten wrote:
On Thursday, October 23, 2014 4:28 AM, Ian Abbott wrote:
[snip]
Is this patch even necessary?  comedi_bytes_per_scan() assumes digital
samples will be packed into a whole number of "samples" and calculates
the scan length in bytes accordingly.

I guess it's not really "necessary" but it adds clarification to what
the SDF_PACKED flag does. Right now the only documentation
for that flag is:

#define SDF_PACKED	0x20000000	/* subdevice can do packed DIO */

But nothing in the core uses it. I don't think comedilib
references the flag either.

Applications could see it, though they would probably ignore it as well,
as any application using async commands for digital I/O probably needs
to be hardware specific as the order of data in the scan data doesn't
match the order of channels in the chanlist for all drivers. (Some just
return all channels in channel number order.)

Should this be fixed?

Probably best left alone for the sake of stability. In particular, ni_pcidio is a reasonably high-speed device, so looping up to 32 times per scan to rearrange the bits may be a bit much. It currently ignores the chanlist altogether!

--
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@xxxxxxxxx> )=-
-=(                          Web: http://www.mev.co.uk/  )=-
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux