File s390-tools-sles15-qethqoat-add-OSA-Express7S-support.patch of Package s390-tools.10760

Subject: qethqoat: add OSA-Express7S support
From: Julian Wiedmann <jwi@linux.ibm.com>

Description:  qethqoat: add OSA-Express7S support
Symptom:      qethqoat fails to report HW generation and link speed for
              OSA-Express7S network card.
Problem:      Missing identifiers for new values in the QUERY OAT data.
Solution:     Add identifiers for card generation and link speed.
Reproduction: Run qethqoat on an OSA-Express7S, check the output for
              'OSA Generation' and 'Port speed/mode'.
Upstream-ID:  20145b6d06debd47944bff0a471d17e5eba07010
Problem-ID:   172673

Upstream-Description:

              qethqoat: add OSA-Express7S support

              Add the missing identifiers to report the card name and link speed.

              Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
              Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>


Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
---
 qethqoat/qethqoat.c |    6 ++++++
 qethqoat/qethqoat.h |    2 ++
 2 files changed, 8 insertions(+)

--- a/qethqoat/qethqoat.c
+++ b/qethqoat/qethqoat.c
@@ -208,6 +208,9 @@ static void print_physical(struct qeth_q
 	case OAT_OSA_GEN_OSAE6S:
 		osagen = "OSA-Express6S";
 		break;
+	case OAT_OSA_GEN_OSAE7S:
+		osagen = "OSA-Express7S";
+		break;
 	default:
 		sprintf(tmp, "unknown (0x%x)", phdr->osa_gen);
 		osagen = tmp;
@@ -239,6 +242,9 @@ static void print_physical(struct qeth_q
 	case OAT_PORT_SPEED_10gbs_full:
 		speed = "10 Gb/s / full duplex";
 		break;
+	case OAT_PORT_SPEED_25gbs_full:
+		speed = "25 Gb/s / full duplex";
+		break;
 	case OAT_PORT_SPEED_UNKNOWN:
 		speed = "unknown / unknown";
 		break;
--- a/qethqoat/qethqoat.h
+++ b/qethqoat/qethqoat.h
@@ -58,6 +58,7 @@ struct qeth_qoat_physical {
 #define OAT_OSA_GEN_OSAE4S 0x02
 #define OAT_OSA_GEN_OSAE5S 0x03
 #define OAT_OSA_GEN_OSAE6S 0x04
+#define OAT_OSA_GEN_OSAE7S 0x05
 	__u8 osa_gen;
 #define OAT_PORT_SPEED_UNKNOWN      0x00
 #define OAT_PORT_SPEED_10mbs_half   0x01
@@ -68,6 +69,7 @@ struct qeth_qoat_physical {
 #define OAT_PORT_SPEED_1000mbs_full 0x06
 #define OAT_PORT_SPEED_NA           0x07
 #define OAT_PORT_SPEED_10gbs_full   0x08
+#define OAT_PORT_SPEED_25gbs_full   0x0A
 	__u8 port_speed;
 #define OAT_PORT_MEDIA_COPPER      0x01
 #define OAT_PORT_MEDIA_MULTI_MODE  0x02
openSUSE Build Service is sponsored by