linux/drivers/firewire/packet-serdes-test.c

// SPDX-License-Identifier: GPL-2.0-or-later
//
// packet-serdes-test.c - An application of Kunit to check serialization/deserialization of packets
//			  defined by IEEE 1394.
//
// Copyright (c) 2024 Takashi Sakamoto

#include <kunit/test.h>

#include <linux/firewire-constants.h>

#include "packet-header-definitions.h"
#include "phy-packet-definitions.h"

static void serialize_async_header_common(u32 header[ASYNC_HEADER_QUADLET_COUNT],
					  unsigned int dst_id, unsigned int tlabel,
					  unsigned int retry, unsigned int tcode,
					  unsigned int priority, unsigned int src_id)
{}

static void serialize_async_header_request(u32 header[ASYNC_HEADER_QUADLET_COUNT],
					   unsigned int dst_id, unsigned int tlabel,
					   unsigned int retry, unsigned int tcode,
					   unsigned int priority, unsigned int src_id, u64 offset)
{}

static void serialize_async_header_quadlet_request(u32 header[ASYNC_HEADER_QUADLET_COUNT],
						   unsigned int dst_id, unsigned int tlabel,
						   unsigned int retry, unsigned int tcode,
						   unsigned int priority, unsigned int src_id,
						   u64 offset)
{}

static void serialize_async_header_block_request(u32 header[ASYNC_HEADER_QUADLET_COUNT],
						 unsigned int dst_id, unsigned int tlabel,
						 unsigned int retry, unsigned int tcode,
						 unsigned int priority, unsigned int src_id,
						 u64 offset, unsigned int data_length,
						 unsigned int extended_tcode)
{}

static void serialize_async_header_response(u32 header[ASYNC_HEADER_QUADLET_COUNT],
					    unsigned int dst_id, unsigned int tlabel,
					    unsigned int retry, unsigned int tcode,
					    unsigned int priority, unsigned int src_id,
					    unsigned int rcode)
{}

static void serialize_async_header_quadlet_response(u32 header[ASYNC_HEADER_QUADLET_COUNT],
						    unsigned int dst_id, unsigned int tlabel,
						    unsigned int retry, unsigned int tcode,
						    unsigned int priority, unsigned int src_id,
						    unsigned int rcode)
{}

static void serialize_async_header_block_response(u32 header[ASYNC_HEADER_QUADLET_COUNT],
						  unsigned int dst_id, unsigned int tlabel,
						  unsigned int retry, unsigned int tcode,
						  unsigned int priority, unsigned int src_id,
						  unsigned int rcode, unsigned int data_length,
						  unsigned int extended_tcode)
{}

static void deserialize_async_header_common(const u32 header[ASYNC_HEADER_QUADLET_COUNT],
					    unsigned int *dst_id, unsigned int *tlabel,
					    unsigned int *retry, unsigned int *tcode,
					    unsigned int *priority, unsigned int *src_id)
{}

static void deserialize_async_header_request(const u32 header[ASYNC_HEADER_QUADLET_COUNT],
					     unsigned int *dst_id, unsigned int *tlabel,
					     unsigned int *retry, unsigned int *tcode,
					     unsigned int *priority, unsigned int *src_id,
					     u64 *offset)
{}

static void deserialize_async_header_quadlet_request(const u32 header[ASYNC_HEADER_QUADLET_COUNT],
						     unsigned int *dst_id, unsigned int *tlabel,
						     unsigned int *retry, unsigned int *tcode,
						     unsigned int *priority, unsigned int *src_id,
						     u64 *offset)
{}

static void deserialize_async_header_block_request(const u32 header[ASYNC_HEADER_QUADLET_COUNT],
						   unsigned int *dst_id, unsigned int *tlabel,
						   unsigned int *retry, unsigned int *tcode,
						   unsigned int *priority, unsigned int *src_id,
						   u64 *offset,
						   unsigned int *data_length,
						   unsigned int *extended_tcode)
{}

static void deserialize_async_header_response(const u32 header[ASYNC_HEADER_QUADLET_COUNT],
					      unsigned int *dst_id, unsigned int *tlabel,
					      unsigned int *retry, unsigned int *tcode,
					      unsigned int *priority, unsigned int *src_id,
					      unsigned int *rcode)
{}

