1 /* SPDX-License-Identifier: GPL-2.0 */
3 * IBM System z PNET ID Support
5 * Copyright IBM Corp. 2018
8 #ifndef _ASM_S390_PNET_H
9 #define _ASM_S390_PNET_H
11 #include <linux/device.h>
12 #include <linux/types.h>
14 #define PNETIDS_LEN 64 /* Total utility string length in bytes
15 * to cover up to 4 PNETIDs of 16 bytes
16 * for up to 4 device ports
18 #define MAX_PNETID_LEN 16 /* Max.length of a single port PNETID */
19 #define MAX_PNETID_PORTS (PNETIDS_LEN / MAX_PNETID_LEN)
20 /* Max. # of ports with a PNETID */
22 int pnet_id_by_dev_port(struct device *dev, unsigned short port, u8 *pnetid);
23 #endif /* _ASM_S390_PNET_H */