Skip to content

Commit b620462

Browse files
bvanasschemartinkpetersen
authored andcommitted
scsi: ufs: core: Move the tracing enumeration types into a new file
The <ufs/ufs.h> header file defines constants and data structures related to the UFS standard. Move the enumeration types related to tracing into a new header file because these are not defined in the UFS standard. An intended side effect of this patch is that the tracing enumeration types are no longer visible to UFS host drivers. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20250829153841.2201700-1-bvanassche@acm.org Reviewed-by: Avri Altman <avri.altman@sandisk.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent e02436d commit b620462

3 files changed

Lines changed: 25 additions & 17 deletions

File tree

drivers/ufs/core/ufs_trace.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
#include <ufs/ufs.h>
1313
#include <linux/tracepoint.h>
14+
#include "ufs_trace_types.h"
1415

1516
#define str_opcode(opcode) \
1617
__print_symbolic(opcode, \

drivers/ufs/core/ufs_trace_types.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/* SPDX-License-Identifier: GPL-2.0-only */
2+
#ifndef _UFS_TRACE_TYPES_H_
3+
#define _UFS_TRACE_TYPES_H_
4+
5+
enum ufs_trace_str_t {
6+
UFS_CMD_SEND,
7+
UFS_CMD_COMP,
8+
UFS_DEV_COMP,
9+
UFS_QUERY_SEND,
10+
UFS_QUERY_COMP,
11+
UFS_QUERY_ERR,
12+
UFS_TM_SEND,
13+
UFS_TM_COMP,
14+
UFS_TM_ERR
15+
};
16+
17+
enum ufs_trace_tsf_t {
18+
UFS_TSF_CDB,
19+
UFS_TSF_OSF,
20+
UFS_TSF_TM_INPUT,
21+
UFS_TSF_TM_OUTPUT
22+
};
23+
24+
#endif /* _UFS_TRACE_TYPES_H_ */

include/ufs/ufs.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -653,21 +653,4 @@ struct ufs_dev_info {
653653
bool hid_sup;
654654
};
655655

656-
/*
657-
* This enum is used in string mapping in ufs_trace.h.
658-
*/
659-
enum ufs_trace_str_t {
660-
UFS_CMD_SEND, UFS_CMD_COMP, UFS_DEV_COMP,
661-
UFS_QUERY_SEND, UFS_QUERY_COMP, UFS_QUERY_ERR,
662-
UFS_TM_SEND, UFS_TM_COMP, UFS_TM_ERR
663-
};
664-
665-
/*
666-
* Transaction Specific Fields (TSF) type in the UPIU package, this enum is
667-
* used in ufs_trace.h for UFS command trace.
668-
*/
669-
enum ufs_trace_tsf_t {
670-
UFS_TSF_CDB, UFS_TSF_OSF, UFS_TSF_TM_INPUT, UFS_TSF_TM_OUTPUT
671-
};
672-
673656
#endif /* End of Header */

0 commit comments

Comments
 (0)