History log of /linux-6.15/drivers/firewire/core-cdev.c (Results 1 – 25 of 116)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14, v6.14-rc7
# ca2c7365 13-Mar-2025 Gustavo A. R. Silva <[email protected]>

firewire: core: avoid -Wflex-array-member-not-at-end warning

Use the `DEFINE_RAW_FLEX()` helper for an on-stack definition of
a flexible structure where the size of the flexible-array member
is know

firewire: core: avoid -Wflex-array-member-not-at-end warning

Use the `DEFINE_RAW_FLEX()` helper for an on-stack definition of
a flexible structure where the size of the flexible-array member
is known at compile-time, and refactor the rest of the code,
accordingly.

So, with these changes, fix the following warning:

drivers/firewire/core-cdev.c:1141:38: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]

Signed-off-by: Gustavo A. R. Silva <[email protected]>
Link: https://lore.kernel.org/r/Z9NcB81yfPo-8o0h@kspp
Signed-off-by: Takashi Sakamoto <[email protected]>

show more ...


Revision tags: v6.14-rc6, v6.14-rc5, v6.14-rc4, v6.14-rc3, v6.14-rc2, v6.14-rc1, v6.13, v6.13-rc7, v6.13-rc6, v6.13-rc5, v6.13-rc4, v6.13-rc3, v6.13-rc2, v6.13-rc1, v6.12, v6.12-rc7, v6.12-rc6, v6.12-rc5, v6.12-rc4, v6.12-rc3, v6.12-rc2, v6.12-rc1
# cb787f4a 27-Sep-2024 Al Viro <[email protected]>

[tree-wide] finally take no_llseek out

no_llseek had been defined to NULL two years ago, in commit 868941b14441
("fs: remove no_llseek")

To quote that commit,

At -rc1 we'll need do a mechanical

[tree-wide] finally take no_llseek out

no_llseek had been defined to NULL two years ago, in commit 868941b14441
("fs: remove no_llseek")

To quote that commit,

At -rc1 we'll need do a mechanical removal of no_llseek -

git grep -l -w no_llseek | grep -v porting.rst | while read i; do
sed -i '/\<no_llseek\>/d' $i
done

would do it.

Unfortunately, that hadn't been done. Linus, could you do that now, so
that we could finally put that thing to rest? All instances are of the
form
.llseek = no_llseek,
so it's obviously safe.

Signed-off-by: Al Viro <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>

show more ...


Revision tags: v6.11, v6.11-rc7
# f62ec13e 04-Sep-2024 Takashi Sakamoto <[email protected]>

firewire: core: non-atomic memory allocation for isochronous event to user client

In the former commits, the callback of isochronous context runs on work
process, thus no need to use atomic memory a

firewire: core: non-atomic memory allocation for isochronous event to user client

In the former commits, the callback of isochronous context runs on work
process, thus no need to use atomic memory allocation.

This commit replaces GFP_ATOMIC with GCP_KERNEL in the callback for user
client.

Tested-by: Edmund Raile <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Sakamoto <[email protected]>

show more ...


Revision tags: v6.11-rc6, v6.11-rc5, v6.11-rc4
# d9f6c64e 12-Aug-2024 Takashi Sakamoto <[email protected]>

firewire: core: use xarray instead of idr to maintain client resource

In core function, the instances of some client resource structures are
maintained by IDR. As of kernel v6.0, IDR has been supers

firewire: core: use xarray instead of idr to maintain client resource

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/[email protected]
Signed-off-by: Takashi Sakamoto <[email protected]>

show more ...


# 6ec9e926 12-Aug-2024 Takashi Sakamoto <[email protected]>

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_eac

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/[email protected]
Signed-off-by: Takashi Sakamoto <[email protected]>

show more ...


# 58ee62c2 12-Aug-2024 Takashi Sakamoto <[email protected]>

firewire: core: add helper function to detect data of iso resource structure

It depends on the function assigned to release member to identify
resource structure.

This commit adds a helper function

firewire: core: add helper function to detect data of iso resource structure

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/[email protected]
Signed-off-by: Takashi Sakamoto <[email protected]>

show more ...


# ced2da31 12-Aug-2024 Takashi Sakamoto <[email protected]>

firewire: core: add helper functions to convert to parent resource structure

All of local resource structure commonly have data of client_resource type
in its first member. This design sometimes req

firewire: core: add helper functions to convert to parent resource structure

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/[email protected]
Signed-off-by: Takashi Sakamoto <[email protected]>

show more ...


# 3b443fe0 12-Aug-2024 Takashi Sakamoto <[email protected]>

firewire: core: minor code refactoring to release client resource

Current implementation checks and validates the result to find resource
entry two times. It is redundant.

This commit refactors the

firewire: core: minor code refactoring to release client resource

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/[email protected]
Signed-off-by: Takashi Sakamoto <[email protected]>

show more ...


Revision tags: v6.11-rc3
# ebb9d3ca 10-Aug-2024 Takashi Sakamoto <[email protected]>

firewire: core: correct range of block for case of switch statement

