mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 19:15:04 +07:00
b6ef86e962
s390 hardware supports the definition of a so-call Physical NETwork IDentifier (short PNETID) per network device port. These PNETIDS can be used to identify network devices that are attached to the same physical network (broadcast domain). This patch provides the interface to extract the PNETID of a port of a device attached to the ccw-bus or pci-bus. Parts of this patch are based on an initial implementation by Thomas Richter. Signed-off-by: Ursula Braun <ubraun@linux.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
24 lines
642 B
C
24 lines
642 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* IBM System z PNET ID Support
|
|
*
|
|
* Copyright IBM Corp. 2018
|
|
*/
|
|
|
|
#ifndef _ASM_S390_PNET_H
|
|
#define _ASM_S390_PNET_H
|
|
|
|
#include <linux/device.h>
|
|
#include <linux/types.h>
|
|
|
|
#define PNETIDS_LEN 64 /* Total utility string length in bytes
|
|
* to cover up to 4 PNETIDs of 16 bytes
|
|
* for up to 4 device ports
|
|
*/
|
|
#define MAX_PNETID_LEN 16 /* Max.length of a single port PNETID */
|
|
#define MAX_PNETID_PORTS (PNETIDS_LEN / MAX_PNETID_LEN)
|
|
/* Max. # of ports with a PNETID */
|
|
|
|
int pnet_id_by_dev_port(struct device *dev, unsigned short port, u8 *pnetid);
|
|
#endif /* _ASM_S390_PNET_H */
|