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: ohci: use TCODE_LINK_INTERNAL consistently

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

+4 -6
+4 -5
drivers/firewire/ohci.c
··· 264 264 #define OHCI1394_REGISTER_SIZE 0x800 265 265 #define OHCI1394_PCI_HCI_Control 0x40 266 266 #define SELF_ID_BUF_SIZE 0x800 267 - #define OHCI_TCODE_PHY_PACKET 0x0e 268 267 #define OHCI_VERSION_1_1 0x010010 269 268 270 269 static char ohci_driver_name[] = KBUILD_MODNAME; ··· 585 586 ohci_notice(ohci, "A%c %s, %s\n", 586 587 dir, evts[evt], tcodes[tcode]); 587 588 break; 588 - case 0xe: 589 + case TCODE_LINK_INTERNAL: 589 590 ohci_notice(ohci, "A%c %s, PHY %08x %08x\n", 590 591 dir, evts[evt], header[1], header[2]); 591 592 break; ··· 938 939 939 940 case TCODE_WRITE_RESPONSE: 940 941 case TCODE_READ_QUADLET_REQUEST: 941 - case OHCI_TCODE_PHY_PACKET: 942 + case TCODE_LINK_INTERNAL: 942 943 p.header_length = 12; 943 944 p.payload_length = 0; 944 945 break; ··· 966 967 * Several controllers, notably from NEC and VIA, forget to 967 968 * write ack_complete status at PHY packet reception. 968 969 */ 969 - if (evt == OHCI1394_evt_no_status && tcode == OHCI1394_phy_tcode) 970 + if (evt == OHCI1394_evt_no_status && tcode == TCODE_LINK_INTERNAL) 970 971 p.ack = ACK_COMPLETE; 971 972 972 973 /* ··· 1434 1435 break; 1435 1436 1436 1437 case TCODE_LINK_INTERNAL: 1437 - header[0] = cpu_to_le32((OHCI1394_phy_tcode << 4) | 1438 + header[0] = cpu_to_le32((TCODE_LINK_INTERNAL << 4) | 1438 1439 (packet->speed << 16)); 1439 1440 header[1] = cpu_to_le32(packet->header[1]); 1440 1441 header[2] = cpu_to_le32(packet->header[2]);
-1
drivers/firewire/ohci.h
··· 153 153 #define OHCI1394_evt_unknown 0xe 154 154 #define OHCI1394_evt_flushed 0xf 155 155 156 - #define OHCI1394_phy_tcode 0xe 157 156 158 157 // Self-ID DMA. 159 158