^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * Copyright IBM Corp. 2020
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * Author(s): Alexandra Winter <wintera@linux.ibm.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) * Interface for Channel Subsystem Call
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #ifndef _ASM_S390_CHSC_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #define _ASM_S390_CHSC_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #include <uapi/asm/chsc.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) * Operation codes for CHSC PNSO:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) * PNSO_OC_NET_BRIDGE_INFO - only addresses that are visible to a bridgeport
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) * PNSO_OC_NET_ADDR_INFO - all addresses
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #define PNSO_OC_NET_BRIDGE_INFO 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) #define PNSO_OC_NET_ADDR_INFO 3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) * struct chsc_pnso_naid_l2 - network address information descriptor
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) * @nit: Network interface token
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) * @addr_lnid: network address and logical network id (VLAN ID)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) struct chsc_pnso_naid_l2 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) u64 nit;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) struct { u8 mac[6]; u16 lnid; } addr_lnid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) struct chsc_pnso_resume_token {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) u64 t1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) u64 t2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) struct chsc_pnso_naihdr {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) struct chsc_pnso_resume_token resume_token;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) u32:32;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) u32 instance;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) u32:24;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) u8 naids;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) u32 reserved[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) struct chsc_pnso_area {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) struct chsc_header request;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) u8:2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) u8 m:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) u8:5;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) u8:2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) u8 ssid:2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) u8 fmt:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) u16 sch;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) u8:8;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) u8 cssid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) u16:16;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) u8 oc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) u32:24;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) struct chsc_pnso_resume_token resume_token;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) u32 n:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) u32:31;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) u32 reserved[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) struct chsc_header response;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) u32:32;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) struct chsc_pnso_naihdr naihdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) struct chsc_pnso_naid_l2 entries[0];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) } __packed __aligned(PAGE_SIZE);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) #endif /* _ASM_S390_CHSC_H */