static void deserialize_async_header_quadlet_response(const u32 header[ASYNC_HEADER_QUADLET_COUNT],
						      unsigned int *dst_id, unsigned int *tlabel,
						      unsigned int *retry, unsigned int *tcode,
						      unsigned int *priority, unsigned int *src_id,
						      unsigned int *rcode)
{}

static void deserialize_async_header_block_response(const u32 header[ASYNC_HEADER_QUADLET_COUNT],
						    unsigned int *dst_id, unsigned int *tlabel,
						    unsigned int *retry, unsigned int *tcode,
						    unsigned int *priority, unsigned int *src_id,
						    unsigned int *rcode, unsigned int *data_length,
						    unsigned int *extended_tcode)
{}

static void serialize_isoc_header(u32 *header, unsigned int data_length, unsigned int tag,
				  unsigned int channel, unsigned int tcode, unsigned int sy)
{}

static void deserialize_isoc_header(u32 header, unsigned int *data_length, unsigned int *tag,
				    unsigned int *channel, unsigned int *tcode, unsigned int *sy)
{}

static void serialize_phy_packet_self_id_zero(u32 *quadlet, unsigned int packet_identifier,
					      unsigned int phy_id, bool extended,
					      bool link_is_active, unsigned int gap_count,
					      unsigned int scode, bool is_contender,
					      unsigned int power_class, bool is_initiated_reset,
					      bool has_more_packets)
{}

static void deserialize_phy_packet_self_id_zero(u32 quadlet, unsigned int *packet_identifier,
						unsigned int *phy_id, bool *extended,
						bool *link_is_active, unsigned int *gap_count,
						unsigned int *scode, bool *is_contender,
						unsigned int *power_class,
						bool *is_initiated_reset, bool *has_more_packets)
{}

static void serialize_phy_packet_self_id_extended(u32 *quadlet, unsigned int packet_identifier,
						  unsigned int phy_id, bool extended,
						  unsigned int sequence, bool has_more_packets)
{}

static void deserialize_phy_packet_self_id_extended(u32 quadlet, unsigned int *packet_identifier,
						    unsigned int *phy_id, bool *extended,
						    unsigned int *sequence, bool *has_more_packets)
{}

static void serialize_phy_packet_phy_config(u32 *quadlet, unsigned int packet_identifier,
					    unsigned int root_id, bool has_force_root_node,
					    bool has_gap_count_optimization, unsigned int gap_count)
{}

static void deserialize_phy_packet_phy_config(u32 quadlet, unsigned int *packet_identifier,
					      unsigned int *root_id, bool *has_force_root_node,
					      bool *has_gap_count_optimization,
					      unsigned int *gap_count)
{}

static void test_async_header_write_quadlet_request(struct kunit *test)
{}

static void test_async_header_write_block_request(struct kunit *test)
{}

static void test_async_header_write_response(struct kunit *test)
{}

static void test_async_header_read_quadlet_request(struct kunit *test)
{}

static void test_async_header_read_quadlet_response(struct kunit *test)
{}

static void test_async_header_read_block_request(struct kunit *test)
{}

static void test_async_header_read_block_response(struct kunit *test)
{}

static void test_async_header_lock_request(struct kunit *test)
{}

static void test_async_header_lock_response(struct kunit *test)
{}

static void test_isoc_header(struct kunit *test)
{}

static void test_phy_packet_self_id_zero_case0(struct kunit *test)
{}

static void test_phy_packet_self_id_zero_case1(struct kunit *test)
{}

static void test_phy_packet_self_id_zero_and_one(struct kunit *test)
{}

static void test_phy_packet_phy_config_force_root_node(struct kunit *test)
{}

static void test_phy_packet_phy_config_gap_count_optimization(struct kunit *test)
{}

static struct kunit_case packet_serdes_test_cases[] =;

static struct kunit_suite packet_serdes_test_suite =;
kunit_test_suite();

MODULE_DESCRIPTION();
MODULE_LICENSE();