- Jan 21, 2013
-
-
Federico Vaga authored
This help user-space programs which use libudev to rebuild the ZIO device structure Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
Federico Vaga authored
This has no effect for ZIO users Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Jan 19, 2013
-
-
Alessandro Rubini authored
Since __zio_write_allowed and __zio_read_allowed don't check the type of cset (input or output), it must be checked by the called, like read and write do. Otherwise, users of poll() on input channels will loose one every other block, because now __zio_write_allowed can free user blocks. Bug exposed by commit: efbcb48a chardev.c: support zero-sized blocks on output Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
- Jan 18, 2013
-
-
This patch renames ZIO_CONTROL_SIZE to __ZIO_CONTROL_SIZE and it introduces the function zio_control_size(chan). At a future time, the function will return a channel-dependent value, when we implement TLV to extend the control structure. Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
The control version is already in available in /sys/bus/zio. Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Jan 17, 2013
-
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
- Jan 10, 2013
-
-
Alessandro Rubini authored
When the current buffer is changed, there should be no users on the channels (otherwise, either a user block is being produced/consumed or there's somebody sleeping on the wq of the buffer instance). This prevents changing the buffer if in use, and prevents users from opening a channel if the buffer is being changed. We use the "disabled" flag for the buffer, not used so far. We noticed this while working on buffer changes (see previous commit). I'm unable to backport this to the proper place in the history because it relies on the new locking introduced by this branch. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
- Nov 25, 2012
-
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
- Nov 24, 2012
-
-
Alessandro Rubini authored
We are getting rid of the "zio-" prefix in all file names. The prefix is needed module names (so all single-file devices triggers and buffers) but not in component files. This simplifies stuff a little for our command lines and tab completion. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Signed-off-by:
Federico Vaga <federico.vaga@gmail.com>
-
Alessandro Rubini authored
This also removes the ugly __ZIO_INTERNAL__ define we used until now Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Nov 09, 2012
-
-
Alessandro Rubini authored
Now the open() returns -ENODEV at is should. The bug only happens if you are not using udev, though. Original code returned -EBUSY when 0 (== false) was needed. The patch is bigger than that because it simplifies related code. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
Alessandro Rubini authored
This is an incompatible change for buffer authors. We don't think there are any out-of-tree buffers, though. The allocation function must allocate the control by itself, instead of receiving it from outside. The reason why the control was passed doesn't hold any more, and the upcoming PF_ZIO buffer will greatly benefit from this. Also, now alloc_block returns NULL on error, so it can be used directly by the caller (it used to be ERR_PTR). Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
Federico Vaga authored
Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This replaces the previous allocation bitmask, which only supported small channel-sets, with the first-fit allocator. Minors are always taken from the smallest available slot starting from minor 0. Each cset is allocated separately, but this should not be a problem. With the zio-mini driver, which is not upstream yet, this works: insmod zio-mini.ko nchan=300 ndev=20 And we get all the devices we need. # ls -1 /sys/dev/char/250:* | wc -l 12000 The patch makes also some other renaming of functions (less underscores for functions exported by zio-cdev.c to zio-sys.c) and similar stuff that makes stuff clearer, if I happened to find them during this change. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
- Nov 05, 2012
-
-
Federico Vaga authored
Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Apr 06, 2012
-
-
Federico Vaga authored
This patch introduces zio_driver and zio_device_id structure, which are used to define a zio's driver. ZIO uses these structures to handle the match between devices and drivers connected on the zio bus. To make ZIO work on the Linux bus mechanism, ZIO creates two zio_device structures. The first zio_device is allocated and it is registered by the module which wants to declare the existence of a new ZIO device. This first zio_device is only used by ZIO to match the device with a driver. When the first zio device matchs with a driver, ZIO creates a new zio device child of the first one. The new device is filled with all the device information and sysfs attributes. This second zio device represents the real device to use; ZIO passes this zio device as argument to the driver probe function, so the driver can use the real zio device for its operations. From the user space point of view, both ZIO devices are available at /sys/bus/zio/devices/; the first zio device has the prefix "hwdev-", the second zio device (the real one) has the prefix "zio-" Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Mar 15, 2012
-
-
Federico Vaga authored
The current control used to be per-trigger (i.e., per-cset). However, some parameters are per-channel (like the gain), so each channel now has its own current control structure. Also, zio-dump now shows device and trigger attributes, both standard and extended ones. Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Feb 10, 2012
-
-
Federico Vaga authored
bugfix: add zio_device_put on error Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Feb 02, 2012
-
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
Alessandro Rubini authored
We will have buffers that use the default operations (the majority) and buffers without file operations for in-kernel activities, like the input subsystem. In the latter case we want the cdev to refuse being openend, so NULL is reserved for that case. Also, add v_op to the buffer, so it can support mmap. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
- Feb 01, 2012
-
-
Federico Vaga authored
this also rename the zio class "zio" to "zio-char-devices" to make the sysfs structure more readable. On some old version of udev it does not work; it set read/write permission on every char device. Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Jan 31, 2012
-
-
Alessandro Rubini authored
The argument is a relic of original design and was used incorrectly. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
Alessandro Rubini authored
Some of them don't apply any more (we made our choices, or the problem has been addressed and fixed elsewhere). Some do but I reworded them. Some still apply unchanged, and are not touched by this patch. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
- Nov 25, 2011
-
-
Alessandro Rubini authored
Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Nov 22, 2011
-
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
zio invokes try_module_get() on buffer, trigger and device owners when they are in use. For devices we still have a little unsafe time. Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Nov 20, 2011
-
-
Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Nov 15, 2011
-
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
- Nov 04, 2011
-
-
Alessandro Rubini authored
The file exports a few functions that can be used by specific buffers to handle read, poll, release. Write is not supported at this time. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Signed-off by: Federico Vaga <federico.vaga@gmail.com>
-