- 03 Sep, 2024 1 commit
-
-
Takashi Sakamoto authored
Many tracepoints events have been added to 6.10 and 6.11 kernels. They are available as an alternative of debug parameter in firewire-ohci module. The logging messages enabled by the parameter require some cumbersomes in a point of maintenance; e.g. the code to decode transaction frame. This commit adds deprecation text to conduct users to them.. Link: https://lore.kernel.org/r/20240903101455.317067-1-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
- 20 Aug, 2024 1 commit
-
-
Takashi Sakamoto authored
When detecting updates of bus topology, the data of fw_device is newly allocated and caches the content of configuration ROM from the corresponding node. Then, the tree of device is sought to find the previous data of fw_device corresponding to the node. If found, the previous data is updated and reused and the data of fw_device newly allocated is going to be released. The above procedure is done in the call of device_find_child(), however it is a bit abusing against the intention of the helper function, since it is preferable to find only without updating. This commit splits the update outside of the call. Cc: Zijun Hu <zijun_hu@icloud.com> Link: https://lore.kernel.org/r/20240820132132.28839-1-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
- 17 Aug, 2024 1 commit
-
-
Takashi Sakamoto authored
A commit 404957c1e207 ("firewire: ohci: use guard macro to serialize accesses to phy registers") refactored initiated_reset() helper function, while the error path was changed wrongly. This commit fixes the bug. Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Fixes: 80f3401dfeb2 ("firewire: ohci: use guard macro to serialize accesses to phy registers") Link: https://lore.kernel.org/r/20240817091128.180303-1-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
- 14 Aug, 2024 3 commits
-
-
Takashi Sakamoto authored
The size of space for configuration ROM is defined by IEEE 1212. The start and end offsets are available as some macros in UAPI header. This commit uses these macros to compute the size. Link: https://lore.kernel.org/r/20240814131222.69949-4-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
Takashi Sakamoto authored
The ohci_info() macro is a thin wrapper of dev_info(), while it is never used. Link: https://lore.kernel.org/r/20240814131222.69949-3-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
Takashi Sakamoto authored
The __aligned() macro has been available since v4.19 kernel by a commit 815f0ddb ("include/linux/compiler*.h: make compiler-*.h mutually exclusive"). This commit replaces with the macro. Link: https://lore.kernel.org/r/20240814131222.69949-2-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
- 12 Aug, 2024 7 commits
-
-
Takashi Sakamoto authored
In core function, the instances of some client resource structures are maintained by IDR. As of kernel v6.0, IDR has been superseded by XArray and deprecated. This commit replaces the usage of IDR with XArray to maintain the resource instances. The instance of XArray is allocated per client with XA_FLAGS_ALLOC1 so that the index of allocated entry is greater than zero and returns to user space client as handle of the resource. Link: https://lore.kernel.org/r/20240812235210.28458-6-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
Takashi Sakamoto authored
firewire: core: code refactoring to use idr_for_each_entry() macro instead of idr_for_each() function This commit is a preparation to use xa_for_each() macro. Current implementation uses idr_for_each() function and has a disadvantage to replace with the macro. The IDR framework has idr_for_each_entry() macro for the similar purpose. This commit replace the function with the macro with minor code refactoring. Link: https://lore.kernel.org/r/20240812235210.28458-5-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
Takashi Sakamoto authored
It depends on the function assigned to release member to identify resource structure. This commit adds a helper function to identify iso_resource structure. Link: https://lore.kernel.org/r/20240812235210.28458-4-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
Takashi Sakamoto authored
All of local resource structure commonly have data of client_resource type in its first member. This design sometimes requires usage of container_of to retrieve parent structure by the first member. This commit adds some helper functions for this purpose. Link: https://lore.kernel.org/r/20240812235210.28458-3-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
Takashi Sakamoto authored
Current implementation checks and validates the result to find resource entry two times. It is redundant. This commit refactors the redundancy. Link: https://lore.kernel.org/r/20240812235210.28458-2-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
Takashi Sakamoto authored
The data of XArray structure includes spinlock and requires no external lock, while the data is still under the critical section by fw_device_rwsem. This commit deletes the critical section. Link: https://lore.kernel.org/r/20240812014251.165492-3-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
Takashi Sakamoto authored
In core function, the instances of fw_device corresponding to firewire device node in system are maintained by IDR. As of kernel v6.0, IDR has been superseded by XArray and deprecated. This commit replaces the usage of IDR with XArray to maintain the device instances. The instance of XArray is allocated statically, and initialized with XA_FLAGS_ALLOC so that the index of allocated entry starts with zero and available as the minor identifier of device node. Link: https://lore.kernel.org/r/20240812014251.165492-2-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
- 10 Aug, 2024 1 commit
-
-
Takashi Sakamoto authored
A commit d8527cab ("firewire: cdev: implement new event to notify response subaction with time stamp") adds an additional case, FW_CDEV_EVENT_RESPONSE2, into switch statement in complete_transaction(). However, the range of block is beyond to the case label and reaches neibour default label. This commit corrects the range of block. Fortunately, it has few impacts in practice since the local variable in the scope under the label is not used in codes under default label. Fixes: d8527cab ("firewire: cdev: implement new event to notify response subaction with time stamp") Link: https://lore.kernel.org/r/20240810070403.36801-1-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
- 05 Aug, 2024 17 commits
-
-
Takashi Sakamoto authored
The 1394 OHCI driver uses spinlock to serialize operations for isochronous contexts. This commit uses guard macro to maintain the spinlock. Link: https://lore.kernel.org/r/20240805085408.251763-18-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
Takashi Sakamoto authored
The 1394 OHCI driver uses spinlock for the process to update local configuration ROM. This commit uses guard macro to maintain the spinlock. Link: https://lore.kernel.org/r/20240805085408.251763-17-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
Takashi Sakamoto authored
The 1394 OHCI driver maintains bus time to respond to querying request. The concurrent access to the bus time is protected by spinlock. This commit uses guard macro to maintain the spinlock. Link: https://lore.kernel.org/r/20240805085408.251763-16-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
Takashi Sakamoto authored
The core functions uses spinlock in instance of fw_card structure to protect concurrent access to properties in the instance. This commit uses guard macro to maintain the spinlock. Link: https://lore.kernel.org/r/20240805085408.251763-15-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
Takashi Sakamoto authored
The core function maintains pending asynchronous transactions by list in the instance of fw_card. The concurrent access to the list is protected by spinlock in the instance. This commit uses guard macro to maintain the spinlock. Link: https://lore.kernel.org/r/20240805085408.251763-14-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
Takashi Sakamoto authored
The core function maintains clients to receive phy configuration packets by list in the instance of fw_card. The concurrent access to the list is protected by spinlock in the instance. This commit uses guard macro to maintain the list. Link: https://lore.kernel.org/r/20240805085408.251763-13-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
Takashi Sakamoto authored
The core function allows one isochronous contexts per userspace client. The concurrent access to the context is protected by spinlock in the instance of client. This commit uses guard macro to maintain the spinlock. Link: https://lore.kernel.org/r/20240805085408.251763-12-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
Takashi Sakamoto authored
The core function provides UAPI to maintain isochronous resources allocated by userspace clients across bus resets automatically. The resources are maintained by IDR and the concurrent access to it is protected by spinlock in the instance of client. This commit uses guard macro to maintain the spinlock. Link: https://lore.kernel.org/r/20240805085408.251763-11-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
Takashi Sakamoto authored
The core function maintains events to userspace by list in the instance of client. The concurrent access to the list is protected by spinlock in the instance. This commit uses guard macro to maintain the spinlock. Link: https://lore.kernel.org/r/20240805085408.251763-10-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
Takashi Sakamoto authored
The core function provides an operation for userspace application to retrieve current value of CYCLE_TIMER register with several types of system time. In the operation, local interrupt is disables so that the access of the register and ktime are done atomically. This commit uses guard macro to disable/enable local interrupts. Link: https://lore.kernel.org/r/20240805085408.251763-9-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
Takashi Sakamoto authored
The core function maintains address handlers by list. It is protected by spinlock to insert and remove entry to the list. This commit uses guard macro to maintain the spinlock. Link: https://lore.kernel.org/r/20240805085408.251763-8-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
Takashi Sakamoto authored
The core function maintains the instance of fw_device structure by IDR. The concurrent access to IDR is protected by static read/write semaphore. The semaphore is also utilized to protect concurrent access to the content of configuration ROM cached to the instance so that the cache is swapped to the latest one. This commit uses guard macro to maintain the mutex. Link: https://lore.kernel.org/r/20240805085408.251763-7-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
Takashi Sakamoto authored
The core function maintains address handlers by list. RCU is utilized for efficient read access to any entries in the list. This commit uses guard macro to maintain RCU locking and releasing. Link: https://lore.kernel.org/r/20240805085408.251763-6-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
Takashi Sakamoto authored
The 1394 OHCI driver protects concurrent accesses to phy registers by mutex object in fw_ohci structure. This commit uses guard macro to maintain the mutex. Link: https://lore.kernel.org/r/20240805085408.251763-5-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
Takashi Sakamoto authored
The core function maintains userspace clients by the list in fw_device object associated to the operated character device. The concurrent access to the list is protected by mutex in the object. This commit uses guard macro to maintain the mutex. Link: https://lore.kernel.org/r/20240805085408.251763-4-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
Takashi Sakamoto authored
The core function maintains registered cards by list. The concurrent access to the list is protected by static mutex. This commit uses guard macro to maintain the mutex. Link: https://lore.kernel.org/r/20240805085408.251763-3-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
Takashi Sakamoto authored
The core function provide a kernel API to send phy configuration packet. Current implementation of the feature uses packet object allocated statically. The concurrent access to the object is protected by static mutex. This commit uses guard macro to maintain the mutex. Link: https://lore.kernel.org/r/20240805085408.251763-2-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
- 02 Aug, 2024 4 commits
-
-
Takashi Sakamoto authored
THis commit replaces current implementation with the helper functions added in the former commit. Link: https://lore.kernel.org/r/20240802003606.109402-5-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
Takashi Sakamoto authored
In 1394 OHCI specification, the format of data for IT DMA is different from the format of isochronous packet in IEEE 1394 specification, in its spd and srcBusID fields. This commit adds some static inline functions to serialize/deserialize the data of IT DMA. Link: https://lore.kernel.org/r/20240802003606.109402-4-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
Takashi Sakamoto authored
This commit replaces current implementation with the helper functions added in the former commit. Link: https://lore.kernel.org/r/20240802003606.109402-3-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
Takashi Sakamoto authored
In 1394 OHCI specification, the format of data for AT DMA is different from the format of asynchronous packet in IEEE 1394 specification, in its spd and srcBusID fields. This commit adds some static inline functions to serialize/deserialize the data of AT DMA. Link: https://lore.kernel.org/r/20240802003606.109402-2-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
- 01 Aug, 2024 1 commit
-
-
Takashi Sakamoto authored
Current implementation directly uses refcount_t to maintain the life time of fw_node, while kref is available for the same purpose. This commit replaces the implementation with kref. Link: https://lore.kernel.org/r/20240801022629.31857-1-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
- 29 Jul, 2024 3 commits
-
-
Takashi Sakamoto authored
A common helper function is available to serialize the first quadlet of phy configuration packet. This commit is for the purpose. Link: https://lore.kernel.org/r/20240729134631.127189-4-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
Takashi Sakamoto authored
The string table for tcode is just used by log_ar_at_event(). In the case, it is suitable to move the table inner the function definition. This commit is for the purpose. Additionally, the hard-coded value for tcode is replaced with defined macros as many as possible. Link: https://lore.kernel.org/r/20240729134631.127189-3-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
Takashi Sakamoto authored
In IEEE 1394 specification, 0x0e in tcode field is reserved for internal purpose depending on link layer. In 1394 OHCI specification, it is used to express phy packet in AT/AR contexts. Current implementation of 1394 OHCI driver has several macros for the code. They can be simply replaced with a macro in core code. This commit obsoletes the macros. Link: https://lore.kernel.org/r/20240729134631.127189-2-o-takashi@sakamocchi.jpSigned-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-
- 04 Aug, 2024 1 commit
-
-
Linus Torvalds authored
-