| 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | /* |
| 3 | * mctp-usb.h - MCTP USB transport binding: common definitions, |
| 4 | * based on DMTF0283 specification: |
| 5 | * https://www.dmtf.org/sites/default/files/standards/documents/DSP0283_1.0.1.pdf |
| 6 | * |
| 7 | * These are protocol-level definitions, that may be shared between host |
| 8 | * and gadget drivers. |
| 9 | * |
| 10 | * Copyright (C) 2024-2025 Code Construct Pty Ltd |
| 11 | */ |
| 12 | |
| 13 | #ifndef __LINUX_USB_MCTP_USB_H |
| 14 | #define __LINUX_USB_MCTP_USB_H |
| 15 | |
| 16 | #include <linux/types.h> |
| 17 | |
| 18 | struct mctp_usb_hdr { |
| 19 | __be16 id; |
| 20 | u8 rsvd; |
| 21 | u8 len; |
| 22 | } __packed; |
| 23 | |
| 24 | #define MCTP_USB_XFER_SIZE 512 |
| 25 | #define MCTP_USB_BTU 68 |
| 26 | #define MCTP_USB_MTU_MIN MCTP_USB_BTU |
| 27 | #define MCTP_USB_MTU_MAX (U8_MAX - sizeof(struct mctp_usb_hdr)) |
| 28 | #define MCTP_USB_DMTF_ID 0x1ab4 |
| 29 | |
| 30 | #endif /* __LINUX_USB_MCTP_USB_H */ |
| 31 | |