A commit d8527cab6c31 ("firewire: cdev: implement new event to notify
response subaction with time stamp") adds an additional case

firewire: core: correct range of block for case of switch statement

A commit d8527cab6c31 ("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: d8527cab6c31 ("firewire: cdev: implement new event to notify response subaction with time stamp")
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Sakamoto <[email protected]>

show more ...


# 27310d56 05-Aug-2024 Takashi Sakamoto <[email protected]>

firewire: core: use guard macro to maintain properties of fw_card

The core functions uses spinlock in instance of fw_card structure to
protect concurrent access to properties in the instance.

This

firewire: core: use guard macro to maintain properties of fw_card

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/[email protected]
Signed-off-by: Takashi Sakamoto <[email protected]>

show more ...


# b9545448 05-Aug-2024 Takashi Sakamoto <[email protected]>

firewire: core: use guard macro to maintain list of receivers for phy configuration packets

The core function maintains clients to receive phy configuration packets
by list in the instance of fw_car

firewire: core: use guard macro to maintain list of receivers for phy configuration packets

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/[email protected]
Signed-off-by: Takashi Sakamoto <[email protected]>

show more ...


# cf123b01 05-Aug-2024 Takashi Sakamoto <[email protected]>

firewire: core: use guard macro to maintain isochronous context for userspace client

The core function allows one isochronous contexts per userspace client.
The concurrent access to the context is p

firewire: core: use guard macro to maintain isochronous context for userspace client

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/[email protected]
Signed-off-by: Takashi Sakamoto <[email protected]>

show more ...


# d3816b8b 05-Aug-2024 Takashi Sakamoto <[email protected]>

firewire: core: use guard macro to maintain IDR of isochronous resources for userspace clients

The core function provides UAPI to maintain isochronous resources allocated
by userspace clients across

firewire: core: use guard macro to maintain IDR of isochronous resources for userspace clients

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/[email protected]
Signed-off-by: Takashi Sakamoto <[email protected]>

show more ...


# 4f1f91ae 05-Aug-2024 Takashi Sakamoto <[email protected]>

firewire: core: use guard macro to maintain list of events for userspace clients

The core function maintains events to userspace by list in the instance of
client. The concurrent access to the list

firewire: core: use guard macro to maintain list of events for userspace clients

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/[email protected]
Signed-off-by: Takashi Sakamoto <[email protected]>

show more ...


# bacf921c 05-Aug-2024 Takashi Sakamoto <[email protected]>

firewire: core: use guard macro to disable local IRQ

The core function provides an operation for userspace application to
retrieve current value of CYCLE_TIMER register with several types of
system

firewire: core: use guard macro to disable local IRQ

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/[email protected]
Signed-off-by: Takashi Sakamoto <[email protected]>

show more ...


# 2a6a58f0 05-Aug-2024 Takashi Sakamoto <[email protected]>

firewire: core: use guard macro to access to IDR for fw_device

The core function maintains the instance of fw_device structure by IDR.
The concurrent access to IDR is protected by static read/write

firewire: core: use guard macro to access to IDR for fw_device

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/[email protected]
Signed-off-by: Takashi Sakamoto <[email protected]>

show more ...


# 044ce581 05-Aug-2024 Takashi Sakamoto <[email protected]>

firewire: core: use guard macro to maintain the list of cdev clients

The core function maintains userspace clients by the list in fw_device
object associated to the operated character device. The co

firewire: core: use guard macro to maintain the list of cdev clients

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/[email protected]
Signed-off-by: Takashi Sakamoto <[email protected]>

show more ...


Revision tags: v6.11-rc2
# 9b6ad6a0 29-Jul-2024 Takashi Sakamoto <[email protected]>

firewire: core: use common helper function to serialize phy configuration packet

A common helper function is available to serialize the first quadlet of phy
configuration packet.

This commit is for

firewire: core: use common helper function to serialize phy configuration packet

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/[email protected]
Signed-off-by: Takashi Sakamoto <[email protected]>

show more ...


Revision tags: v6.11-rc1, v6.10, v6.10-rc7, v6.10-rc6, v6.10-rc5, v6.10-rc4
# 810f2aa8 13-Jun-2024 Takashi Sakamoto <[email protected]>

firewire: core: record card index in async_phy_outbound_complete tracepoints event

The asynchronous transmission of phy packet is initiated on one of 1394
OHCI controller, however the existing trace

firewire: core: record card index in async_phy_outbound_complete tracepoints event

The asynchronous transmission of phy packet is initiated on one of 1394
OHCI controller, however the existing tracepoints events has the lack of
data about it.

This commit adds card_index member into event structure to store the index
of host controller in use, and prints it.

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Sakamoto <[email protected]>

show more ...


# 3cb44a72 13-Jun-2024 Takashi Sakamoto <[email protected]>

firewire: core: record card index in async_phy_outbound_initiate tracepoints event

The asynchronous transaction is initiated on one of 1394 OHCI
controller, however the existing tracepoints events h

firewire: core: record card index in async_phy_outbound_initiate tracepoints event

The asynchronous transaction is initiated on one of 1394 OHCI
controller, however the existing tracepoints events has the lack of data
about it.

This commit adds card_index member into event structure to store the index
of host controller in use, and prints it.

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Sakamoto <[email protected]>

show more ...


Revision tags: v6.10-rc3, v6.10-rc2, v6.10-rc1, v6.9, v6.9-rc7
# 1a4c53cf 30-Apr-2024 Takashi Sakamoto <[email protected]>

firewire: core/cdev: add tracepoints events for asynchronous phy packet

In IEEE 1394 bus, the type of asynchronous packet without any offset to
node address space is called as phy packet. The destin

firewire: core/cdev: add tracepoints events for asynchronous phy packet

In IEEE 1394 bus, the type of asynchronous packet without any offset to
node address space is called as phy packet. The destination of packet is
IEEE 1394 phy itself. This type of packet is used for several purposes,
mainly for selfID at the state of bus reset, to force selection of root
node, and to adjust gap count.

This commit adds tracepoints events for the type of asynchronous outbound
packet. Like asynchronous outbound transaction packets, a pair of events
are added to trace initiation and completion of transmission.

In the case that the phy packet is sent by kernel API, the match between
the initiation and completion is not so easy, since the data of
'struct fw_packet' is allocated statically. In the case that it is sent by
userspace applications via cdev, the match is easy, since the data is
allocated per each.

This example is for Remote Access Packet by lsfirewirephy command in
linux-firewire-utils:

async_phy_outbound_initiate: \
packet=0xffff89fb34e42e78 generation=1 first_quadlet=0x00148200 \
second_quadlet=0xffeb7dff
async_phy_outbound_complete: \
packet=0xffff89fb34e42e78 generation=1 status=1 timestamp=0x0619

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Sakamoto <[email protected]>

show more ...


Revision tags: v6.9-rc6, v6.9-rc5, v6.9-rc4, v6.9-rc3, v6.9-rc2, v6.9-rc1, v6.8, v6.8-rc7, v6.8-rc6, v6.8-rc5, v6.8-rc4, v6.8-rc3, v6.8-rc2, v6.8-rc1, v6.7, v6.7-rc8, v6.7-rc7, v6.7-rc6, v6.7-rc5, v6.7-rc4, v6.7-rc3, v6.7-rc2, v6.7-rc1, v6.6, v6.6-rc7, v6.6-rc6, v6.6-rc5, v6.6-rc4, v6.6-rc3, v6.6-rc2, v6.6-rc1, v6.5, v6.5-rc7, v6.5-rc6, v6.5-rc5, v6.5-rc4, v6.5-rc3, v6.5-rc2, v6.5-rc1, v6.4, v6.4-rc7, v6.4-rc6, v6.4-rc5
# fe971f91 29-May-2023 Takashi Sakamoto <[email protected]>

firewire: cdev: implement new event relevant to phy packet with time stamp

In 1394 OHCI, the OUTPUT_LAST descriptor of Asynchronous Transmit (AT)
context has timeStamp field, in which 1394 OHCI cont

firewire: cdev: implement new event relevant to phy packet with time stamp

In 1394 OHCI, the OUTPUT_LAST descriptor of Asynchronous Transmit (AT)
context has timeStamp field, in which 1394 OHCI controller record the
isochronous cycle when the packet was sent for the request subaction.
Additionally, the trailing quadlet of Asynchronous Receive (AR) context
has timeStamp field as well in which 1394 OHCI controller record the
isochronous cycle when the packet arrived. The time stamps are also
available for the cases to send and receive phy packet.

This commit implements new events with time stamp field for user space.

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Sakamoto <[email protected]>

show more ...


# 1ef14771 29-May-2023 Takashi Sakamoto <[email protected]>

firewire: cdev: code refactoring to dispatch event for phy packet

In 1394 OHCI, both Asynchronous Transmit (AT) and Asynchronous Receive
(AR) contexts are used to deliver the phy packet of IEEE 1394

firewire: cdev: code refactoring to dispatch event for phy packet

In 1394 OHCI, both Asynchronous Transmit (AT) and Asynchronous Receive
(AR) contexts are used to deliver the phy packet of IEEE 1394. The time
stamp is available as well as the usual asynchronous transaction.

This commit is a preparation for future commit to handle the time stamp.

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Sakamoto <[email protected]>

show more ...


# d8527cab 29-May-2023 Takashi Sakamoto <[email protected]>

firewire: cdev: implement new event to notify response subaction with time stamp

The callback function now receives an argument for time stamps relevant
to asynchronous transaction. This commit impl

firewire: cdev: implement new event to notify response subaction with time stamp

The callback function now receives an argument for time stamps relevant
to asynchronous transaction. This commit implements a new event to
notify response subaction with the time stamps for user space.

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Sakamoto <[email protected]>

show more ...


# 147e9d3a 29-May-2023 Takashi Sakamoto <[email protected]>

firewire: cdev: code refactoring to operate event of response

This commit is a preparation to handle time stamp of asynchronous
transaction for user space application.

Link: https://lore.kernel.org

firewire: cdev: code refactoring to operate event of response

This commit is a preparation to handle time stamp of asynchronous
transaction for user space application.

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Sakamoto <[email protected]>

show more ...


12345