-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upcoming changes will add a USB host (and later gadget) driver for the MCTP-over-USB protocol. Add a header that provides common definitions for protocol support: the packet header format and a few framing definitions. Add a define for the MCTP class code, as per https://usb.org/defined-class-codes. Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://patch.msgid.link/20250221-dev-mctp-usb-v3-1-3353030fe9cc@codeconstruct.com.au Signed-off-by: Jakub Kicinski <kuba@kernel.org>
- Loading branch information
Jeremy Kerr
authored and
Jakub Kicinski
committed
Feb 22, 2025
1 parent
e6a5321
commit dcc35ba
Showing
3 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 */ | ||
/* | ||
* mctp-usb.h - MCTP USB transport binding: common definitions, | ||
* based on DMTF0283 specification: | ||
* https://www.dmtf.org/sites/default/files/standards/documents/DSP0283_1.0.1.pdf | ||
* | ||
* These are protocol-level definitions, that may be shared between host | ||
* and gadget drivers. | ||
* | ||
* Copyright (C) 2024-2025 Code Construct Pty Ltd | ||
*/ | ||
|
||
#ifndef __LINUX_USB_MCTP_USB_H | ||
#define __LINUX_USB_MCTP_USB_H | ||
|
||
#include <linux/types.h> | ||
|
||
struct mctp_usb_hdr { | ||
__be16 id; | ||
u8 rsvd; | ||
u8 len; | ||
} __packed; | ||
|
||
#define MCTP_USB_XFER_SIZE 512 | ||
#define MCTP_USB_BTU 68 | ||
#define MCTP_USB_MTU_MIN MCTP_USB_BTU | ||
#define MCTP_USB_MTU_MAX (U8_MAX - sizeof(struct mctp_usb_hdr)) | ||
#define MCTP_USB_DMTF_ID 0x1ab4 | ||
|
||
#endif /* __LINUX_USB_MCTP_USB_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters