blob: 6e278584f8f1d19a4710a7cea852599c9e1d6e24 [file] [log] [blame]
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00001/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * IBM System z PNET ID Support
4 *
5 * Copyright IBM Corp. 2018
6 */
7
8#ifndef _ASM_S390_PNET_H
9#define _ASM_S390_PNET_H
10
11#include <linux/device.h>
12#include <linux/types.h>
13
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
17 */
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 */
21
22int pnet_id_by_dev_port(struct device *dev, unsigned short port, u8 *pnetid);
23#endif /* _ASM_S390_PNET_H */