- Jan 21, 2013
-
-
Federico Vaga authored
address is a default ZIO binary attribute which return the channel address structure zio_addr. Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
Federico Vaga authored
Alarms are raised by some events and are persistent (in sysfs and in the control blocks) until they are cleared in sysfs. Clearing is write-1-to-clear (i.e.: write 32 to clear bit 5). Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
Federico Vaga authored
The Linux kernel automatic updates the uevent attributes only if the device has a bus or a class. When the Linux kernel updates the uevent it automatically adds the DEVTYPE attribute if the device has a device_type. In ZIO cset, channel, buffer and trigger have not a bus or a class, but they have a different device_type. These attributes are used to export the device_type to user-space and allow libudev to easy inspect the ZIO device hierarchy. Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
This has no effect on ZIO users, but tries to make some order in the file itself giving symbolic name to attribute groups. Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com> Conflicts: sysfs.c
-
The devname attribute returns the device name in /dev to gain access to blocks. Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
This is not really useful for the ZIO framework, but it simplify the work on the user-space side with the libudev library Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
This fixes a deadlock when changing of trigger type at runtime. bug introduced in a496ca04 Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.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>
-
This patch introduces ZIO_RW_PERM and ZIO_RO_PERM, which are used in all attributes. Prevoously we had write-all for writeable attributes, now we only allos the owner and the group. Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Jan 10, 2013
-
-
Alessandro Rubini authored
This is a bug fix for overlooks in this same series of commits. I won't fix each lock when it is introduced before proposing for master, because it takes too much time. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
Alessandro Rubini authored
This is important now that we have self-timed devices: if any trigger parameter is changed (e.g., nsamples), we need to abort the armed trigger and rearm with new parameters. If the trigger is not armed when changing parameters, nothing happens like before. 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>
-
Alessandro Rubini authored
This is the first step of a series of changes aimed at a cleaner and more flexible management of triggers, as well as a really transparent "user" trigger. This commit does the following: - zio_fire_trigger renamed to zio_arm_trigger: the trigger is actually armed by software, and then it fires by hardware. This distinction is especially important for the transparent trigger: when devices have internal timing, the software trigger must arm it immediately (as opposed to the dumb devices, where the software trigger really causes I/O to happen). - ZIO_TI_BUSY renamed to ZIO_TI_ARMED. Also, ZIO_TI_COMPLETING is removed. The new, simplified policy is like this: the trigger is armed by software (the trigger module), but completion is driven by hardware (the device module). There is no need for a COMPLETING flag, because the ARMED flag is only cleared after data_done is over for all channels in the cset. - the cset spinlock is used to protect all changes of the ti flags. - change_current_trigger completely revised and fixed to match new conventions. - trigger->abort now takes "ti" instead of "cset" as argument; it is more natural do do so, and no current trigger implements abort so no harm is done. - the trigger->abort and trigger->change_status methods are now always called while holding the cset spinlock. ZIO core calls abort when changing the current trigger type, to ensure no pending blocks are there. - zio_trigger_abort is renamed to zio_trigger_abort_disable, with an additional argument to state whether the trigger must be atomically disabled after the abort is over. This avoids a race condition on trigger removal. It returns the previous "disabled" bit, to be used when changing a buffer type while preserving trigger status. - minor unrelated improvements in error management in objects.c. - documentation update to match the new locking, and a few typos fixed. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
- Nov 25, 2012
-
-
Alessandro Rubini authored
While the binary control file in sysfs is a neat feature, the interface to binary attributes was different before 2.6.35. This allows compiling with no warnings (and no crashes if the feature is used) by just disabling the attribute at compile time. 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>
-
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>
-
Alessandro Rubini authored
Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.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>
-
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, 2012
-
-
ZIO creates a binary sysfs attribute named "current-control" within each channel. This attribute allows the user to read the current control of any channel. Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubinig@gnudd.com>
-
- Nov 11, 2012
-
-
Federico Vaga authored
The patch 896e0664 misses to assign the zattr for the zio extended attributes. This patch also improve comments to avoid similar errors in the future. Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubinig@gnudd.com>
-
- Nov 09, 2012
-
-
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>
-
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>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
- Nov 08, 2012
-
-
Alessandro Rubini authored
The driver itself is allowed to change nsamples, because it may have less samples than requested when the trigger fires. This is done by zio-mini, for example, that will be merged soon. Therefore, the number in current_ctrl must be updated, or the previous shorter value will stick. Also, move seq_num incrementing earlier, so even if allocation fails the sequence number is updated (and we need to do alarms too for that). Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
- Nov 05, 2012
-
-
Alessandro Rubini authored
This removes the annyoing message about the missing attribute. Simple driver can choose to not have attributes at all, which simplifies source code, so the core should better not complain about them. 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>
-
Federico Vaga authored
Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
Federico Vaga authored
Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
Federico Vaga authored
Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
Federico Vaga authored
Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
Federico Vaga authored
Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
Federico Vaga authored
Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Nov 04, 2012
-
-
Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
This is more in line with current kernel practices. We do not use zio_ here because the context is always clear when this macro is used. Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Nov 03, 2012
-
-
Federico Vaga authored
Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Nov 01, 2012
-
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Oct 31, 2012
-
-
Alessandro Rubini authored
This is a potentially incompatible change: if your driver fills attributes in the input block at raw_io() time, it won't work any more. You should fill chan->current_ctrl instead, which will be visible as a binary blob in sysfs soon. Moving the memcpy() to a later point doesn't change overhead. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-