Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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/20240729134631.127189-4-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>

+4 -2
+3 -1
drivers/firewire/core-cdev.c
··· 37 37 #include "core.h" 38 38 #include <trace/events/firewire.h> 39 39 40 + #include "packet-header-definitions.h" 41 + 40 42 /* 41 43 * ABI version history is documented in linux/firewire-cdev.h. 42 44 */ ··· 1637 1635 e->client = client; 1638 1636 e->p.speed = SCODE_100; 1639 1637 e->p.generation = a->generation; 1640 - e->p.header[0] = TCODE_LINK_INTERNAL << 4; 1638 + async_header_set_tcode(e->p.header, TCODE_LINK_INTERNAL); 1641 1639 e->p.header[1] = a->data[0]; 1642 1640 e->p.header[2] = a->data[1]; 1643 1641 e->p.header_length = 12;
+1 -1
drivers/firewire/core-transaction.c
··· 464 464 465 465 static struct fw_packet phy_config_packet = { 466 466 .header_length = 12, 467 - .header[0] = TCODE_LINK_INTERNAL << 4, 468 467 .payload_length = 0, 469 468 .speed = SCODE_100, 470 469 .callback = transmit_phy_packet_callback, ··· 496 497 497 498 mutex_lock(&phy_config_mutex); 498 499 500 + async_header_set_tcode(phy_config_packet.header, TCODE_LINK_INTERNAL); 499 501 phy_config_packet.header[1] = data; 500 502 phy_config_packet.header[2] = ~data; 501 503 phy_config_packet.generation = generation;