pnet.h 642 B

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